# HG changeset patch # User haftmann # Date 1312578414 -7200 # Node ID 01d6ab227069df173d208ec3650351d4f5af2b1a # Parent 32881ab55eac60e63a2ab4a8c8cd2b6845e6720b tuned order: pushing INF and SUP to Inf and Sup diff -r 32881ab55eac -r 01d6ab227069 src/HOL/Complete_Lattice.thy --- a/src/HOL/Complete_Lattice.thy Fri Aug 05 22:58:17 2011 +0200 +++ b/src/HOL/Complete_Lattice.thy Fri Aug 05 23:06:54 2011 +0200 @@ -200,6 +200,14 @@ lemma Sup_subset_mono: "A \ B \ \A \ \B" by (auto intro: Sup_least Sup_upper) +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) + +lemma SUP_cong: + "A = B \ (\x. x \ B \ C x = D x) \ (\x\A. C x) = (\x\B. D x)" + by (simp add: SUP_def image_def) + lemma Inf_mono: assumes "\b. b \ B \ \a\A. a \ b" shows "\A \ \B" @@ -210,6 +218,10 @@ with `a \ b` show "\A \ b" by auto qed +lemma INF_mono: + "(\m. m \ B \ \n\A. f n \ g m) \ (\n\A. f n) \ (\n\B. g n)" + by (force intro!: Inf_mono simp: INF_def) + lemma Sup_mono: assumes "\a. a \ A \ \b\B. a \ b" shows "\A \ \B" @@ -220,6 +232,19 @@ with `a \ b` show "a \ \B" by auto qed +lemma SUP_mono: + "(\n. n \ A \ \m\B. f n \ g m) \ (\n\A. f n) \ (\n\B. g n)" + by (force intro!: Sup_mono simp: SUP_def) + +lemma INF_superset_mono: + "B \ A \ (\x. x \ B \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" + -- {* The last inclusion is POSITIVE! *} + by (blast intro: INF_mono dest: subsetD) + +lemma SUP_subset_mono: + "A \ B \ (\x. x \ A \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" + by (blast intro: SUP_mono dest: subsetD) + lemma Inf_less_eq: assumes "\v. v \ A \ v \ u" and "A \ {}" @@ -249,9 +274,24 @@ lemma Inf_union_distrib: "\(A \ B) = \A \ \B" by (rule antisym) (auto intro: Inf_greatest Inf_lower le_infI1 le_infI2) +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_INF_I INF_leI) + lemma Sup_union_distrib: "\(A \ B) = \A \ \B" by (rule antisym) (auto intro: Sup_least Sup_upper le_supI1 le_supI2) +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_SUP_I) + +lemma INF_inf_distrib: "(\a\A. f a) \ (\a\A. g a) = (\a\A. f a \ g a)" + by (rule antisym) (rule le_INF_I, auto intro: le_infI1 le_infI2 INF_leI INF_mono) + +lemma SUP_sup_distrib: "(\a\A. f a) \ (\a\A. g a) = (\a\A. f a \ g a)" + by (rule antisym) (auto intro: le_supI1 le_supI2 le_SUP_I SUP_mono, + rule SUP_leI, auto intro: le_supI1 le_supI2 le_SUP_I SUP_mono) + lemma Inf_top_conv [no_atp]: "\A = \ \ (\x\A. x = \)" "\ = \A \ (\x\A. x = \)" @@ -274,6 +314,11 @@ then show "\ = \A \ (\x\A. x = \)" by auto qed +lemma INF_top_conv: + "(\x\A. B x) = \ \ (\x\A. B x = \)" + "\ = (\x\A. B x) \ (\x\A. B x = \)" + by (auto simp add: INF_def Inf_top_conv) + lemma Sup_bot_conv [no_atp]: "\A = \ \ (\x\A. x = \)" (is ?P) "\ = \A \ (\x\A. x = \)" (is ?Q) @@ -283,6 +328,11 @@ from dual.Inf_top_conv show ?P and ?Q by simp_all qed +lemma SUP_bot_conv: + "(\x\A. B x) = \ \ (\x\A. B x = \)" + "\ = (\x\A. B x) \ (\x\A. B x = \)" + by (auto simp add: SUP_def Sup_bot_conv) + lemma INF_const [simp]: "A \ {} \ (\i\A. f) = f" by (auto intro: antisym INF_leI le_INF_I) @@ -295,31 +345,6 @@ 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) - -lemma SUP_cong: - "A = B \ (\x. x \ B \ C x = D x) \ (\x\A. C x) = (\x\B. D x)" - by (simp add: SUP_def image_def) - -lemma INF_mono: - "(\m. m \ B \ \n\A. f n \ g m) \ (\n\A. f n) \ (\n\B. g n)" - by (force intro!: Inf_mono simp: INF_def) - -lemma SUP_mono: - "(\n. n \ A \ \m\B. f n \ g m) \ (\n\A. f n) \ (\n\B. g n)" - by (force intro!: Sup_mono simp: SUP_def) - -lemma INF_superset_mono: - "B \ A \ (\x. x \ B \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" - -- {* The last inclusion is POSITIVE! *} - by (blast intro: INF_mono dest: subsetD) - -lemma SUP_subset_mono: - "A \ B \ (\x. x \ A \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" - by (blast intro: SUP_mono dest: subsetD) - lemma INF_commute: "(\i\A. \j\B. f i j) = (\j\B. \i\A. f i j)" by (iprover intro: INF_leI le_INF_I order_trans antisym) @@ -342,21 +367,6 @@ 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_INF_I INF_leI) - -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_SUP_I) - -lemma INF_inf_distrib: "(\a\A. f a) \ (\a\A. g a) = (\a\A. f a \ g a)" - by (rule antisym) (rule le_INF_I, auto intro: le_infI1 le_infI2 INF_leI INF_mono) - -lemma SUP_sup_distrib: "(\a\A. f a) \ (\a\A. g a) = (\a\A. f a \ g a)" - by (rule antisym) (auto intro: le_supI1 le_supI2 le_SUP_I SUP_mono, - rule SUP_leI, auto intro: le_supI1 le_supI2 le_SUP_I SUP_mono) - lemma INF_constant: "(\y\A. c) = (if A = {} then \ else c)" by (simp add: INF_empty) @@ -373,16 +383,6 @@ "(\x\A. B x) = \({Y. \x\A. Y = B x})" by (simp add: SUP_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: INF_def Inf_top_conv) - -lemma SUP_bot_conv: - "\ = (\x\A. B x) \ (\x\A. B x = \)" - "(\x\A. B x) = \ \ (\x\A. B x = \)" - by (auto simp add: SUP_def Sup_bot_conv) - lemma less_INF_D: assumes "y < (\i\A. f i)" "i \ A" shows "y < f i" proof - @@ -497,6 +497,9 @@ by (rule Sup_least, rule compl_le_swap1, rule Inf_lower) auto qed +lemma uminus_INF: "- (\x\A. B x) = (\x\A. - B x)" + by (simp add: INF_def SUP_def uminus_Inf image_image) + lemma uminus_Sup: "- (\A) = \(uminus ` A)" proof - @@ -504,9 +507,6 @@ then show ?thesis by simp qed -lemma uminus_INF: "- (\x\A. B x) = (\x\A. - B x)" - by (simp add: INF_def SUP_def uminus_Inf image_image) - lemma uminus_SUP: "- (\x\A. B x) = (\x\A. - B x)" by (simp add: INF_def SUP_def uminus_Sup image_image) @@ -523,14 +523,14 @@ "\S \ a \ (\x\S. x \ a)" unfolding not_le [symmetric] le_Inf_iff by auto +lemma INF_less_iff: + "(\i\A. f i) \ a \ (\x\A. f x \ a)" + unfolding INF_def Inf_less_iff by auto + lemma less_Sup_iff: "a \ \S \ (\x\S. a \ x)" unfolding not_le [symmetric] Sup_le_iff by auto -lemma INF_less_iff: - "(\i\A. f i) \ a \ (\x\A. f x \ a)" - unfolding INF_def Inf_less_iff by auto - lemma less_SUP_iff: "a \ (\i\A. f i) \ (\x\A. a \ f x)" unfolding SUP_def less_Sup_iff by auto @@ -557,6 +557,10 @@ qed qed +lemma SUP_eq_top_iff: + "(\i\A. f i) = \ \ (\x<\. \i\A. x < f i)" + unfolding SUP_def Sup_eq_top_iff by auto + lemma Inf_eq_bot_iff: "\A = \ \ (\x>\. \i\A. i < x)" proof - @@ -569,10 +573,6 @@ "(\i\A. f i) = \ \ (\x>\. \i\A. f i < x)" unfolding INF_def Inf_eq_bot_iff by auto -lemma SUP_eq_top_iff: - "(\i\A. f i) = \ \ (\x<\. \i\A. x < f i)" - unfolding SUP_def Sup_eq_top_iff by auto - end