src/HOL/Hahn_Banach/Bounds.thy
author wenzelm
Tue Oct 21 10:58:19 2014 +0200 (2014-10-21)
changeset 58744 c434e37f290e
parent 54263 c4159fe6fa46
child 58745 5d452cf4bce7
permissions -rw-r--r--
update_cartouches;
wenzelm@31795
     1
(*  Title:      HOL/Hahn_Banach/Bounds.thy
wenzelm@7566
     2
    Author:     Gertrud Bauer, TU Munich
wenzelm@7566
     3
*)
wenzelm@7535
     4
wenzelm@58744
     5
header \<open>Bounds\<close>
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)
wenzelm@58744
    31
    from \<open>lub A x\<close> 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
hoelzl@54263
    60
lemma real_complete: "\<exists>a::real. a \<in> A \<Longrightarrow> \<exists>y. \<forall>a \<in> A. a \<le> y \<Longrightarrow> \<exists>x. lub A x"
hoelzl@54263
    61
  by (intro exI[of _ "Sup A"]) (auto intro!: cSup_upper cSup_least simp: lub_def)
wenzelm@13515
    62
wenzelm@10687
    63
end