376 fix x; assume "x:H" "x : lin x0"; |
376 fix x; assume "x:H" "x : lin x0"; |
377 thus "x = <0>"; |
377 thus "x = <0>"; |
378 proof (unfold lin_def, elim CollectE exE conjE); |
378 proof (unfold lin_def, elim CollectE exE conjE); |
379 fix a; assume "x = a <*> x0"; |
379 fix a; assume "x = a <*> x0"; |
380 show ?thesis; |
380 show ?thesis; |
381 proof (rule case_split); |
381 proof cases; |
382 assume "a = 0r"; show ?thesis; by (simp!); |
382 assume "a = 0r"; show ?thesis; by (simp!); |
383 next; |
383 next; |
384 assume "a ~= 0r"; |
384 assume "a ~= 0r"; |
385 from h; have "rinv a <*> a <*> x0 : H"; |
385 from h; have "rinv a <*> a <*> x0 : H"; |
386 by (rule subspace_mult_closed) (simp!); |
386 by (rule subspace_mult_closed) (simp!); |
433 text {* The components $y\in H$ and $a$ in $y \plus a \mult x_0$ |
433 text {* The components $y\in H$ and $a$ in $y \plus a \mult x_0$ |
434 are unique, so the function $h_0$ defined by |
434 are unique, so the function $h_0$ defined by |
435 $h_0 (y \plus a \mult x_0) = h y + a \cdot \xi$ is definite. *}; |
435 $h_0 (y \plus a \mult x_0) = h y + a \cdot \xi$ is definite. *}; |
436 |
436 |
437 lemma h0_definite: |
437 lemma h0_definite: |
438 "[| h0 == (\<lambda>x. let (y, a) = SOME (y, a). (x = y + a <*> x0 & y:H) |
438 "[| h0 == (\\<lambda>x. let (y, a) = SOME (y, a). (x = y + a <*> x0 & y:H) |
439 in (h y) + a * xi); |
439 in (h y) + a * xi); |
440 x = y + a <*> x0; is_vectorspace E; is_subspace H E; |
440 x = y + a <*> x0; is_vectorspace E; is_subspace H E; |
441 y:H; x0 ~: H; x0:E; x0 ~= <0> |] |
441 y:H; x0 ~: H; x0:E; x0 ~= <0> |] |
442 ==> h0 x = h y + a * xi"; |
442 ==> h0 x = h y + a * xi"; |
443 proof -; |
443 proof -; |
444 assume |
444 assume |
445 "h0 == (\<lambda>x. let (y, a) = SOME (y, a). (x = y + a <*> x0 & y:H) |
445 "h0 == (\\<lambda>x. let (y, a) = SOME (y, a). (x = y + a <*> x0 & y:H) |
446 in (h y) + a * xi)" |
446 in (h y) + a * xi)" |
447 "x = y + a <*> x0" "is_vectorspace E" "is_subspace H E" |
447 "x = y + a <*> x0" "is_vectorspace E" "is_subspace H E" |
448 "y:H" "x0 ~: H" "x0:E" "x0 ~= <0>"; |
448 "y:H" "x0 ~: H" "x0:E" "x0 ~= <0>"; |
449 have "x : H + (lin x0)"; |
449 have "x : H + (lin x0)"; |
450 by (simp! add: vs_sum_def lin_def) force+; |
450 by (simp! add: vs_sum_def lin_def) force+; |
451 have "EX! xa. ((\<lambda>(y, a). x = y + a <*> x0 & y:H) xa)"; |
451 have "EX! xa. ((\\<lambda>(y, a). x = y + a <*> x0 & y:H) xa)"; |
452 proof; |
452 proof; |
453 show "EX xa. ((\<lambda>(y, a). x = y + a <*> x0 & y:H) xa)"; |
453 show "EX xa. ((\\<lambda>(y, a). x = y + a <*> x0 & y:H) xa)"; |
454 by (force!); |
454 by (force!); |
455 next; |
455 next; |
456 fix xa ya; |
456 fix xa ya; |
457 assume "(\<lambda>(y,a). x = y + a <*> x0 & y : H) xa" |
457 assume "(\\<lambda>(y,a). x = y + a <*> x0 & y : H) xa" |
458 "(\<lambda>(y,a). x = y + a <*> x0 & y : H) ya"; |
458 "(\\<lambda>(y,a). x = y + a <*> x0 & y : H) ya"; |
459 show "xa = ya"; ; |
459 show "xa = ya"; ; |
460 proof -; |
460 proof -; |
461 show "fst xa = fst ya & snd xa = snd ya ==> xa = ya"; |
461 show "fst xa = fst ya & snd xa = snd ya ==> xa = ya"; |
462 by (rule Pair_fst_snd_eq [RS iffD2]); |
462 by (rule Pair_fst_snd_eq [RS iffD2]); |
463 have x: "x = fst xa + snd xa <*> x0 & fst xa : H"; |
463 have x: "x = fst xa + snd xa <*> x0 & fst xa : H"; |