move Lubs from HOL to HOL-Library (replaced by conditionally complete lattices)
1 (* Title: HOL/Hahn_Banach/Bounds.thy
2 Author: Gertrud Bauer, TU Munich
8 imports Main "~~/src/HOL/Library/ContNotDenum"
13 assumes least [intro?]: "(\<And>a. a \<in> A \<Longrightarrow> a \<le> b) \<Longrightarrow> x \<le> b"
14 and upper [intro?]: "a \<in> A \<Longrightarrow> a \<le> x"
16 lemmas [elim?] = lub.least lub.upper
18 definition the_lub :: "'a::order set \<Rightarrow> 'a"
19 where "the_lub A = The (lub A)"
22 the_lub ("\<Squnion>_" [90] 90)
24 lemma the_lub_equality [elim?]:
26 shows "\<Squnion>A = (x::'a::order)"
28 interpret lub A x by fact
30 proof (unfold the_lub_def)
31 from `lub A x` show "The (lub A) = x"
33 fix x' assume lub': "lub A x'"
35 proof (rule order_antisym)
36 from lub' show "x' \<le> x"
38 fix a assume "a \<in> A"
39 then show "a \<le> x" ..
43 fix a assume "a \<in> A"
44 with lub' show "a \<le> x'" ..
52 assumes ex: "\<exists>x. lub A x"
53 shows "lub A (\<Squnion>A)"
55 from ex obtain x where x: "lub A x" ..
56 also from x have [symmetric]: "\<Squnion>A = x" ..
57 finally show ?thesis .
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"
61 by (intro exI[of _ "Sup A"]) (auto intro!: cSup_upper cSup_least simp: lub_def)