src/HOL/Real/HahnBanach/FunctionOrder.thy
author wenzelm
Tue Jul 15 19:39:37 2008 +0200 (2008-07-15)
changeset 27612 d3eb431db035
parent 25762 c03e9d04b3e4
permissions -rw-r--r--
modernized specifications and proofs;
tuned document;
wenzelm@7566
     1
(*  Title:      HOL/Real/HahnBanach/FunctionOrder.thy
wenzelm@7566
     2
    ID:         $Id$
wenzelm@7566
     3
    Author:     Gertrud Bauer, TU Munich
wenzelm@7566
     4
*)
wenzelm@7535
     5
wenzelm@9035
     6
header {* An order on functions *}
wenzelm@7808
     7
wenzelm@27612
     8
theory FunctionOrder
wenzelm@27612
     9
imports Subspace Linearform
wenzelm@27612
    10
begin
wenzelm@7535
    11
wenzelm@9035
    12
subsection {* The graph of a function *}
wenzelm@7808
    13
wenzelm@10687
    14
text {*
wenzelm@10687
    15
  We define the \emph{graph} of a (real) function @{text f} with
wenzelm@10687
    16
  domain @{text F} as the set
wenzelm@10687
    17
  \begin{center}
wenzelm@10687
    18
  @{text "{(x, f x). x \<in> F}"}
wenzelm@10687
    19
  \end{center}
wenzelm@10687
    20
  So we are modeling partial functions by specifying the domain and
wenzelm@10687
    21
  the mapping function. We use the term ``function'' also for its
wenzelm@10687
    22
  graph.
wenzelm@9035
    23
*}
wenzelm@7535
    24
wenzelm@13515
    25
types 'a graph = "('a \<times> real) set"
wenzelm@7535
    26
wenzelm@19736
    27
definition
wenzelm@21404
    28
  graph :: "'a set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> 'a graph" where
wenzelm@19736
    29
  "graph F f = {(x, f x) | x. x \<in> F}"
wenzelm@7535
    30
wenzelm@13515
    31
lemma graphI [intro]: "x \<in> F \<Longrightarrow> (x, f x) \<in> graph F f"
wenzelm@27612
    32
  unfolding graph_def by blast
wenzelm@7535
    33
wenzelm@13515
    34
lemma graphI2 [intro?]: "x \<in> F \<Longrightarrow> \<exists>t \<in> graph F f. t = (x, f x)"
wenzelm@27612
    35
  unfolding graph_def by blast
wenzelm@7566
    36
wenzelm@13515
    37
lemma graphE [elim?]:
wenzelm@13515
    38
    "(x, y) \<in> graph F f \<Longrightarrow> (x \<in> F \<Longrightarrow> y = f x \<Longrightarrow> C) \<Longrightarrow> C"
wenzelm@27612
    39
  unfolding graph_def by blast
wenzelm@10687
    40
wenzelm@7535
    41
wenzelm@9035
    42
subsection {* Functions ordered by domain extension *}
wenzelm@7917
    43
wenzelm@13515
    44
