author | wenzelm |
Mon, 03 Feb 2025 20:22:51 +0100 | |
changeset 82073 | 879be333e939 |
parent 81464 | 2575f1bd226b |
permissions | -rw-r--r-- |
31795
be3e1cc5005c
standard naming conventions for session and theories;
wenzelm
parents:
30729
diff
changeset
|
1 |
(* Title: HOL/Hahn_Banach/Subspace.thy |
7566 | 2 |
Author: Gertrud Bauer, TU Munich |
3 |
*) |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
4 |
|
58889 | 5 |
section \<open>Subspaces\<close> |
7808 | 6 |
|
27612 | 7 |
theory Subspace |
66453
cc19f7ca2ed6
session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
wenzelm
parents:
63910
diff
changeset
|
8 |
imports Vector_Space "HOL-Library.Set_Algebras" |
27612 | 9 |
begin |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
10 |
|
58744 | 11 |
subsection \<open>Definition\<close> |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
12 |
|
58744 | 13 |
text \<open> |
61540 | 14 |
A non-empty subset \<open>U\<close> of a vector space \<open>V\<close> is a \<^emph>\<open>subspace\<close> of \<open>V\<close>, iff |
15 |
\<open>U\<close> is closed under addition and scalar multiplication. |
|
58744 | 16 |
\<close> |
7917 | 17 |
|
29234 | 18 |
locale subspace = |
61076 | 19 |
fixes U :: "'a::{minus, plus, zero, uminus} set" and V |
13515 | 20 |
assumes non_empty [iff, intro]: "U \<noteq> {}" |
21 |
and subset [iff]: "U \<subseteq> V" |
|
22 |
and add_closed [iff]: "x \<in> U \<Longrightarrow> y \<in> U \<Longrightarrow> x + y \<in> U" |
|
23 |
and mult_closed [iff]: "x \<in> U \<Longrightarrow> a \<cdot> x \<in> U" |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
24 |
|
21210 | 25 |
notation (symbols) |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
66453
diff
changeset
|
26 |
subspace (infix \<open>\<unlhd>\<close> 50) |
14254
342634f38451
Isar/Locales: <loc>.intro and <loc>.axioms no longer intro? and elim? by
ballarin
parents:
13547
diff
changeset
|
27 |
|
19736 | 28 |
declare vectorspace.intro [intro?] subspace.intro [intro?] |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
29 |
|
13515 | 30 |
lemma subspace_subset [elim]: "U \<unlhd> V \<Longrightarrow> U \<subseteq> V" |
31 |
by (rule subspace.subset) |
|
7566 | 32 |
|
13515 | 33 |
lemma (in subspace) subsetD [iff]: "x \<in> U \<Longrightarrow> x \<in> V" |
34 |
using subset by blast |
|
7566 | 35 |
|
13515 | 36 |
lemma subspaceD [elim]: "U \<unlhd> V \<Longrightarrow> x \<in> U \<Longrightarrow> x \<in> V" |
37 |
by (rule subspace.subsetD) |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
38 |
|
13515 | 39 |
lemma rev_subspaceD [elim?]: "x \<in> U \<Longrightarrow> U \<unlhd> V \<Longrightarrow> x \<in> V" |
40 |
by (rule subspace.subsetD) |
|
41 |
||
13547 | 42 |
lemma (in subspace) diff_closed [iff]: |
27611 | 43 |
assumes "vectorspace V" |
27612 | 44 |
assumes x: "x \<in> U" and y: "y \<in> U" |
45 |
shows "x - y \<in> U" |
|
27611 | 46 |
proof - |
29234 | 47 |
interpret vectorspace V by fact |
27612 | 48 |
from x y show ?thesis by (simp add: diff_eq1 negate_eq1) |
27611 | 49 |
qed |
7917 | 50 |
|
58744 | 51 |
text \<open> |
61486 | 52 |
\<^medskip> |
61540 | 53 |
Similar as for linear spaces, the existence of the zero element in every |
54 |
subspace follows from the non-emptiness of the carrier set and by vector |
|
55 |
space laws. |
|
58744 | 56 |
\<close> |
13515 | 57 |
|
13547 | 58 |
lemma (in subspace) zero [intro]: |
27611 | 59 |
assumes "vectorspace V" |
13547 | 60 |
shows "0 \<in> U" |
10687 | 61 |
proof - |
30729
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents:
29252
diff
changeset
|
62 |
interpret V: vectorspace V by fact |
29234 | 63 |
have "U \<noteq> {}" by (rule non_empty) |
13515 | 64 |
then obtain x where x: "x \<in> U" by blast |
27612 | 65 |
then have "x \<in> V" .. then have "0 = x - x" by simp |
58744 | 66 |
also from \<open>vectorspace V\<close> x x have "\<dots> \<in> U" by (rule diff_closed) |
13515 | 67 |
finally show ?thesis . |
9035 | 68 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
69 |
|
13547 | 70 |
lemma (in subspace) neg_closed [iff]: |
27611 | 71 |
assumes "vectorspace V" |
27612 | 72 |
assumes x: "x \<in> U" |
73 |
shows "- x \<in> U" |
|
27611 | 74 |
proof - |
29234 | 75 |
interpret vectorspace V by fact |
27612 | 76 |
from x show ?thesis by (simp add: negate_eq1) |
27611 | 77 |
qed |
13515 | 78 |
|
61486 | 79 |
text \<open>\<^medskip> Further derived laws: every subspace is a vector space.\<close> |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
80 |
|
13547 | 81 |
lemma (in subspace) vectorspace [iff]: |
27611 | 82 |
assumes "vectorspace V" |
13547 | 83 |
shows "vectorspace U" |
27611 | 84 |
proof - |
29234 | 85 |
interpret vectorspace V by fact |
27612 | 86 |
show ?thesis |
87 |
proof |
|
27611 | 88 |
show "U \<noteq> {}" .. |
89 |
fix x y z assume x: "x \<in> U" and y: "y \<in> U" and z: "z \<in> U" |
|
90 |
fix a b :: real |
|
91 |
from x y show "x + y \<in> U" by simp |
|
92 |
from x show "a \<cdot> x \<in> U" by simp |
|
93 |
from x y z show "(x + y) + z = x + (y + z)" by (simp add: add_ac) |
|
94 |
from x y show "x + y = y + x" by (simp add: add_ac) |
|
95 |
from x show "x - x = 0" by simp |
|
96 |
from x show "0 + x = x" by simp |
|
97 |
from x y show "a \<cdot> (x + y) = a \<cdot> x + a \<cdot> y" by (simp add: distrib) |
|
98 |
from x show "(a + b) \<cdot> x = a \<cdot> x + b \<cdot> x" by (simp add: distrib) |
|
99 |
from x show "(a * b) \<cdot> x = a \<cdot> b \<cdot> x" by (simp add: mult_assoc) |
|
100 |
from x show "1 \<cdot> x = x" by simp |
|
101 |
from x show "- x = - 1 \<cdot> x" by (simp add: negate_eq1) |
|
102 |
from x y show "x - y = x + - y" by (simp add: diff_eq1) |
|
103 |
qed |
|
9035 | 104 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
105 |
|
13515 | 106 |
|
58744 | 107 |
text \<open>The subspace relation is reflexive.\<close> |
7917 | 108 |
|
13515 | 109 |
lemma (in vectorspace) subspace_refl [intro]: "V \<unlhd> V" |
10687 | 110 |
proof |
13515 | 111 |
show "V \<noteq> {}" .. |
10687 | 112 |
show "V \<subseteq> V" .. |
81464 | 113 |
fix a :: real and x y assume x: "x \<in> V" and y: "y \<in> V" |
13515 | 114 |
from x y show "x + y \<in> V" by simp |
115 |
from x show "a \<cdot> x \<in> V" by simp |
|
9035 | 116 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
117 |
|
58744 | 118 |
text \<open>The subspace relation is transitive.\<close> |
7917 | 119 |
|
13515 | 120 |
lemma (in vectorspace) subspace_trans [trans]: |
121 |
"U \<unlhd> V \<Longrightarrow> V \<unlhd> W \<Longrightarrow> U \<unlhd> W" |
|
10687 | 122 |
proof |
13515 | 123 |
assume uv: "U \<unlhd> V" and vw: "V \<unlhd> W" |
124 |
from uv show "U \<noteq> {}" by (rule subspace.non_empty) |
|
125 |
show "U \<subseteq> W" |
|
126 |
proof - |
|
127 |
from uv have "U \<subseteq> V" by (rule subspace.subset) |
|
128 |
also from vw have "V \<subseteq> W" by (rule subspace.subset) |
|
129 |
finally show ?thesis . |
|
9035 | 130 |
qed |
13515 | 131 |
fix x y assume x: "x \<in> U" and y: "y \<in> U" |
132 |
from uv and x y show "x + y \<in> U" by (rule subspace.add_closed) |
|
60412 | 133 |
from uv and x show "a \<cdot> x \<in> U" for a by (rule subspace.mult_closed) |
9035 | 134 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
135 |
|
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
136 |
|
58744 | 137 |
subsection \<open>Linear closure\<close> |
7808 | 138 |
|
58744 | 139 |
text \<open> |
61879 | 140 |
The \<^emph>\<open>linear closure\<close> of a vector \<open>x\<close> is the set of all scalar multiples of |
141 |
\<open>x\<close>. |
|
58744 | 142 |
\<close> |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
143 |
|
58745 | 144 |
definition lin :: "('a::{minus,plus,zero}) \<Rightarrow> 'a set" |
44887 | 145 |
where "lin x = {a \<cdot> x | a. True}" |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
146 |
|
13515 | 147 |
lemma linI [intro]: "y = a \<cdot> x \<Longrightarrow> y \<in> lin x" |
27612 | 148 |
unfolding lin_def by blast |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
149 |
|
13515 | 150 |
lemma linI' [iff]: "a \<cdot> x \<in> lin x" |
27612 | 151 |
unfolding lin_def by blast |
13515 | 152 |
|
60412 | 153 |
lemma linE [elim]: |
154 |
assumes "x \<in> lin v" |
|
155 |
obtains a :: real where "x = a \<cdot> v" |
|
156 |
using assms unfolding lin_def by blast |
|
13515 | 157 |
|
7656 | 158 |
|
58744 | 159 |
text \<open>Every vector is contained in its linear closure.\<close> |
7917 | 160 |
|
13515 | 161 |
lemma (in vectorspace) x_lin_x [iff]: "x \<in> V \<Longrightarrow> x \<in> lin x" |
162 |
proof - |
|
163 |
assume "x \<in> V" |
|
27612 | 164 |
then have "x = 1 \<cdot> x" by simp |
13515 | 165 |
also have "\<dots> \<in> lin x" .. |
166 |
finally show ?thesis . |
|
167 |
qed |
|
168 |
||
169 |
lemma (in vectorspace) "0_lin_x" [iff]: "x \<in> V \<Longrightarrow> 0 \<in> lin x" |
|
170 |
proof |
|
171 |
assume "x \<in> V" |
|
27612 | 172 |
then show "0 = 0 \<cdot> x" by simp |
13515 | 173 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
174 |
|
58744 | 175 |
text \<open>Any linear closure is a subspace.\<close> |
7917 | 176 |
|
13515 | 177 |
lemma (in vectorspace) lin_subspace [intro]: |
44887 | 178 |
assumes x: "x \<in> V" |
179 |
shows "lin x \<unlhd> V" |
|
9035 | 180 |
proof |
44887 | 181 |
from x show "lin x \<noteq> {}" by auto |
10687 | 182 |
show "lin x \<subseteq> V" |
13515 | 183 |
proof |
184 |
fix x' assume "x' \<in> lin x" |
|
185 |
then obtain a where "x' = a \<cdot> x" .. |
|
186 |
with x show "x' \<in> V" by simp |
|
9035 | 187 |
qed |
81464 | 188 |
|
13515 | 189 |
fix x' x'' assume x': "x' \<in> lin x" and x'': "x'' \<in> lin x" |
190 |
show "x' + x'' \<in> lin x" |
|
191 |
proof - |
|
192 |
from x' obtain a' where "x' = a' \<cdot> x" .. |
|
193 |
moreover from x'' obtain a'' where "x'' = a'' \<cdot> x" .. |
|
194 |
ultimately have "x' + x'' = (a' + a'') \<cdot> x" |
|
195 |
using x by (simp add: distrib) |
|
196 |
also have "\<dots> \<in> lin x" .. |
|
197 |
finally show ?thesis . |
|
9035 | 198 |
qed |
81464 | 199 |
show "a \<cdot> x' \<in> lin x" for a :: real |
13515 | 200 |
proof - |
201 |
from x' obtain a' where "x' = a' \<cdot> x" .. |
|
202 |
with x have "a \<cdot> x' = (a * a') \<cdot> x" by (simp add: mult_assoc) |
|
203 |
also have "\<dots> \<in> lin x" .. |
|
204 |
finally show ?thesis . |
|
10687 | 205 |
qed |
9035 | 206 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
207 |
|
13515 | 208 |
|
58744 | 209 |
text \<open>Any linear closure is a vector space.\<close> |
7917 | 210 |
|
13515 | 211 |
lemma (in vectorspace) lin_vectorspace [intro]: |
23378 | 212 |
assumes "x \<in> V" |
213 |
shows "vectorspace (lin x)" |
|
214 |
proof - |
|
58744 | 215 |
from \<open>x \<in> V\<close> have "subspace (lin x) V" |
23378 | 216 |
by (rule lin_subspace) |
26199 | 217 |
from this and vectorspace_axioms show ?thesis |
23378 | 218 |
by (rule subspace.vectorspace) |
219 |
qed |
|
7808 | 220 |
|
221 |
||
58744 | 222 |
subsection \<open>Sum of two vectorspaces\<close> |
7808 | 223 |
|
58744 | 224 |
text \<open> |
61540 | 225 |
The \<^emph>\<open>sum\<close> of two vectorspaces \<open>U\<close> and \<open>V\<close> is the set of all sums of |
226 |
elements from \<open>U\<close> and \<open>V\<close>. |
|
58744 | 227 |
\<close> |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
228 |
|
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
229 |
lemma sum_def: "U + V = {u + v | u v. u \<in> U \<and> v \<in> V}" |
44190 | 230 |
unfolding set_plus_def by auto |
7917 | 231 |
|
13515 | 232 |
lemma sumE [elim]: |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
233 |
"x \<in> U + V \<Longrightarrow> (\<And>u v. x = u + v \<Longrightarrow> u \<in> U \<Longrightarrow> v \<in> V \<Longrightarrow> C) \<Longrightarrow> C" |
27612 | 234 |
unfolding sum_def by blast |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
235 |
|
13515 | 236 |
lemma sumI [intro]: |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
237 |
"u \<in> U \<Longrightarrow> v \<in> V \<Longrightarrow> x = u + v \<Longrightarrow> x \<in> U + V" |
27612 | 238 |
unfolding sum_def by blast |
7566 | 239 |
|
13515 | 240 |
lemma sumI' [intro]: |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
241 |
"u \<in> U \<Longrightarrow> v \<in> V \<Longrightarrow> u + v \<in> U + V" |
27612 | 242 |
unfolding sum_def by blast |
7917 | 243 |
|
61539 | 244 |
text \<open>\<open>U\<close> is a subspace of \<open>U + V\<close>.\<close> |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
245 |
|
13515 | 246 |
lemma subspace_sum1 [iff]: |
27611 | 247 |
assumes "vectorspace U" "vectorspace V" |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
248 |
shows "U \<unlhd> U + V" |
27611 | 249 |
proof - |
29234 | 250 |
interpret vectorspace U by fact |
251 |
interpret vectorspace V by fact |
|
27612 | 252 |
show ?thesis |
253 |
proof |
|
27611 | 254 |
show "U \<noteq> {}" .. |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
255 |
show "U \<subseteq> U + V" |
27611 | 256 |
proof |
257 |
fix x assume x: "x \<in> U" |
|
258 |
moreover have "0 \<in> V" .. |
|
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
259 |
ultimately have "x + 0 \<in> U + V" .. |
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
260 |
with x show "x \<in> U + V" by simp |
27611 | 261 |
qed |
262 |
fix x y assume x: "x \<in> U" and "y \<in> U" |
|
27612 | 263 |
then show "x + y \<in> U" by simp |
60412 | 264 |
from x show "a \<cdot> x \<in> U" for a by simp |
9035 | 265 |
qed |
266 |
qed |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
267 |
|
58744 | 268 |
text \<open>The sum of two subspaces is again a subspace.\<close> |
7917 | 269 |
|
13515 | 270 |
lemma sum_subspace [intro?]: |
27611 | 271 |
assumes "subspace U E" "vectorspace E" "subspace V E" |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
272 |
shows "U + V \<unlhd> E" |
27611 | 273 |
proof - |
29234 | 274 |
interpret subspace U E by fact |
275 |
interpret vectorspace E by fact |
|
276 |
interpret subspace V E by fact |
|
27612 | 277 |
show ?thesis |
278 |
proof |
|
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
279 |
have "0 \<in> U + V" |
27611 | 280 |
proof |
58744 | 281 |
show "0 \<in> U" using \<open>vectorspace E\<close> .. |
282 |
show "0 \<in> V" using \<open>vectorspace E\<close> .. |
|
27611 | 283 |
show "(0::'a) = 0 + 0" by simp |
284 |
qed |
|
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
285 |
then show "U + V \<noteq> {}" by blast |
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
286 |
show "U + V \<subseteq> E" |
27611 | 287 |
proof |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
288 |
fix x assume "x \<in> U + V" |
27611 | 289 |
then obtain u v where "x = u + v" and |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
290 |
"u \<in> U" and "v \<in> V" .. |
27611 | 291 |
then show "x \<in> E" by simp |
292 |
qed |
|
81464 | 293 |
|
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
294 |
fix x y assume x: "x \<in> U + V" and y: "y \<in> U + V" |
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
295 |
show "x + y \<in> U + V" |
27611 | 296 |
proof - |
297 |
from x obtain ux vx where "x = ux + vx" and "ux \<in> U" and "vx \<in> V" .. |
|
298 |
moreover |
|
299 |
from y obtain uy vy where "y = uy + vy" and "uy \<in> U" and "vy \<in> V" .. |
|
300 |
ultimately |
|
301 |
have "ux + uy \<in> U" |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
302 |
and "vx + vy \<in> V" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
303 |
and "x + y = (ux + uy) + (vx + vy)" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
304 |
using x y by (simp_all add: add_ac) |
27612 | 305 |
then show ?thesis .. |
27611 | 306 |
qed |
81464 | 307 |
show "a \<cdot> x \<in> U + V" for a |
27611 | 308 |
proof - |
309 |
from x obtain u v where "x = u + v" and "u \<in> U" and "v \<in> V" .. |
|
27612 | 310 |
then have "a \<cdot> u \<in> U" and "a \<cdot> v \<in> V" |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
311 |
and "a \<cdot> x = (a \<cdot> u) + (a \<cdot> v)" by (simp_all add: distrib) |
27612 | 312 |
then show ?thesis .. |
27611 | 313 |
qed |
9035 | 314 |
qed |
315 |
qed |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
316 |
|
61879 | 317 |
text \<open>The sum of two subspaces is a vectorspace.\<close> |
7917 | 318 |
|
13515 | 319 |
lemma sum_vs [intro?]: |
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
320 |
"U \<unlhd> E \<Longrightarrow> V \<unlhd> E \<Longrightarrow> vectorspace E \<Longrightarrow> vectorspace (U + V)" |
13547 | 321 |
by (rule subspace.vectorspace) (rule sum_subspace) |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
322 |
|
7808 | 323 |
|
58744 | 324 |
subsection \<open>Direct sums\<close> |
7808 | 325 |
|
58744 | 326 |
text \<open> |
61879 | 327 |
The sum of \<open>U\<close> and \<open>V\<close> is called \<^emph>\<open>direct\<close>, iff the zero element is the only |
328 |
common element of \<open>U\<close> and \<open>V\<close>. For every element \<open>x\<close> of the direct sum of |
|
329 |
\<open>U\<close> and \<open>V\<close> the decomposition in \<open>x = u + v\<close> with \<open>u \<in> U\<close> and \<open>v \<in> V\<close> is |
|
330 |
unique. |
|
58744 | 331 |
\<close> |
7808 | 332 |
|
10687 | 333 |
lemma decomp: |
27611 | 334 |
assumes "vectorspace E" "subspace U E" "subspace V E" |
13515 | 335 |
assumes direct: "U \<inter> V = {0}" |
336 |
and u1: "u1 \<in> U" and u2: "u2 \<in> U" |
|
337 |
and v1: "v1 \<in> V" and v2: "v2 \<in> V" |
|
338 |
and sum: "u1 + v1 = u2 + v2" |
|
339 |
shows "u1 = u2 \<and> v1 = v2" |
|
27611 | 340 |
proof - |
29234 | 341 |
interpret vectorspace E by fact |
342 |
interpret subspace U E by fact |
|
343 |
interpret subspace V E by fact |
|
27612 | 344 |
show ?thesis |
345 |
proof |
|
27611 | 346 |
have U: "vectorspace U" (* FIXME: use interpret *) |
58744 | 347 |
using \<open>subspace U E\<close> \<open>vectorspace E\<close> by (rule subspace.vectorspace) |
27611 | 348 |
have V: "vectorspace V" |
58744 | 349 |
using \<open>subspace V E\<close> \<open>vectorspace E\<close> by (rule subspace.vectorspace) |
27611 | 350 |
from u1 u2 v1 v2 and sum have eq: "u1 - u2 = v2 - v1" |
351 |
by (simp add: add_diff_swap) |
|
352 |
from u1 u2 have u: "u1 - u2 \<in> U" |
|
353 |
by (rule vectorspace.diff_closed [OF U]) |
|
354 |
with eq have v': "v2 - v1 \<in> U" by (simp only:) |
|
355 |
from v2 v1 have v: "v2 - v1 \<in> V" |
|
356 |
by (rule vectorspace.diff_closed [OF V]) |
|
357 |
with eq have u': " u1 - u2 \<in> V" by (simp only:) |
|
81464 | 358 |
|
27611 | 359 |
show "u1 = u2" |
360 |
proof (rule add_minus_eq) |
|
361 |
from u1 show "u1 \<in> E" .. |
|
362 |
from u2 show "u2 \<in> E" .. |
|
363 |
from u u' and direct show "u1 - u2 = 0" by blast |
|
364 |
qed |
|
365 |
show "v1 = v2" |
|
366 |
proof (rule add_minus_eq [symmetric]) |
|
367 |
from v1 show "v1 \<in> E" .. |
|
368 |
from v2 show "v2 \<in> E" .. |
|
369 |
from v v' and direct show "v2 - v1 = 0" by blast |
|
370 |
qed |
|
9035 | 371 |
qed |
372 |
qed |
|
7656 | 373 |
|
58744 | 374 |
text \<open> |
61540 | 375 |
An application of the previous lemma will be used in the proof of the |
376 |
Hahn-Banach Theorem (see page \pageref{decomp-H-use}): for any element |
|
377 |
\<open>y + a \<cdot> x\<^sub>0\<close> of the direct sum of a vectorspace \<open>H\<close> and the linear closure |
|
378 |
of \<open>x\<^sub>0\<close> the components \<open>y \<in> H\<close> and \<open>a\<close> are uniquely determined. |
|
58744 | 379 |
\<close> |
7917 | 380 |
|
10687 | 381 |
lemma decomp_H': |
27611 | 382 |
assumes "vectorspace E" "subspace H E" |
13515 | 383 |
assumes y1: "y1 \<in> H" and y2: "y2 \<in> H" |
384 |
and x': "x' \<notin> H" "x' \<in> E" "x' \<noteq> 0" |
|
385 |
and eq: "y1 + a1 \<cdot> x' = y2 + a2 \<cdot> x'" |
|
386 |
shows "y1 = y2 \<and> a1 = a2" |
|
27611 | 387 |
proof - |
29234 | 388 |
interpret vectorspace E by fact |
389 |
interpret subspace H E by fact |
|
27612 | 390 |
show ?thesis |
391 |
proof |
|
27611 | 392 |
have c: "y1 = y2 \<and> a1 \<cdot> x' = a2 \<cdot> x'" |
393 |
proof (rule decomp) |
|
394 |
show "a1 \<cdot> x' \<in> lin x'" .. |
|
395 |
show "a2 \<cdot> x' \<in> lin x'" .. |
|
396 |
show "H \<inter> lin x' = {0}" |
|
13515 | 397 |
proof |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
398 |
show "H \<inter> lin x' \<subseteq> {0}" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
399 |
proof |
27611 | 400 |
fix x assume x: "x \<in> H \<inter> lin x'" |
401 |
then obtain a where xx': "x = a \<cdot> x'" |
|
402 |
by blast |
|
403 |
have "x = 0" |
|
81464 | 404 |
proof (cases "a = 0") |
405 |
case True |
|
27611 | 406 |
with xx' and x' show ?thesis by simp |
407 |
next |
|
81464 | 408 |
case False |
27611 | 409 |
from x have "x \<in> H" .. |
410 |
with xx' have "inverse a \<cdot> a \<cdot> x' \<in> H" by simp |
|
81464 | 411 |
with False and x' have "x' \<in> H" by (simp add: mult_assoc2) |
58744 | 412 |
with \<open>x' \<notin> H\<close> show ?thesis by contradiction |
27611 | 413 |
qed |
27612 | 414 |
then show "x \<in> {0}" .. |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
415 |
qed |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
416 |
show "{0} \<subseteq> H \<inter> lin x'" |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
417 |
proof - |
58744 | 418 |
have "0 \<in> H" using \<open>vectorspace E\<close> .. |
419 |
moreover have "0 \<in> lin x'" using \<open>x' \<in> E\<close> .. |
|
27611 | 420 |
ultimately show ?thesis by blast |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
31795
diff
changeset
|
421 |
qed |
9035 | 422 |
qed |
58744 | 423 |
show "lin x' \<unlhd> E" using \<open>x' \<in> E\<close> .. |
424 |
qed (rule \<open>vectorspace E\<close>, rule \<open>subspace H E\<close>, rule y1, rule y2, rule eq) |
|
27612 | 425 |
then show "y1 = y2" .. |
27611 | 426 |
from c have "a1 \<cdot> x' = a2 \<cdot> x'" .. |
427 |
with x' show "a1 = a2" by (simp add: mult_right_cancel) |
|
428 |
qed |
|
9035 | 429 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
430 |
|
58744 | 431 |
text \<open> |
61540 | 432 |
Since for any element \<open>y + a \<cdot> x'\<close> of the direct sum of a vectorspace \<open>H\<close> |
61879 | 433 |
and the linear closure of \<open>x'\<close> the components \<open>y \<in> H\<close> and \<open>a\<close> are unique, it |
434 |
follows from \<open>y \<in> H\<close> that \<open>a = 0\<close>. |
|
58744 | 435 |
\<close> |
7917 | 436 |
|
10687 | 437 |
lemma decomp_H'_H: |
27611 | 438 |
assumes "vectorspace E" "subspace H E" |
13515 | 439 |
assumes t: "t \<in> H" |
440 |
and x': "x' \<notin> H" "x' \<in> E" "x' \<noteq> 0" |
|
441 |
shows "(SOME (y, a). t = y + a \<cdot> x' \<and> y \<in> H) = (t, 0)" |
|
27611 | 442 |
proof - |
29234 | 443 |
interpret vectorspace E by fact |
444 |
interpret subspace H E by fact |
|
27612 | 445 |
show ?thesis |
446 |
proof (rule, simp_all only: split_paired_all split_conv) |
|
27611 | 447 |
from t x' show "t = t + 0 \<cdot> x' \<and> t \<in> H" by simp |
448 |
fix y and a assume ya: "t = y + a \<cdot> x' \<and> y \<in> H" |
|
449 |
have "y = t \<and> a = 0" |
|
450 |
proof (rule decomp_H') |
|
451 |
from ya x' show "y + a \<cdot> x' = t + 0 \<cdot> x'" by simp |
|
452 |
from ya show "y \<in> H" .. |
|
58744 | 453 |
qed (rule \<open>vectorspace E\<close>, rule \<open>subspace H E\<close>, rule t, (rule x')+) |
27611 | 454 |
with t x' show "(y, a) = (y + a \<cdot> x', 0)" by simp |
455 |
qed |
|
13515 | 456 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
457 |
|
58744 | 458 |
text \<open> |
61540 | 459 |
The components \<open>y \<in> H\<close> and \<open>a\<close> in \<open>y + a \<cdot> x'\<close> are unique, so the function |
460 |
\<open>h'\<close> defined by \<open>h' (y + a \<cdot> x') = h y + a \<cdot> \<xi>\<close> is definite. |
|
58744 | 461 |
\<close> |
7917 | 462 |
|
9374 | 463 |
lemma h'_definite: |
27611 | 464 |
fixes H |
13515 | 465 |
assumes h'_def: |
63040 | 466 |
"\<And>x. h' x = |
467 |
(let (y, a) = SOME (y, a). (x = y + a \<cdot> x' \<and> y \<in> H) |
|
468 |
in (h y) + a * xi)" |
|
13515 | 469 |
and x: "x = y + a \<cdot> x'" |
27611 | 470 |
assumes "vectorspace E" "subspace H E" |
13515 | 471 |
assumes y: "y \<in> H" |
472 |
and x': "x' \<notin> H" "x' \<in> E" "x' \<noteq> 0" |
|
473 |
shows "h' x = h y + a * xi" |
|
10687 | 474 |
proof - |
29234 | 475 |
interpret vectorspace E by fact |
476 |
interpret subspace H E by fact |
|
47445
69e96e5500df
Set_Algebras: removed syntax \<oplus> and \<otimes>, in favour of plain + and *
krauss
parents:
44887
diff
changeset
|
477 |
from x y x' have "x \<in> H + lin x'" by auto |
63910 | 478 |
have "\<exists>!(y, a). x = y + a \<cdot> x' \<and> y \<in> H" (is "\<exists>!p. ?P p") |
18689
a50587cd8414
prefer ex1I over ex_ex1I in single-step reasoning;
wenzelm
parents:
16417
diff
changeset
|
479 |
proof (rule ex_ex1I) |
13515 | 480 |
from x y show "\<exists>p. ?P p" by blast |
481 |
fix p q assume p: "?P p" and q: "?P q" |
|
482 |
show "p = q" |
|
9035 | 483 |
proof - |
13515 | 484 |
from p have xp: "x = fst p + snd p \<cdot> x' \<and> fst p \<in> H" |
485 |
by (cases p) simp |
|
486 |
from q have xq: "x = fst q + snd q \<cdot> x' \<and> fst q \<in> H" |
|
487 |
by (cases q) simp |
|
488 |
have "fst p = fst q \<and> snd p = snd q" |
|
489 |
proof (rule decomp_H') |
|
490 |
from xp show "fst p \<in> H" .. |
|
491 |
from xq show "fst q \<in> H" .. |
|
492 |
from xp and xq show "fst p + snd p \<cdot> x' = fst q + snd q \<cdot> x'" |
|
493 |
by simp |
|
58744 | 494 |
qed (rule \<open>vectorspace E\<close>, rule \<open>subspace H E\<close>, (rule x')+) |
27612 | 495 |
then show ?thesis by (cases p, cases q) simp |
9035 | 496 |
qed |
497 |
qed |
|
27612 | 498 |
then have eq: "(SOME (y, a). x = y + a \<cdot> x' \<and> y \<in> H) = (y, a)" |
13515 | 499 |
by (rule some1_equality) (simp add: x y) |
500 |
with h'_def show "h' x = h y + a * xi" by (simp add: Let_def) |
|
9035 | 501 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
502 |
|
10687 | 503 |
end |