# HG changeset patch # User hoelzl # Date 1361358282 -3600 # Node ID 4a3c453f99a13544452824753a4e0eb5fedb3827 # Parent d63ec23c9125f7203e48807f204c8b42c9914dd8 split dense into inner_dense_order and no_top/no_bot diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Int.thy --- a/src/HOL/Int.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Int.thy Wed Feb 20 12:04:42 2013 +0100 @@ -303,6 +303,18 @@ qed +instance int :: no_top + apply default + apply (rule_tac x="x + 1" in exI) + apply simp + done + +instance int :: no_bot + apply default + apply (rule_tac x="x - 1" in exI) + apply simp + done + subsection {* Magnitude of an Integer, as a Natural Number: @{text nat} *} lift_definition nat :: "int \ nat" is "\(x, y). x - y" diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Library/Extended_Real.thy --- a/src/HOL/Library/Extended_Real.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Library/Extended_Real.thy Wed Feb 20 12:04:42 2013 +0100 @@ -26,6 +26,18 @@ "(INF i : A. INF j : B. f i j) = (INF p : A \ B. f (fst p) (snd p))" by (rule antisym) (auto intro!: INF_greatest INF_lower2) +lemma le_Sup_iff_less: + fixes x :: "'a :: {complete_linorder, inner_dense_linorder}" + shows "x \ (SUP i:A. f i) \ (\yi\A. y \ f i)" (is "?lhs = ?rhs") + unfolding le_SUP_iff + by (blast intro: less_imp_le less_trans less_le_trans dest: dense) + +lemma Inf_le_iff_less: + fixes x :: "'a :: {complete_linorder, inner_dense_linorder}" + shows "(INF i:A. f i) \ x \ (\y>x. \i\A. f i \ y)" + unfolding INF_le_iff + by (blast intro: less_imp_le less_trans le_less_trans dest: dense) + subsection {* Definition and basic properties *} datatype ereal = ereal real | PInfty | MInfty @@ -295,6 +307,12 @@ end +lemma ereal_dense2: "x < y \ \z. x < ereal z \ ereal z < y" + using lt_ex gt_ex dense by (cases x y rule: ereal2_cases) auto + +instance ereal :: inner_dense_linorder + by default (blast dest: ereal_dense2) + instance ereal :: ordered_ab_semigroup_add proof fix a b c :: ereal assume "a \ b" then show "c + a \ c + b" @@ -389,14 +407,6 @@ fixes a :: ereal shows "-a \ 0 \ 0 \ a" by (cases rule: ereal2_cases[of a]) auto -lemma ereal_dense2: "x < y \ \z. x < ereal z \ ereal z < y" - using lt_ex gt_ex dense by (cases x y rule: ereal2_cases) auto - -lemma ereal_dense: - fixes x y :: ereal assumes "x < y" - shows "\z. x < z \ z < y" - using ereal_dense2[OF `x < y`] by blast - lemma ereal_add_strict_mono: fixes a b c d :: ereal assumes "a = b" "0 \ a" "a \ \" "c < d" @@ -725,18 +735,6 @@ shows "y <= x" by (metis assms ereal_bot ereal_cases ereal_infty_less_eq(2) ereal_less_eq(1) linorder_le_cases) -lemma ereal_le_ereal: - fixes x y :: ereal - assumes "\B. B < x \ B <= y" - shows "x <= y" -by (metis assms ereal_dense leD linorder_le_less_linear) - -lemma ereal_ge_ereal: - fixes x y :: ereal - assumes "ALL B. B>x --> B >= y" - shows "x >= y" -by (metis assms ereal_dense leD linorder_le_less_linear) - lemma setprod_ereal_0: fixes f :: "'a \ ereal" shows "(\i\A. f i) = 0 \ (finite A \ (\i\A. f i = 0))" @@ -1126,11 +1124,11 @@ definition "bot = (-\::ereal)" definition "top = (\::ereal)" -definition "Sup S = (LEAST z. \x\S. x \ z :: ereal)" -definition "Inf S = (GREATEST z. \x\S. z \ x :: ereal)" +definition "Sup S = (SOME x :: ereal. (\y\S. y \ x) \ (\z. (\y\S. y \ z) \ x \ z))" +definition "Inf S = (SOME x :: ereal. (\y\S. x \ y) \ (\z. (\y\S. z \ y) \ z \ x))" lemma ereal_complete_Sup: - fixes S :: "ereal set" assumes "S \ {}" + fixes S :: "ereal set" shows "\x. (\y\S. y \ x) \ (\z. (\y\S. y \ z) \ x \ z)" proof cases assume "\x. \a\S. a \ ereal x" @@ -1138,69 +1136,23 @@ then have "\ \ S" by force show ?thesis proof cases - assume "S = {-\}" - then show ?thesis by (auto intro!: exI[of _ "-\"]) - next - assume "S \ {-\}" - with `S \ {}` `\ \ S` obtain x where "x \ S - {-\}" "x \ \" by auto - with y `\ \ S` have "\z\real ` (S - {-\}). z \ y" - by (auto simp: real_of_ereal_ord_simps) - with complete_real[of "real ` (S - {-\})"] `x \ S - {-\}` - obtain s where s: - "\y\S - {-\}. real y \ s" "\z. (\y\S - {-\}. real y \ z) \ s \ z" - by auto + assume "S \ {-\} \ S \ {}" + with `\ \ S` obtain x where x: "x \ S" "\x\ \ \" by auto + obtain s where s: "\x\ereal -` S. x \ s" "\z. (\x\ereal -` S. x \ z) \ s \ z" + proof (atomize_elim, rule complete_real) + show "\x. x \ ereal -` S" using x by auto + show "\z. \x\ereal -` S. x \ z" by (auto dest: y intro!: exI[of _ y]) + qed show ?thesis proof (safe intro!: exI[of _ "ereal s"]) - fix z assume "z \ S" with `\ \ S` show "z \ ereal s" - proof (cases z) - case (real r) - then show ?thesis - using s(1)[rule_format, of z] `z \ S` `z = ereal r` by auto - qed auto + fix y assume "y \ S" with s `\ \ S` show "y \ ereal s" + by (cases y) auto next - fix z assume *: "\y\S. y \ z" - with `S \ {-\}` `S \ {}` show "ereal s \ z" - proof (cases z) - case (real u) - with * have "s \ u" - by (intro s(2)[of u]) (auto simp: real_of_ereal_ord_simps) - then show ?thesis using real by simp - qed auto + fix z assume "\y\S. y \ z" with `S \ {-\} \ S \ {}` show "ereal s \ z" + by (cases z) (auto intro!: s) qed - qed -next - assume *: "\ (\x. \a\S. a \ ereal x)" - show ?thesis - proof (safe intro!: exI[of _ \]) - fix y assume **: "\z\S. z \ y" - with * show "\ \ y" - proof (cases y) - case MInf with * ** show ?thesis by (force simp: not_le) - qed auto - qed simp -qed - -lemma ereal_complete_Inf: - fixes S :: "ereal set" assumes "S ~= {}" - shows "EX x. (ALL y:S. x <= y) & (ALL z. (ALL y:S. z <= y) --> z <= x)" -proof- -def S1 == "uminus ` S" -hence "S1 ~= {}" using assms by auto -then obtain x where x_def: "(ALL y:S1. y <= x) & (ALL z. (ALL y:S1. y <= z) --> x <= z)" - using ereal_complete_Sup[of S1] by auto -{ fix z assume "ALL y:S. z <= y" - hence "ALL y:S1. y <= -z" unfolding S1_def by auto - hence "x <= -z" using x_def by auto - hence "z <= -x" - apply (subst ereal_uminus_uminus[symmetric]) - unfolding ereal_minus_le_minus . } -moreover have "(ALL y:S. -x <= y)" - using x_def unfolding S1_def - apply simp - apply (subst (3) ereal_uminus_uminus[symmetric]) - unfolding ereal_minus_le_minus by simp -ultimately show ?thesis by auto -qed + qed (auto intro!: exI[of _ "-\"]) +qed (fastforce intro!: exI[of _ \] ereal_top intro: order_trans dest: less_imp_le simp: not_le) lemma ereal_complete_uminus_eq: fixes S :: "ereal set" @@ -1208,100 +1160,40 @@ \ (\y\S. -x \ y) \ (\z. (\y\S. z \ y) \ z \ -x)" by simp (metis ereal_minus_le_minus ereal_uminus_uminus) -lemma ereal_Sup_uminus_image_eq: - fixes S :: "ereal set" - shows "Sup (uminus ` S) = - Inf S" -proof cases - assume "S = {}" - moreover have "(THE x. All (op \ x)) = (-\::ereal)" - by (rule the_equality) (auto intro!: ereal_bot) - moreover have "(SOME x. \y. y \ x) = (\::ereal)" - by (rule some_equality) (auto intro!: ereal_top) - ultimately show ?thesis unfolding Inf_ereal_def Sup_ereal_def - Least_def Greatest_def GreatestM_def by simp -next - assume "S \ {}" - with ereal_complete_Sup[of "uminus`S"] - obtain x where x: "(\y\S. -x \ y) \ (\z. (\y\S. z \ y) \ z \ -x)" - unfolding ereal_complete_uminus_eq by auto - show "Sup (uminus ` S) = - Inf S" - unfolding Inf_ereal_def Greatest_def GreatestM_def - proof (intro someI2[of _ _ "\x. Sup (uminus`S) = - x"]) - show "(\y\S. -x \ y) \ (\y. (\z\S. y \ z) \ y \ -x)" - using x . - fix x' assume "(\y\S. x' \ y) \ (\y. (\z\S. y \ z) \ y \ x')" - then have "(\y\uminus`S. y \ - x') \ (\y. (\z\uminus`S. z \ y) \ - x' \ y)" - unfolding ereal_complete_uminus_eq by simp - then show "Sup (uminus ` S) = -x'" - unfolding Sup_ereal_def ereal_uminus_eq_iff - by (intro Least_equality) auto - qed -qed +lemma ereal_complete_Inf: + "\x. (\y\S::ereal set. x \ y) \ (\z. (\y\S. z \ y) \ z \ x)" + using ereal_complete_Sup[of "uminus ` S"] unfolding ereal_complete_uminus_eq by auto instance -proof - { fix x :: ereal and A - show "bot <= x" by (cases x) (simp_all add: bot_ereal_def) - show "x <= top" by (simp add: top_ereal_def) } - - { fix x :: ereal and A assume "x : A" - with ereal_complete_Sup[of A] - obtain s where s: "\y\A. y <= s" "\z. (\y\A. y <= z) \ s <= z" by auto - hence "x <= s" using `x : A` by auto - also have "... = Sup A" using s unfolding Sup_ereal_def - by (auto intro!: Least_equality[symmetric]) - finally show "x <= Sup A" . } - note le_Sup = this - - { fix x :: ereal and A assume *: "!!z. (z : A ==> z <= x)" - show "Sup A <= x" - proof (cases "A = {}") - case True - hence "Sup A = -\" unfolding Sup_ereal_def - by (auto intro!: Least_equality) - thus "Sup A <= x" by simp - next - case False - with ereal_complete_Sup[of A] - obtain s where s: "\y\A. y <= s" "\z. (\y\A. y <= z) \ s <= z" by auto - hence "Sup A = s" - unfolding Sup_ereal_def by (auto intro!: Least_equality) - also have "s <= x" using * s by auto - finally show "Sup A <= x" . - qed } - note Sup_le = this - - { fix x :: ereal and A assume "x \ A" - with le_Sup[of "-x" "uminus`A"] show "Inf A \ x" - unfolding ereal_Sup_uminus_image_eq by simp } - - { fix x :: ereal and A assume *: "!!z. (z : A ==> x <= z)" - with Sup_le[of "uminus`A" "-x"] show "x \ Inf A" - unfolding ereal_Sup_uminus_image_eq by force } -qed + by default (auto intro: someI2_ex ereal_complete_Sup ereal_complete_Inf + simp: Sup_ereal_def Inf_ereal_def bot_ereal_def top_ereal_def) end instance ereal :: complete_linorder .. +lemma ereal_Sup_uminus_image_eq: "Sup (uminus ` S::ereal set) = - Inf S" + by (auto intro!: Sup_eqI + simp: Ball_def[symmetric] ereal_uminus_le_reorder le_Inf_iff + intro!: complete_lattice_class.Inf_lower2) + +lemma ereal_inj_on_uminus[intro, simp]: "inj_on uminus (A :: ereal set)" + by (auto intro!: inj_onI) + +lemma ereal_Inf_uminus_image_eq: "Inf (uminus ` S::ereal set) = - Sup S" + using ereal_Sup_uminus_image_eq[of "uminus ` S"] by simp + lemma ereal_SUPR_uminus: fixes f :: "'a => ereal" shows "(SUP i : R. -(f i)) = -(INF i : R. f i)" - unfolding SUP_def INF_def using ereal_Sup_uminus_image_eq[of "f`R"] - by (simp add: image_image) + by (simp add: SUP_def INF_def image_image) lemma ereal_INFI_uminus: fixes f :: "'a => ereal" shows "(INF i : R. -(f i)) = -(SUP i : R. f i)" using ereal_SUPR_uminus[of _ "\x. - f x"] by simp -lemma ereal_Inf_uminus_image_eq: "Inf (uminus ` S) = - Sup (S::ereal set)" - using ereal_Sup_uminus_image_eq[of "uminus ` S"] by (simp add: image_image) - -lemma ereal_inj_on_uminus[intro, simp]: "inj_on uminus (A :: ereal set)" - by (auto intro!: inj_onI) - lemma ereal_image_uminus_shift: fixes X Y :: "ereal set" shows "uminus ` X = Y \ X = uminus ` Y" proof @@ -1319,14 +1211,7 @@ lemma Sup_eq_MInfty: fixes S :: "ereal set" shows "Sup S = -\ \ S = {} \ S = {-\}" -proof - assume a: "Sup S = -\" - with complete_lattice_class.Sup_upper[of _ S] - show "S={} \ S={-\}" by auto -next - assume "S={} \ S={-\}" then show "Sup S = -\" - unfolding Sup_ereal_def by (auto intro!: Least_equality) -qed + unfolding bot_ereal_def[symmetric] by auto lemma Inf_eq_PInfty: fixes S :: "ereal set" shows "Inf S = \ \ S = {} \ S = {\}" @@ -1335,13 +1220,11 @@ lemma Inf_eq_MInfty: fixes S :: "ereal set" shows "-\ \ S \ Inf S = -\" - unfolding Inf_ereal_def - by (auto intro!: Greatest_equality) + unfolding bot_ereal_def[symmetric] by auto lemma Sup_eq_PInfty: fixes S :: "ereal set" shows "\ \ S \ Sup S = \" - unfolding Sup_ereal_def - by (auto intro!: Least_equality) + unfolding top_ereal_def[symmetric] by auto lemma Sup_ereal_close: fixes e :: ereal @@ -2007,39 +1890,6 @@ lemma ereal_real': assumes "\x\ \ \" shows "ereal (real x) = x" using assms by auto -lemma ereal_le_ereal_bounded: - fixes x y z :: ereal - assumes "z \ y" - assumes *: "\B. z < B \ B < x \ B \ y" - shows "x \ y" -proof (rule ereal_le_ereal) - fix B assume "B < x" - show "B \ y" - proof cases - assume "z < B" from *[OF this `B < x`] show "B \ y" . - next - assume "\ z < B" with `z \ y` show "B \ y" by auto - qed -qed - -lemma fixes x y :: ereal - shows Sup_atMost[simp]: "Sup {.. y} = y" - and Sup_lessThan[simp]: "Sup {..< y} = y" - and Sup_atLeastAtMost[simp]: "x \ y \ Sup { x .. y} = y" - and Sup_greaterThanAtMost[simp]: "x < y \ Sup { x <.. y} = y" - and Sup_atLeastLessThan[simp]: "x < y \ Sup { x ..< y} = y" - by (auto simp: Sup_ereal_def intro!: Least_equality - intro: ereal_le_ereal ereal_le_ereal_bounded[of x]) - -lemma Sup_greaterThanlessThan[simp]: - fixes x y :: ereal assumes "x < y" shows "Sup { x <..< y} = y" - unfolding Sup_ereal_def -proof (intro Least_equality ereal_le_ereal_bounded[of _ _ y]) - fix z assume z: "\u\{x<.. z" - from ereal_dense[OF `x < y`] guess w .. note w = this - with z[THEN bspec, of w] show "x \ z" by auto -qed auto - lemma real_ereal_id: "real o ereal = id" proof- { fix x have "(real o ereal) x = id x" by auto } @@ -2109,6 +1959,7 @@ assumes "f ----> f0" assumes "open S" "f0 : S" obtains N where "ALL n>=N. f n : S" + using assms using tendsto_def using tendsto_explicit[of f f0] assms by auto lemma ereal_LimI_finite_iff: diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Multivariate_Analysis/Extended_Real_Limits.thy --- a/src/HOL/Multivariate_Analysis/Extended_Real_Limits.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Multivariate_Analysis/Extended_Real_Limits.thy Wed Feb 20 12:04:42 2013 +0100 @@ -82,7 +82,7 @@ case (real r) then have fin: "\a\ \ \" by simp from ereal_open_cont_interval[OF a singletonI this] guess e . note e = this then obtain b where b_def: "aInf S\ \ \" from ereal_open_cont_interval[OF assms(1) * fin] guess e . note e = this then obtain b where b_def: "Inf S-eS. open S \ mono_set S \ l \ S \ eventually (\x. f x \ S) net" assume P: "\P. eventually P net \ INFI (Collect P) f \ y" show "l \ y" - proof (rule ereal_le_ereal) + proof (rule dense_le) fix B assume "B < l" then have "eventually (\x. f x \ {B <..}) net" by (intro S[rule_format]) auto @@ -369,7 +369,7 @@ assume S: "\S. open S \ mono_set (uminus ` S) \ l \ S \ eventually (\x. f x \ S) net" assume P: "\P. eventually P net \ y \ SUPR (Collect P) f" show "y \ l" - proof (rule ereal_ge_ereal, safe) + proof (rule dense_ge) fix B assume "l < B" then have "eventually (\x. f x \ {..< B}) net" by (intro S[rule_format]) auto diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Nat.thy --- a/src/HOL/Nat.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Nat.thy Wed Feb 20 12:04:42 2013 +0100 @@ -455,6 +455,9 @@ end +instance nat :: no_top + by default (auto intro: less_Suc_eq_le[THEN iffD2]) + subsubsection {* Introduction properties *} lemma lessI [iff]: "n < Suc n" diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Orderings.thy --- a/src/HOL/Orderings.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Orderings.thy Wed Feb 20 12:04:42 2013 +0100 @@ -1135,10 +1135,10 @@ subsection {* Dense orders *} -class dense_linorder = linorder + - assumes gt_ex: "\y. x < y" - and lt_ex: "\y. y < x" - and dense: "x < y \ (\z. x < z \ z < y)" +class inner_dense_order = order + + assumes dense: "x < y \ (\z. x < z \ z < y)" + +class inner_dense_linorder = linorder + inner_dense_order begin lemma dense_le: @@ -1175,8 +1175,50 @@ qed qed +lemma dense_ge: + fixes y z :: 'a + assumes "\x. z < x \ y \ x" + shows "y \ z" +proof (rule ccontr) + assume "\ ?thesis" + hence "z < y" by simp + from dense[OF this] + obtain x where "x < y" and "z < x" by safe + moreover have "y \ x" using assms[OF `z < x`] . + ultimately show False by auto +qed + +lemma dense_ge_bounded: + fixes x y z :: 'a + assumes "z < x" + assumes *: "\w. \ z < w ; w < x \ \ y \ w" + shows "y \ z" +proof (rule dense_ge) + fix w assume "z < w" + from dense[OF `z < x`] obtain u where "z < u" "u < x" by safe + from linear[of u w] + show "y \ w" + proof (rule disjE) + assume "w \ u" + from `z < w` le_less_trans[OF `w \ u` `u < x`] + show "y \ w" by (rule *) + next + assume "u \ w" + from *[OF `z < u` `u < x`] `u \ w` + show "y \ w" by (rule order_trans) + qed +qed + end +class no_top = order + + assumes gt_ex: "\y. x < y" + +class no_bot = order + + assumes lt_ex: "\y. y < x" + +class dense_linorder = inner_dense_linorder + no_top + no_bot + subsection {* Wellorders *} class wellorder = linorder + diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Probability/Caratheodory.thy --- a/src/HOL/Probability/Caratheodory.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Probability/Caratheodory.thy Wed Feb 20 12:04:42 2013 +0100 @@ -363,8 +363,7 @@ assumes posf: "positive M f" and ca: "countably_additive M f" and s: "s \ M" shows "Inf (measure_set M f s) = f s" - unfolding Inf_ereal_def -proof (safe intro!: Greatest_equality) +proof (intro Inf_eqI) fix z assume z: "z \ measure_set M f s" from this obtain A where @@ -394,12 +393,7 @@ qed also have "... = z" by (rule si) finally show "f s \ z" . -next - fix y - assume y: "\u \ measure_set M f s. y \ u" - thus "y \ f s" - by (blast intro: inf_measure_nonempty [of _ f, OF posf s subset_refl]) -qed +qed (blast intro: inf_measure_nonempty [of _ f, OF posf s subset_refl]) lemma measure_set_pos: assumes posf: "positive M f" "r \ measure_set M f X" diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Probability/Radon_Nikodym.thy --- a/src/HOL/Probability/Radon_Nikodym.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Probability/Radon_Nikodym.thy Wed Feb 20 12:04:42 2013 +0100 @@ -57,7 +57,7 @@ proof fix i show "\x. 0 < x \ x < inverse (?B i)" using measure[of i] emeasure_nonneg[of M "A i"] - by (auto intro!: ereal_dense simp: ereal_0_gt_inverse ereal_zero_le_0_iff) + by (auto intro!: dense simp: ereal_0_gt_inverse ereal_zero_le_0_iff) qed from choice[OF this] obtain n where n: "\i. 0 < n i" "\i. n i < inverse (2^Suc i * emeasure M (A i))" by auto diff -r d63ec23c9125 -r 4a3c453f99a1 src/HOL/Set_Interval.thy --- a/src/HOL/Set_Interval.thy Wed Feb 20 12:04:42 2013 +0100 +++ b/src/HOL/Set_Interval.thy Wed Feb 20 12:04:42 2013 +0100 @@ -267,7 +267,7 @@ end -context dense_linorder +context inner_dense_linorder begin lemma greaterThanLessThan_empty_iff[simp]: @@ -310,6 +310,22 @@ end +context no_top +begin + +lemma greaterThan_non_empty: "{x <..} \ {}" + using gt_ex[of x] by auto + +end + +context no_bot +begin + +lemma lessThan_non_empty: "{..< x} \ {}" + using lt_ex[of x] by auto + +end + lemma (in linorder) atLeastLessThan_subset_iff: "{a.. b <= a | c<=a & b<=d" apply (auto simp:subset_eq Ball_def) @@ -378,6 +394,36 @@ end +context complete_lattice +begin + +lemma + shows Sup_atLeast[simp]: "Sup {x ..} = top" + and Sup_greaterThanAtLeast[simp]: "x < top \ Sup {x <..} = top" + and Sup_atMost[simp]: "Sup {.. y} = y" + and Sup_atLeastAtMost[simp]: "x \ y \ Sup { x .. y} = y" + and Sup_greaterThanAtMost[simp]: "x < y \ Sup { x <.. y} = y" + by (auto intro!: Sup_eqI) + +lemma + shows Inf_atMost[simp]: "Inf {.. x} = bot" + and Inf_atMostLessThan[simp]: "top < x \ Inf {..< x} = bot" + and Inf_atLeast[simp]: "Inf {x ..} = x" + and Inf_atLeastAtMost[simp]: "x \ y \ Inf { x .. y} = x" + and Inf_atLeastLessThan[simp]: "x < y \ Inf { x ..< y} = x" + by (auto intro!: Inf_eqI) + +end + +lemma + fixes x y :: "'a :: {complete_lattice, inner_dense_linorder}" + shows Sup_lessThan[simp]: "Sup {..< y} = y" + and Sup_atLeastLessThan[simp]: "x < y \ Sup { x ..< y} = y" + and Sup_greaterThanLessThan[simp]: "x < y \ Sup { x <..< y} = y" + and Inf_greaterThan[simp]: "Inf {x <..} = x" + and Inf_greaterThanAtMost[simp]: "x < y \ Inf { x <.. y} = x" + and Inf_greaterThanLessThan[simp]: "x < y \ Inf { x <..< y} = x" + by (auto intro!: Inf_eqI Sup_eqI intro: dense_le dense_le_bounded dense_ge dense_ge_bounded) subsection {* Intervals of natural numbers *}