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