16 definite, absolute homogenous and subadditive. *}; |
16 definite, absolute homogenous and subadditive. *}; |
17 |
17 |
18 constdefs |
18 constdefs |
19 is_seminorm :: "['a::{plus, minus} set, 'a => real] => bool" |
19 is_seminorm :: "['a::{plus, minus} set, 'a => real] => bool" |
20 "is_seminorm V norm == ALL x: V. ALL y:V. ALL a. |
20 "is_seminorm V norm == ALL x: V. ALL y:V. ALL a. |
21 0r <= norm x |
21 (#0::real) <= norm x |
22 & norm (a (*) x) = (abs a) * (norm x) |
22 & norm (a (*) x) = (abs a) * (norm x) |
23 & norm (x + y) <= norm x + norm y"; |
23 & norm (x + y) <= norm x + norm y"; |
24 |
24 |
25 lemma is_seminormI [intro]: |
25 lemma is_seminormI [intro]: |
26 "[| !! x y a. [| x:V; y:V|] ==> 0r <= norm x; |
26 "[| !! x y a. [| x:V; y:V|] ==> (#0::real) <= norm x; |
27 !! x a. x:V ==> norm (a (*) x) = (abs a) * (norm x); |
27 !! x a. x:V ==> norm (a (*) x) = (abs a) * (norm x); |
28 !! x y. [|x:V; y:V |] ==> norm (x + y) <= norm x + norm y |] |
28 !! x y. [|x:V; y:V |] ==> norm (x + y) <= norm x + norm y |] |
29 ==> is_seminorm V norm"; |
29 ==> is_seminorm V norm"; |
30 by (unfold is_seminorm_def, force); |
30 by (unfold is_seminorm_def, force); |
31 |
31 |
32 lemma seminorm_ge_zero [intro??]: |
32 lemma seminorm_ge_zero [intro??]: |
33 "[| is_seminorm V norm; x:V |] ==> 0r <= norm x"; |
33 "[| is_seminorm V norm; x:V |] ==> (#0::real) <= norm x"; |
34 by (unfold is_seminorm_def, force); |
34 by (unfold is_seminorm_def, force); |
35 |
35 |
36 lemma seminorm_abs_homogenous: |
36 lemma seminorm_abs_homogenous: |
37 "[| is_seminorm V norm; x:V |] |
37 "[| is_seminorm V norm; x:V |] |
38 ==> norm (a (*) x) = (abs a) * (norm x)"; |
38 ==> norm (a (*) x) = (abs a) * (norm x)"; |
46 lemma seminorm_diff_subadditive: |
46 lemma seminorm_diff_subadditive: |
47 "[| is_seminorm V norm; x:V; y:V; is_vectorspace V |] |
47 "[| is_seminorm V norm; x:V; y:V; is_vectorspace V |] |
48 ==> norm (x - y) <= norm x + norm y"; |
48 ==> norm (x - y) <= norm x + norm y"; |
49 proof -; |
49 proof -; |
50 assume "is_seminorm V norm" "x:V" "y:V" "is_vectorspace V"; |
50 assume "is_seminorm V norm" "x:V" "y:V" "is_vectorspace V"; |
51 have "norm (x - y) = norm (x + - 1r (*) y)"; |
51 have "norm (x - y) = norm (x + - (#1::real) (*) y)"; |
52 by (simp! add: diff_eq2 negate_eq2); |
52 by (simp! add: diff_eq2 negate_eq2a); |
53 also; have "... <= norm x + norm (- 1r (*) y)"; |
53 also; have "... <= norm x + norm (- (#1::real) (*) y)"; |
54 by (simp! add: seminorm_subadditive); |
54 by (simp! add: seminorm_subadditive); |
55 also; have "norm (- 1r (*) y) = abs (- 1r) * norm y"; |
55 also; have "norm (- (#1::real) (*) y) = abs (- (#1::real)) * norm y"; |
56 by (rule seminorm_abs_homogenous); |
56 by (rule seminorm_abs_homogenous); |
57 also; have "abs (- 1r) = 1r"; by (rule abs_minus_one); |
57 also; have "abs (- (#1::real)) = (#1::real)"; by (rule abs_minus_one); |
58 finally; show "norm (x - y) <= norm x + norm y"; by simp; |
58 finally; show "norm (x - y) <= norm x + norm y"; by simp; |
59 qed; |
59 qed; |
60 |
60 |
61 lemma seminorm_minus: |
61 lemma seminorm_minus: |
62 "[| is_seminorm V norm; x:V; is_vectorspace V |] |
62 "[| is_seminorm V norm; x:V; is_vectorspace V |] |
63 ==> norm (- x) = norm x"; |
63 ==> norm (- x) = norm x"; |
64 proof -; |
64 proof -; |
65 assume "is_seminorm V norm" "x:V" "is_vectorspace V"; |
65 assume "is_seminorm V norm" "x:V" "is_vectorspace V"; |
66 have "norm (- x) = norm (- 1r (*) x)"; by (simp! only: negate_eq1); |
66 have "norm (- x) = norm (- (#1::real) (*) x)"; by (simp! only: negate_eq1); |
67 also; have "... = abs (- 1r) * norm x"; |
67 also; have "... = abs (- (#1::real)) * norm x"; |
68 by (rule seminorm_abs_homogenous); |
68 by (rule seminorm_abs_homogenous); |
69 also; have "abs (- 1r) = 1r"; by (rule abs_minus_one); |
69 also; have "abs (- (#1::real)) = (#1::real)"; by (rule abs_minus_one); |
70 finally; show "norm (- x) = norm x"; by simp; |
70 finally; show "norm (- x) = norm x"; by simp; |
71 qed; |
71 qed; |
72 |
72 |
73 |
73 |
74 subsection {* Norms *}; |
74 subsection {* Norms *}; |
77 $\zero$ vector to $0$. *}; |
77 $\zero$ vector to $0$. *}; |
78 |
78 |
79 constdefs |
79 constdefs |
80 is_norm :: "['a::{minus, plus} set, 'a => real] => bool" |
80 is_norm :: "['a::{minus, plus} set, 'a => real] => bool" |
81 "is_norm V norm == ALL x: V. is_seminorm V norm |
81 "is_norm V norm == ALL x: V. is_seminorm V norm |
82 & (norm x = 0r) = (x = 00)"; |
82 & (norm x = (#0::real)) = (x = 00)"; |
83 |
83 |
84 lemma is_normI [intro]: |
84 lemma is_normI [intro]: |
85 "ALL x: V. is_seminorm V norm & (norm x = 0r) = (x = 00) |
85 "ALL x: V. is_seminorm V norm & (norm x = (#0::real)) = (x = 00) |
86 ==> is_norm V norm"; by (simp only: is_norm_def); |
86 ==> is_norm V norm"; by (simp only: is_norm_def); |
87 |
87 |
88 lemma norm_is_seminorm [intro??]: |
88 lemma norm_is_seminorm [intro??]: |
89 "[| is_norm V norm; x:V |] ==> is_seminorm V norm"; |
89 "[| is_norm V norm; x:V |] ==> is_seminorm V norm"; |
90 by (unfold is_norm_def, force); |
90 by (unfold is_norm_def, force); |
91 |
91 |
92 lemma norm_zero_iff: |
92 lemma norm_zero_iff: |
93 "[| is_norm V norm; x:V |] ==> (norm x = 0r) = (x = 00)"; |
93 "[| is_norm V norm; x:V |] ==> (norm x = (#0::real)) = (x = 00)"; |
94 by (unfold is_norm_def, force); |
94 by (unfold is_norm_def, force); |
95 |
95 |
96 lemma norm_ge_zero [intro??]: |
96 lemma norm_ge_zero [intro??]: |
97 "[|is_norm V norm; x:V |] ==> 0r <= norm x"; |
97 "[|is_norm V norm; x:V |] ==> (#0::real) <= norm x"; |
98 by (unfold is_norm_def is_seminorm_def, force); |
98 by (unfold is_norm_def is_seminorm_def, force); |
99 |
99 |
100 |
100 |
101 subsection {* Normed vector spaces *}; |
101 subsection {* Normed vector spaces *}; |
102 |
102 |
122 lemma normed_vs_norm [intro??]: |
122 lemma normed_vs_norm [intro??]: |
123 "is_normed_vectorspace V norm ==> is_norm V norm"; |
123 "is_normed_vectorspace V norm ==> is_norm V norm"; |
124 by (unfold is_normed_vectorspace_def, elim conjE); |
124 by (unfold is_normed_vectorspace_def, elim conjE); |
125 |
125 |
126 lemma normed_vs_norm_ge_zero [intro??]: |
126 lemma normed_vs_norm_ge_zero [intro??]: |
127 "[| is_normed_vectorspace V norm; x:V |] ==> 0r <= norm x"; |
127 "[| is_normed_vectorspace V norm; x:V |] ==> (#0::real) <= norm x"; |
128 by (unfold is_normed_vectorspace_def, rule, elim conjE); |
128 by (unfold is_normed_vectorspace_def, rule, elim conjE); |
129 |
129 |
130 lemma normed_vs_norm_gt_zero [intro??]: |
130 lemma normed_vs_norm_gt_zero [intro??]: |
131 "[| is_normed_vectorspace V norm; x:V; x ~= 00 |] ==> 0r < norm x"; |
131 "[| is_normed_vectorspace V norm; x:V; x ~= 00 |] ==> (#0::real) < norm x"; |
132 proof (unfold is_normed_vectorspace_def, elim conjE); |
132 proof (unfold is_normed_vectorspace_def, elim conjE); |
133 assume "x : V" "x ~= 00" "is_vectorspace V" "is_norm V norm"; |
133 assume "x : V" "x ~= 00" "is_vectorspace V" "is_norm V norm"; |
134 have "0r <= norm x"; ..; |
134 have "(#0::real) <= norm x"; ..; |
135 also; have "0r ~= norm x"; |
135 also; have "(#0::real) ~= norm x"; |
136 proof; |
136 proof; |
137 presume "norm x = 0r"; |
137 presume "norm x = (#0::real)"; |
138 also; have "?this = (x = 00)"; by (rule norm_zero_iff); |
138 also; have "?this = (x = 00)"; by (rule norm_zero_iff); |
139 finally; have "x = 00"; .; |
139 finally; have "x = 00"; .; |
140 thus "False"; by contradiction; |
140 thus "False"; by contradiction; |
141 qed (rule sym); |
141 qed (rule sym); |
142 finally; show "0r < norm x"; .; |
142 finally; show "(#0::real) < norm x"; .; |
143 qed; |
143 qed; |
144 |
144 |
145 lemma normed_vs_norm_abs_homogenous [intro??]: |
145 lemma normed_vs_norm_abs_homogenous [intro??]: |
146 "[| is_normed_vectorspace V norm; x:V |] |
146 "[| is_normed_vectorspace V norm; x:V |] |
147 ==> norm (a (*) x) = (abs a) * (norm x)"; |
147 ==> norm (a (*) x) = (abs a) * (norm x)"; |
167 show "is_norm F norm"; |
167 show "is_norm F norm"; |
168 proof (intro is_normI ballI conjI); |
168 proof (intro is_normI ballI conjI); |
169 show "is_seminorm F norm"; |
169 show "is_seminorm F norm"; |
170 proof; |
170 proof; |
171 fix x y a; presume "x : E"; |
171 fix x y a; presume "x : E"; |
172 show "0r <= norm x"; ..; |
172 show "(#0::real) <= norm x"; ..; |
173 show "norm (a (*) x) = abs a * norm x"; ..; |
173 show "norm (a (*) x) = abs a * norm x"; ..; |
174 presume "y : E"; |
174 presume "y : E"; |
175 show "norm (x + y) <= norm x + norm y"; ..; |
175 show "norm (x + y) <= norm x + norm y"; ..; |
176 qed (simp!)+; |
176 qed (simp!)+; |
177 |
177 |
178 fix x; assume "x : F"; |
178 fix x; assume "x : F"; |
179 show "(norm x = 0r) = (x = 00)"; |
179 show "(norm x = (#0::real)) = (x = 00)"; |
180 proof (rule norm_zero_iff); |
180 proof (rule norm_zero_iff); |
181 show "is_norm E norm"; ..; |
181 show "is_norm E norm"; ..; |
182 qed (simp!); |
182 qed (simp!); |
183 qed; |
183 qed; |
184 qed; |
184 qed; |