text {*
wenzelm@13515
    45
  A function @{text h'} is an extension of @{text h}, iff the graph of
wenzelm@13515
    46
  @{text h} is a subset of the graph of @{text h'}.
wenzelm@13515
    47
*}
wenzelm@7917
    48
wenzelm@10687
    49
lemma graph_extI:
wenzelm@10687
    50
  "(\<And>x. x \<in> H \<Longrightarrow> h x = h' x) \<Longrightarrow> H \<subseteq> H'
wenzelm@13515
    51
    \<Longrightarrow> graph H h \<subseteq> graph H' h'"
wenzelm@27612
    52
  unfolding graph_def by blast
wenzelm@7917
    53
wenzelm@13515
    54
lemma graph_extD1 [dest?]:
wenzelm@10687
    55
  "graph H h \<subseteq> graph H' h' \<Longrightarrow> x \<in> H \<Longrightarrow> h x = h' x"
wenzelm@27612
    56
  unfolding graph_def by blast
wenzelm@7566
    57
wenzelm@13515
    58
lemma graph_extD2 [dest?]:
wenzelm@10687
    59
  "graph H h \<subseteq> graph H' h' \<Longrightarrow> H \<subseteq> H'"
wenzelm@27612
    60
  unfolding graph_def by blast
wenzelm@7566
    61
wenzelm@13515
    62
wenzelm@9035
    63
subsection {* Domain and function of a graph *}
wenzelm@7917
    64
wenzelm@10687
    65
text {*
wenzelm@13515
    66
  The inverse functions to @{text graph} are @{text domain} and @{text
wenzelm@13515
    67
  funct}.
wenzelm@10687
    68
*}
wenzelm@7917
    69
wenzelm@19736
    70
definition
wenzelm@21404
    71
  "domain" :: "'a graph \<Rightarrow> 'a set" where
wenzelm@19736
    72
  "domain g = {x. \<exists>y. (x, y) \<in> g}"
wenzelm@7917
    73
wenzelm@21404
    74
definition
wenzelm@21404
    75
  funct :: "'a graph \<Rightarrow> ('a \<Rightarrow> real)" where
wenzelm@19736
    76
  "funct g = (\<lambda>x. (SOME y. (x, y) \<in> g))"
wenzelm@7917
    77
wenzelm@10687
    78
text {*
wenzelm@10687
    79
  The following lemma states that @{text g} is the graph of a function
wenzelm@10687
    80
  if the relation induced by @{text g} is unique.
wenzelm@10687
    81
*}
wenzelm@7566
    82
wenzelm@10687
    83
lemma graph_domain_funct:
wenzelm@13515
    84
  assumes uniq: "\<And>x y z. (x, y) \<in> g \<Longrightarrow> (x, z) \<in> g \<Longrightarrow> z = y"
wenzelm@13515
    85
  shows "graph (domain g) (funct g) = g"
wenzelm@27612
    86
  unfolding domain_def funct_def graph_def
wenzelm@27612
    87
proof auto  (* FIXME !? *)
wenzelm@23378
    88
  fix a b assume g: "(a, b) \<in> g"
wenzelm@23378
    89
  from g show "(a, SOME y. (a, y) \<in> g) \<in> g" by (rule someI2)
wenzelm@23378
    90
  from g show "\<exists>y. (a, y) \<in> g" ..
wenzelm@23378
    91
  from g show "b = (SOME y. (a, y) \<in> g)"
paulson@9969
    92
  proof (rule some_equality [symmetric])
wenzelm@13515
    93
    fix y assume "(a, y) \<in> g"
wenzelm@23378
    94
    with g show "y = b" by (rule uniq)
wenzelm@9035
    95
  qed
wenzelm@9035
    96
qed
wenzelm@7535
    97
wenzelm@7808
    98
wenzelm@9035
    99
subsection {* Norm-preserving extensions of a function *}
wenzelm@7917
   100
wenzelm@10687
   101
text {*
wenzelm@10687
   102
  Given a linear form @{text f} on the space @{text F} and a seminorm
wenzelm@10687
   103
  @{text p} on @{text E}. The set of all linear extensions of @{text
wenzelm@10687
   104
  f}, to superspaces @{text H} of @{text F}, which are bounded by
wenzelm@10687
   105
  @{text p}, is defined as follows.
wenzelm@10687
   106
*}
wenzelm@7808
   107
wenzelm@19736
   108
definition
wenzelm@10687
   109
  norm_pres_extensions ::
haftmann@25762
   110
    "'a::{plus, minus, uminus, zero} set \<Rightarrow> ('a \<Rightarrow> real) \<Rightarrow> 'a set \<Rightarrow> ('a \<Rightarrow> real)
wenzelm@21404
   111
      \<Rightarrow> 'a graph set" where
wenzelm@10687
   112
    "norm_pres_extensions E p F f
wenzelm@19736
   113
      = {g. \<exists>H h. g = graph H h
wenzelm@13515
   114
          \<and> linearform H h
wenzelm@13515
   115
          \<and> H \<unlhd> E
wenzelm@13515
   116
          \<and> F \<unlhd> H
wenzelm@13515
   117
          \<and> graph F f \<subseteq> graph H h
wenzelm@13515
   118
          \<and> (\<forall>x \<in> H. h x \<le> p x)}"
wenzelm@10687
   119
wenzelm@13515
   120
lemma norm_pres_extensionE [elim]:
wenzelm@9503
   121
  "g \<in> norm_pres_extensions E p F f
wenzelm@13515
   122
  \<Longrightarrow> (\<And>H h. g = graph H h \<Longrightarrow> linearform H h
wenzelm@13515
   123
        \<Longrightarrow> H \<unlhd> E \<Longrightarrow> F \<unlhd> H \<Longrightarrow> graph F f \<subseteq> graph H h
wenzelm@13515
   124
        \<Longrightarrow> \<forall>x \<in> H. h x \<le> p x \<Longrightarrow> C) \<Longrightarrow> C"
wenzelm@27612
   125
  unfolding norm_pres_extensions_def by blast
wenzelm@7535
   126
wenzelm@10687
   127
lemma norm_pres_extensionI2 [intro]:
wenzelm@13515
   128
  "linearform H h \<Longrightarrow> H \<unlhd> E \<Longrightarrow> F \<unlhd> H
wenzelm@13515
   129
    \<Longrightarrow> graph F f \<subseteq> graph H h \<Longrightarrow> \<forall>x \<in> H. h x \<le> p x
wenzelm@13515
   130
    \<Longrightarrow> graph H h \<in> norm_pres_extensions E p F f"
wenzelm@27612
   131
  unfolding norm_pres_extensions_def by blast
wenzelm@7535
   132
wenzelm@13515
   133
lemma norm_pres_extensionI:  (* FIXME ? *)
wenzelm@13515
   134
  "\<exists>H h. g = graph H h
wenzelm@13515
   135
    \<and> linearform H h
wenzelm@13515
   136
    \<and> H \<unlhd> E
wenzelm@13515
   137
    \<and> F \<unlhd> H
wenzelm@13515
   138
    \<and> graph F f \<subseteq> graph H h
wenzelm@13515
   139
    \<and> (\<forall>x \<in> H. h x \<le> p x) \<Longrightarrow> g \<in> norm_pres_extensions E p F f"
wenzelm@27612
   140
  unfolding norm_pres_extensions_def by blast
wenzelm@7535
   141
wenzelm@10687
   142
end