src/HOL/Real/HahnBanach/HahnBanach.thy
changeset 8838 4eaa99f0d223
parent 8703 816d8f6513be
child 8902 a705822f4e2a
equal deleted inserted replaced
8837:9ee87bdcba05 8838:4eaa99f0d223
   594 
   594 
   595 
   595 
   596 subsection  {* Alternative formulation *};
   596 subsection  {* Alternative formulation *};
   597 
   597 
   598 text {* The following alternative formulation of the Hahn-Banach
   598 text {* The following alternative formulation of the Hahn-Banach
   599 Theorem\label{rabs-HahnBanach} uses the fact that for a real linear form
   599 Theorem\label{abs-HahnBanach} uses the fact that for a real linear form
   600 $f$ and a seminorm $p$ the
   600 $f$ and a seminorm $p$ the
   601 following inequations are equivalent:\footnote{This was shown in lemma
   601 following inequations are equivalent:\footnote{This was shown in lemma
   602 $\idt{rabs{\dsh}ineq{\dsh}iff}$ (see page \pageref{rabs-ineq-iff}).}
   602 $\idt{abs{\dsh}ineq{\dsh}iff}$ (see page \pageref{abs-ineq-iff}).}
   603 \begin{matharray}{ll}
   603 \begin{matharray}{ll}
   604 \forall x\in H.\ap |h\ap x|\leq p\ap x& {\rm and}\\
   604 \forall x\in H.\ap |h\ap x|\leq p\ap x& {\rm and}\\
   605 \forall x\in H.\ap h\ap x\leq p\ap x\\
   605 \forall x\in H.\ap h\ap x\leq p\ap x\\
   606 \end{matharray}
   606 \end{matharray}
   607 *};
   607 *};
   608 
   608 
   609 theorem rabs_HahnBanach:
   609 theorem abs_HahnBanach:
   610   "[| is_vectorspace E; is_subspace F E; is_linearform F f; 
   610   "[| is_vectorspace E; is_subspace F E; is_linearform F f; 
   611   is_seminorm E p; ALL x:F. rabs (f x) <= p x |]
   611   is_seminorm E p; ALL x:F. abs (f x) <= p x |]
   612   ==> EX g. is_linearform E g & (ALL x:F. g x = f x)
   612   ==> EX g. is_linearform E g & (ALL x:F. g x = f x)
   613    & (ALL x:E. rabs (g x) <= p x)";
   613    & (ALL x:E. abs (g x) <= p x)";
   614 proof -;
   614 proof -;
   615   assume "is_vectorspace E" "is_subspace F E" "is_seminorm E p" 
   615   assume "is_vectorspace E" "is_subspace F E" "is_seminorm E p" 
   616     "is_linearform F f"  "ALL x:F. rabs (f x) <= p x";
   616     "is_linearform F f"  "ALL x:F. abs (f x) <= p x";
   617   have "ALL x:F. f x <= p x";  by (rule rabs_ineq_iff [RS iffD1]);
   617   have "ALL x:F. f x <= p x";  by (rule abs_ineq_iff [RS iffD1]);
   618   hence "EX g. is_linearform E g & (ALL x:F. g x = f x) 
   618   hence "EX g. is_linearform E g & (ALL x:F. g x = f x) 
   619               & (ALL x:E. g x <= p x)";
   619               & (ALL x:E. g x <= p x)";
   620     by (simp! only: HahnBanach);
   620     by (simp! only: HahnBanach);
   621   thus ?thesis; 
   621   thus ?thesis; 
   622   proof (elim exE conjE);
   622   proof (elim exE conjE);
   623     fix g; assume "is_linearform E g" "ALL x:F. g x = f x" 
   623     fix g; assume "is_linearform E g" "ALL x:F. g x = f x" 
   624                   "ALL x:E. g x <= p x";
   624                   "ALL x:E. g x <= p x";
   625     hence "ALL x:E. rabs (g x) <= p x";
   625     hence "ALL x:E. abs (g x) <= p x";
   626       by (simp! add: rabs_ineq_iff [OF subspace_refl]);
   626       by (simp! add: abs_ineq_iff [OF subspace_refl]);
   627     thus ?thesis; by (intro exI conjI);
   627     thus ?thesis; by (intro exI conjI);
   628   qed;
   628   qed;
   629 qed;
   629 qed;
   630 
   630 
   631 subsection {* The Hahn-Banach Theorem for normed spaces *};
   631 subsection {* The Hahn-Banach Theorem for normed spaces *};
   670       show "0r <= norm x"; ..;
   670       show "0r <= norm x"; ..;
   671     qed;
   671     qed;
   672 
   672 
   673     txt{* $p$ is absolutely homogenous: *};
   673     txt{* $p$ is absolutely homogenous: *};
   674 
   674 
   675     show "p (a (*) x) = rabs a * p x";
   675     show "p (a (*) x) = abs a * p x";
   676     proof -; 
   676     proof -; 
   677       have "p (a (*) x) = function_norm F norm f * norm (a (*) x)";
   677       have "p (a (*) x) = function_norm F norm f * norm (a (*) x)";
   678         by (simp!);
   678         by (simp!);
   679       also; have "norm (a (*) x) = rabs a * norm x"; 
   679       also; have "norm (a (*) x) = abs a * norm x"; 
   680         by (rule normed_vs_norm_rabs_homogenous);
   680         by (rule normed_vs_norm_abs_homogenous);
   681       also; have "function_norm F norm f * (rabs a * norm x) 
   681       also; have "function_norm F norm f * (abs a * norm x) 
   682         = rabs a * (function_norm F norm f * norm x)";
   682         = abs a * (function_norm F norm f * norm x)";
   683         by (simp! only: real_mult_left_commute);
   683         by (simp! only: real_mult_left_commute);
   684       also; have "... = rabs a * p x"; by (simp!);
   684       also; have "... = abs a * p x"; by (simp!);
   685       finally; show ?thesis; .;
   685       finally; show ?thesis; .;
   686     qed;
   686     qed;
   687 
   687 
   688     txt{* Furthermore, $p$ is subadditive: *};
   688     txt{* Furthermore, $p$ is subadditive: *};
   689 
   689 
   704     qed;
   704     qed;
   705   qed;
   705   qed;
   706 
   706 
   707   txt{* $f$ is bounded by $p$. *}; 
   707   txt{* $f$ is bounded by $p$. *}; 
   708 
   708 
   709   have "ALL x:F. rabs (f x) <= p x";
   709   have "ALL x:F. abs (f x) <= p x";
   710   proof;
   710   proof;
   711     fix x; assume "x:F";
   711     fix x; assume "x:F";
   712      from f_norm; show "rabs (f x) <= p x"; 
   712      from f_norm; show "abs (f x) <= p x"; 
   713        by (simp! add: norm_fx_le_norm_f_norm_x);
   713        by (simp! add: norm_fx_le_norm_f_norm_x);
   714   qed;
   714   qed;
   715 
   715 
   716   txt{* Using the fact that $p$ is a seminorm and 
   716   txt{* Using the fact that $p$ is a seminorm and 
   717   $f$ is bounded by $p$ we can apply the Hahn-Banach Theorem 
   717   $f$ is bounded by $p$ we can apply the Hahn-Banach Theorem 
   719   So $f$ can be extended in a norm-preserving way to some function
   719   So $f$ can be extended in a norm-preserving way to some function
   720   $g$ on the whole vector space $E$. *};
   720   $g$ on the whole vector space $E$. *};
   721 
   721 
   722   with e f q; 
   722   with e f q; 
   723   have "EX g. is_linearform E g & (ALL x:F. g x = f x) 
   723   have "EX g. is_linearform E g & (ALL x:F. g x = f x) 
   724             & (ALL x:E. rabs (g x) <= p x)";
   724             & (ALL x:E. abs (g x) <= p x)";
   725     by (simp! add: rabs_HahnBanach);
   725     by (simp! add: abs_HahnBanach);
   726 
   726 
   727   thus ?thesis;
   727   thus ?thesis;
   728   proof (elim exE conjE); 
   728   proof (elim exE conjE); 
   729     fix g;
   729     fix g;
   730     assume "is_linearform E g" and a: "ALL x:F. g x = f x" 
   730     assume "is_linearform E g" and a: "ALL x:F. g x = f x" 
   731        and b: "ALL x:E. rabs (g x) <= p x";
   731        and b: "ALL x:E. abs (g x) <= p x";
   732 
   732 
   733     show "EX g. is_linearform E g 
   733     show "EX g. is_linearform E g 
   734             & is_continuous E norm g 
   734             & is_continuous E norm g 
   735             & (ALL x:F. g x = f x) 
   735             & (ALL x:F. g x = f x) 
   736             & function_norm E norm g = function_norm F norm f";
   736             & function_norm E norm g = function_norm F norm f";
   741 
   741 
   742       show g_cont: "is_continuous E norm g";
   742       show g_cont: "is_continuous E norm g";
   743       proof;
   743       proof;
   744         fix x; assume "x:E";
   744         fix x; assume "x:E";
   745         from b [RS bspec, OF this]; 
   745         from b [RS bspec, OF this]; 
   746         show "rabs (g x) <= function_norm F norm f * norm x";
   746         show "abs (g x) <= function_norm F norm f * norm x";
   747           by (unfold p_def);
   747           by (unfold p_def);
   748       qed; 
   748       qed; 
   749 
   749 
   750       txt {* To complete the proof, we show that 
   750       txt {* To complete the proof, we show that 
   751       $\fnorm g = \fnorm f$. \label{order_antisym} *};
   751       $\fnorm g = \fnorm f$. \label{order_antisym} *};
   763         \begin{matharray}{l}
   763         \begin{matharray}{l}
   764         \All {x\in E} {|g\ap x| \leq \fnorm f \cdot \norm x}
   764         \All {x\in E} {|g\ap x| \leq \fnorm f \cdot \norm x}
   765         \end{matharray}
   765         \end{matharray}
   766         *};
   766         *};
   767  
   767  
   768         have "ALL x:E. rabs (g x) <= function_norm F norm f * norm x";
   768         have "ALL x:E. abs (g x) <= function_norm F norm f * norm x";
   769         proof;
   769         proof;
   770           fix x; assume "x:E"; 
   770           fix x; assume "x:E"; 
   771           show "rabs (g x) <= function_norm F norm f * norm x";
   771           show "abs (g x) <= function_norm F norm f * norm x";
   772             by (simp!);
   772             by (simp!);
   773         qed;
   773         qed;
   774 
   774 
   775         with _ g_cont; show "?L <= ?R";
   775         with _ g_cont; show "?L <= ?R";
   776         proof (rule fnorm_le_ub);
   776         proof (rule fnorm_le_ub);
   778         qed;
   778         qed;
   779 
   779 
   780         txt{* The other direction is achieved by a similar 
   780         txt{* The other direction is achieved by a similar 
   781         argument. *};
   781         argument. *};
   782 
   782 
   783         have "ALL x:F. rabs (f x) <= function_norm E norm g * norm x";
   783         have "ALL x:F. abs (f x) <= function_norm E norm g * norm x";
   784         proof;
   784         proof;
   785           fix x; assume "x : F"; 
   785           fix x; assume "x : F"; 
   786           from a; have "g x = f x"; ..;
   786           from a; have "g x = f x"; ..;
   787           hence "rabs (f x) = rabs (g x)"; by simp;
   787           hence "abs (f x) = abs (g x)"; by simp;
   788           also; from _ _ g_cont;
   788           also; from _ _ g_cont;
   789           have "... <= function_norm E norm g * norm x";
   789           have "... <= function_norm E norm g * norm x";
   790           proof (rule norm_fx_le_norm_f_norm_x);
   790           proof (rule norm_fx_le_norm_f_norm_x);
   791             show "x:E"; ..;
   791             show "x:E"; ..;
   792           qed;
   792           qed;
   793           finally; show "rabs (f x) <= function_norm E norm g * norm x"; .;
   793           finally; show "abs (f x) <= function_norm E norm g * norm x"; .;
   794         qed; 
   794         qed; 
   795         thus "?R <= ?L"; 
   795         thus "?R <= ?L"; 
   796         proof (rule fnorm_le_ub [OF f_norm f_cont]);
   796         proof (rule fnorm_le_ub [OF f_norm f_cont]);
   797           from g_cont; show "0r <= function_norm E norm g"; ..;
   797           from g_cont; show "0r <= function_norm E norm g"; ..;
   798         qed;
   798         qed;