src/HOL/Real/HahnBanach/FunctionNorm.thy
author schirmer
Tue, 20 Jan 2004 13:56:27 +0100
changeset 14359 3d9948163018
parent 14334 6137d24eef79
child 14710 247615bfffb8
permissions -rw-r--r--
Added print translation for pairs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     1
(*  Title:      HOL/Real/HahnBanach/FunctionNorm.thy
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     2
    ID:         $Id$
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     3
    Author:     Gertrud Bauer, TU Munich
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     4
*)
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
     5
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
     6
header {* The norm of a function *}
7808
fd019ac3485f update from Gertrud;
wenzelm
parents: 7656
diff changeset
     7
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
     8
theory FunctionNorm = NormedSpace + FunctionOrder:
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
     9
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    10
subsection {* Continuous linear forms*}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    11
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    12
text {*
11472
wenzelm
parents: 10752
diff changeset
    13
  A linear form @{text f} on a normed vector space @{text "(V, \<parallel>\<cdot>\<parallel>)"}
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    14
  is \emph{continuous}, iff it is bounded, i.e.
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    15
  \begin{center}
11472
wenzelm
parents: 10752
diff changeset
    16
  @{text "\<exists>c \<in> R. \<forall>x \<in> V. \<bar>f x\<bar> \<le> c \<cdot> \<parallel>x\<parallel>"}
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    17
  \end{center}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    18
  In our application no other functions than linear forms are
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    19
  considered, so we can define continuous linear forms as bounded
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    20
  linear forms:
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    21
*}
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    22
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    23
locale continuous = var V + norm_syntax + linearform +
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    24
  assumes bounded: "\<exists>c. \<forall>x \<in> V. \<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>"
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    25
14254
342634f38451 Isar/Locales: <loc>.intro and <loc>.axioms no longer intro? and elim? by
ballarin
parents: 14214
diff changeset
    26
declare continuous.intro [intro?] continuous_axioms.intro [intro?]
342634f38451 Isar/Locales: <loc>.intro and <loc>.axioms no longer intro? and elim? by
ballarin
parents: 14214
diff changeset
    27
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    28
lemma continuousI [intro]:
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    29
  includes norm_syntax + linearform
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    30
  assumes r: "\<And>x. x \<in> V \<Longrightarrow> \<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    31
  shows "continuous V norm f"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    32
proof
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    33
  show "linearform V f" .
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    34
  from r have "\<exists>c. \<forall>x\<in>V. \<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>" by blast
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    35
  then show "continuous_axioms V norm f" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    36
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    37
11472
wenzelm
parents: 10752
diff changeset
    38
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    39
subsection {* The norm of a linear form *}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    40
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    41
text {*
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    42
  The least real number @{text c} for which holds
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    43
  \begin{center}
11472
wenzelm
parents: 10752
diff changeset
    44
  @{text "\<forall>x \<in> V. \<bar>f x\<bar> \<le> c \<cdot> \<parallel>x\<parallel>"}
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    45
  \end{center}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    46
  is called the \emph{norm} of @{text f}.
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    47
11472
wenzelm
parents: 10752
diff changeset
    48
  For non-trivial vector spaces @{text "V \<noteq> {0}"} the norm can be
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    49
  defined as
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    50
  \begin{center}
11472
wenzelm
parents: 10752
diff changeset
    51
  @{text "\<parallel>f\<parallel> = \<sup>x \<noteq> 0. \<bar>f x\<bar> / \<parallel>x\<parallel>"}
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    52
  \end{center}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    53
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    54
  For the case @{text "V = {0}"} the supremum would be taken from an
11472
wenzelm
parents: 10752
diff changeset
    55
  empty set. Since @{text \<real>} is unbounded, there would be no supremum.
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    56
  To avoid this situation it must be guaranteed that there is an
11472
wenzelm
parents: 10752
diff changeset
    57
  element in this set. This element must be @{text "{} \<ge> 0"} so that
13547
wenzelm
parents: 13524
diff changeset
    58
  @{text fn_norm} has the norm properties. Furthermore it does not
wenzelm
parents: 13524
diff changeset
    59
  have to change the norm in all other cases, so it must be @{text 0},
wenzelm
parents: 13524
diff changeset
    60
  as all other elements are @{text "{} \<ge> 0"}.
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    61
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    62
  Thus we define the set @{text B} where the supremum is taken from as
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    63
  follows:
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    64
  \begin{center}
11472
wenzelm
parents: 10752
diff changeset
    65
  @{text "{0} \<union> {\<bar>f x\<bar> / \<parallel>x\<parallel>. x \<noteq> 0 \<and> x \<in> F}"}
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    66
  \end{center}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    67
13547
wenzelm
parents: 13524
diff changeset
    68
  @{text fn_norm} is equal to the supremum of @{text B}, if the
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    69
  supremum exists (otherwise it is undefined).
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
    70
*}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    71
13547
wenzelm
parents: 13524
diff changeset
    72
