src/HOL/Hahn_Banach/Bounds.thy
author wenzelm
Sun Sep 11 22:55:26 2011 +0200 (2011-09-11)
changeset 44887 7ca82df6e951
parent 41413 64cd30d6b0b8
child 54263 c4159fe6fa46
permissions -rw-r--r--
misc tuning and clarification;
     1 (*  Title:      HOL/Hahn_Banach/Bounds.thy
     2     Author:     Gertrud Bauer, TU Munich
     3 *)
     4 
     5 header {* Bounds *}
     6 
     7 theory Bounds
     8 imports Main "~~/src/HOL/Library/ContNotDenum"
     9 begin
    10 
    11 locale lub =
    12   fixes A and x
    13   assumes least [intro?]: "(\<And>a. a \<in> A \<Longrightarrow> a \<le> b) \<Longrightarrow> x \<le> b"
    14     and upper [intro?]: "a \<in> A \<Longrightarrow> a \<le> x"
    15 
    16 lemmas [elim?] = lub.least lub.upper
    17 
    18 definition the_lub :: "'a::order set \<Rightarrow> 'a"
    19   where "the_lub A = The (lub A)"
    20 
    21 notation (xsymbols)
    22   the_lub  ("\<Squnion>_" [90] 90)
    23 
    24 lemma the_lub_equality [elim?]:
    25   assumes "lub A x"
    26   shows "\<Squnion>A = (x::'a::order)"
    27 proof -
    28   interpret lub A x by fact
    29   show ?thesis
    30   proof (unfold the_lub_def)
    31     from `lub A x` show "The (lub A) = x"
    32     proof
    33       fix x' assume lub': "lub A x'"
    34       show "x' = x"
    35       proof (rule order_antisym)
    36         from lub' show "x' \<le> x"
    37         proof
    38           fix a assume "a \<in> A"
    39           then show "a \<le> x" ..
    40         qed
    41         show "x \<le> x'"
    42         proof
    43           fix a assume "a \<in> A"
    44           with lub' show "a \<le> x'" ..
    45         qed
    46       qed
    47     qed
    48   qed
    49 qed
    50 
    51 lemma the_lubI_ex:
    52   assumes ex: "\<exists>x. lub A x"
    53   shows "lub A (\<Squnion>A)"
    54 proof -
    55   from ex obtain x where x: "lub A x" ..
    56   also from x have [symmetric]: "\<Squnion>A = x" ..
    57   finally show ?thesis .
    58 qed
    59 
    60 lemma lub_compat: "lub A x = isLub UNIV A x"
    61 proof -
    62   have "isUb UNIV A = (\<lambda>x. A *<= x \<and> x \<in> UNIV)"
    63     by (rule ext) (simp only: isUb_def)
    64   then show ?thesis
    65     by (simp only: lub_def isLub_def leastP_def setge_def setle_def) blast
    66 qed
    67 
    68 lemma real_complete:
    69   fixes A :: "real set"
    70   assumes nonempty: "\<exists>a. a \<in> A"
    71     and ex_upper: "\<exists>y. \<forall>a \<in> A. a \<le> y"
    72   shows "\<exists>x. lub A x"
    73 proof -
    74   from ex_upper have "\<exists>y. isUb UNIV A y"
    75     unfolding isUb_def setle_def by blast
    76   with nonempty have "\<exists>x. isLub UNIV A x"
    77     by (rule reals_complete)
    78   then show ?thesis by (simp only: lub_compat)
    79 qed
    80 
    81 end