src/HOL/Hahn_Banach/Bounds.thy
author wenzelm
Tue Oct 21 11:13:16 2014 +0200 (2014-10-21)
changeset 58745 5d452cf4bce7
parent 58744 c434e37f290e
child 58889 5b7a9633cfa8
permissions -rw-r--r--
tuned;
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@58745
    18
definition the_lub :: "'a::order set \<Rightarrow> 'a"  ("\<Squnion>_" [90] 90)
wenzelm@44887
    19
  where "the_lub A = The (lub A)"
wenzelm@14653
    20
wenzelm@13515
    21
lemma the_lub_equality [elim?]:
ballarin@27611
    22
  assumes "lub A x"
wenzelm@13515
    23
  shows "\<Squnion>A = (x::'a::order)"
ballarin@27611
    24
proof -
ballarin@29234
    25
  interpret lub A x by fact
wenzelm@27612
    26
  show ?thesis
wenzelm@27612
    27
  proof (unfold the_lub_def)
wenzelm@58744
    28
    from \<open>lub A x\<close> show "The (lub A) = x"
ballarin@27611
    29
    proof
ballarin@27611
    30
      fix x' assume lub': "lub A x'"
ballarin@27611
    31
      show "x' = x"
ballarin@27611
    32
      proof (rule order_antisym)
wenzelm@32960
    33
        from lub' show "x' \<le> x"
wenzelm@32960
    34
        proof
ballarin@27611
    35
          fix a assume "a \<in> A"
ballarin@27611
    36
          then show "a \<le> x" ..
wenzelm@32960
    37
        qed
wenzelm@32960
    38
        show "x \<le> x'"
wenzelm@32960
    39
        proof
ballarin@27611
    40
          fix a assume "a \<in> A"
ballarin@27611
    41
          with lub' show "a \<le> x'" ..
wenzelm@32960
    42
        qed
wenzelm@13515
    43
      qed
wenzelm@13515
    44
    qed
wenzelm@13515
    45
  qed
wenzelm@13515
    46
qed
wenzelm@7917
    47
wenzelm@13515
    48
lemma the_lubI_ex:
wenzelm@13515
    49
  assumes ex: "\<exists>x. lub A x"
wenzelm@13515
    50
  shows "lub A (\<Squnion>A)"
wenzelm@13515
    51
proof -
wenzelm@13515
    52
  from ex obtain x where x: "lub A x" ..
wenzelm@13515
    53
  also from x have [symmetric]: "\<Squnion>A = x" ..
wenzelm@13515
    54
  finally show ?thesis .
wenzelm@13515
    55
qed
wenzelm@7917
    56
hoelzl@54263
    57
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
    58
  by (intro exI[of _ "Sup A"]) (auto intro!: cSup_upper cSup_least simp: lub_def)
wenzelm@13515
    59
wenzelm@10687
    60
end