src/HOL/Hahn_Banach/Hahn_Banach.thy
 author wenzelm Sun Nov 02 18:21:45 2014 +0100 (2014-11-02) changeset 58889 5b7a9633cfa8 parent 58744 c434e37f290e child 59197 c112a24446d4 permissions -rw-r--r--
     1 (*  Title:      HOL/Hahn_Banach/Hahn_Banach.thy

     2     Author:     Gertrud Bauer, TU Munich

     3 *)

     4

     5 section \<open>The Hahn-Banach Theorem\<close>

     6

     7 theory Hahn_Banach

     8 imports Hahn_Banach_Lemmas

     9 begin

    10

    11 text \<open>

    12   We present the proof of two different versions of the Hahn-Banach

    13   Theorem, closely following @{cite \<open>\S36\<close> "Heuser:1986"}.

    14 \<close>

    15

    16 subsection \<open>The Hahn-Banach Theorem for vector spaces\<close>

    17

    18 text \<open>

    19   \textbf{Hahn-Banach Theorem.} Let @{text F} be a subspace of a real

    20   vector space @{text E}, let @{text p} be a semi-norm on @{text E},

    21   and @{text f} be a linear form defined on @{text F} such that @{text

    22   f} is bounded by @{text p}, i.e.  @{text "\<forall>x \<in> F. f x \<le> p x"}.  Then

    23   @{text f} can be extended to a linear form @{text h} on @{text E}

    24   such that @{text h} is norm-preserving, i.e. @{text h} is also

    25   bounded by @{text p}.

    26

    27   \bigskip

    28   \textbf{Proof Sketch.}

    29   \begin{enumerate}

    30

    31   \item Define @{text M} as the set of norm-preserving extensions of

    32   @{text f} to subspaces of @{text E}. The linear forms in @{text M}

    33   are ordered by domain extension.

    34

    35   \item We show that every non-empty chain in @{text M} has an upper

    36   bound in @{text M}.

    37

    38   \item With Zorn's Lemma we conclude that there is a maximal function

    39   @{text g} in @{text M}.

    40

    41   \item The domain @{text H} of @{text g} is the whole space @{text

    42   E}, as shown by classical contradiction:

    43

    44   \begin{itemize}

    45

    46   \item Assuming @{text g} is not defined on whole @{text E}, it can

    47   still be extended in a norm-preserving way to a super-space @{text

    48   H'} of @{text H}.

    49

    50   \item Thus @{text g} can not be maximal. Contradiction!

    51

    52   \end{itemize}

    53   \end{enumerate}

    54 \<close>

    55

    56 theorem Hahn_Banach:

    57   assumes E: "vectorspace E" and "subspace F E"

    58     and "seminorm E p" and "linearform F f"

    59   assumes fp: "\<forall>x \<in> F. f x \<le> p x"

    60   shows "\<exists>h. linearform E h \<and> (\<forall>x \<in> F. h x = f x) \<and> (\<forall>x \<in> E. h x \<le> p x)"

    61     -- \<open>Let @{text E} be a vector space, @{text F} a subspace of @{text E}, @{text p} a seminorm on @{text E},\<close>

    62     -- \<open>and @{text f} a linear form on @{text F} such that @{text f} is bounded by @{text p},\<close>

    63     -- \<open>then @{text f} can be extended to a linear form @{text h} on @{text E} in a norm-preserving way. \skp\<close>

    64 proof -

    65   interpret vectorspace E by fact

    66   interpret subspace F E by fact

    67   interpret seminorm E p by fact

    68   interpret linearform F f by fact

    69   def M \<equiv> "norm_pres_extensions E p F f"

    70   then have M: "M = \<dots>" by (simp only:)

    71   from E have F: "vectorspace F" ..

    72   note FE = \<open>F \<unlhd> E\<close>

    73   {

    74     fix c assume cM: "c \<in> chains M" and ex: "\<exists>x. x \<in> c"

    75     have "\<Union>c \<in> M"

    76       -- \<open>Show that every non-empty chain @{text c} of @{text M} has an upper bound in @{text M}:\<close>

    77       -- \<open>@{text "\<Union>c"} is greater than any element of the chain @{text c}, so it suffices to show @{text "\<Union>c \<in> M"}.\<close>

    78       unfolding M_def

    79     proof (rule norm_pres_extensionI)

    80       let ?H = "domain (\<Union>c)"

    81       let ?h = "funct (\<Union>c)"

    82

    83       have a: "graph ?H ?h = \<Union>c"

    84       proof (rule graph_domain_funct)

    85         fix x y z assume "(x, y) \<in> \<Union>c" and "(x, z) \<in> \<Union>c"

    86         with M_def cM show "z = y" by (rule sup_definite)

    87       qed

    88       moreover from M cM a have "linearform ?H ?h"

    89         by (rule sup_lf)

    90       moreover from a M cM ex FE E have "?H \<unlhd> E"

    91         by (rule sup_subE)

    92       moreover from a M cM ex FE have "F \<unlhd> ?H"

    93         by (rule sup_supF)

    94       moreover from a M cM ex have "graph F f \<subseteq> graph ?H ?h"

    95         by (rule sup_ext)

    96       moreover from a M cM have "\<forall>x \<in> ?H. ?h x \<le> p x"

    97         by (rule sup_norm_pres)

    98       ultimately show "\<exists>H h. \<Union>c = graph H h

    99           \<and> linearform H h

   100           \<and> H \<unlhd> E

   101           \<and> F \<unlhd> H

   102           \<and> graph F f \<subseteq> graph H h

   103           \<and> (\<forall>x \<in> H. h x \<le> p x)" by blast

   104     qed

   105   }

   106   then have "\<exists>g \<in> M. \<forall>x \<in> M. g \<subseteq> x \<longrightarrow> x = g"

   107   -- \<open>With Zorn's Lemma we can conclude that there is a maximal element in @{text M}. \skp\<close>

   108   proof (rule Zorn's_Lemma)

   109       -- \<open>We show that @{text M} is non-empty:\<close>

   110     show "graph F f \<in> M"

   111       unfolding M_def

   112     proof (rule norm_pres_extensionI2)

   113       show "linearform F f" by fact

   114       show "F \<unlhd> E" by fact

   115       from F show "F \<unlhd> F" by (rule vectorspace.subspace_refl)

   116       show "graph F f \<subseteq> graph F f" ..

   117       show "\<forall>x\<in>F. f x \<le> p x" by fact

   118     qed

   119   qed

   120   then obtain g where gM: "g \<in> M" and gx: "\<forall>x \<in> M. g \<subseteq> x \<longrightarrow> g = x"

   121     by blast

   122   from gM obtain H h where

   123       g_rep: "g = graph H h"

   124     and linearform: "linearform H h"

   125     and HE: "H \<unlhd> E" and FH: "F \<unlhd> H"

   126     and graphs: "graph F f \<subseteq> graph H h"

   127     and hp: "\<forall>x \<in> H. h x \<le> p x" unfolding M_def ..

   128       -- \<open>@{text g} is a norm-preserving extension of @{text f}, in other words:\<close>

   129       -- \<open>@{text g} is the graph of some linear form @{text h} defined on a subspace @{text H} of @{text E},\<close>

   130       -- \<open>and @{text h} is an extension of @{text f} that is again bounded by @{text p}. \skp\<close>

   131   from HE E have H: "vectorspace H"

   132     by (rule subspace.vectorspace)

   133

   134   have HE_eq: "H = E"

   135     -- \<open>We show that @{text h} is defined on whole @{text E} by classical contradiction. \skp\<close>

   136   proof (rule classical)

   137     assume neq: "H \<noteq> E"

   138       -- \<open>Assume @{text h} is not defined on whole @{text E}. Then show that @{text h} can be extended\<close>

   139       -- \<open>in a norm-preserving way to a function @{text h'} with the graph @{text g'}. \skp\<close>

   140     have "\<exists>g' \<in> M. g \<subseteq> g' \<and> g \<noteq> g'"

   141     proof -

   142       from HE have "H \<subseteq> E" ..

   143       with neq obtain x' where x'E: "x' \<in> E" and "x' \<notin> H" by blast

   144       obtain x': "x' \<noteq> 0"

   145       proof

   146         show "x' \<noteq> 0"

   147         proof

   148           assume "x' = 0"

   149           with H have "x' \<in> H" by (simp only: vectorspace.zero)

   150           with \<open>x' \<notin> H\<close> show False by contradiction

   151         qed

   152       qed

   153

   154       def H' \<equiv> "H + lin x'"

   155         -- \<open>Define @{text H'} as the direct sum of @{text H} and the linear closure of @{text x'}. \skp\<close>

   156       have HH': "H \<unlhd> H'"

   157       proof (unfold H'_def)

   158         from x'E have "vectorspace (lin x')" ..

   159         with H show "H \<unlhd> H + lin x'" ..

   160       qed

   161

   162       obtain xi where

   163         xi: "\<forall>y \<in> H. - p (y + x') - h y \<le> xi

   164           \<and> xi \<le> p (y + x') - h y"

   165         -- \<open>Pick a real number @{text \<xi>} that fulfills certain inequations; this will\<close>

   166         -- \<open>be used to establish that @{text h'} is a norm-preserving extension of @{text h}.

   167            \label{ex-xi-use}\skp\<close>

   168       proof -

   169         from H have "\<exists>xi. \<forall>y \<in> H. - p (y + x') - h y \<le> xi

   170             \<and> xi \<le> p (y + x') - h y"

   171         proof (rule ex_xi)

   172           fix u v assume u: "u \<in> H" and v: "v \<in> H"

   173           with HE have uE: "u \<in> E" and vE: "v \<in> E" by auto

   174           from H u v linearform have "h v - h u = h (v - u)"

   175             by (simp add: linearform.diff)

   176           also from hp and H u v have "\<dots> \<le> p (v - u)"

   177             by (simp only: vectorspace.diff_closed)

   178           also from x'E uE vE have "v - u = x' + - x' + v + - u"

   179             by (simp add: diff_eq1)

   180           also from x'E uE vE have "\<dots> = v + x' + - (u + x')"

   181             by (simp add: add_ac)

   182           also from x'E uE vE have "\<dots> = (v + x') - (u + x')"

   183             by (simp add: diff_eq1)

   184           also from x'E uE vE E have "p \<dots> \<le> p (v + x') + p (u + x')"

   185             by (simp add: diff_subadditive)

   186           finally have "h v - h u \<le> p (v + x') + p (u + x')" .

   187           then show "- p (u + x') - h u \<le> p (v + x') - h v" by simp

   188         qed

   189         then show thesis by (blast intro: that)

   190       qed

   191

   192       def h' \<equiv> "\<lambda>x. let (y, a) =

   193           SOME (y, a). x = y + a \<cdot> x' \<and> y \<in> H in h y + a * xi"

   194         -- \<open>Define the extension @{text h'} of @{text h} to @{text H'} using @{text \<xi>}. \skp\<close>

   195

   196       have "g \<subseteq> graph H' h' \<and> g \<noteq> graph H' h'"

   197         -- \<open>@{text h'} is an extension of @{text h} \dots \skp\<close>

   198       proof

   199         show "g \<subseteq> graph H' h'"

   200         proof -

   201           have  "graph H h \<subseteq> graph H' h'"

   202           proof (rule graph_extI)

   203             fix t assume t: "t \<in> H"

   204             from E HE t have "(SOME (y, a). t = y + a \<cdot> x' \<and> y \<in> H) = (t, 0)"

   205               using \<open>x' \<notin> H\<close> \<open>x' \<in> E\<close> \<open>x' \<noteq> 0\<close> by (rule decomp_H'_H)

   206             with h'_def show "h t = h' t" by (simp add: Let_def)

   207           next

   208             from HH' show "H \<subseteq> H'" ..

   209           qed

   210           with g_rep show ?thesis by (simp only:)

   211         qed

   212

   213         show "g \<noteq> graph H' h'"

   214         proof -

   215           have "graph H h \<noteq> graph H' h'"

   216           proof

   217             assume eq: "graph H h = graph H' h'"

   218             have "x' \<in> H'"

   219               unfolding H'_def

   220             proof

   221               from H show "0 \<in> H" by (rule vectorspace.zero)

   222               from x'E show "x' \<in> lin x'" by (rule x_lin_x)

   223               from x'E show "x' = 0 + x'" by simp

   224             qed

   225             then have "(x', h' x') \<in> graph H' h'" ..

   226             with eq have "(x', h' x') \<in> graph H h" by (simp only:)

   227             then have "x' \<in> H" ..

   228             with \<open>x' \<notin> H\<close> show False by contradiction

   229           qed

   230           with g_rep show ?thesis by simp

   231         qed

   232       qed

   233       moreover have "graph H' h' \<in> M"

   234         -- \<open>and @{text h'} is norm-preserving. \skp\<close>

   235       proof (unfold M_def)

   236         show "graph H' h' \<in> norm_pres_extensions E p F f"

   237         proof (rule norm_pres_extensionI2)

   238           show "linearform H' h'"

   239             using h'_def H'_def HE linearform \<open>x' \<notin> H\<close> \<open>x' \<in> E\<close> \<open>x' \<noteq> 0\<close> E

   240             by (rule h'_lf)

   241           show "H' \<unlhd> E"

   242           unfolding H'_def

   243           proof

   244             show "H \<unlhd> E" by fact

   245             show "vectorspace E" by fact

   246             from x'E show "lin x' \<unlhd> E" ..

   247           qed

   248           from H \<open>F \<unlhd> H\<close> HH' show FH': "F \<unlhd> H'"

   249             by (rule vectorspace.subspace_trans)

   250           show "graph F f \<subseteq> graph H' h'"

   251           proof (rule graph_extI)

   252             fix x assume x: "x \<in> F"

   253             with graphs have "f x = h x" ..

   254             also have "\<dots> = h x + 0 * xi" by simp

   255             also have "\<dots> = (let (y, a) = (x, 0) in h y + a * xi)"

   256               by (simp add: Let_def)

   257             also have "(x, 0) =

   258                 (SOME (y, a). x = y + a \<cdot> x' \<and> y \<in> H)"

   259               using E HE

   260             proof (rule decomp_H'_H [symmetric])

   261               from FH x show "x \<in> H" ..

   262               from x' show "x' \<noteq> 0" .

   263               show "x' \<notin> H" by fact

   264               show "x' \<in> E" by fact

   265             qed

   266             also have

   267               "(let (y, a) = (SOME (y, a). x = y + a \<cdot> x' \<and> y \<in> H)

   268               in h y + a * xi) = h' x" by (simp only: h'_def)

   269             finally show "f x = h' x" .

   270           next

   271             from FH' show "F \<subseteq> H'" ..

   272           qed

   273           show "\<forall>x \<in> H'. h' x \<le> p x"

   274             using h'_def H'_def \<open>x' \<notin> H\<close> \<open>x' \<in> E\<close> \<open>x' \<noteq> 0\<close> E HE

   275               \<open>seminorm E p\<close> linearform and hp xi

   276             by (rule h'_norm_pres)

   277         qed

   278       qed

   279       ultimately show ?thesis ..

   280     qed

   281     then have "\<not> (\<forall>x \<in> M. g \<subseteq> x \<longrightarrow> g = x)" by simp

   282       -- \<open>So the graph @{text g} of @{text h} cannot be maximal. Contradiction! \skp\<close>

   283     with gx show "H = E" by contradiction

   284   qed

   285

   286   from HE_eq and linearform have "linearform E h"

   287     by (simp only:)

   288   moreover have "\<forall>x \<in> F. h x = f x"

   289   proof

   290     fix x assume "x \<in> F"

   291     with graphs have "f x = h x" ..

   292     then show "h x = f x" ..

   293   qed

   294   moreover from HE_eq and hp have "\<forall>x \<in> E. h x \<le> p x"

   295     by (simp only:)

   296   ultimately show ?thesis by blast

   297 qed

   298

   299

   300 subsection  \<open>Alternative formulation\<close>

   301

   302 text \<open>

   303   The following alternative formulation of the Hahn-Banach

   304   Theorem\label{abs-Hahn-Banach} uses the fact that for a real linear

   305   form @{text f} and a seminorm @{text p} the following inequations

   306   are equivalent:\footnote{This was shown in lemma @{thm [source]

   307   abs_ineq_iff} (see page \pageref{abs-ineq-iff}).}

   308   \begin{center}

   309   \begin{tabular}{lll}

   310   @{text "\<forall>x \<in> H. \<bar>h x\<bar> \<le> p x"} & and &

   311   @{text "\<forall>x \<in> H. h x \<le> p x"} \\

   312   \end{tabular}

   313   \end{center}

   314 \<close>

   315

   316 theorem abs_Hahn_Banach:

   317   assumes E: "vectorspace E" and FE: "subspace F E"

   318     and lf: "linearform F f" and sn: "seminorm E p"

   319   assumes fp: "\<forall>x \<in> F. \<bar>f x\<bar> \<le> p x"

   320   shows "\<exists>g. linearform E g

   321     \<and> (\<forall>x \<in> F. g x = f x)

   322     \<and> (\<forall>x \<in> E. \<bar>g x\<bar> \<le> p x)"

   323 proof -

   324   interpret vectorspace E by fact

   325   interpret subspace F E by fact

   326   interpret linearform F f by fact

   327   interpret seminorm E p by fact

   328   have "\<exists>g. linearform E g \<and> (\<forall>x \<in> F. g x = f x) \<and> (\<forall>x \<in> E. g x \<le> p x)"

   329     using E FE sn lf

   330   proof (rule Hahn_Banach)

   331     show "\<forall>x \<in> F. f x \<le> p x"

   332       using FE E sn lf and fp by (rule abs_ineq_iff [THEN iffD1])

   333   qed

   334   then obtain g where lg: "linearform E g" and *: "\<forall>x \<in> F. g x = f x"

   335       and **: "\<forall>x \<in> E. g x \<le> p x" by blast

   336   have "\<forall>x \<in> E. \<bar>g x\<bar> \<le> p x"

   337     using _ E sn lg **

   338   proof (rule abs_ineq_iff [THEN iffD2])

   339     show "E \<unlhd> E" ..

   340   qed

   341   with lg * show ?thesis by blast

   342 qed

   343

   344

   345 subsection \<open>The Hahn-Banach Theorem for normed spaces\<close>

   346

   347 text \<open>

   348   Every continuous linear form @{text f} on a subspace @{text F} of a

   349   norm space @{text E}, can be extended to a continuous linear form

   350   @{text g} on @{text E} such that @{text "\<parallel>f\<parallel> = \<parallel>g\<parallel>"}.

   351 \<close>

   352

   353 theorem norm_Hahn_Banach:

   354   fixes V and norm ("\<parallel>_\<parallel>")

   355   fixes B defines "\<And>V f. B V f \<equiv> {0} \<union> {\<bar>f x\<bar> / \<parallel>x\<parallel> | x. x \<noteq> 0 \<and> x \<in> V}"

   356   fixes fn_norm ("\<parallel>_\<parallel>\<hyphen>_" [0, 1000] 999)

   357   defines "\<And>V f. \<parallel>f\<parallel>\<hyphen>V \<equiv> \<Squnion>(B V f)"

   358   assumes E_norm: "normed_vectorspace E norm" and FE: "subspace F E"

   359     and linearform: "linearform F f" and "continuous F f norm"

   360   shows "\<exists>g. linearform E g

   361      \<and> continuous E g norm

   362      \<and> (\<forall>x \<in> F. g x = f x)

   363      \<and> \<parallel>g\<parallel>\<hyphen>E = \<parallel>f\<parallel>\<hyphen>F"

   364 proof -

   365   interpret normed_vectorspace E norm by fact

   366   interpret normed_vectorspace_with_fn_norm E norm B fn_norm

   367     by (auto simp: B_def fn_norm_def) intro_locales

   368   interpret subspace F E by fact

   369   interpret linearform F f by fact

   370   interpret continuous F f norm by fact

   371   have E: "vectorspace E" by intro_locales

   372   have F: "vectorspace F" by rule intro_locales

   373   have F_norm: "normed_vectorspace F norm"

   374     using FE E_norm by (rule subspace_normed_vs)

   375   have ge_zero: "0 \<le> \<parallel>f\<parallel>\<hyphen>F"

   376     by (rule normed_vectorspace_with_fn_norm.fn_norm_ge_zero

   377       [OF normed_vectorspace_with_fn_norm.intro,

   378        OF F_norm \<open>continuous F f norm\<close> , folded B_def fn_norm_def])

   379   txt \<open>We define a function @{text p} on @{text E} as follows:

   380     @{text "p x = \<parallel>f\<parallel> \<cdot> \<parallel>x\<parallel>"}\<close>

   381   def p \<equiv> "\<lambda>x. \<parallel>f\<parallel>\<hyphen>F * \<parallel>x\<parallel>"

   382

   383   txt \<open>@{text p} is a seminorm on @{text E}:\<close>

   384   have q: "seminorm E p"

   385   proof

   386     fix x y a assume x: "x \<in> E" and y: "y \<in> E"

   387

   388     txt \<open>@{text p} is positive definite:\<close>

   389     have "0 \<le> \<parallel>f\<parallel>\<hyphen>F" by (rule ge_zero)

   390     moreover from x have "0 \<le> \<parallel>x\<parallel>" ..

   391     ultimately show "0 \<le> p x"

   392       by (simp add: p_def zero_le_mult_iff)

   393

   394     txt \<open>@{text p} is absolutely homogeneous:\<close>

   395

   396     show "p (a \<cdot> x) = \<bar>a\<bar> * p x"

   397     proof -

   398       have "p (a \<cdot> x) = \<parallel>f\<parallel>\<hyphen>F * \<parallel>a \<cdot> x\<parallel>" by (simp only: p_def)

   399       also from x have "\<parallel>a \<cdot> x\<parallel> = \<bar>a\<bar> * \<parallel>x\<parallel>" by (rule abs_homogenous)

   400       also have "\<parallel>f\<parallel>\<hyphen>F * (\<bar>a\<bar> * \<parallel>x\<parallel>) = \<bar>a\<bar> * (\<parallel>f\<parallel>\<hyphen>F * \<parallel>x\<parallel>)" by simp

   401       also have "\<dots> = \<bar>a\<bar> * p x" by (simp only: p_def)

   402       finally show ?thesis .

   403     qed

   404

   405     txt \<open>Furthermore, @{text p} is subadditive:\<close>

   406

   407     show "p (x + y) \<le> p x + p y"

   408     proof -

   409       have "p (x + y) = \<parallel>f\<parallel>\<hyphen>F * \<parallel>x + y\<parallel>" by (simp only: p_def)

   410       also have a: "0 \<le> \<parallel>f\<parallel>\<hyphen>F" by (rule ge_zero)

   411       from x y have "\<parallel>x + y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>" ..

   412       with a have " \<parallel>f\<parallel>\<hyphen>F * \<parallel>x + y\<parallel> \<le> \<parallel>f\<parallel>\<hyphen>F * (\<parallel>x\<parallel> + \<parallel>y\<parallel>)"

   413         by (simp add: mult_left_mono)

   414       also have "\<dots> = \<parallel>f\<parallel>\<hyphen>F * \<parallel>x\<parallel> + \<parallel>f\<parallel>\<hyphen>F * \<parallel>y\<parallel>" by (simp only: distrib_left)

   415       also have "\<dots> = p x + p y" by (simp only: p_def)

   416       finally show ?thesis .

   417     qed

   418   qed

   419

   420   txt \<open>@{text f} is bounded by @{text p}.\<close>

   421

   422   have "\<forall>x \<in> F. \<bar>f x\<bar> \<le> p x"

   423   proof

   424     fix x assume "x \<in> F"

   425     with \<open>continuous F f norm\<close> and linearform

   426     show "\<bar>f x\<bar> \<le> p x"

   427       unfolding p_def by (rule normed_vectorspace_with_fn_norm.fn_norm_le_cong

   428         [OF normed_vectorspace_with_fn_norm.intro,

   429          OF F_norm, folded B_def fn_norm_def])

   430   qed

   431

   432   txt \<open>Using the fact that @{text p} is a seminorm and @{text f} is bounded

   433     by @{text p} we can apply the Hahn-Banach Theorem for real vector

   434     spaces. So @{text f} can be extended in a norm-preserving way to

   435     some function @{text g} on the whole vector space @{text E}.\<close>

   436

   437   with E FE linearform q obtain g where

   438       linearformE: "linearform E g"

   439     and a: "\<forall>x \<in> F. g x = f x"

   440     and b: "\<forall>x \<in> E. \<bar>g x\<bar> \<le> p x"

   441     by (rule abs_Hahn_Banach [elim_format]) iprover

   442

   443   txt \<open>We furthermore have to show that @{text g} is also continuous:\<close>

   444

   445   have g_cont: "continuous E g norm" using linearformE

   446   proof

   447     fix x assume "x \<in> E"

   448     with b show "\<bar>g x\<bar> \<le> \<parallel>f\<parallel>\<hyphen>F * \<parallel>x\<parallel>"

   449       by (simp only: p_def)

   450   qed

   451

   452   txt \<open>To complete the proof, we show that @{text "\<parallel>g\<parallel> = \<parallel>f\<parallel>"}.\<close>

   453

   454   have "\<parallel>g\<parallel>\<hyphen>E = \<parallel>f\<parallel>\<hyphen>F"

   455   proof (rule order_antisym)

   456     txt \<open>

   457       First we show @{text "\<parallel>g\<parallel> \<le> \<parallel>f\<parallel>"}.  The function norm @{text

   458       "\<parallel>g\<parallel>"} is defined as the smallest @{text "c \<in> \<real>"} such that

   459       \begin{center}

   460       \begin{tabular}{l}

   461       @{text "\<forall>x \<in> E. \<bar>g x\<bar> \<le> c \<cdot> \<parallel>x\<parallel>"}

   462       \end{tabular}

   463       \end{center}

   464       \noindent Furthermore holds

   465       \begin{center}

   466       \begin{tabular}{l}

   467       @{text "\<forall>x \<in> E. \<bar>g x\<bar> \<le> \<parallel>f\<parallel> \<cdot> \<parallel>x\<parallel>"}

   468       \end{tabular}

   469       \end{center}

   470 \<close>

   471

   472     from g_cont _ ge_zero

   473     show "\<parallel>g\<parallel>\<hyphen>E \<le> \<parallel>f\<parallel>\<hyphen>F"

   474     proof

   475       fix x assume "x \<in> E"

   476       with b show "\<bar>g x\<bar> \<le> \<parallel>f\<parallel>\<hyphen>F * \<parallel>x\<parallel>"

   477         by (simp only: p_def)

   478     qed

   479

   480     txt \<open>The other direction is achieved by a similar argument.\<close>

   481

   482     show "\<parallel>f\<parallel>\<hyphen>F \<le> \<parallel>g\<parallel>\<hyphen>E"

   483     proof (rule normed_vectorspace_with_fn_norm.fn_norm_least

   484         [OF normed_vectorspace_with_fn_norm.intro,

   485          OF F_norm, folded B_def fn_norm_def])

   486       fix x assume x: "x \<in> F"

   487       show "\<bar>f x\<bar> \<le> \<parallel>g\<parallel>\<hyphen>E * \<parallel>x\<parallel>"

   488       proof -

   489         from a x have "g x = f x" ..

   490         then have "\<bar>f x\<bar> = \<bar>g x\<bar>" by (simp only:)

   491         also from g_cont

   492         have "\<dots> \<le> \<parallel>g\<parallel>\<hyphen>E * \<parallel>x\<parallel>"

   493         proof (rule fn_norm_le_cong [OF _ linearformE, folded B_def fn_norm_def])

   494           from FE x show "x \<in> E" ..

   495         qed

   496         finally show ?thesis .

   497       qed

   498     next

   499       show "0 \<le> \<parallel>g\<parallel>\<hyphen>E"

   500         using g_cont

   501         by (rule fn_norm_ge_zero [of g, folded B_def fn_norm_def])

   502       show "continuous F f norm" by fact

   503     qed

   504   qed

   505   with linearformE a g_cont show ?thesis by blast

   506 qed

   507

   508 end