locale fn_norm = norm_syntax +
wenzelm
parents: 13524
diff changeset
    73
  fixes B defines "B V f \<equiv> {0} \<union> {\<bar>f x\<bar> / \<parallel>x\<parallel> | x. x \<noteq> 0 \<and> x \<in> V}"
wenzelm
parents: 13524
diff changeset
    74
  fixes fn_norm ("\<parallel>_\<parallel>\<hyphen>_" [0, 1000] 999)
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    75
  defines "\<parallel>f\<parallel>\<hyphen>V \<equiv> \<Squnion>(B V f)"
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    76
13547
wenzelm
parents: 13524
diff changeset
    77
lemma (in fn_norm) B_not_empty [intro]: "0 \<in> B V f"
wenzelm
parents: 13524
diff changeset
    78
  by (simp add: B_def)
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    79
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    80
text {*
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    81
  The following lemma states that every continuous linear form on a
11472
wenzelm
parents: 10752
diff changeset
    82
  normed space @{text "(V, \<parallel>\<cdot>\<parallel>)"} has a function norm.
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    83
*}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    84
13547
wenzelm
parents: 13524
diff changeset
    85
lemma (in normed_vectorspace) fn_norm_works:   (* FIXME bug with "(in fn_norm)" !? *)
wenzelm
parents: 13524
diff changeset
    86
  includes fn_norm + continuous
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    87
  shows "lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    88
