# HG changeset patch # User hoelzl # Date 1300109856 -3600 # Node ID a54e8e95fe962311c31b22ab26a8d802681562a0 # Parent 47d6e13d17108c2489cb94a5ab19890b5c754513 add lemmas for SUP and INF diff -r 47d6e13d1710 -r a54e8e95fe96 src/HOL/Complete_Lattice.thy --- a/src/HOL/Complete_Lattice.thy Mon Mar 14 14:37:35 2011 +0100 +++ b/src/HOL/Complete_Lattice.thy Mon Mar 14 14:37:36 2011 +0100 @@ -89,25 +89,45 @@ by (auto intro: Sup_least dest: Sup_upper) lemma Inf_mono: - assumes "\b. b \ B \ \a\A. a \ b" - shows "Inf A \ Inf B" + assumes "\b. b \ B \ \a\A. a \ b" + shows "Inf A \ Inf B" proof (rule Inf_greatest) fix b assume "b \ B" - with assms obtain a where "a \ A" and "a \ b" by blast - from `a \ A` have "Inf A \ a" by (rule Inf_lower) - with `a \ b` show "Inf A \ b" by auto + with assms obtain a where "a \ A" and "a \ b" by blast + from `a \ A` have "Inf A \ a" by (rule Inf_lower) + with `a \ b` show "Inf A \ b" by auto qed lemma Sup_mono: - assumes "\a. a \ A \ \b\B. a \ b" - shows "Sup A \ Sup B" + assumes "\a. a \ A \ \b\B. a \ b" + shows "Sup A \ Sup B" proof (rule Sup_least) fix a assume "a \ A" - with assms obtain b where "b \ B" and "a \ b" by blast - from `b \ B` have "b \ Sup B" by (rule Sup_upper) - with `a \ b` show "a \ Sup B" by auto + with assms obtain b where "b \ B" and "a \ b" by blast + from `b \ B` have "b \ Sup B" by (rule Sup_upper) + with `a \ b` show "a \ Sup B" by auto qed +lemma top_le: + "top \ x \ x = top" + by (rule antisym) auto + +lemma le_bot: + "x \ bot \ x = bot" + by (rule antisym) auto + +lemma not_less_bot[simp]: "\ (x \ bot)" + using bot_least[of x] by (auto simp: le_less) + +lemma not_top_less[simp]: "\ (top \ x)" + using top_greatest[of x] by (auto simp: le_less) + +lemma Sup_upper2: "u \ A \ v \ u \ v \ Sup A" + using Sup_upper[of u A] by auto + +lemma Inf_lower2: "u \ A \ u \ v \ Inf A \ v" + using Inf_lower[of u A] by auto + definition INFI :: "'b set \ ('b \ 'a) \ 'a" where "INFI A f = \ (f ` A)" @@ -146,15 +166,27 @@ context complete_lattice begin +lemma SUP_cong: "(\x. x \ A \ f x = g x) \ SUPR A f = SUPR A g" + by (simp add: SUPR_def cong: image_cong) + +lemma INF_cong: "(\x. x \ A \ f x = g x) \ INFI A f = INFI A g" + by (simp add: INFI_def cong: image_cong) + lemma le_SUPI: "i : A \ M i \ (SUP i:A. M i)" by (auto simp add: SUPR_def intro: Sup_upper) +lemma le_SUPI2: "i \ A \ u \ M i \ u \ (SUP i:A. M i)" + using le_SUPI[of i A M] by auto + lemma SUP_leI: "(\i. i : A \ M i \ u) \ (SUP i:A. M i) \ u" by (auto simp add: SUPR_def intro: Sup_least) lemma INF_leI: "i : A \ (INF i:A. M i) \ M i" by (auto simp add: INFI_def intro: Inf_lower) +lemma INF_leI2: "i \ A \ M i \ u \ (INF i:A. M i) \ u" + using INF_leI[of i A M] by auto + lemma le_INFI: "(\i. i : A \ u \ M i) \ u \ (INF i:A. M i)" by (auto simp add: INFI_def intro: Inf_greatest)