# HG changeset patch # User haftmann # Date 1310928411 -7200 # Node ID 79c3231e0593635639e56e8e5ac684b05f1d6dcf # Parent 92129f50512526cbb4aa3836556e31dc79b7f531 more lemmas about SUP diff -r 92129f505125 -r 79c3231e0593 src/HOL/Complete_Lattice.thy --- a/src/HOL/Complete_Lattice.thy Sun Jul 17 20:29:54 2011 +0200 +++ b/src/HOL/Complete_Lattice.thy Sun Jul 17 20:46:51 2011 +0200 @@ -293,11 +293,7 @@ lemma SUP_commute: "(\i\A. \j\B. f i j) = (\j\B. \i\A. f i j)" by (iprover intro: SUP_leI le_SUPI order_trans antisym) -lemma (in complete_lattice) INFI_empty: - "(\x\{}. B x) = \" - by (simp add: INFI_def) - -lemma (in complete_lattice) INFI_absorb: +lemma INF_absorb: assumes "k \ I" shows "A k \ (\i\I. A i) = (\i\I. A i)" proof - @@ -305,36 +301,74 @@ then show ?thesis by (simp add: INF_insert) qed -lemma (in complete_lattice) INF_union: +lemma SUP_absorb: + assumes "k \ I" + shows "A k \ (\i\I. A i) = (\i\I. A i)" +proof - + from assms obtain J where "I = insert k J" by blast + then show ?thesis by (simp add: SUP_insert) +qed + +lemma INF_union: "(\i \ A \ B. M i) = (\i \ A. M i) \ (\i\B. M i)" by (auto intro!: antisym INF_mono intro: le_infI1 le_infI2 le_INFI INF_leI) -lemma (in complete_lattice) INF_constant: +lemma SUP_union: + "(\i \ A \ B. M i) = (\i \ A. M i) \ (\i\B. M i)" + by (auto intro!: antisym SUP_mono intro: le_supI1 le_supI2 SUP_leI le_SUPI) + +lemma INF_constant: "(\y\A. c) = (if A = {} then \ else c)" by (simp add: INF_empty) -lemma (in complete_lattice) INF_eq: +lemma SUP_constant: + "(\y\A. c) = (if A = {} then \ else c)" + by (simp add: SUP_empty) + +lemma INF_eq: "(\x\A. B x) = \({Y. \x\A. Y = B x})" by (simp add: INFI_def image_def) -lemma (in complete_lattice) INF_top_conv: +lemma SUP_eq: + "(\x\A. B x) = \({Y. \x\A. Y = B x})" + by (simp add: SUPR_def image_def) + +lemma INF_top_conv: "\ = (\x\A. B x) \ (\x\A. B x = \)" "(\x\A. B x) = \ \ (\x\A. B x = \)" by (auto simp add: INFI_def Inf_top_conv) -lemma (in complete_lattice) INFI_UNIV_range: - "(\x\UNIV. f x) = \range f" - by (simp add: INFI_def) +lemma SUP_bot_conv: + "\ = (\x\A. B x) \ (\x\A. B x = \)" + "(\x\A. B x) = \ \ (\x\A. B x = \)" + by (auto simp add: SUPR_def Sup_bot_conv) -lemma (in complete_lattice) INF_bool_eq: +lemma (in complete_lattice) INF_UNIV_range: + "(\x. f x) = \range f" + by (fact INFI_def) + +lemma (in complete_lattice) SUP_UNIV_range: + "(\x. f x) = \range f" + by (fact SUPR_def) + +lemma INF_bool_eq: "(\b. A b) = A True \ A False" by (simp add: UNIV_bool INF_empty INF_insert inf_commute) -lemma (in complete_lattice) INF_anti_mono: +lemma SUP_bool_eq: + "(\b. A b) = A True \ A False" + by (simp add: UNIV_bool SUP_empty SUP_insert sup_commute) + +lemma INF_anti_mono: "B \ A \ (\x. x \ A \ f x \ g x) \ (\x\B. f x) \ (\x\B. g x)" -- {* The last inclusion is POSITIVE! *} by (blast intro: INF_mono dest: subsetD) +lemma SUP_anti_mono: + "B \ A \ (\x. x \ A \ g x \ f x) \ (\x\B. g x) \ (\x\B. f x)" + -- {* The last inclusion is POSITIVE! *} + by (blast intro: SUP_mono dest: subsetD) + end lemma Inf_less_iff: @@ -342,16 +376,16 @@ shows "\S \ a \ (\x\S. x \ a)" unfolding not_le [symmetric] le_Inf_iff by auto +lemma less_Sup_iff: + fixes a :: "'a\{complete_lattice,linorder}" + shows "a \ \S \ (\x\S. a \ x)" + unfolding not_le [symmetric] Sup_le_iff by auto + lemma INF_less_iff: fixes a :: "'a::{complete_lattice,linorder}" shows "(\i\A. f i) \ a \ (\x\A. f x \ a)" unfolding INFI_def Inf_less_iff by auto -lemma less_Sup_iff: - fixes a :: "'a\{complete_lattice,linorder}" - shows "a \ \S \ (\x\S. a \ x)" - unfolding not_le [symmetric] Sup_le_iff by auto - lemma less_SUP_iff: fixes a :: "'a::{complete_lattice,linorder}" shows "a \ (\i\A. f i) \ (\x\A. a \ f x)"