src/HOL/Real/HahnBanach/Bounds.thy
author wenzelm
Fri Nov 17 02:20:03 2006 +0100 (2006-11-17)
changeset 21404 eb85850d3eb7
parent 21210 c17fd2df4e9e
child 25596 ad9e3594f3f3
permissions -rw-r--r--
more robust syntax for definition/abbreviation/notation;
wenzelm@7566
     1
(*  Title:      HOL/Real/HahnBanach/Bounds.thy
wenzelm@7566
     2
    ID:         $Id$
wenzelm@7566
     3
    Author:     Gertrud Bauer, TU Munich
wenzelm@7566
     4
*)
wenzelm@7535
     5
wenzelm@9035
     6
header {* Bounds *}
wenzelm@7808
     7
haftmann@16417
     8
theory Bounds imports Main Real begin
wenzelm@7535
     9
wenzelm@13515
    10
locale lub =
wenzelm@13515
    11
  fixes A and x
wenzelm@13515
    12
  assumes least [intro?]: "(\<And>a. a \<in> A \<Longrightarrow> a \<le> b) \<Longrightarrow> x \<le> b"
wenzelm@13515
    13
    and upper [intro?]: "a \<in> A \<Longrightarrow> a \<le> x"
wenzelm@13515
    14
wenzelm@13515
    15
lemmas [elim?] = lub.least lub.upper
wenzelm@13515
    16
wenzelm@19736
    17
definition
wenzelm@21404
    18
  the_lub :: "'a::order set \<Rightarrow> 'a" where
wenzelm@19736
    19
  "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?]:
wenzelm@13515
    25
  includes lub
wenzelm@13515
    26
  shows "\<Squnion>A = (x::'a::order)"
wenzelm@13515
    27
proof (unfold the_lub_def)
wenzelm@13515
    28
  from lub_axioms show "The (lub A) = x"
wenzelm@13515
    29
  proof
wenzelm@13515
    30
    fix x' assume lub': "lub A x'"
wenzelm@13515
    31
    show "x' = x"
wenzelm@13515
    32
    proof (rule order_antisym)
wenzelm@13515
    33
      from lub' show "x' \<le> x"
wenzelm@13515
    34
      proof
wenzelm@13515
    35
        fix a assume "a \<in> A"
wenzelm@13515
    36
        then show "a \<le> x" ..
wenzelm@13515
    37
      qed
wenzelm@13515
    38
      show "x \<le> x'"
wenzelm@13515
    39
      proof
wenzelm@13515
    40
        fix a assume "a \<in> A"
wenzelm@13515
    41
        with lub' show "a \<le> x'" ..
wenzelm@13515
    42
      qed
wenzelm@13515
    43
    qed
wenzelm@13515
    44
  qed
wenzelm@13515
    45
qed
wenzelm@7917
    46
wenzelm@13515
    47
lemma the_lubI_ex:
wenzelm@13515
    48
  assumes ex: "\<exists>x. lub A x"
wenzelm@13515
    49
  shows "lub A (\<Squnion>A)"
wenzelm@13515
    50
proof -
wenzelm@13515
    51
  from ex obtain x where x: "lub A x" ..
wenzelm@13515
    52
  also from x have [symmetric]: "\<Squnion>A = x" ..
wenzelm@13515
    53
  finally show ?thesis .
wenzelm@13515
    54
qed
wenzelm@7917
    55
wenzelm@13515
    56
lemma lub_compat: "lub A x = isLub UNIV A x"
wenzelm@13515
    57
proof -
wenzelm@13515
    58
  have "isUb UNIV A = (\<lambda>x. A *<= x \<and> x \<in> UNIV)"
wenzelm@13515
    59
    by (rule ext) (simp only: isUb_def)
wenzelm@13515
    60
  then show ?thesis
wenzelm@13515
    61
    by (simp only: lub_def isLub_def leastP_def setge_def setle_def) blast
wenzelm@9035
    62
qed
wenzelm@13515
    63
wenzelm@13515
    64
lemma real_complete:
wenzelm@13515
    65
  fixes A :: "real set"
wenzelm@13515
    66
  assumes nonempty: "\<exists>a. a \<in> A"
wenzelm@13515
    67
    and ex_upper: "\<exists>y. \<forall>a \<in> A. a \<le> y"
wenzelm@13515
    68
  shows "\<exists>x. lub A x"
wenzelm@13515
    69
proof -
wenzelm@13515
    70
  from ex_upper have "\<exists>y. isUb UNIV A y"
wenzelm@13515
    71
    by (unfold isUb_def setle_def) blast
wenzelm@13515
    72
  with nonempty have "\<exists>x. isLub UNIV A x"
wenzelm@13515
    73
    by (rule reals_complete)
wenzelm@13515
    74
  then show ?thesis by (simp only: lub_compat)
wenzelm@13515
    75
qed
wenzelm@13515
    76
wenzelm@10687
    77
end