src/HOL/Hahn_Banach/Function_Order.thy
author wenzelm
Wed, 04 Nov 2015 23:27:00 +0100
changeset 61578 6623c81cb15a
parent 61540 f92bf6674699
child 61879 e4f9d8f094fe
permissions -rw-r--r--
avoid ligatures;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31795
be3e1cc5005c standard naming conventions for session and theories;
wenzelm
parents: 29197
diff changeset
     1
(*  Title:      HOL/Hahn_Banach/Function_Order.thy
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     2
    Author:     Gertrud Bauer, TU Munich
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
     3
*)
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
     4
58889
5b7a9633cfa8 modernized header uniformly as section;
wenzelm
parents: 58745
diff changeset
     5
section \<open>An order on functions\<close>
7808
fd019ac3485f update from Gertrud;
wenzelm
parents: 7656
diff changeset
     6
31795
be3e1cc5005c standard naming conventions for session and theories;
wenzelm
parents: 29197
diff changeset
     7
theory Function_Order
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
     8
imports Subspace Linearform
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
     9
begin
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    10
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    11
subsection \<open>The graph of a function\<close>
7808
fd019ac3485f update from Gertrud;
wenzelm
parents: 7656
diff changeset
    12
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    13
text \<open>
61539
a29295dac1ca isabelle update_cartouches -t;
wenzelm
parents: 61486
diff changeset
    14
  We define the \<^emph>\<open>graph\<close> of a (real) function \<open>f\<close> with
a29295dac1ca isabelle update_cartouches -t;
wenzelm
parents: 61486
diff changeset
    15
  domain \<open>F\<close> as the set
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    16
  \begin{center}
61539
a29295dac1ca isabelle update_cartouches -t;
wenzelm
parents: 61486
diff changeset
    17
  \<open>{(x, f x). x \<in> F}\<close>
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    18
  \end{center}
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    19
  So we are modeling partial functions by specifying the domain and
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    20
  the mapping function. We use the term ``function'' also for its
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    21
  graph.
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    22
\<close>
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    23
41818
6d4c3ee8219d modernized specifications;
wenzelm
parents: 31795
diff changeset
    24
type_synonym 'a graph = "('a \<times> real) set"
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    25
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    26
definition graph :: "'a set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> 'a graph"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    27
  where "graph F f = {(x, f x) | x. x \<in> F}"
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    28
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    29
lemma graphI [intro]: "x \<in> F \<Longrightarrow> (x, f x) \<in> graph F f"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    30
  unfolding graph_def by blast
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    31
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    32
lemma graphI2 [intro?]: "x \<in> F \<Longrightarrow> \<exists>t \<in> graph F f. t = (x, f x)"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    33
  unfolding graph_def by blast
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
    34
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    35
lemma graphE [elim?]:
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    36
  assumes "(x, y) \<in> graph F f"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    37
  obtains "x \<in> F" and "y = f x"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    38
  using assms unfolding graph_def by blast
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    39
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    40
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    41
subsection \<open>Functions ordered by domain extension\<close>
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    42
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    43
text \<open>
61539
a29295dac1ca isabelle update_cartouches -t;
wenzelm
parents: 61486
diff changeset
    44
  A function \<open>h'\<close> is an extension of \<open>h\<close>, iff the graph of
a29295dac1ca isabelle update_cartouches -t;
wenzelm
parents: 61486
diff changeset
    45
  \<open>h\<close> is a subset of the graph of \<open>h'\<close>.
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    46
\<close>
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    47
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    48
lemma graph_extI:
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    49
  "(\<And>x. x \<in> H \<Longrightarrow> h x = h' x) \<Longrightarrow> H \<subseteq> H'
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    50
    \<Longrightarrow> graph H h \<subseteq> graph H' h'"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    51
  unfolding graph_def by blast
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    52
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    53
lemma graph_extD1 [dest?]: "graph H h \<subseteq> graph H' h' \<Longrightarrow> x \<in> H \<Longrightarrow> h x = h' x"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    54
  unfolding graph_def by blast
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
    55
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    56
lemma graph_extD2 [dest?]: "graph H h \<subseteq> graph H' h' \<Longrightarrow> H \<subseteq> H'"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    57
  unfolding graph_def by blast
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
    58
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    59
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    60
subsection \<open>Domain and function of a graph\<close>
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    61
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    62
text \<open>
61539
a29295dac1ca isabelle update_cartouches -t;
wenzelm
parents: 61486
diff changeset
    63
  The inverse functions to \<open>graph\<close> are \<open>domain\<close> and \<open>funct\<close>.
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    64
\<close>
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    65
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    66
definition domain :: "'a graph \<Rightarrow> 'a set"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    67
  where "domain g = {x. \<exists>y. (x, y) \<in> g}"
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    68
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    69
definition funct :: "'a graph \<Rightarrow> ('a \<Rightarrow> real)"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
    70
  where "funct g = (\<lambda>x. (SOME y. (x, y) \<in> g))"
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    71
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    72
text \<open>
61540
f92bf6674699 tuned document;
wenzelm
parents: 61539
diff changeset
    73
  The following lemma states that \<open>g\<close> is the graph of a function if the
f92bf6674699 tuned document;
wenzelm
parents: 61539
diff changeset
    74
  relation induced by \<open>g\<close> is unique.
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    75
\<close>
7566
c5a3f980a7af accomodate refined facts handling;
wenzelm
parents: 7535
diff changeset
    76
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
    77
