# HG changeset patch # User haftmann # Date 1311018579 -7200 # Node ID 7162691e740bf34b2ac4902d7da06d99006c0f59 # Parent 60ef6abb2f928c1cbbbe86e078b7f2630fa5681a generalization; various notation and proof tuning diff -r 60ef6abb2f92 -r 7162691e740b src/HOL/Complete_Lattice.thy --- a/src/HOL/Complete_Lattice.thy Mon Jul 18 21:34:01 2011 +0200 +++ b/src/HOL/Complete_Lattice.thy Mon Jul 18 21:49:39 2011 +0200 @@ -269,6 +269,12 @@ lemma SUP_const [simp]: "A \ {} \ (\i\A. f) = f" by (auto intro: antisym SUP_leI le_SUP_I) +lemma INF_top: "(\x\A. \) = \" + by (cases "A = {}") (simp_all add: INF_empty) + +lemma SUP_bot: "(\x\A. \) = \" + by (cases "A = {}") (simp_all add: SUP_empty) + lemma INF_cong: "A = B \ (\x. x \ B \ C x = D x) \ (\x\A. C x) = (\x\B. D x)" by (simp add: INF_def image_def) @@ -289,7 +295,7 @@ "B \ A \ INFI A f \ INFI B f" by (rule INF_mono) auto -lemma SUPO_subset_mono: +lemma SUP_subset_mono: "A \ B \ SUPR A f \ SUPR B f" by (rule SUP_mono) auto @@ -366,12 +372,12 @@ by (simp add: UNIV_bool SUP_empty SUP_insert sup_commute) lemma INF_mono': - "B \ A \ (\x. x \ A \ f x \ g x) \ (\x\B. f x) \ (\x\B. g x)" + "B \ A \ (\x. x \ B \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" -- {* The last inclusion is POSITIVE! *} by (rule INF_mono) auto lemma SUP_mono': - "B \ A \ (\x. x \ A \ f x \ g x) \ (\x\B. f x) \ (\x\B. g x)" + "A \ B \ (\x. x \ A \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" -- {* The last inclusion is POSITIVE! *} by (blast intro: SUP_mono dest: subsetD) @@ -680,7 +686,7 @@ by (fact INF_UNIV_bool_expand) lemma INT_anti_mono: - "B \ A \ (\x. x \ A \ f x \ g x) \ (\x\B. f x) \ (\x\B. g x)" + "A \ B \ (\x. x \ A \ f x \ g x) \ (\x\B. f x) \ (\x\A. g x)" -- {* The last inclusion is POSITIVE! *} by (fact INF_mono') @@ -835,12 +841,12 @@ by (unfold UNION_def) blast lemma UN_cong [cong]: - "A = B \ (\x. x \ B \ C x = D x) \ (\x\A. C x) = (\x\B. D x)" - by (simp add: UNION_def) + "A = B \ (\x. x \ B \ C x = D x) \ (\x\A. C x) = (\x\B. D x)" + by (fact SUP_cong) lemma strong_UN_cong: - "A = B \ (\x. x \ B =simp=> C x = D x) \ (\x\A. C x) = (\x\B. D x)" - by (simp add: UNION_def simp_implies_def) + "A = B \ (\x. x \ B =simp=> C x = D x) \ (\x\A. C x) = (\x\B. D x)" + by (unfold simp_implies_def) (fact UN_cong) lemma image_eq_UN: "f ` A = (\x\A. {f x})" by blast @@ -849,7 +855,7 @@ by (fact le_SUP_I) lemma UN_least: "(\x. x \ A \ B x \ C) \ (\x\A. B x) \ C" - by (iprover intro: subsetI elim: UN_E dest: subsetD) + by (fact SUP_leI) lemma Collect_bex_eq [no_atp]: "{x. \y\A. P x y} = (\y\A. {x. P x y})" by blast @@ -857,58 +863,58 @@ lemma UN_insert_distrib: "u \ A \ (\x\A. insert a (B x)) = insert a (\x\A. B x)" by blast -lemma UN_empty [simp,no_atp]: "(\x\{}. B x) = {}" - by blast +lemma UN_empty [simp, no_atp]: "(\x\{}. B x) = {}" + by (fact SUP_empty) lemma UN_empty2 [simp]: "(\x\A. {}) = {}" - by blast + by (fact SUP_bot) lemma UN_singleton [simp]: "(\x\A. {x}) = A" by blast lemma UN_absorb: "k \ I \ A k \ (\i\I. A i) = (\i\I. A i)" - by auto + by (fact SUP_absorb) lemma UN_insert [simp]: "(\x\insert a A. B x) = B a \ UNION A B" - by blast + by (fact SUP_insert) lemma UN_Un[simp]: "(\i \ A \ B. M i) = (\i\A. M i) \ (\i\B. M i)" - by blast + by (fact SUP_union) -lemma UN_UN_flatten: "(\x \ (\y\A. B y). C x) = (\y\A. \x\B y. C x)" +lemma UN_UN_flatten: "(\x \ (\y\A. B y). C x) = (\y\A. \x\B y. C x)" -- "FIXME generalize" by blast lemma UN_subset_iff: "((\i\I. A i) \ B) = (\i\I. A i \ B)" by (fact SUP_le_iff) -lemma image_Union: "f ` \S = (\x\S. f ` x)" - by blast - lemma UN_constant [simp]: "(\y\A. c) = (if A = {} then {} else c)" - by auto + by (fact SUP_constant) lemma UN_eq: "(\x\A. B x) = \({Y. \x\A. Y = B x})" + by (fact SUP_eq) + +lemma image_Union: "f ` \S = (\x\S. f ` x)" -- "FIXME generalize" by blast lemma UNION_empty_conv[simp]: "{} = (\x\A. B x) \ (\x\A. B x = {})" "(\x\A. B x) = {} \ (\x\A. B x = {})" -by blast+ + by (fact SUP_bot_conv)+ lemma Collect_ex_eq [no_atp]: "{x. \y. P x y} = (\y. {x. P x y})" by blast -lemma ball_UN: "(\z \ UNION A B. P z) = (\x\A. \z \ B x. P z)" +lemma ball_UN: "(\z \ UNION A B. P z) \ (\x\A. \z \ B x. P z)" by blast -lemma bex_UN: "(\z \ UNION A B. P z) = (\x\A. \z\B x. P z)" +lemma bex_UN: "(\z \ UNION A B. P z) \ (\x\A. \z\B x. P z)" by blast lemma Un_eq_UN: "A \ B = (\b. if b then A else B)" by (auto simp add: split_if_mem2) lemma UN_bool_eq: "(\b. A b) = (A True \ A False)" - by (auto intro: bool_contrapos) + by (fact SUP_UNIV_bool_expand) lemma UN_Pow_subset: "(\x\A. Pow (B x)) \ Pow (\x\A. B x)" by blast @@ -916,7 +922,7 @@ lemma UN_mono: "A \ B \ (\x. x \ A \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" - by (blast dest: subsetD) + by (fact SUP_mono') lemma vimage_Union: "f -` (\A) = (\X\A. f -` X)" by blast