author | ballarin |
Thu, 06 Nov 2003 14:18:05 +0100 | |
changeset 14254 | 342634f38451 |
parent 13547 | bf399f3bd7dc |
child 14329 | ff3210fe968f |
permissions | -rw-r--r-- |
7566 | 1 |
(* Title: HOL/Real/HahnBanach/Subspace.thy |
2 |
ID: $Id$ |
|
3 |
Author: Gertrud Bauer, TU Munich |
|
4 |
*) |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
5 |
|
9035 | 6 |
header {* Subspaces *} |
7808 | 7 |
|
9035 | 8 |
theory Subspace = VectorSpace: |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
9 |
|
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
10 |
|
9035 | 11 |
subsection {* Definition *} |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
12 |
|
10687 | 13 |
text {* |
14 |
A non-empty subset @{text U} of a vector space @{text V} is a |
|
15 |
\emph{subspace} of @{text V}, iff @{text U} is closed under addition |
|
16 |
and scalar multiplication. |
|
17 |
*} |
|
7917 | 18 |
|
13515 | 19 |
locale subspace = var U + var V + |
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 |
|
14254
342634f38451
Isar/Locales: <loc>.intro and <loc>.axioms no longer intro? and elim? by
ballarin
parents:
13547
diff
changeset
|
25 |
declare vectorspace.intro [intro?] subspace.intro [intro?] |
342634f38451
Isar/Locales: <loc>.intro and <loc>.axioms no longer intro? and elim? by
ballarin
parents:
13547
diff
changeset
|
26 |
|
13515 | 27 |
syntax (symbols) |
28 |
subspace :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" (infix "\<unlhd>" 50) |
|
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]: |
43 |
includes vectorspace |
|
44 |
shows "x \<in> U \<Longrightarrow> y \<in> U \<Longrightarrow> x - y \<in> U" |
|
10687 | 45 |
by (simp add: diff_eq1 negate_eq1) |
7917 | 46 |
|
47 |
||
13515 | 48 |
text {* |
49 |
\medskip Similar as for linear spaces, the existence of the zero |
|
50 |
element in every subspace follows from the non-emptiness of the |
|
51 |
carrier set and by vector space laws. |
|
52 |
*} |
|
53 |
||
13547 | 54 |
lemma (in subspace) zero [intro]: |
55 |
includes vectorspace |
|
56 |
shows "0 \<in> U" |
|
10687 | 57 |
proof - |
13515 | 58 |
have "U \<noteq> {}" by (rule U_V.non_empty) |
59 |
then obtain x where x: "x \<in> U" by blast |
|
60 |
hence "x \<in> V" .. hence "0 = x - x" by simp |
|
61 |
also have "... \<in> U" by (rule U_V.diff_closed) |
|
62 |
finally show ?thesis . |
|
9035 | 63 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
64 |
|
13547 | 65 |
lemma (in subspace) neg_closed [iff]: |
66 |
includes vectorspace |
|
67 |
shows "x \<in> U \<Longrightarrow> - x \<in> U" |
|
9035 | 68 |
by (simp add: negate_eq1) |
7917 | 69 |
|
13515 | 70 |
|
10687 | 71 |
text {* \medskip Further derived laws: every subspace is a vector space. *} |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
72 |
|
13547 | 73 |
lemma (in subspace) vectorspace [iff]: |
74 |
includes vectorspace |
|
75 |
shows "vectorspace U" |
|
13515 | 76 |
proof |
77 |
show "U \<noteq> {}" .. |
|
78 |
fix x y z assume x: "x \<in> U" and y: "y \<in> U" and z: "z \<in> U" |
|
79 |
fix a b :: real |
|
80 |
from x y show "x + y \<in> U" by simp |
|
81 |
from x show "a \<cdot> x \<in> U" by simp |
|
82 |
from x y z show "(x + y) + z = x + (y + z)" by (simp add: add_ac) |
|
83 |
from x y show "x + y = y + x" by (simp add: add_ac) |
|
84 |
from x show "x - x = 0" by simp |
|
85 |
from x show "0 + x = x" by simp |
|
86 |
from x y show "a \<cdot> (x + y) = a \<cdot> x + a \<cdot> y" by (simp add: distrib) |
|
87 |
from x show "(a + b) \<cdot> x = a \<cdot> x + b \<cdot> x" by (simp add: distrib) |
|
88 |
from x show "(a * b) \<cdot> x = a \<cdot> b \<cdot> x" by (simp add: mult_assoc) |
|
89 |
from x show "1 \<cdot> x = x" by simp |
|
90 |
from x show "- x = - 1 \<cdot> x" by (simp add: negate_eq1) |
|
91 |
from x y show "x - y = x + - y" by (simp add: diff_eq1) |
|
9035 | 92 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
93 |
|
13515 | 94 |
|
9035 | 95 |
text {* The subspace relation is reflexive. *} |
7917 | 96 |
|
13515 | 97 |
lemma (in vectorspace) subspace_refl [intro]: "V \<unlhd> V" |
10687 | 98 |
proof |
13515 | 99 |
show "V \<noteq> {}" .. |
10687 | 100 |
show "V \<subseteq> V" .. |
13515 | 101 |
fix x y assume x: "x \<in> V" and y: "y \<in> V" |
102 |
fix a :: real |
|
103 |
from x y show "x + y \<in> V" by simp |
|
104 |
from x show "a \<cdot> x \<in> V" by simp |
|
9035 | 105 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
106 |
|
9035 | 107 |
text {* The subspace relation is transitive. *} |
7917 | 108 |
|
13515 | 109 |
lemma (in vectorspace) subspace_trans [trans]: |
110 |
"U \<unlhd> V \<Longrightarrow> V \<unlhd> W \<Longrightarrow> U \<unlhd> W" |
|
10687 | 111 |
proof |
13515 | 112 |
assume uv: "U \<unlhd> V" and vw: "V \<unlhd> W" |
113 |
from uv show "U \<noteq> {}" by (rule subspace.non_empty) |
|
114 |
show "U \<subseteq> W" |
|
115 |
proof - |
|
116 |
from uv have "U \<subseteq> V" by (rule subspace.subset) |
|
117 |
also from vw have "V \<subseteq> W" by (rule subspace.subset) |
|
118 |
finally show ?thesis . |
|
9035 | 119 |
qed |
13515 | 120 |
fix x y assume x: "x \<in> U" and y: "y \<in> U" |
121 |
from uv and x y show "x + y \<in> U" by (rule subspace.add_closed) |
|
122 |
from uv and x show "\<And>a. a \<cdot> x \<in> U" by (rule subspace.mult_closed) |
|
9035 | 123 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
124 |
|
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
125 |
|
9035 | 126 |
subsection {* Linear closure *} |
7808 | 127 |
|
10687 | 128 |
text {* |
129 |
The \emph{linear closure} of a vector @{text x} is the set of all |
|
130 |
scalar multiples of @{text x}. |
|
131 |
*} |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
132 |
|
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
133 |
constdefs |
13515 | 134 |
lin :: "('a::{minus, plus, zero}) \<Rightarrow> 'a set" |
10687 | 135 |
"lin x \<equiv> {a \<cdot> x | a. True}" |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
136 |
|
13515 | 137 |
lemma linI [intro]: "y = a \<cdot> x \<Longrightarrow> y \<in> lin x" |
138 |
by (unfold lin_def) blast |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
139 |
|
13515 | 140 |
lemma linI' [iff]: "a \<cdot> x \<in> lin x" |
141 |
by (unfold lin_def) blast |
|
142 |
||
143 |
lemma linE [elim]: |
|
144 |
"x \<in> lin v \<Longrightarrow> (\<And>a::real. x = a \<cdot> v \<Longrightarrow> C) \<Longrightarrow> C" |
|
145 |
by (unfold lin_def) blast |
|
146 |
||
7656 | 147 |
|
9035 | 148 |
text {* Every vector is contained in its linear closure. *} |
7917 | 149 |
|
13515 | 150 |
lemma (in vectorspace) x_lin_x [iff]: "x \<in> V \<Longrightarrow> x \<in> lin x" |
151 |
proof - |
|
152 |
assume "x \<in> V" |
|
153 |
hence "x = 1 \<cdot> x" by simp |
|
154 |
also have "\<dots> \<in> lin x" .. |
|
155 |
finally show ?thesis . |
|
156 |
qed |
|
157 |
||
158 |
lemma (in vectorspace) "0_lin_x" [iff]: "x \<in> V \<Longrightarrow> 0 \<in> lin x" |
|
159 |
proof |
|
160 |
assume "x \<in> V" |
|
161 |
thus "0 = 0 \<cdot> x" by simp |
|
162 |
qed |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
163 |
|
9035 | 164 |
text {* Any linear closure is a subspace. *} |
7917 | 165 |
|
13515 | 166 |
lemma (in vectorspace) lin_subspace [intro]: |
167 |
"x \<in> V \<Longrightarrow> lin x \<unlhd> V" |
|
9035 | 168 |
proof |
13515 | 169 |
assume x: "x \<in> V" |
170 |
thus "lin x \<noteq> {}" by (auto simp add: x_lin_x) |
|
10687 | 171 |
show "lin x \<subseteq> V" |
13515 | 172 |
proof |
173 |
fix x' assume "x' \<in> lin x" |
|
174 |
then obtain a where "x' = a \<cdot> x" .. |
|
175 |
with x show "x' \<in> V" by simp |
|
9035 | 176 |
qed |
13515 | 177 |
fix x' x'' assume x': "x' \<in> lin x" and x'': "x'' \<in> lin x" |
178 |
show "x' + x'' \<in> lin x" |
|
179 |
proof - |
|
180 |
from x' obtain a' where "x' = a' \<cdot> x" .. |
|
181 |
moreover from x'' obtain a'' where "x'' = a'' \<cdot> x" .. |
|
182 |
ultimately have "x' + x'' = (a' + a'') \<cdot> x" |
|
183 |
using x by (simp add: distrib) |
|
184 |
also have "\<dots> \<in> lin x" .. |
|
185 |
finally show ?thesis . |
|
9035 | 186 |
qed |
13515 | 187 |
fix a :: real |
188 |
show "a \<cdot> x' \<in> lin x" |
|
189 |
proof - |
|
190 |
from x' obtain a' where "x' = a' \<cdot> x" .. |
|
191 |
with x have "a \<cdot> x' = (a * a') \<cdot> x" by (simp add: mult_assoc) |
|
192 |
also have "\<dots> \<in> lin x" .. |
|
193 |
finally show ?thesis . |
|
10687 | 194 |
qed |
9035 | 195 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
196 |
|
13515 | 197 |
|
9035 | 198 |
text {* Any linear closure is a vector space. *} |
7917 | 199 |
|
13515 | 200 |
lemma (in vectorspace) lin_vectorspace [intro]: |
201 |
"x \<in> V \<Longrightarrow> vectorspace (lin x)" |
|
13547 | 202 |
by (rule subspace.vectorspace) (rule lin_subspace) |
7808 | 203 |
|
204 |
||
9035 | 205 |
subsection {* Sum of two vectorspaces *} |
7808 | 206 |
|
10687 | 207 |
text {* |
208 |
The \emph{sum} of two vectorspaces @{text U} and @{text V} is the |
|
209 |
set of all sums of elements from @{text U} and @{text V}. |
|
210 |
*} |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
211 |
|
10309 | 212 |
instance set :: (plus) plus .. |
7917 | 213 |
|
10687 | 214 |
defs (overloaded) |
13515 | 215 |
sum_def: "U + V \<equiv> {u + v | u v. u \<in> U \<and> v \<in> V}" |
7917 | 216 |
|
13515 | 217 |
lemma sumE [elim]: |
218 |
"x \<in> U + V \<Longrightarrow> (\<And>u v. x = u + v \<Longrightarrow> u \<in> U \<Longrightarrow> v \<in> V \<Longrightarrow> C) \<Longrightarrow> C" |
|
219 |
by (unfold sum_def) blast |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
220 |
|
13515 | 221 |
lemma sumI [intro]: |
222 |
"u \<in> U \<Longrightarrow> v \<in> V \<Longrightarrow> x = u + v \<Longrightarrow> x \<in> U + V" |
|
223 |
by (unfold sum_def) blast |
|
7566 | 224 |
|
13515 | 225 |
lemma sumI' [intro]: |
226 |
"u \<in> U \<Longrightarrow> v \<in> V \<Longrightarrow> u + v \<in> U + V" |
|
227 |
by (unfold sum_def) blast |
|
7917 | 228 |
|
10687 | 229 |
text {* @{text U} is a subspace of @{text "U + V"}. *} |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
230 |
|
13515 | 231 |
lemma subspace_sum1 [iff]: |
232 |
includes vectorspace U + vectorspace V |
|
233 |
shows "U \<unlhd> U + V" |
|
10687 | 234 |
proof |
13515 | 235 |
show "U \<noteq> {}" .. |
10687 | 236 |
show "U \<subseteq> U + V" |
13515 | 237 |
proof |
238 |
fix x assume x: "x \<in> U" |
|
239 |
moreover have "0 \<in> V" .. |
|
240 |
ultimately have "x + 0 \<in> U + V" .. |
|
241 |
with x show "x \<in> U + V" by simp |
|
9035 | 242 |
qed |
13515 | 243 |
fix x y assume x: "x \<in> U" and "y \<in> U" |
244 |
thus "x + y \<in> U" by simp |
|
245 |
from x show "\<And>a. a \<cdot> x \<in> U" by simp |
|
9035 | 246 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
247 |
|
13515 | 248 |
text {* The sum of two subspaces is again a subspace. *} |
7917 | 249 |
|
13515 | 250 |
lemma sum_subspace [intro?]: |
13547 | 251 |
includes subspace U E + vectorspace E + subspace V E |
13515 | 252 |
shows "U + V \<unlhd> E" |
10687 | 253 |
proof |
13515 | 254 |
have "0 \<in> U + V" |
255 |
proof |
|
9374 | 256 |
show "0 \<in> U" .. |
257 |
show "0 \<in> V" .. |
|
13515 | 258 |
show "(0::'a) = 0 + 0" by simp |
9035 | 259 |
qed |
13515 | 260 |
thus "U + V \<noteq> {}" by blast |
10687 | 261 |
show "U + V \<subseteq> E" |
13515 | 262 |
proof |
263 |
fix x assume "x \<in> U + V" |
|
264 |
then obtain u v where x: "x = u + v" and |
|
265 |
u: "u \<in> U" and v: "v \<in> V" .. |
|
266 |
have "U \<unlhd> E" . with u have "u \<in> E" .. |
|
267 |
moreover have "V \<unlhd> E" . with v have "v \<in> E" .. |
|
268 |
ultimately show "x \<in> E" using x by simp |
|
9035 | 269 |
qed |
13515 | 270 |
fix x y assume x: "x \<in> U + V" and y: "y \<in> U + V" |
271 |
show "x + y \<in> U + V" |
|
272 |
proof - |
|
273 |
from x obtain ux vx where "x = ux + vx" and "ux \<in> U" and "vx \<in> V" .. |
|
274 |
moreover |
|
275 |
from y obtain uy vy where "y = uy + vy" and "uy \<in> U" and "vy \<in> V" .. |
|
276 |
ultimately |
|
277 |
have "ux + uy \<in> U" |
|
278 |
and "vx + vy \<in> V" |
|
279 |
and "x + y = (ux + uy) + (vx + vy)" |
|
280 |
using x y by (simp_all add: add_ac) |
|
281 |
thus ?thesis .. |
|
9035 | 282 |
qed |
13515 | 283 |
fix a show "a \<cdot> x \<in> U + V" |
284 |
proof - |
|
285 |
from x obtain u v where "x = u + v" and "u \<in> U" and "v \<in> V" .. |
|
286 |
hence "a \<cdot> u \<in> U" and "a \<cdot> v \<in> V" |
|
287 |
and "a \<cdot> x = (a \<cdot> u) + (a \<cdot> v)" by (simp_all add: distrib) |
|
288 |
thus ?thesis .. |
|
9035 | 289 |
qed |
290 |
qed |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
291 |
|
9035 | 292 |
text{* The sum of two subspaces is a vectorspace. *} |
7917 | 293 |
|
13515 | 294 |
lemma sum_vs [intro?]: |
295 |
"U \<unlhd> E \<Longrightarrow> V \<unlhd> E \<Longrightarrow> vectorspace E \<Longrightarrow> vectorspace (U + V)" |
|
13547 | 296 |
by (rule subspace.vectorspace) (rule sum_subspace) |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
297 |
|
7808 | 298 |
|
9035 | 299 |
subsection {* Direct sums *} |
7808 | 300 |
|
10687 | 301 |
text {* |
302 |
The sum of @{text U} and @{text V} is called \emph{direct}, iff the |
|
303 |
zero element is the only common element of @{text U} and @{text |
|
304 |
V}. For every element @{text x} of the direct sum of @{text U} and |
|
305 |
@{text V} the decomposition in @{text "x = u + v"} with |
|
306 |
@{text "u \<in> U"} and @{text "v \<in> V"} is unique. |
|
307 |
*} |
|
7808 | 308 |
|
10687 | 309 |
lemma decomp: |
13515 | 310 |
includes vectorspace E + subspace U E + subspace V E |
311 |
assumes direct: "U \<inter> V = {0}" |
|
312 |
and u1: "u1 \<in> U" and u2: "u2 \<in> U" |
|
313 |
and v1: "v1 \<in> V" and v2: "v2 \<in> V" |
|
314 |
and sum: "u1 + v1 = u2 + v2" |
|
315 |
shows "u1 = u2 \<and> v1 = v2" |
|
10687 | 316 |
proof |
13547 | 317 |
have U: "vectorspace U" by (rule subspace.vectorspace) |
318 |
have V: "vectorspace V" by (rule subspace.vectorspace) |
|
13515 | 319 |
from u1 u2 v1 v2 and sum have eq: "u1 - u2 = v2 - v1" |
320 |
by (simp add: add_diff_swap) |
|
321 |
from u1 u2 have u: "u1 - u2 \<in> U" |
|
322 |
by (rule vectorspace.diff_closed [OF U]) |
|
323 |
with eq have v': "v2 - v1 \<in> U" by (simp only:) |
|
324 |
from v2 v1 have v: "v2 - v1 \<in> V" |
|
325 |
by (rule vectorspace.diff_closed [OF V]) |
|
326 |
with eq have u': " u1 - u2 \<in> V" by (simp only:) |
|
10687 | 327 |
|
9035 | 328 |
show "u1 = u2" |
13515 | 329 |
proof (rule add_minus_eq) |
9374 | 330 |
show "u1 \<in> E" .. |
331 |
show "u2 \<in> E" .. |
|
13515 | 332 |
from u u' and direct show "u1 - u2 = 0" by blast |
9035 | 333 |
qed |
334 |
show "v1 = v2" |
|
13515 | 335 |
proof (rule add_minus_eq [symmetric]) |
9374 | 336 |
show "v1 \<in> E" .. |
337 |
show "v2 \<in> E" .. |
|
13515 | 338 |
from v v' and direct show "v2 - v1 = 0" by blast |
9035 | 339 |
qed |
340 |
qed |
|
7656 | 341 |
|
10687 | 342 |
text {* |
343 |
An application of the previous lemma will be used in the proof of |
|
344 |
the Hahn-Banach Theorem (see page \pageref{decomp-H-use}): for any |
|
345 |
element @{text "y + a \<cdot> x\<^sub>0"} of the direct sum of a |
|
346 |
vectorspace @{text H} and the linear closure of @{text "x\<^sub>0"} |
|
347 |
the components @{text "y \<in> H"} and @{text a} are uniquely |
|
348 |
determined. |
|
349 |
*} |
|
7917 | 350 |
|
10687 | 351 |
lemma decomp_H': |
13547 | 352 |
includes vectorspace E + subspace H E |
13515 | 353 |
assumes y1: "y1 \<in> H" and y2: "y2 \<in> H" |
354 |
and x': "x' \<notin> H" "x' \<in> E" "x' \<noteq> 0" |
|
355 |
and eq: "y1 + a1 \<cdot> x' = y2 + a2 \<cdot> x'" |
|
356 |
shows "y1 = y2 \<and> a1 = a2" |
|
9035 | 357 |
proof |
9374 | 358 |
have c: "y1 = y2 \<and> a1 \<cdot> x' = a2 \<cdot> x'" |
10687 | 359 |
proof (rule decomp) |
360 |
show "a1 \<cdot> x' \<in> lin x'" .. |
|
9374 | 361 |
show "a2 \<cdot> x' \<in> lin x'" .. |
13515 | 362 |
show "H \<inter> lin x' = {0}" |
9035 | 363 |
proof |
10687 | 364 |
show "H \<inter> lin x' \<subseteq> {0}" |
13515 | 365 |
proof |
366 |
fix x assume x: "x \<in> H \<inter> lin x'" |
|
367 |
then obtain a where xx': "x = a \<cdot> x'" |
|
368 |
by blast |
|
369 |
have "x = 0" |
|
370 |
proof cases |
|
371 |
assume "a = 0" |
|
372 |
with xx' and x' show ?thesis by simp |
|
373 |
next |
|
374 |
assume a: "a \<noteq> 0" |
|
375 |
from x have "x \<in> H" .. |
|
376 |
with xx' have "inverse a \<cdot> a \<cdot> x' \<in> H" by simp |
|
377 |
with a and x' have "x' \<in> H" by (simp add: mult_assoc2) |
|
378 |
thus ?thesis by contradiction |
|
379 |
qed |
|
380 |
thus "x \<in> {0}" .. |
|
9035 | 381 |
qed |
10687 | 382 |
show "{0} \<subseteq> H \<inter> lin x'" |
9035 | 383 |
proof - |
13515 | 384 |
have "0 \<in> H" .. |
385 |
moreover have "0 \<in> lin x'" .. |
|
386 |
ultimately show ?thesis by blast |
|
9035 | 387 |
qed |
388 |
qed |
|
13515 | 389 |
show "lin x' \<unlhd> E" .. |
9035 | 390 |
qed |
13515 | 391 |
thus "y1 = y2" .. |
392 |
from c have "a1 \<cdot> x' = a2 \<cdot> x'" .. |
|
393 |
with x' show "a1 = a2" by (simp add: mult_right_cancel) |
|
9035 | 394 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
395 |
|
10687 | 396 |
text {* |
397 |
Since for any element @{text "y + a \<cdot> x'"} of the direct sum of a |
|
398 |
vectorspace @{text H} and the linear closure of @{text x'} the |
|
399 |
components @{text "y \<in> H"} and @{text a} are unique, it follows from |
|
400 |
@{text "y \<in> H"} that @{text "a = 0"}. |
|
401 |
*} |
|
7917 | 402 |
|
10687 | 403 |
lemma decomp_H'_H: |
13547 | 404 |
includes vectorspace E + subspace H E |
13515 | 405 |
assumes t: "t \<in> H" |
406 |
and x': "x' \<notin> H" "x' \<in> E" "x' \<noteq> 0" |
|
407 |
shows "(SOME (y, a). t = y + a \<cdot> x' \<and> y \<in> H) = (t, 0)" |
|
408 |
proof (rule, simp_all only: split_paired_all split_conv) |
|
409 |
from t x' show "t = t + 0 \<cdot> x' \<and> t \<in> H" by simp |
|
410 |
fix y and a assume ya: "t = y + a \<cdot> x' \<and> y \<in> H" |
|
411 |
have "y = t \<and> a = 0" |
|
412 |
proof (rule decomp_H') |
|
413 |
from ya x' show "y + a \<cdot> x' = t + 0 \<cdot> x'" by simp |
|
414 |
from ya show "y \<in> H" .. |
|
415 |
qed |
|
416 |
with t x' show "(y, a) = (y + a \<cdot> x', 0)" by simp |
|
417 |
qed |
|
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
418 |
|
10687 | 419 |
text {* |
420 |
The components @{text "y \<in> H"} and @{text a} in @{text "y + a \<cdot> x'"} |
|
421 |
are unique, so the function @{text h'} defined by |
|
422 |
@{text "h' (y + a \<cdot> x') = h y + a \<cdot> \<xi>"} is definite. |
|
423 |
*} |
|
7917 | 424 |
|
9374 | 425 |
lemma h'_definite: |
13515 | 426 |
includes var H |
427 |
assumes h'_def: |
|
428 |
"h' \<equiv> (\<lambda>x. let (y, a) = SOME (y, a). (x = y + a \<cdot> x' \<and> y \<in> H) |
|
429 |
in (h y) + a * xi)" |
|
430 |
and x: "x = y + a \<cdot> x'" |
|
13547 | 431 |
includes vectorspace E + subspace H E |
13515 | 432 |
assumes y: "y \<in> H" |
433 |
and x': "x' \<notin> H" "x' \<in> E" "x' \<noteq> 0" |
|
434 |
shows "h' x = h y + a * xi" |
|
10687 | 435 |
proof - |
13515 | 436 |
from x y x' have "x \<in> H + lin x'" by auto |
437 |
have "\<exists>!p. (\<lambda>(y, a). x = y + a \<cdot> x' \<and> y \<in> H) p" (is "\<exists>!p. ?P p") |
|
9035 | 438 |
proof |
13515 | 439 |
from x y show "\<exists>p. ?P p" by blast |
440 |
fix p q assume p: "?P p" and q: "?P q" |
|
441 |
show "p = q" |
|
9035 | 442 |
proof - |
13515 | 443 |
from p have xp: "x = fst p + snd p \<cdot> x' \<and> fst p \<in> H" |
444 |
by (cases p) simp |
|
445 |
from q have xq: "x = fst q + snd q \<cdot> x' \<and> fst q \<in> H" |
|
446 |
by (cases q) simp |
|
447 |
have "fst p = fst q \<and> snd p = snd q" |
|
448 |
proof (rule decomp_H') |
|
449 |
from xp show "fst p \<in> H" .. |
|
450 |
from xq show "fst q \<in> H" .. |
|
451 |
from xp and xq show "fst p + snd p \<cdot> x' = fst q + snd q \<cdot> x'" |
|
452 |
by simp |
|
453 |
apply_end assumption+ |
|
454 |
qed |
|
455 |
thus ?thesis by (cases p, cases q) simp |
|
9035 | 456 |
qed |
457 |
qed |
|
10687 | 458 |
hence eq: "(SOME (y, a). x = y + a \<cdot> x' \<and> y \<in> H) = (y, a)" |
13515 | 459 |
by (rule some1_equality) (simp add: x y) |
460 |
with h'_def show "h' x = h y + a * xi" by (simp add: Let_def) |
|
9035 | 461 |
qed |
7535
599d3414b51d
The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff
changeset
|
462 |
|
10687 | 463 |
end |