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