# HG changeset patch # User haftmann # Date 1350544777 -7200 # Node ID a81f95693c684a7b3c4d83409f8695f93c15549e # Parent 2df2786ac7b70f5ed940abed00de2dfd8740ac60 simp results for simplification results of Inf/Sup expressions on bool; tuned proofs diff -r 2df2786ac7b7 -r a81f95693c68 src/HOL/Complete_Lattices.thy --- a/src/HOL/Complete_Lattices.thy Thu Oct 18 09:17:00 2012 +0200 +++ b/src/HOL/Complete_Lattices.thy Thu Oct 18 09:19:37 2012 +0200 @@ -549,23 +549,21 @@ end +lemma not_False_in_image_Ball [simp]: + "False \ P ` A \ Ball A P" + by auto + +lemma True_in_image_Bex [simp]: + "True \ P ` A \ Bex A P" + by auto + lemma INF_bool_eq [simp]: "INFI = Ball" -proof (rule ext)+ - fix A :: "'a set" - fix P :: "'a \ bool" - show "(\x\A. P x) \ (\x\A. P x)" - by (auto simp add: INF_def) -qed + by (simp add: fun_eq_iff INF_def) lemma SUP_bool_eq [simp]: "SUPR = Bex" -proof (rule ext)+ - fix A :: "'a set" - fix P :: "'a \ bool" - show "(\x\A. P x) \ (\x\A. P x)" - by (auto simp add: SUP_def) -qed + by (simp add: fun_eq_iff SUP_def) instance bool :: complete_boolean_algebra proof qed (auto intro: bool_induct) @@ -1220,3 +1218,4 @@ -- {* Each of these has ALREADY been added @{text "[simp]"} above. *} end + diff -r 2df2786ac7b7 -r a81f95693c68 src/HOL/Fun.thy --- a/src/HOL/Fun.thy Thu Oct 18 09:17:00 2012 +0200 +++ b/src/HOL/Fun.thy Thu Oct 18 09:19:37 2012 +0200 @@ -188,25 +188,30 @@ assumes CH: "\ i j. \i \ I; j \ I\ \ A i \ A j \ A j \ A i" and INJ: "\ i. i \ I \ inj_on f (A i)" shows "inj_on f (\ i \ I. A i)" -proof(unfold inj_on_def UNION_eq, auto) - fix i j x y - assume *: "i \ I" "j \ I" and **: "x \ A i" "y \ A j" - and ***: "f x = f y" - show "x = y" - proof- - {assume "A i \ A j" - with ** have "x \ A j" by auto - with INJ * ** *** have ?thesis - by(auto simp add: inj_on_def) - } - moreover - {assume "A j \ A i" - with ** have "y \ A i" by auto - with INJ * ** *** have ?thesis - by(auto simp add: inj_on_def) - } - ultimately show ?thesis using CH * by blast - qed +proof - + { + fix i j x y + assume *: "i \ I" "j \ I" and **: "x \ A i" "y \ A j" + and ***: "f x = f y" + have "x = y" + proof - + { + assume "A i \ A j" + with ** have "x \ A j" by auto + with INJ * ** *** have ?thesis + by(auto simp add: inj_on_def) + } + moreover + { + assume "A j \ A i" + with ** have "y \ A i" by auto + with INJ * ** *** have ?thesis + by(auto simp add: inj_on_def) + } + ultimately show ?thesis using CH * by blast + qed + } + then show ?thesis by (unfold inj_on_def UNION_eq) auto qed lemma surj_id: "surj id" @@ -416,7 +421,7 @@ assumes CH: "\ i j. \i \ I; j \ I\ \ A i \ A j \ A j \ A i" and BIJ: "\ i. i \ I \ bij_betw f (A i) (A' i)" shows "bij_betw f (\ i \ I. A i) (\ i \ I. A' i)" -proof(unfold bij_betw_def, auto simp add: image_def) +proof (unfold bij_betw_def, auto) have "\ i. i \ I \ inj_on f (A i)" using BIJ bij_betw_def[of f] by auto thus "inj_on f (\ i \ I. A i)" @@ -430,8 +435,9 @@ fix i x' assume *: "i \ I" "x' \ A' i" hence "\x \ A i. x' = f x" using BIJ bij_betw_def[of f] by blast - thus "\j \ I. \x \ A j. x' = f x" - using * by blast + then have "\j \ I. \x \ A j. x' = f x" + using * by blast + then show "x' \ f ` (\x\I. A x)" by (simp add: image_def) qed lemma bij_betw_subset: