# HG changeset patch # User huffman # Date 1313247415 25200 # Node ID fe55049849373a08e3b2e904980b7dad888c2207 # Parent 4a80017c733ff254053513f8636fbe8df2ee4ce6 HOL-Hahn_Banach: use Set_Algebras library diff -r 4a80017c733f -r fe5504984937 src/HOL/Hahn_Banach/Hahn_Banach.thy --- a/src/HOL/Hahn_Banach/Hahn_Banach.thy Sat Aug 13 07:39:35 2011 -0700 +++ b/src/HOL/Hahn_Banach/Hahn_Banach.thy Sat Aug 13 07:56:55 2011 -0700 @@ -151,12 +151,12 @@ qed qed - def H' \ "H + lin x'" + def H' \ "H \ lin x'" -- {* Define @{text H'} as the direct sum of @{text H} and the linear closure of @{text x'}. \skp *} have HH': "H \ H'" proof (unfold H'_def) from x'E have "vectorspace (lin x')" .. - with H show "H \ H + lin x'" .. + with H show "H \ H \ lin x'" .. qed obtain xi where diff -r 4a80017c733f -r fe5504984937 src/HOL/Hahn_Banach/Hahn_Banach_Ext_Lemmas.thy --- a/src/HOL/Hahn_Banach/Hahn_Banach_Ext_Lemmas.thy Sat Aug 13 07:39:35 2011 -0700 +++ b/src/HOL/Hahn_Banach/Hahn_Banach_Ext_Lemmas.thy Sat Aug 13 07:56:55 2011 -0700 @@ -90,7 +90,7 @@ lemma h'_lf: assumes h'_def: "h' \ \x. let (y, a) = SOME (y, a). x = y + a \ x0 \ y \ H in h y + a * xi" - and H'_def: "H' \ H + lin x0" + and H'_def: "H' \ H \ lin x0" and HE: "H \ E" assumes "linearform H h" assumes x0: "x0 \ H" "x0 \ E" "x0 \ 0" @@ -106,7 +106,7 @@ proof (unfold H'_def) from `x0 \ E` have "lin x0 \ E" .. - with HE show "vectorspace (H + lin x0)" using E .. + with HE show "vectorspace (H \ lin x0)" using E .. qed { fix x1 x2 assume x1: "x1 \ H'" and x2: "x2 \ H'" @@ -194,7 +194,7 @@ lemma h'_norm_pres: assumes h'_def: "h' \ \x. let (y, a) = SOME (y, a). x = y + a \ x0 \ y \ H in h y + a * xi" - and H'_def: "H' \ H + lin x0" + and H'_def: "H' \ H \ lin x0" and x0: "x0 \ H" "x0 \ E" "x0 \ 0" assumes E: "vectorspace E" and HE: "subspace H E" and "seminorm E p" and "linearform H h" diff -r 4a80017c733f -r fe5504984937 src/HOL/Hahn_Banach/Subspace.thy --- a/src/HOL/Hahn_Banach/Subspace.thy Sat Aug 13 07:39:35 2011 -0700 +++ b/src/HOL/Hahn_Banach/Subspace.thy Sat Aug 13 07:56:55 2011 -0700 @@ -5,7 +5,7 @@ header {* Subspaces *} theory Subspace -imports Vector_Space +imports Vector_Space "~~/src/HOL/Library/Set_Algebras" begin subsection {* Definition *} @@ -226,45 +226,38 @@ set of all sums of elements from @{text U} and @{text V}. *} -instantiation "fun" :: (type, type) plus -begin - -definition - sum_def: "plus_fun U V = {u + v | u v. u \ U \ v \ V}" (* FIXME not fully general!? *) - -instance .. - -end +lemma sum_def: "U \ V = {u + v | u v. u \ U \ v \ V}" + unfolding set_plus_def by auto lemma sumE [elim]: - "x \ U + V \ (\u v. x = u + v \ u \ U \ v \ V \ C) \ C" + "x \ U \ V \ (\u v. x = u + v \ u \ U \ v \ V \ C) \ C" unfolding sum_def by blast lemma sumI [intro]: - "u \ U \ v \ V \ x = u + v \ x \ U + V" + "u \ U \ v \ V \ x = u + v \ x \ U \ V" unfolding sum_def by blast lemma sumI' [intro]: - "u \ U \ v \ V \ u + v \ U + V" + "u \ U \ v \ V \ u + v \ U \ V" unfolding sum_def by blast -text {* @{text U} is a subspace of @{text "U + V"}. *} +text {* @{text U} is a subspace of @{text "U \ V"}. *} lemma subspace_sum1 [iff]: assumes "vectorspace U" "vectorspace V" - shows "U \ U + V" + shows "U \ U \ V" proof - interpret vectorspace U by fact interpret vectorspace V by fact show ?thesis proof show "U \ {}" .. - show "U \ U + V" + show "U \ U \ V" proof fix x assume x: "x \ U" moreover have "0 \ V" .. - ultimately have "x + 0 \ U + V" .. - with x show "x \ U + V" by simp + ultimately have "x + 0 \ U \ V" .. + with x show "x \ U \ V" by simp qed fix x y assume x: "x \ U" and "y \ U" then show "x + y \ U" by simp @@ -276,29 +269,29 @@ lemma sum_subspace [intro?]: assumes "subspace U E" "vectorspace E" "subspace V E" - shows "U + V \ E" + shows "U \ V \ E" proof - interpret subspace U E by fact interpret vectorspace E by fact interpret subspace V E by fact show ?thesis proof - have "0 \ U + V" + have "0 \ U \ V" proof show "0 \ U" using `vectorspace E` .. show "0 \ V" using `vectorspace E` .. show "(0::'a) = 0 + 0" by simp qed - then show "U + V \ {}" by blast - show "U + V \ E" + then show "U \ V \ {}" by blast + show "U \ V \ E" proof - fix x assume "x \ U + V" + fix x assume "x \ U \ V" then obtain u v where "x = u + v" and "u \ U" and "v \ V" .. then show "x \ E" by simp qed - fix x y assume x: "x \ U + V" and y: "y \ U + V" - show "x + y \ U + V" + fix x y assume x: "x \ U \ V" and y: "y \ U \ V" + show "x + y \ U \ V" proof - from x obtain ux vx where "x = ux + vx" and "ux \ U" and "vx \ V" .. moreover @@ -310,7 +303,7 @@ using x y by (simp_all add: add_ac) then show ?thesis .. qed - fix a show "a \ x \ U + V" + fix a show "a \ x \ U \ V" proof - from x obtain u v where "x = u + v" and "u \ U" and "v \ V" .. then have "a \ u \ U" and "a \ v \ V" @@ -323,7 +316,7 @@ text{* The sum of two subspaces is a vectorspace. *} lemma sum_vs [intro?]: - "U \ E \ V \ E \ vectorspace E \ vectorspace (U + V)" + "U \ E \ V \ E \ vectorspace E \ vectorspace (U \ V)" by (rule subspace.vectorspace) (rule sum_subspace) @@ -484,7 +477,7 @@ proof - interpret vectorspace E by fact interpret subspace H E by fact - from x y x' have "x \ H + lin x'" by auto + from x y x' have "x \ H \ lin x'" by auto have "\!p. (\(y, a). x = y + a \ x' \ y \ H) p" (is "\!p. ?P p") proof (rule ex_ex1I) from x y show "\p. ?P p" by blast