src/HOL/Hahn_Banach/Bounds.thy
author hoelzl
Thu Sep 02 10:14:32 2010 +0200 (2010-09-02)
changeset 39072 1030b1a166ef
parent 32960 69916a850301
child 41413 64cd30d6b0b8
permissions -rw-r--r--
Add lessThan_Suc_eq_insert_0
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@29043
     8
imports Main 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@19736
    18
definition
wenzelm@21404
    19
  the_lub :: "'a::order set \<Rightarrow> 'a" where
wenzelm@19736
    20
  "the_lub A = The (lub A)"
wenzelm@14653
    21
wenzelm@21210
    22
notation (xsymbols)
wenzelm@19736
    23
  the_lub  ("\<Squnion>_" [90] 90)
wenzelm@7535
    24
wenzelm@13515
    25
lemma the_lub_equality [elim?]:
ballarin@27611
    26
  assumes "lub A x"
wenzelm@13515
    27
  shows "\<Squnion>A = (x::'a::order)"
ballarin@27611
    28
proof -
ballarin@29234
    29
  interpret lub A x by fact
wenzelm@27612
    30
  show ?thesis
wenzelm@27612
    31
  proof (unfold the_lub_def)
ballarin@27611
    32
    from `lub A x` show "The (lub A) = x"
ballarin@27611
    33
    proof
ballarin@27611
    34
      fix x' assume lub': "lub A x'"
ballarin@27611
    35
      show "x' = x"
ballarin@27611
    36
      proof (rule order_antisym)
wenzelm@32960
    37
        from lub' show "x' \<le> x"
wenzelm@32960
    38
        proof
ballarin@27611
    39
          fix a assume "a \<in> A"
ballarin@27611
    40
          then show "a \<le> x" ..
wenzelm@32960
    41
        qed
wenzelm@32960
    42
        show "x \<le> x'"
wenzelm@32960
    43
        proof
ballarin@27611
    44
          fix a assume "a \<in> A"
ballarin@27611
    45
          with lub' show "a \<le> x'" ..
wenzelm@32960
    46
        qed
wenzelm@13515
    47
      qed
wenzelm@13515
    48
    qed
wenzelm@13515
    49
  qed
wenzelm@13515
    50
qed
wenzelm@7917
    51
wenzelm@13515
    52
lemma the_lubI_ex:
wenzelm@13515
    53
  assumes ex: "\<exists>x. lub A x"
wenzelm@13515
    54
  shows "lub A (\<Squnion>A)"
wenzelm@13515
    55
proof -
wenzelm@13515
    56
  from ex obtain x where x: "lub A x" ..
wenzelm@13515
    57
  also from x have [symmetric]: "\<Squnion>A = x" ..
wenzelm@13515
    58
  finally show ?thesis .
wenzelm@13515
    59
qed
wenzelm@7917
    60
wenzelm@13515
    61
lemma lub_compat: "lub A x = isLub UNIV A x"
wenzelm@13515
    62
proof -
wenzelm@13515
    63
  have "isUb UNIV A = (\<lambda>x. A *<= x \<and> x \<in> UNIV)"
wenzelm@13515
    64
    by (rule ext) (simp only: isUb_def)
wenzelm@13515
    65
  then show ?thesis
wenzelm@13515
    66
    by (simp only: lub_def isLub_def leastP_def setge_def setle_def) blast
wenzelm@9035
    67
qed
wenzelm@13515
    68
wenzelm@13515
    69
lemma real_complete:
wenzelm@13515
    70
  fixes A :: "real set"
wenzelm@13515
    71
  assumes nonempty: "\<exists>a. a \<in> A"
wenzelm@13515
    72
    and ex_upper: "\<exists>y. \<forall>a \<in> A. a \<le> y"
wenzelm@13515
    73
  shows "\<exists>x. lub A x"
wenzelm@13515
    74
proof -
wenzelm@13515
    75
  from ex_upper have "\<exists>y. isUb UNIV A y"
wenzelm@27612
    76
    unfolding isUb_def setle_def by blast
wenzelm@13515
    77
  with nonempty have "\<exists>x. isLub UNIV A x"
wenzelm@13515
    78
    by (rule reals_complete)
wenzelm@13515
    79
  then show ?thesis by (simp only: lub_compat)
wenzelm@13515
    80
qed
wenzelm@13515
    81
wenzelm@10687
    82
end