lemma graph_domain_funct:
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    78
  assumes uniq: "\<And>x y z. (x, y) \<in> g \<Longrightarrow> (x, z) \<in> g \<Longrightarrow> z = y"
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    79
  shows "graph (domain g) (funct g) = g"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    80
  unfolding domain_def funct_def graph_def
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
    81
proof auto  (* FIXME !? *)
23378
1d138d6bb461 tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
    82
  fix a b assume g: "(a, b) \<in> g"
1d138d6bb461 tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
    83
  from g show "(a, SOME y. (a, y) \<in> g) \<in> g" by (rule someI2)
1d138d6bb461 tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
    84
  from g show "\<exists>y. (a, y) \<in> g" ..
1d138d6bb461 tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
    85
  from g show "b = (SOME y. (a, y) \<in> g)"
9969
4753185f1dd2 renamed (most of...) the select rules
paulson
parents: 9623
diff changeset
    86
  proof (rule some_equality [symmetric])
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
    87
    fix y assume "(a, y) \<in> g"
23378
1d138d6bb461 tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
    88
    with g show "y = b" by (rule uniq)
9035
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 8203
diff changeset
    89
  qed
371f023d3dbd removed explicit terminator (";");
wenzelm
parents: 8203
diff changeset
    90
qed
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
    91
7808
fd019ac3485f update from Gertrud;
wenzelm
parents: 7656
diff changeset
    92
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    93
subsection \<open>Norm-preserving extensions of a function\<close>
7917
5e5b9813cce7 HahnBanach update by Gertrud Bauer;
wenzelm
parents: 7808
diff changeset
    94
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    95
text \<open>
61540
f92bf6674699 tuned document;
wenzelm
parents: 61539
diff changeset
    96
  Given a linear form \<open>f\<close> on the space \<open>F\<close> and a seminorm \<open>p\<close> on \<open>E\<close>. The
f92bf6674699 tuned document;
wenzelm
parents: 61539
diff changeset
    97
  set of all linear extensions of \<open>f\<close>, to superspaces \<open>H\<close> of \<open>F\<close>, which are
f92bf6674699 tuned document;
wenzelm
parents: 61539
diff changeset
    98
  bounded by \<open>p\<close>, is defined as follows.
58744
c434e37f290e update_cartouches;
wenzelm
parents: 44887
diff changeset
    99
\<close>
7808
fd019ac3485f update from Gertrud;
wenzelm
parents: 7656
diff changeset
   100
19736
wenzelm
parents: 16417
diff changeset
   101
definition
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
   102
  norm_pres_extensions ::
58745
wenzelm
parents: 58744
diff changeset
   103
    "'a::{plus,minus,uminus,zero} set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> 'a set \<Rightarrow> ('a \<Rightarrow> real)
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   104
      \<Rightarrow> 'a graph set"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   105
where
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   106
  "norm_pres_extensions E p F f
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   107
    = {g. \<exists>H h. g = graph H h
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   108
        \<and> linearform H h
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   109
        \<and> H \<unlhd> E
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   110
        \<and> F \<unlhd> H
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   111
        \<and> graph F f \<subseteq> graph H h
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   112
        \<and> (\<forall>x \<in> H. h x \<le> p x)}"
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
   113
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   114
lemma norm_pres_extensionE [elim]:
44887
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   115
  assumes "g \<in> norm_pres_extensions E p F f"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   116
  obtains H h
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   117
    where "g = graph H h"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   118
    and "linearform H h"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   119
    and "H \<unlhd> E"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   120
    and "F \<unlhd> H"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   121
    and "graph F f \<subseteq> graph H h"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   122
    and "\<forall>x \<in> H. h x \<le> p x"
7ca82df6e951 misc tuning and clarification;
wenzelm
parents: 41818
diff changeset
   123
  using assms unfolding norm_pres_extensions_def by blast
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   124
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
   125
lemma norm_pres_extensionI2 [intro]:
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   126
  "linearform H h \<Longrightarrow> H \<unlhd> E \<Longrightarrow> F \<unlhd> H
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   127
    \<Longrightarrow> graph F f \<subseteq> graph H h \<Longrightarrow> \<forall>x \<in> H. h x \<le> p x
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   128
    \<Longrightarrow> graph H h \<in> norm_pres_extensions E p F f"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
   129
  unfolding norm_pres_extensions_def by blast
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   130
13515
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   131
lemma norm_pres_extensionI:  (* FIXME ? *)
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   132
  "\<exists>H h. g = graph H h
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   133
    \<and> linearform H h
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   134
    \<and> H \<unlhd> E
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   135
    \<and> F \<unlhd> H
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   136
    \<and> graph F f \<subseteq> graph H h
a6a7025fd7e8 updated to use locales (still some rough edges);
wenzelm
parents: 11472
diff changeset
   137
    \<and> (\<forall>x \<in> H. h x \<le> p x) \<Longrightarrow> g \<in> norm_pres_extensions E p F f"
27612
d3eb431db035 modernized specifications and proofs;
wenzelm
parents: 25762
diff changeset
   138
  unfolding norm_pres_extensions_def by blast
7535
599d3414b51d The Hahn-Banach theorem for real vectorspaces (Isabelle/Isar)
wenzelm
parents:
diff changeset
   139
10687
c186279eecea tuned HOL/Real/HahnBanach;
wenzelm
parents: 9969
diff changeset
   140
end