16 *} |
16 *} |
17 |
17 |
18 constdefs |
18 constdefs |
19 is_seminorm :: "'a::{plus, minus, zero} set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> bool" |
19 is_seminorm :: "'a::{plus, minus, zero} set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> bool" |
20 "is_seminorm V norm \<equiv> \<forall>x \<in> V. \<forall>y \<in> V. \<forall>a. |
20 "is_seminorm V norm \<equiv> \<forall>x \<in> V. \<forall>y \<in> V. \<forall>a. |
21 #0 \<le> norm x |
21 Numeral0 \<le> norm x |
22 \<and> norm (a \<cdot> x) = \<bar>a\<bar> * norm x |
22 \<and> norm (a \<cdot> x) = \<bar>a\<bar> * norm x |
23 \<and> norm (x + y) \<le> norm x + norm y" |
23 \<and> norm (x + y) \<le> norm x + norm y" |
24 |
24 |
25 lemma is_seminormI [intro]: |
25 lemma is_seminormI [intro]: |
26 "(\<And>x y a. x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> #0 \<le> norm x) \<Longrightarrow> |
26 "(\<And>x y a. x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> Numeral0 \<le> norm x) \<Longrightarrow> |
27 (\<And>x a. x \<in> V \<Longrightarrow> norm (a \<cdot> x) = \<bar>a\<bar> * norm x) \<Longrightarrow> |
27 (\<And>x a. x \<in> V \<Longrightarrow> norm (a \<cdot> x) = \<bar>a\<bar> * norm x) \<Longrightarrow> |
28 (\<And>x y. x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> norm (x + y) \<le> norm x + norm y) |
28 (\<And>x y. x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> norm (x + y) \<le> norm x + norm y) |
29 \<Longrightarrow> is_seminorm V norm" |
29 \<Longrightarrow> is_seminorm V norm" |
30 by (unfold is_seminorm_def) auto |
30 by (unfold is_seminorm_def) auto |
31 |
31 |
32 lemma seminorm_ge_zero [intro?]: |
32 lemma seminorm_ge_zero [intro?]: |
33 "is_seminorm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> #0 \<le> norm x" |
33 "is_seminorm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> Numeral0 \<le> norm x" |
34 by (unfold is_seminorm_def) blast |
34 by (unfold is_seminorm_def) blast |
35 |
35 |
36 lemma seminorm_abs_homogenous: |
36 lemma seminorm_abs_homogenous: |
37 "is_seminorm V norm \<Longrightarrow> x \<in> V |
37 "is_seminorm V norm \<Longrightarrow> x \<in> V |
38 \<Longrightarrow> norm (a \<cdot> x) = \<bar>a\<bar> * norm x" |
38 \<Longrightarrow> norm (a \<cdot> x) = \<bar>a\<bar> * norm x" |
46 lemma seminorm_diff_subadditive: |
46 lemma seminorm_diff_subadditive: |
47 "is_seminorm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> is_vectorspace V |
47 "is_seminorm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> is_vectorspace V |
48 \<Longrightarrow> norm (x - y) \<le> norm x + norm y" |
48 \<Longrightarrow> norm (x - y) \<le> norm x + norm y" |
49 proof - |
49 proof - |
50 assume "is_seminorm V norm" "x \<in> V" "y \<in> V" "is_vectorspace V" |
50 assume "is_seminorm V norm" "x \<in> V" "y \<in> V" "is_vectorspace V" |
51 have "norm (x - y) = norm (x + - #1 \<cdot> y)" |
51 have "norm (x - y) = norm (x + - Numeral1 \<cdot> y)" |
52 by (simp! add: diff_eq2 negate_eq2a) |
52 by (simp! add: diff_eq2 negate_eq2a) |
53 also have "... \<le> norm x + norm (- #1 \<cdot> y)" |
53 also have "... \<le> norm x + norm (- Numeral1 \<cdot> y)" |
54 by (simp! add: seminorm_subadditive) |
54 by (simp! add: seminorm_subadditive) |
55 also have "norm (- #1 \<cdot> y) = \<bar>- #1\<bar> * norm y" |
55 also have "norm (- Numeral1 \<cdot> y) = \<bar>- Numeral1\<bar> * norm y" |
56 by (rule seminorm_abs_homogenous) |
56 by (rule seminorm_abs_homogenous) |
57 also have "\<bar>- #1\<bar> = (#1::real)" by (rule abs_minus_one) |
57 also have "\<bar>- Numeral1\<bar> = (Numeral1::real)" by (rule abs_minus_one) |
58 finally show "norm (x - y) \<le> norm x + norm y" by simp |
58 finally show "norm (x - y) \<le> 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 \<Longrightarrow> x \<in> V \<Longrightarrow> is_vectorspace V |
62 "is_seminorm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> is_vectorspace V |
63 \<Longrightarrow> norm (- x) = norm x" |
63 \<Longrightarrow> norm (- x) = norm x" |
64 proof - |
64 proof - |
65 assume "is_seminorm V norm" "x \<in> V" "is_vectorspace V" |
65 assume "is_seminorm V norm" "x \<in> V" "is_vectorspace V" |
66 have "norm (- x) = norm (- #1 \<cdot> x)" by (simp! only: negate_eq1) |
66 have "norm (- x) = norm (- Numeral1 \<cdot> x)" by (simp! only: negate_eq1) |
67 also have "... = \<bar>- #1\<bar> * norm x" |
67 also have "... = \<bar>- Numeral1\<bar> * norm x" |
68 by (rule seminorm_abs_homogenous) |
68 by (rule seminorm_abs_homogenous) |
69 also have "\<bar>- #1\<bar> = (#1::real)" by (rule abs_minus_one) |
69 also have "\<bar>- Numeral1\<bar> = (Numeral1::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 *} |
79 *} |
79 *} |
80 |
80 |
81 constdefs |
81 constdefs |
82 is_norm :: "'a::{plus, minus, zero} set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> bool" |
82 is_norm :: "'a::{plus, minus, zero} set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> bool" |
83 "is_norm V norm \<equiv> \<forall>x \<in> V. is_seminorm V norm |
83 "is_norm V norm \<equiv> \<forall>x \<in> V. is_seminorm V norm |
84 \<and> (norm x = #0) = (x = 0)" |
84 \<and> (norm x = Numeral0) = (x = 0)" |
85 |
85 |
86 lemma is_normI [intro]: |
86 lemma is_normI [intro]: |
87 "\<forall>x \<in> V. is_seminorm V norm \<and> (norm x = #0) = (x = 0) |
87 "\<forall>x \<in> V. is_seminorm V norm \<and> (norm x = Numeral0) = (x = 0) |
88 \<Longrightarrow> is_norm V norm" by (simp only: is_norm_def) |
88 \<Longrightarrow> is_norm V norm" by (simp only: is_norm_def) |
89 |
89 |
90 lemma norm_is_seminorm [intro?]: |
90 lemma norm_is_seminorm [intro?]: |
91 "is_norm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> is_seminorm V norm" |
91 "is_norm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> is_seminorm V norm" |
92 by (unfold is_norm_def) blast |
92 by (unfold is_norm_def) blast |
93 |
93 |
94 lemma norm_zero_iff: |
94 lemma norm_zero_iff: |
95 "is_norm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> (norm x = #0) = (x = 0)" |
95 "is_norm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> (norm x = Numeral0) = (x = 0)" |
96 by (unfold is_norm_def) blast |
96 by (unfold is_norm_def) blast |
97 |
97 |
98 lemma norm_ge_zero [intro?]: |
98 lemma norm_ge_zero [intro?]: |
99 "is_norm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> #0 \<le> norm x" |
99 "is_norm V norm \<Longrightarrow> x \<in> V \<Longrightarrow> Numeral0 \<le> norm x" |
100 by (unfold is_norm_def is_seminorm_def) blast |
100 by (unfold is_norm_def is_seminorm_def) blast |
101 |
101 |
102 |
102 |
103 subsection {* Normed vector spaces *} |
103 subsection {* Normed vector spaces *} |
104 |
104 |
123 lemma normed_vs_norm [intro?]: |
123 lemma normed_vs_norm [intro?]: |
124 "is_normed_vectorspace V norm \<Longrightarrow> is_norm V norm" |
124 "is_normed_vectorspace V norm \<Longrightarrow> is_norm V norm" |
125 by (unfold is_normed_vectorspace_def) blast |
125 by (unfold is_normed_vectorspace_def) blast |
126 |
126 |
127 lemma normed_vs_norm_ge_zero [intro?]: |
127 lemma normed_vs_norm_ge_zero [intro?]: |
128 "is_normed_vectorspace V norm \<Longrightarrow> x \<in> V \<Longrightarrow> #0 \<le> norm x" |
128 "is_normed_vectorspace V norm \<Longrightarrow> x \<in> V \<Longrightarrow> Numeral0 \<le> norm x" |
129 by (unfold is_normed_vectorspace_def) (fast elim: norm_ge_zero) |
129 by (unfold is_normed_vectorspace_def) (fast elim: norm_ge_zero) |
130 |
130 |
131 lemma normed_vs_norm_gt_zero [intro?]: |
131 lemma normed_vs_norm_gt_zero [intro?]: |
132 "is_normed_vectorspace V norm \<Longrightarrow> x \<in> V \<Longrightarrow> x \<noteq> 0 \<Longrightarrow> #0 < norm x" |
132 "is_normed_vectorspace V norm \<Longrightarrow> x \<in> V \<Longrightarrow> x \<noteq> 0 \<Longrightarrow> Numeral0 < norm x" |
133 proof (unfold is_normed_vectorspace_def, elim conjE) |
133 proof (unfold is_normed_vectorspace_def, elim conjE) |
134 assume "x \<in> V" "x \<noteq> 0" "is_vectorspace V" "is_norm V norm" |
134 assume "x \<in> V" "x \<noteq> 0" "is_vectorspace V" "is_norm V norm" |
135 have "#0 \<le> norm x" .. |
135 have "Numeral0 \<le> norm x" .. |
136 also have "#0 \<noteq> norm x" |
136 also have "Numeral0 \<noteq> norm x" |
137 proof |
137 proof |
138 presume "norm x = #0" |
138 presume "norm x = Numeral0" |
139 also have "?this = (x = 0)" by (rule norm_zero_iff) |
139 also have "?this = (x = 0)" by (rule norm_zero_iff) |
140 finally have "x = 0" . |
140 finally have "x = 0" . |
141 thus "False" by contradiction |
141 thus "False" by contradiction |
142 qed (rule sym) |
142 qed (rule sym) |
143 finally show "#0 < norm x" . |
143 finally show "Numeral0 < norm x" . |
144 qed |
144 qed |
145 |
145 |
146 lemma normed_vs_norm_abs_homogenous [intro?]: |
146 lemma normed_vs_norm_abs_homogenous [intro?]: |
147 "is_normed_vectorspace V norm \<Longrightarrow> x \<in> V |
147 "is_normed_vectorspace V norm \<Longrightarrow> x \<in> V |
148 \<Longrightarrow> norm (a \<cdot> x) = \<bar>a\<bar> * norm x" |
148 \<Longrightarrow> norm (a \<cdot> x) = \<bar>a\<bar> * norm x" |
168 show "is_norm F norm" |
168 show "is_norm F norm" |
169 proof (intro is_normI ballI conjI) |
169 proof (intro is_normI ballI conjI) |
170 show "is_seminorm F norm" |
170 show "is_seminorm F norm" |
171 proof |
171 proof |
172 fix x y a presume "x \<in> E" |
172 fix x y a presume "x \<in> E" |
173 show "#0 \<le> norm x" .. |
173 show "Numeral0 \<le> norm x" .. |
174 show "norm (a \<cdot> x) = \<bar>a\<bar> * norm x" .. |
174 show "norm (a \<cdot> x) = \<bar>a\<bar> * norm x" .. |
175 presume "y \<in> E" |
175 presume "y \<in> E" |
176 show "norm (x + y) \<le> norm x + norm y" .. |
176 show "norm (x + y) \<le> norm x + norm y" .. |
177 qed (simp!)+ |
177 qed (simp!)+ |
178 |
178 |
179 fix x assume "x \<in> F" |
179 fix x assume "x \<in> F" |
180 show "(norm x = #0) = (x = 0)" |
180 show "(norm x = Numeral0) = (x = 0)" |
181 proof (rule norm_zero_iff) |
181 proof (rule norm_zero_iff) |
182 show "is_norm E norm" .. |
182 show "is_norm E norm" .. |
183 qed (simp!) |
183 qed (simp!) |
184 qed |
184 qed |
185 qed |
185 qed |