1 (* Title: HOL/Real/HahnBanach/NormedSpace.thy
3 Author: Gertrud Bauer, TU Munich
6 header {* Normed vector spaces *}
8 theory NormedSpace = Subspace:
11 abs :: "real \<Rightarrow> real" ("|_|")
13 subsection {* Quasinorms *}
15 text{* A \emph{seminorm} $\norm{\cdot}$ is a function on a real vector
16 space into the reals that has the following properties: It is positive
17 definite, absolute homogenous and subadditive. *}
20 is_seminorm :: "['a::{plus, minus, zero} set, 'a => real] => bool"
21 "is_seminorm V norm == \<forall>x \<in> V. \<forall>y \<in> V. \<forall>a.
23 \<and> norm (a \<cdot> x) = |a| * norm x
24 \<and> norm (x + y) <= norm x + norm y"
26 lemma is_seminormI [intro]:
27 "[| !! x y a. [| x \<in> V; y \<in> V|] ==> #0 <= norm x;
28 !! x a. x \<in> V ==> norm (a \<cdot> x) = |a| * norm x;
29 !! x y. [|x \<in> V; y \<in> V |] ==> norm (x + y) <= norm x + norm y |]
30 ==> is_seminorm V norm"
31 by (unfold is_seminorm_def, force)
33 lemma seminorm_ge_zero [intro?]:
34 "[| is_seminorm V norm; x \<in> V |] ==> #0 <= norm x"
35 by (unfold is_seminorm_def, force)
37 lemma seminorm_abs_homogenous:
38 "[| is_seminorm V norm; x \<in> V |]
39 ==> norm (a \<cdot> x) = |a| * norm x"
40 by (unfold is_seminorm_def, force)
42 lemma seminorm_subadditive:
43 "[| is_seminorm V norm; x \<in> V; y \<in> V |]
44 ==> norm (x + y) <= norm x + norm y"
45 by (unfold is_seminorm_def, force)
47 lemma seminorm_diff_subadditive:
48 "[| is_seminorm V norm; x \<in> V; y \<in> V; is_vectorspace V |]
49 ==> norm (x - y) <= norm x + norm y"
51 assume "is_seminorm V norm" "x \<in> V" "y \<in> V" "is_vectorspace V"
52 have "norm (x - y) = norm (x + - #1 \<cdot> y)"
53 by (simp! add: diff_eq2 negate_eq2a)
54 also have "... <= norm x + norm (- #1 \<cdot> y)"
55 by (simp! add: seminorm_subadditive)
56 also have "norm (- #1 \<cdot> y) = |- #1| * norm y"
57 by (rule seminorm_abs_homogenous)
58 also have "|- #1| = (#1::real)" by (rule abs_minus_one)
59 finally show "norm (x - y) <= norm x + norm y" by simp
63 "[| is_seminorm V norm; x \<in> V; is_vectorspace V |]
64 ==> norm (- x) = norm x"
66 assume "is_seminorm V norm" "x \<in> V" "is_vectorspace V"
67 have "norm (- x) = norm (- #1 \<cdot> x)" by (simp! only: negate_eq1)
68 also have "... = |- #1| * norm x"
69 by (rule seminorm_abs_homogenous)
70 also have "|- #1| = (#1::real)" by (rule abs_minus_one)
71 finally show "norm (- x) = norm x" by simp
75 subsection {* Norms *}
77 text{* A \emph{norm} $\norm{\cdot}$ is a seminorm that maps only the
78 $\zero$ vector to $0$. *}
81 is_norm :: "['a::{plus, minus, zero} set, 'a => real] => bool"
82 "is_norm V norm == \<forall>x \<in> V. is_seminorm V norm
83 \<and> (norm x = #0) = (x = 0)"
85 lemma is_normI [intro]:
86 "\<forall>x \<in> V. is_seminorm V norm \<and> (norm x = #0) = (x = 0)
87 ==> is_norm V norm" by (simp only: is_norm_def)
89 lemma norm_is_seminorm [intro?]:
90 "[| is_norm V norm; x \<in> V |] ==> is_seminorm V norm"
91 by (unfold is_norm_def, force)
94 "[| is_norm V norm; x \<in> V |] ==> (norm x = #0) = (x = 0)"
95 by (unfold is_norm_def, force)
97 lemma norm_ge_zero [intro?]:
98 "[|is_norm V norm; x \<in> V |] ==> #0 <= norm x"
99 by (unfold is_norm_def is_seminorm_def, force)
102 subsection {* Normed vector spaces *}
104 text{* A vector space together with a norm is called
105 a \emph{normed space}. *}
108 is_normed_vectorspace ::
109 "['a::{plus, minus, zero} set, 'a => real] => bool"
110 "is_normed_vectorspace V norm ==
111 is_vectorspace V \<and> is_norm V norm"
113 lemma normed_vsI [intro]:
114 "[| is_vectorspace V; is_norm V norm |]
115 ==> is_normed_vectorspace V norm"
116 by (unfold is_normed_vectorspace_def) blast
118 lemma normed_vs_vs [intro?]:
119 "is_normed_vectorspace V norm ==> is_vectorspace V"
120 by (unfold is_normed_vectorspace_def) force
122 lemma normed_vs_norm [intro?]:
123 "is_normed_vectorspace V norm ==> is_norm V norm"
124 by (unfold is_normed_vectorspace_def, elim conjE)
126 lemma normed_vs_norm_ge_zero [intro?]:
127 "[| is_normed_vectorspace V norm; x \<in> V |] ==> #0 <= norm x"
128 by (unfold is_normed_vectorspace_def, rule, elim conjE)
130 lemma normed_vs_norm_gt_zero [intro?]:
131 "[| is_normed_vectorspace V norm; x \<in> V; x \<noteq> 0 |] ==> #0 < norm x"
132 proof (unfold is_normed_vectorspace_def, elim conjE)
133 assume "x \<in> V" "x \<noteq> 0" "is_vectorspace V" "is_norm V norm"
134 have "#0 <= norm x" ..
135 also have "#0 \<noteq> norm x"
137 presume "norm x = #0"
138 also have "?this = (x = 0)" by (rule norm_zero_iff)
139 finally have "x = 0" .
140 thus "False" by contradiction
142 finally show "#0 < norm x" .
145 lemma normed_vs_norm_abs_homogenous [intro?]:
146 "[| is_normed_vectorspace V norm; x \<in> V |]
147 ==> norm (a \<cdot> x) = |a| * norm x"
148 by (rule seminorm_abs_homogenous, rule norm_is_seminorm,
151 lemma normed_vs_norm_subadditive [intro?]:
152 "[| is_normed_vectorspace V norm; x \<in> V; y \<in> V |]
153 ==> norm (x + y) <= norm x + norm y"
154 by (rule seminorm_subadditive, rule norm_is_seminorm,
157 text{* Any subspace of a normed vector space is again a
158 normed vectorspace.*}
160 lemma subspace_normed_vs [intro?]:
161 "[| is_vectorspace E; is_subspace F E;
162 is_normed_vectorspace E norm |] ==> is_normed_vectorspace F norm"
163 proof (rule normed_vsI)
164 assume "is_subspace F E" "is_vectorspace E"
165 "is_normed_vectorspace E norm"
166 show "is_vectorspace F" ..
167 show "is_norm F norm"
168 proof (intro is_normI ballI conjI)
169 show "is_seminorm F norm"
171 fix x y a presume "x \<in> E"
172 show "#0 <= norm x" ..
173 show "norm (a \<cdot> x) = |a| * norm x" ..
175 show "norm (x + y) <= norm x + norm y" ..
178 fix x assume "x \<in> F"
179 show "(norm x = #0) = (x = 0)"
180 proof (rule norm_zero_iff)
181 show "is_norm E norm" ..