proof -
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    89
  txt {* The existence of the supremum is shown using the
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    90
    completeness of the reals. Completeness means, that every
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    91
    non-empty bounded set of reals has a supremum. *}
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    92
  have "\<exists>a. lub (B V f) a"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    93
  proof (rule real_complete)
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    94
    txt {* First we have to show that @{text B} is non-empty: *}
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    95
    have "0 \<in> B V f" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    96
    thus "\<exists>x. x \<in> B V f" ..
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    97
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
    98
    txt {* Then we have to show that @{text B} is bounded: *}
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
    99
    show "\<exists>c. \<forall>y \<in> B V f. y \<le> c"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   100
    proof -
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   101
      txt {* We know that @{text f} is bounded by some value @{text c}. *}
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   102
      from bounded obtain c where c: "\<forall>x \<in> V. \<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>" ..
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   103
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   104
      txt {* To prove the thesis, we have to show that there is some
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   105
        @{text b}, such that @{text "y \<le> b"} for all @{text "y \<in>
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   106
        B"}. Due to the definition of @{text B} there are two cases. *}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
   107
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   108
      def b \<equiv> "max c 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   109
      have "\<forall>y \<in> B V f. y \<le> b"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   110
      proof
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   111
        fix y assume y: "y \<in> B V f"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   112
        show "y \<le> b"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   113
        proof cases
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   114
          assume "y = 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   115
          thus ?thesis by (unfold b_def) arith
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   116
        next
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   117
          txt {* The second case is @{text "y = \<bar>f x\<bar> / \<parallel>x\<parallel>"} for some
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   118
            @{text "x \<in> V"} with @{text "x \<noteq> 0"}. *}
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   119
          assume "y \<noteq> 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   120
          with y obtain x where y_rep: "y = \<bar>f x\<bar> * inverse \<parallel>x\<parallel>"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   121
              and x: "x \<in> V" and neq: "x \<noteq> 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   122
            by (auto simp add: B_def real_divide_def)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   123
          from x neq have gt: "0 < \<parallel>x\<parallel>" ..
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
   124
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   125
          txt {* The thesis follows by a short calculation using the
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   126
            fact that @{text f} is bounded. *}
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   127
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   128
          note y_rep
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   129
          also have "\<bar>f x\<bar> * inverse \<parallel>x\<parallel> \<le> (c * \<parallel>x\<parallel>) * inverse \<parallel>x\<parallel>"
14334
6137d24eef79 tweaking of lemmas in RealDef, RealOrd
paulson
parents: 14254
diff changeset
   130
          proof (rule mult_right_mono)
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   131
            from c show "\<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>" ..
14334
6137d24eef79 tweaking of lemmas in RealDef, RealOrd
paulson
parents: 14254
diff changeset
   132
            from gt have "0 < inverse \<parallel>x\<parallel>" 
6137d24eef79 tweaking of lemmas in RealDef, RealOrd
paulson
parents: 14254
diff changeset
   133
              by (rule positive_imp_inverse_positive)
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   134
            thus "0 \<le> inverse \<parallel>x\<parallel>" by (rule order_less_imp_le)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   135
          qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   136
          also have "\<dots> = c * (\<parallel>x\<parallel> * inverse \<parallel>x\<parallel>)"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   137
            by (rule real_mult_assoc)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   138
          also
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   139
          from gt have "\<parallel>x\<parallel> \<noteq> 0" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   140
          hence "\<parallel>x\<parallel> * inverse \<parallel>x\<parallel> = 1" by (simp add: real_mult_inv_right1)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   141
          also have "c * 1 \<le> b" by (simp add: b_def le_maxI1)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   142
          finally show "y \<le> b" .
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   143
        qed
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   144
      qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   145
      thus ?thesis ..
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   146
    qed
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   147
  qed
13547
wenzelm
parents: 13524
diff changeset
   148
  then show ?thesis by (unfold fn_norm_def) (rule the_lubI_ex)
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   149
qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   150
13547
wenzelm
parents: 13524
diff changeset
   151
lemma (in normed_vectorspace) fn_norm_ub [iff?]:
wenzelm
parents: 13524
diff changeset
   152
  includes fn_norm + continuous
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   153
  assumes b: "b \<in> B V f"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   154
  shows "b \<le> \<parallel>f\<parallel>\<hyphen>V"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   155
proof -
13547
wenzelm
parents: 13524
diff changeset
   156
  have "lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)"
14214
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   157
    by (unfold B_def fn_norm_def) (rule fn_norm_works [OF _ continuous.intro])
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   158
  from this and b show ?thesis ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   159
qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   160
13547
wenzelm
parents: 13524
diff changeset
   161
lemma (in normed_vectorspace) fn_norm_leastB:
wenzelm
parents: 13524
diff changeset
   162
  includes fn_norm + continuous
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   163
  assumes b: "\<And>b. b \<in> B V f \<Longrightarrow> b \<le> y"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   164
  shows "\<parallel>f\<parallel>\<hyphen>V \<le> y"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   165
proof -
13547
wenzelm
parents: 13524
diff changeset
   166
  have "lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)"
14214
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   167
    by (unfold B_def fn_norm_def) (rule fn_norm_works [OF _ continuous.intro])
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   168
  from this and b show ?thesis ..
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   169
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   170
11472
wenzelm
parents: 10752
diff changeset
   171
text {* The norm of a continuous function is always @{text "\<ge> 0"}. *}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
   172
13547
wenzelm
parents: 13524
diff changeset
   173
lemma (in normed_vectorspace) fn_norm_ge_zero [iff]:
wenzelm
parents: 13524
diff changeset
   174
  includes fn_norm + continuous
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   175
  shows "0 \<le> \<parallel>f\<parallel>\<hyphen>V"
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   176
proof -
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   177
  txt {* The function norm is defined as the supremum of @{text B}.
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   178
    So it is @{text "\<ge> 0"} if all elements in @{text B} are @{text "\<ge>
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   179
    0"}, provided the supremum exists and @{text B} is not empty. *}
13547
wenzelm
parents: 13524
diff changeset
   180
  have "lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)"
14214
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   181
    by (unfold B_def fn_norm_def) (rule fn_norm_works [OF _ continuous.intro])
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   182
  moreover have "0 \<in> B V f" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   183
  ultimately show ?thesis ..
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   184
qed
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   185
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   186
text {*
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   187
  \medskip The fundamental property of function norms is:
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   188
  \begin{center}
11472
wenzelm
parents: 10752
diff changeset
   189
  @{text "\<bar>f x\<bar> \<le> \<parallel>f\<parallel> \<cdot> \<parallel>x\<parallel>"}
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   190
  \end{center}
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   191
*}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
   192
13547
wenzelm
parents: 13524
diff changeset
   193
lemma (in normed_vectorspace) fn_norm_le_cong:
wenzelm
parents: 13524
diff changeset
   194
  includes fn_norm + continuous + linearform
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   195
  assumes x: "x \<in> V"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   196
  shows "\<bar>f x\<bar> \<le> \<parallel>f\<parallel>\<hyphen>V * \<parallel>x\<parallel>"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   197
proof cases
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   198
  assume "x = 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   199
  then have "\<bar>f x\<bar> = \<bar>f 0\<bar>" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   200
  also have "f 0 = 0" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   201
  also have "\<bar>\<dots>\<bar> = 0" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   202
  also have "\<dots> \<le> \<parallel>f\<parallel>\<hyphen>V * \<parallel>x\<parallel>"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   203
  proof (rule real_le_mult_order1a)
14214
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   204
    show "0 \<le> \<parallel>f\<parallel>\<hyphen>V"
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   205
      by (unfold B_def fn_norm_def)
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   206
        (rule fn_norm_ge_zero [OF _ continuous.intro])
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   207
    show "0 \<le> norm x" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   208
  qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   209
  finally show "\<bar>f x\<bar> \<le> \<parallel>f\<parallel>\<hyphen>V * \<parallel>x\<parallel>" .
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   210
next
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   211
  assume "x \<noteq> 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   212
  with x have neq: "\<parallel>x\<parallel> \<noteq> 0" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   213
  then have "\<bar>f x\<bar> = (\<bar>f x\<bar> * inverse \<parallel>x\<parallel>) * \<parallel>x\<parallel>" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   214
  also have "\<dots> \<le>  \<parallel>f\<parallel>\<hyphen>V * \<parallel>x\<parallel>"
14334
6137d24eef79 tweaking of lemmas in RealDef, RealOrd
paulson
parents: 14254
diff changeset
   215
  proof (rule mult_right_mono)
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   216
    from x show "0 \<le> \<parallel>x\<parallel>" ..
13547
wenzelm
parents: 13524
diff changeset
   217
    from x and neq have "\<bar>f x\<bar> * inverse \<parallel>x\<parallel> \<in> B V f"
wenzelm
parents: 13524
diff changeset
   218
      by (auto simp add: B_def real_divide_def)
wenzelm
parents: 13524
diff changeset
   219
    then show "\<bar>f x\<bar> * inverse \<parallel>x\<parallel> \<le> \<parallel>f\<parallel>\<hyphen>V"
14214
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   220
      by (unfold B_def fn_norm_def) (rule fn_norm_ub [OF _ continuous.intro])
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   221
  qed
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   222
  finally show ?thesis .
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   223
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   224
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   225
text {*
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   226
  \medskip The function norm is the least positive real number for
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   227
  which the following inequation holds:
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   228
  \begin{center}
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   229
    @{text "\<bar>f x\<bar> \<le> c \<cdot> \<parallel>x\<parallel>"}
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   230
  \end{center}
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   231
*}
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
   232
13547
wenzelm
parents: 13524
diff changeset
   233
lemma (in normed_vectorspace) fn_norm_least [intro?]:
wenzelm
parents: 13524
diff changeset
   234
  includes fn_norm + continuous
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   235
  assumes ineq: "\<forall>x \<in> V. \<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>" and ge: "0 \<le> c"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   236
  shows "\<parallel>f\<parallel>\<hyphen>V \<le> c"
13547
wenzelm
parents: 13524
diff changeset
   237
proof (rule fn_norm_leastB [folded B_def fn_norm_def])
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   238
  fix b assume b: "b \<in> B V f"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   239
  show "b \<le> c"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   240
  proof cases
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   241
    assume "b = 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   242
    with ge show ?thesis by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   243
  next
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   244
    assume "b \<noteq> 0"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   245
    with b obtain x where b_rep: "b = \<bar>f x\<bar> * inverse \<parallel>x\<parallel>"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   246
        and x_neq: "x \<noteq> 0" and x: "x \<in> V"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   247
      by (auto simp add: B_def real_divide_def)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   248
    note b_rep
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   249
    also have "\<bar>f x\<bar> * inverse \<parallel>x\<parallel> \<le> (c * \<parallel>x\<parallel>) * inverse \<parallel>x\<parallel>"
14334
6137d24eef79 tweaking of lemmas in RealDef, RealOrd
paulson
parents: 14254
diff changeset
   250
    proof (rule mult_right_mono)
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   251
      have "0 < \<parallel>x\<parallel>" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   252
      then show "0 \<le> inverse \<parallel>x\<parallel>" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   253
      from ineq and x show "\<bar>f x\<bar> \<le> c * \<parallel>x\<parallel>" ..
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   254
    qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   255
    also have "\<dots> = c"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   256
    proof -
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   257
      from x_neq and x have "\<parallel>x\<parallel> \<noteq> 0" by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   258
      then show ?thesis by simp
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   259
    qed
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 12018
diff changeset
   260
    finally show ?thesis .
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 9013
diff changeset
   261
  qed
14214
5369d671f100 Improvements to Isar/Locales: premises generated by "includes" elements
ballarin
parents: 13547
diff changeset
   262
qed (simp_all! add: continuous_def)
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   263
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 10606
diff changeset
   264
end