# HG changeset patch # User haftmann # Date 1541836639 0 # Node ID 9bbd5497befdf46b18ac521a636b0464864f239a # Parent ff7e6751a1a7a75fd54194eed02fa24cc9c4729a clarified status of legacy input abbreviations diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Complete_Lattices.thy --- a/src/HOL/Complete_Lattices.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Complete_Lattices.thy Sat Nov 10 07:57:19 2018 +0000 @@ -16,21 +16,9 @@ class Inf = fixes Inf :: "'a set \ 'a" ("\ _" [900] 900) -begin - -abbreviation (input) INFIMUM :: "'b set \ ('b \ 'a) \ 'a" \ \legacy\ - where "INFIMUM A f \ \(f ` A)" - -end class Sup = fixes Sup :: "'a set \ 'a" ("\ _" [900] 900) -begin - -abbreviation (input) SUPREMUM :: "'b set \ ('b \ 'a) \ 'a" \ \legacy\ - where "SUPREMUM A f \ \(f ` A)" - -end syntax (ASCII) "_INF1" :: "pttrns \ 'b \ 'b" ("(3INF _./ _)" [0, 10] 10) @@ -858,9 +846,6 @@ subsubsection \Intersections of families\ -abbreviation (input) INTER :: "'a set \ ('a \ 'b set) \ 'b set" \ \legacy\ - where "INTER \ INFIMUM" - syntax (ASCII) "_INTER1" :: "pttrns \ 'b set \ 'b set" ("(3INT _./ _)" [0, 10] 10) "_INTER" :: "pttrn \ 'a set \ 'b set \ 'b set" ("(3INT _:_./ _)" [0, 0, 10] 10) @@ -915,7 +900,7 @@ lemma INT_subset_iff: "B \ (\i\I. A i) \ (\i\I. B \ A i)" by (fact le_INF_iff) -lemma INT_insert [simp]: "(\x \ insert a A. B x) = B a \ INTER A B" +lemma INT_insert [simp]: "(\x \ insert a A. B x) = B a \ \ (B ` A)" by (fact INF_insert) lemma INT_Un: "(\i \ A \ B. M i) = (\i \ A. M i) \ (\i\B. M i)" @@ -1018,9 +1003,6 @@ subsubsection \Unions of families\ -abbreviation (input) UNION :: "'a set \ ('a \ 'b set) \ 'b set" \ \legacy\ - where "UNION \ SUPREMUM" - syntax (ASCII) "_UNION1" :: "pttrns => 'b set => 'b set" ("(3UN _./ _)" [0, 10] 10) "_UNION" :: "pttrn => 'a set => 'b set => 'b set" ("(3UN _:_./ _)" [0, 0, 10] 10) @@ -1050,10 +1032,10 @@ lemma UNION_eq: "(\x\A. B x) = {y. \x\A. y \ B x}" by (auto intro!: SUP_eqI) -lemma bind_UNION [code]: "Set.bind A f = UNION A f" +lemma bind_UNION [code]: "Set.bind A f = \(f ` A)" by (simp add: bind_def UNION_eq) -lemma member_bind [simp]: "x \ Set.bind P f \ x \ UNION P f " +lemma member_bind [simp]: "x \ Set.bind A f \ x \ \(f ` A)" by (simp add: bind_UNION) lemma Union_SetCompr_eq: "\{f x| x. P x} = {a. \x. P x \ a \ f x}" @@ -1091,7 +1073,7 @@ lemma UN_absorb: "k \ I \ A k \ (\i\I. A i) = (\i\I. A i)" by (fact SUP_absorb) -lemma UN_insert [simp]: "(\x\insert a A. B x) = B a \ UNION A B" +lemma UN_insert [simp]: "(\x\insert a A. B x) = B a \ \(B ` A)" by (fact SUP_insert) lemma UN_Un [simp]: "(\i \ A \ B. M i) = (\i\A. M i) \ (\i\B. M i)" @@ -1120,10 +1102,10 @@ lemma Collect_ex_eq: "{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 \ \(B ` A). 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 \ \(B ` A). P z) \ (\x\A. \z\B x. P z)" by blast lemma Un_eq_UN: "A \ B = (\b. if b then A else B)" @@ -1150,7 +1132,7 @@ \ \NOT suitable for rewriting\ by blast -lemma image_UN: "f ` UNION A B = (\x\A. f ` B x)" +lemma image_UN: "f ` \(B ` A) = (\x\A. f ` B x)" by blast lemma UN_singleton [simp]: "(\x\A. {x}) = A" @@ -1251,14 +1233,14 @@ proof safe have "\i. i \ I \ inj_on f (A i)" using bij bij_betw_def[of f] by auto - then show "inj_on f (UNION I A)" + then show "inj_on f (\(A ` I))" using chain inj_on_UNION_chain[of I A f] by auto next fix i x assume *: "i \ I" "x \ A i" with bij have "f x \ A' i" by (auto simp: bij_betw_def) - with * show "f x \ UNION I A'" by blast + with * show "f x \ \(A' ` I)" by blast next fix i x' assume *: "i \ I" "x' \ A' i" @@ -1266,18 +1248,18 @@ unfolding bij_betw_def by blast with * have "\j \ I. \x \ A j. x' = f x" by blast - then show "x' \ f ` UNION I A" + then show "x' \ f ` \(A ` I)" by blast qed (*injectivity's required. Left-to-right inclusion holds even if A is empty*) -lemma image_INT: "inj_on f C \ \x\A. B x \ C \ j \ A \ f ` (INTER A B) = (INT x:A. f ` B x)" +lemma image_INT: "inj_on f C \ \x\A. B x \ C \ j \ A \ f ` (\(B ` A)) = (\x\A. f ` B x)" by (auto simp add: inj_on_def) blast -lemma bij_image_INT: "bij f \ f ` (INTER A B) = (INT x:A. f ` B x)" +lemma bij_image_INT: "bij f \ f ` (\(B ` A)) = (\x\A. f ` B x)" by (auto simp: bij_def inj_def surj_def) blast -lemma UNION_fun_upd: "UNION J (A(i := B)) = UNION (J - {i}) A \ (if i \ J then B else {})" +lemma UNION_fun_upd: "\(A(i := B) ` J) = \(A ` (J - {i})) \ (if i \ J then B else {})" by (auto simp add: set_eq_iff) lemma bij_betw_Pow: @@ -1321,7 +1303,7 @@ "\A B C. (\x\C. A x - B) = ((\x\C. A x) - B)" "\A B C. (\x\C. A - B x) = (A - (\x\C. B x))" "\A B. (\x\\A. B x) = (\y\A. \x\y. B x)" - "\A B C. (\z\UNION A B. C z) = (\x\A. \z\B x. C z)" + "\A B C. (\z\(\(B ` A)). C z) = (\x\A. \z\B x. C z)" "\A B f. (\x\f`A. B x) = (\a\A. B (f a))" by auto @@ -1334,15 +1316,15 @@ "\A B C. (\x\C. A x \ B) = ((\x\C. A x) \ B)" "\A B C. (\x\C. A \ B x) = (A \ (\x\C. B x))" "\A B. (\x\\A. B x) = (\y\A. \x\y. B x)" - "\A B C. (\z\UNION A B. C z) = (\x\A. \z\B x. C z)" + "\A B C. (\z\(\(B ` A)). C z) = (\x\A. \z\B x. C z)" "\A B f. (\x\f`A. B x) = (\a\A. B (f a))" by auto lemma UN_ball_bex_simps [simp]: "\A P. (\x\\A. P x) \ (\y\A. \x\y. P x)" - "\A B P. (\x\UNION A B. P x) = (\a\A. \x\ B a. P x)" + "\A B P. (\x\(\(B ` A)). P x) = (\a\A. \x\ B a. P x)" "\A P. (\x\\A. P x) \ (\y\A. \x\y. P x)" - "\A B P. (\x\UNION A B. P x) \ (\a\A. \x\B a. P x)" + "\A B P. (\x\(\(B ` A)). P x) \ (\a\A. \x\B a. P x)" by auto @@ -1357,7 +1339,7 @@ "\A B C. ((\x\C. A x) - B) = (\x\C. A x - B)" "\A B C. (A - (\x\C. B x)) = (\x\C. A - B x)" "\A B. (\y\A. \x\y. B x) = (\x\\A. B x)" - "\A B C. (\x\A. \z\B x. C z) = (\z\UNION A B. C z)" + "\A B C. (\x\A. \z\B x. C z) = (\z\(\(B ` A)). C z)" "\A B f. (\a\A. B (f a)) = (\x\f`A. B x)" by auto @@ -1370,7 +1352,7 @@ "\A B C. ((\x\C. A x) \ B) = (\x\C. A x \ B)" "\A B C. A \ (\x\C. B x) = (\x\C. A \ B x)" "\A B. (\y\A. \x\y. B x) = (\x\\A. B x)" - "\A B C. (\x\A. \z\B x. C z) = (\z\UNION A B. C z)" + "\A B C. (\x\A. \z\B x. C z) = (\z\(\(B ` A)). C z)" "\A B f. (\a\A. B (f a)) = (\x\f`A. B x)" by auto diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Conditionally_Complete_Lattices.thy --- a/src/HOL/Conditionally_Complete_Lattices.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Conditionally_Complete_Lattices.thy Sat Nov 10 07:57:19 2018 +0000 @@ -286,22 +286,22 @@ lemma cInf_atLeastAtMost[simp]: "y \ x \ Inf {y..x} = y" by (auto intro!: cInf_eq_minimum) -lemma cINF_lower: "bdd_below (f ` A) \ x \ A \ INFIMUM A f \ f x" +lemma cINF_lower: "bdd_below (f ` A) \ x \ A \ \(f ` A) \ f x" using cInf_lower [of _ "f ` A"] by simp -lemma cINF_greatest: "A \ {} \ (\x. x \ A \ m \ f x) \ m \ INFIMUM A f" +lemma cINF_greatest: "A \ {} \ (\x. x \ A \ m \ f x) \ m \ \(f ` A)" using cInf_greatest [of "f ` A"] by auto -lemma cSUP_upper: "x \ A \ bdd_above (f ` A) \ f x \ SUPREMUM A f" +lemma cSUP_upper: "x \ A \ bdd_above (f ` A) \ f x \ \(f ` A)" using cSup_upper [of _ "f ` A"] by simp -lemma cSUP_least: "A \ {} \ (\x. x \ A \ f x \ M) \ SUPREMUM A f \ M" +lemma cSUP_least: "A \ {} \ (\x. x \ A \ f x \ M) \ \(f ` A) \ M" using cSup_least [of "f ` A"] by auto -lemma cINF_lower2: "bdd_below (f ` A) \ x \ A \ f x \ u \ INFIMUM A f \ u" +lemma cINF_lower2: "bdd_below (f ` A) \ x \ A \ f x \ u \ \(f ` A) \ u" by (auto intro: cINF_lower order_trans) -lemma cSUP_upper2: "bdd_above (f ` A) \ x \ A \ u \ f x \ u \ SUPREMUM A f" +lemma cSUP_upper2: "bdd_above (f ` A) \ x \ A \ u \ f x \ u \ \(f ` A)" by (auto intro: cSUP_upper order_trans) lemma cSUP_const [simp]: "A \ {} \ (\x\A. c) = c" @@ -310,10 +310,10 @@ lemma cINF_const [simp]: "A \ {} \ (\x\A. c) = c" by (intro antisym cINF_greatest) (auto intro: cINF_lower) -lemma le_cINF_iff: "A \ {} \ bdd_below (f ` A) \ u \ INFIMUM A f \ (\x\A. u \ f x)" +lemma le_cINF_iff: "A \ {} \ bdd_below (f ` A) \ u \ \(f ` A) \ (\x\A. u \ f x)" by (metis cINF_greatest cINF_lower order_trans) -lemma cSUP_le_iff: "A \ {} \ bdd_above (f ` A) \ SUPREMUM A f \ u \ (\x\A. f x \ u)" +lemma cSUP_le_iff: "A \ {} \ bdd_above (f ` A) \ \(f ` A) \ u \ (\x\A. f x \ u)" by (metis cSUP_least cSUP_upper order_trans) lemma less_cINF_D: "bdd_below (f`A) \ y < (\i\A. f i) \ i \ A \ y < f i" @@ -322,22 +322,22 @@ lemma cSUP_lessD: "bdd_above (f`A) \ (\i\A. f i) < y \ i \ A \ f i < y" by (metis cSUP_upper le_less_trans) -lemma cINF_insert: "A \ {} \ bdd_below (f ` A) \ INFIMUM (insert a A) f = inf (f a) (INFIMUM A f)" - by (metis cInf_insert image_insert image_is_empty) +lemma cINF_insert: "A \ {} \ bdd_below (f ` A) \ \(f ` insert a A) = inf (f a) (\(f ` A))" + by (simp add: cInf_insert cong del: INF_cong) -lemma cSUP_insert: "A \ {} \ bdd_above (f ` A) \ SUPREMUM (insert a A) f = sup (f a) (SUPREMUM A f)" - by (metis cSup_insert image_insert image_is_empty) +lemma cSUP_insert: "A \ {} \ bdd_above (f ` A) \ \(f ` insert a A) = sup (f a) (\(f ` A))" + by (simp add: cSup_insert cong del: SUP_cong) -lemma cINF_mono: "B \ {} \ bdd_below (f ` A) \ (\m. m \ B \ \n\A. f n \ g m) \ INFIMUM A f \ INFIMUM B g" +lemma cINF_mono: "B \ {} \ bdd_below (f ` A) \ (\m. m \ B \ \n\A. f n \ g m) \ \(f ` A) \ \(g ` B)" using cInf_mono [of "g ` B" "f ` A"] by auto -lemma cSUP_mono: "A \ {} \ bdd_above (g ` B) \ (\n. n \ A \ \m\B. f n \ g m) \ SUPREMUM A f \ SUPREMUM B g" +lemma cSUP_mono: "A \ {} \ bdd_above (g ` B) \ (\n. n \ A \ \m\B. f n \ g m) \ \(f ` A) \ \(g ` B)" using cSup_mono [of "f ` A" "g ` B"] by auto -lemma cINF_superset_mono: "A \ {} \ bdd_below (g ` B) \ A \ B \ (\x. x \ B \ g x \ f x) \ INFIMUM B g \ INFIMUM A f" +lemma cINF_superset_mono: "A \ {} \ bdd_below (g ` B) \ A \ B \ (\x. x \ B \ g x \ f x) \ \(g ` B) \ \(f ` A)" by (rule cINF_mono) auto -lemma cSUP_subset_mono: "A \ {} \ bdd_above (g ` B) \ A \ B \ (\x. x \ B \ f x \ g x) \ SUPREMUM A f \ SUPREMUM B g" +lemma cSUP_subset_mono: "A \ {} \ bdd_above (g ` B) \ A \ B \ (\x. x \ B \ f x \ g x) \ \(f ` A) \ \(g ` B)" by (rule cSUP_mono) auto lemma less_eq_cInf_inter: "bdd_below A \ bdd_below B \ A \ B \ {} \ inf (Inf A) (Inf B) \ Inf (A \ B)" @@ -349,20 +349,20 @@ lemma cInf_union_distrib: "A \ {} \ bdd_below A \ B \ {} \ bdd_below B \ Inf (A \ B) = inf (Inf A) (Inf B)" by (intro antisym le_infI cInf_greatest cInf_lower) (auto intro: le_infI1 le_infI2 cInf_lower) -lemma cINF_union: "A \ {} \ bdd_below (f`A) \ B \ {} \ bdd_below (f`B) \ INFIMUM (A \ B) f = inf (INFIMUM A f) (INFIMUM B f)" - using cInf_union_distrib [of "f ` A" "f ` B"] by (simp add: image_Un [symmetric]) +lemma cINF_union: "A \ {} \ bdd_below (f ` A) \ B \ {} \ bdd_below (f ` B) \ \ (f ` (A \ B)) = \ (f ` A) \ \ (f ` B)" + using cInf_union_distrib [of "f ` A" "f ` B"] by (simp add: image_Un cong del: INF_cong) lemma cSup_union_distrib: "A \ {} \ bdd_above A \ B \ {} \ bdd_above B \ Sup (A \ B) = sup (Sup A) (Sup B)" by (intro antisym le_supI cSup_least cSup_upper) (auto intro: le_supI1 le_supI2 cSup_upper) -lemma cSUP_union: "A \ {} \ bdd_above (f`A) \ B \ {} \ bdd_above (f`B) \ SUPREMUM (A \ B) f = sup (SUPREMUM A f) (SUPREMUM B f)" - using cSup_union_distrib [of "f ` A" "f ` B"] by (simp add: image_Un [symmetric]) +lemma cSUP_union: "A \ {} \ bdd_above (f ` A) \ B \ {} \ bdd_above (f ` B) \ \ (f ` (A \ B)) = \ (f ` A) \ \ (f ` B)" + using cSup_union_distrib [of "f ` A" "f ` B"] by (simp add: image_Un cong del: SUP_cong) -lemma cINF_inf_distrib: "A \ {} \ bdd_below (f`A) \ bdd_below (g`A) \ inf (INFIMUM A f) (INFIMUM A g) = (\a\A. inf (f a) (g a))" +lemma cINF_inf_distrib: "A \ {} \ bdd_below (f`A) \ bdd_below (g`A) \ \ (f ` A) \ \ (g ` A) = (\a\A. inf (f a) (g a))" by (intro antisym le_infI cINF_greatest cINF_lower2) (auto intro: le_infI1 le_infI2 cINF_greatest cINF_lower le_infI) -lemma SUP_sup_distrib: "A \ {} \ bdd_above (f`A) \ bdd_above (g`A) \ sup (SUPREMUM A f) (SUPREMUM A g) = (\a\A. sup (f a) (g a))" +lemma SUP_sup_distrib: "A \ {} \ bdd_above (f`A) \ bdd_above (g`A) \ \ (f ` A) \ \ (g ` A) = (\a\A. sup (f a) (g a))" by (intro antisym le_supI cSUP_least cSUP_upper2) (auto intro: le_supI1 le_supI2 cSUP_least cSUP_upper le_supI) diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Enum.thy --- a/src/HOL/Enum.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Enum.thy Sat Nov 10 07:57:19 2018 +0000 @@ -846,8 +846,8 @@ by simp qed -lemma finite_Inf_Sup: "INFIMUM A Sup \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" -proof (rule finite_induct [of A "\ A .INFIMUM A Sup \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf"], simp_all add: finite_UnionD) +lemma finite_Inf_Sup: "\(Sup ` A) \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" +proof (rule finite_induct [of A "\A. \(Sup ` A) \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})"], simp_all add: finite_UnionD) fix x::"'a set" fix F assume "x \ F" @@ -858,13 +858,13 @@ by (auto simp add: fa_def) from this have B: "\f b. \Y\F. f Y \ Y \ b \ x \ fa b f ` ({x} \ F) \ {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)}" by blast - have [simp]: "\f b. \Y\F. f Y \ Y \ b \ x \ b \ (\x\F. f x) \ SUPREMUM {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)} Inf" + have [simp]: "\f b. \Y\F. f Y \ Y \ b \ x \ b \ (\x\F. f x) \ \(Inf ` {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)})" using B apply (rule SUP_upper2, simp_all) by (simp_all add: INF_greatest Inf_lower inf.coboundedI2 fa_def) - assume "INFIMUM F Sup \ SUPREMUM {f ` F |f. \Y\F. f Y \ Y} Inf" + assume "\(Sup ` F) \ \(Inf ` {f ` F |f. \Y\F. f Y \ Y})" - from this have "\x \ INFIMUM F Sup \ \x \ SUPREMUM {f ` F |f. \Y\F. f Y \ Y} Inf" + from this have "\x \ \(Sup ` F) \ \x \ \(Inf ` {f ` F |f. \Y\F. f Y \ Y})" apply simp using inf.coboundedI2 by blast also have "... = Sup {\x \ (Inf (f ` F)) |f . (\Y\F. f Y \ Y)}" @@ -874,11 +874,11 @@ apply (subst inf_commute) by (simp add: finite_inf_Sup) - also have "... \ SUPREMUM {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)} Inf" + also have "... \ \(Inf ` {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)})" apply (rule Sup_least, clarsimp)+ by (subst inf_commute, simp) - finally show "\x \ INFIMUM F Sup \ SUPREMUM {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)} Inf" + finally show "\x \ \(Sup ` F) \ \(Inf ` {insert (f x) (f ` F) |f. f x \ x \ (\Y\F. f Y \ Y)})" by simp qed diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Filter.thy --- a/src/HOL/Filter.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Filter.thy Sat Nov 10 07:57:19 2018 +0000 @@ -669,9 +669,9 @@ by (subst eventually_INF) blast also have "\ \ (\X. (X \ B \ finite X) \ eventually P (filtercomap f (\b\X. F b)))" by (rule ex_cong) (simp add: *) - also have "\ \ eventually P (filtercomap f (INFIMUM B F))" + also have "\ \ eventually P (filtercomap f (\(F ` B)))" unfolding eventually_filtercomap by (subst eventually_INF) blast - finally show "eventually P (filtercomap f (INFIMUM B F)) = + finally show "eventually P (filtercomap f (\(F ` B))) = eventually P (\b\B. filtercomap f (F b))" .. qed qed diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Finite_Set.thy --- a/src/HOL/Finite_Set.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Finite_Set.thy Sat Nov 10 07:57:19 2018 +0000 @@ -256,7 +256,7 @@ "finite A \ (\a. a \ A \ finite (B a)) \ finite (\a\A. B a)" by (induct rule: finite_induct) simp_all -lemma finite_UN [simp]: "finite A \ finite (UNION A B) \ (\x\A. finite (B x))" +lemma finite_UN [simp]: "finite A \ finite (\(B ` A)) \ (\x\A. finite (B x))" by (blast intro: finite_subset) lemma finite_Inter [intro]: "\A\M. finite A \ finite (\M)" @@ -1254,7 +1254,7 @@ lemma inf_INF_fold_inf: assumes "finite A" - shows "inf B (INFIMUM A f) = fold (inf \ f) B A" (is "?inf = ?fold") + shows "inf B (\(f ` A)) = fold (inf \ f) B A" (is "?inf = ?fold") proof - interpret comp_fun_idem inf by (fact comp_fun_idem_inf) interpret comp_fun_idem "inf \ f" by (fact comp_comp_fun_idem) @@ -1265,7 +1265,7 @@ lemma sup_SUP_fold_sup: assumes "finite A" - shows "sup B (SUPREMUM A f) = fold (sup \ f) B A" (is "?sup = ?fold") + shows "sup B (\(f ` A)) = fold (sup \ f) B A" (is "?sup = ?fold") proof - interpret comp_fun_idem sup by (fact comp_fun_idem_sup) interpret comp_fun_idem "sup \ f" by (fact comp_comp_fun_idem) @@ -1274,10 +1274,10 @@ then show ?thesis .. qed -lemma INF_fold_inf: "finite A \ INFIMUM A f = fold (inf \ f) top A" +lemma INF_fold_inf: "finite A \ \(f ` A) = fold (inf \ f) top A" using inf_INF_fold_inf [of A top] by simp -lemma SUP_fold_sup: "finite A \ SUPREMUM A f = fold (sup \ f) bot A" +lemma SUP_fold_sup: "finite A \ \(f ` A) = fold (sup \ f) bot A" using sup_SUP_fold_sup [of A bot] by simp end diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Groups_Big.thy --- a/src/HOL/Groups_Big.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Groups_Big.thy Sat Nov 10 07:57:19 2018 +0000 @@ -161,14 +161,14 @@ lemma UNION_disjoint: assumes "finite I" and "\i\I. finite (A i)" and "\i\I. \j\I. i \ j \ A i \ A j = {}" - shows "F g (UNION I A) = F (\x. F g (A x)) I" + shows "F g (\(A ` I)) = F (\x. F g (A x)) I" apply (insert assms) apply (induct rule: finite_induct) apply simp apply atomize apply (subgoal_tac "\i\Fa. x \ i") prefer 2 apply blast - apply (subgoal_tac "A x \ UNION Fa A = {}") + apply (subgoal_tac "A x \ \(A ` Fa) = {}") prefer 2 apply blast apply (simp add: union_disjoint) done @@ -1023,7 +1023,7 @@ lemma card_UN_disjoint: assumes "finite I" and "\i\I. finite (A i)" and "\i\I. \j\I. i \ j \ A i \ A j = {}" - shows "card (UNION I A) = (\i\I. card(A i))" + shows "card (\(A ` I)) = (\i\I. card(A i))" proof - have "(\i\I. card (A i)) = (\i\I. \x\A i. 1)" by simp diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Hilbert_Choice.thy --- a/src/HOL/Hilbert_Choice.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Hilbert_Choice.thy Sat Nov 10 07:57:19 2018 +0000 @@ -911,39 +911,39 @@ begin lemma Sup_Inf: "Sup (Inf ` A) = Inf (Sup ` {f ` A | f . (\ Y \ A . f Y \ Y)})" proof (rule antisym) - show "SUPREMUM A Inf \ INFIMUM {f ` A |f. \Y\A. f Y \ Y} Sup" + show "\(Inf ` A) \ \(Sup ` {f ` A |f. \Y\A. f Y \ Y})" apply (rule Sup_least, rule INF_greatest) using Inf_lower2 Sup_upper by auto next - show "INFIMUM {f ` A |f. \Y\A. f Y \ Y} Sup \ SUPREMUM A Inf" + show "\(Sup ` {f ` A |f. \Y\A. f Y \ Y}) \ \(Inf ` A)" proof (simp add: Inf_Sup, rule SUP_least, simp, safe) fix f assume "\Y. (\f. Y = f ` A \ (\Y\A. f Y \ Y)) \ f Y \ Y" from this have B: "\ F . (\ Y \ A . F Y \ Y) \ \ Z \ A . f (F ` A) = F Z" by auto - show "INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ SUPREMUM A Inf" - proof (cases "\ Z \ A . INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ Inf Z") + show "\(f ` {f ` A |f. \Y\A. f Y \ Y}) \ \(Inf ` A)" + proof (cases "\ Z \ A . \(f ` {f ` A |f. \Y\A. f Y \ Y}) \ Inf Z") case True - from this obtain Z where [simp]: "Z \ A" and A: "INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ Inf Z" + from this obtain Z where [simp]: "Z \ A" and A: "\(f ` {f ` A |f. \Y\A. f Y \ Y}) \ Inf Z" by blast - have B: "... \ SUPREMUM A Inf" + have B: "... \ \(Inf ` A)" by (simp add: SUP_upper) from A and B show ?thesis by simp next case False - from this have X: "\ Z . Z \ A \ \ x . x \ Z \ \ INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ x" + from this have X: "\ Z . Z \ A \ \ x . x \ Z \ \ \(f ` {f ` A |f. \Y\A. f Y \ Y}) \ x" using Inf_greatest by blast - define F where "F = (\ Z . SOME x . x \ Z \ \ INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ x)" + define F where "F = (\ Z . SOME x . x \ Z \ \ \(f ` {f ` A |f. \Y\A. f Y \ Y}) \ x)" have C: "\ Y . Y \ A \ F Y \ Y" using X by (simp add: F_def, rule someI2_ex, auto) - have E: "\ Y . Y \ A \ \ INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ F Y" + have E: "\ Y . Y \ A \ \ \(f ` {f ` A |f. \Y\A. f Y \ Y}) \ F Y" using X by (simp add: F_def, rule someI2_ex, auto) from C and B obtain Z where D: "Z \ A " and Y: "f (F ` A) = F Z" by blast - from E and D have W: "\ INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ F Z" + from E and D have W: "\ \(f ` {f ` A |f. \Y\A. f Y \ Y}) \ F Z" by simp - have "INFIMUM {f ` A |f. \Y\A. f Y \ Y} f \ f (F ` A)" + have "\(f ` {f ` A |f. \Y\A. f Y \ Y}) \ f (F ` A)" apply (rule INF_lower) using C by blast from this and W and Y show ?thesis @@ -966,7 +966,7 @@ next have "\((\) a ` B) \ \(Sup ` {{f {a}, f B} |f. f {a} = a \ f B \ B})" by (rule INF_greatest, auto simp add: INF_lower) - also have "... = SUPREMUM {{a}, B} Inf" + also have "... = \(Inf ` {{a}, B})" by (unfold Sup_Inf, simp) finally show "\((\) a ` B) \ a \ \B" by simp @@ -1024,7 +1024,7 @@ by (rule INF_lower2, blast+) have B: "\f xa. \Y\A. f Y \ Y \ xa \ A \ f xa \ xa" by blast - have A: "\f xa. \Y\A. f Y \ Y \ xa \ A \ (\x\A. g (f x)) \ SUPREMUM xa g" + have A: "\f xa. \Y\A. f Y \ Y \ xa \ A \ (\x\A. g (f x)) \ \(g ` xa)" by (rule SUP_upper2, rule B, simp_all, simp) show "(\x\{f ` A |f. \Y\A. f Y \ Y}. \a\x. g a) \ (\x\A. \a\x. g a)" apply (rule SUP_least, simp, safe, rule INF_greatest, simp) @@ -1175,13 +1175,13 @@ subclass complete_distrib_lattice proof (standard, rule ccontr) fix A - assume "\ INFIMUM A Sup \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" - from this have C: "INFIMUM A Sup > SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" - using local.not_le by blast - show "False" - proof (cases "\ z . INFIMUM A Sup > z \ z > SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf") + assume "\ \(Sup ` A) \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" + then have C: "\(Sup ` A) > \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" + by (simp add: not_le) + show False + proof (cases "\ z . \(Sup ` A) > z \ z > \(Inf ` {f ` A |f. \Y\A. f Y \ Y})") case True - from this obtain z where A: "z < INFIMUM A Sup" and X: "SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf < z" + from this obtain z where A: "z < \(Sup ` A)" and X: "z > \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" by blast from A have "\ Y . Y \ A \ z < Sup Y" @@ -1204,28 +1204,28 @@ have "z \ Inf (F ` A)" by (simp add: D local.INF_greatest local.order.strict_implies_order) - also have "... \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" + also have "... \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" apply (rule SUP_upper, safe) using E by blast - finally have "z \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" + finally have "z \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" by simp from X and this show ?thesis using local.not_less by blast next case False - from this have A: "\ z . INFIMUM A Sup \ z \ z \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" + from this have A: "\ z . \(Sup ` A) \ z \ z \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" using local.le_less_linear by blast - - from C have "\ Y . Y \ A \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf < Sup Y" + + from C have "\ Y . Y \ A \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y}) < Sup Y" by (simp add: less_INF_D) - - from this have B: "\ Y . Y \ A \ \ k \Y . SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf < k" + + from this have B: "\ Y . Y \ A \ \ k \Y . \(Inf ` {f ` A |f. \Y\A. f Y \ Y}) < k" using local.less_Sup_iff by blast - define F where "F = (\ Y . SOME k . k \ Y \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf < k)" - - have D: "\ Y . Y \ A \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf < F Y" + define F where "F = (\ Y . SOME k . k \ Y \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y}) < k)" + + have D: "\ Y . Y \ A \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y}) < F Y" using B apply (simp add: F_def) by (rule someI2_ex, auto) @@ -1233,17 +1233,17 @@ using B apply (simp add: F_def) by (rule someI2_ex, auto) - have "\ Y . Y \ A \ INFIMUM A Sup \ F Y" + have "\ Y . Y \ A \ \(Sup ` A) \ F Y" using D False local.leI by blast - from this have "INFIMUM A Sup \ Inf (F ` A)" + from this have "\(Sup ` A) \ Inf (F ` A)" by (simp add: local.INF_greatest) - also have "Inf (F ` A) \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" + also have "Inf (F ` A) \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" apply (rule SUP_upper, safe) using E by blast - - finally have "INFIMUM A Sup \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" + + finally have "\(Sup ` A) \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" by simp from C and this show ?thesis diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Lifting_Set.thy --- a/src/HOL/Lifting_Set.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Lifting_Set.thy Sat Nov 10 07:57:19 2018 +0000 @@ -134,8 +134,8 @@ "((A ===> B) ===> rel_set A ===> rel_set B) image image" unfolding rel_fun_def rel_set_def by simp fast -lemma UNION_transfer [transfer_rule]: - "(rel_set A ===> (A ===> rel_set B) ===> rel_set B) UNION UNION" +lemma UNION_transfer [transfer_rule]: \ \TODO deletion candidate\ + "(rel_set A ===> (A ===> rel_set B) ===> rel_set B) (\A f. \(f ` A)) (\A f. \(f ` A))" by transfer_prover lemma Ball_transfer [transfer_rule]: @@ -172,12 +172,12 @@ "(rel_set A ===> (A ===> rel_set B) ===> rel_set B) Set.bind Set.bind" unfolding bind_UNION [abs_def] by transfer_prover -lemma INF_parametric [transfer_rule]: - "(rel_set A ===> (A ===> HOL.eq) ===> HOL.eq) INFIMUM INFIMUM" +lemma INF_parametric [transfer_rule]: \ \TODO deletion candidate\ + "(rel_set A ===> (A ===> HOL.eq) ===> HOL.eq) (\A f. Inf (f ` A)) (\A f. Inf (f ` A))" by transfer_prover -lemma SUP_parametric [transfer_rule]: - "(rel_set R ===> (R ===> HOL.eq) ===> HOL.eq) SUPREMUM SUPREMUM" +lemma SUP_parametric [transfer_rule]: \ \TODO deletion candidate\ + "(rel_set R ===> (R ===> HOL.eq) ===> HOL.eq) (\A f. Sup (f ` A)) (\A f. Sup (f ` A))" by transfer_prover @@ -316,7 +316,7 @@ lemma rel_set_UNION: assumes [transfer_rule]: "rel_set Q A B" "rel_fun Q (rel_set R) f g" - shows "rel_set R (UNION A f) (UNION B g)" + shows "rel_set R (\(f ` A)) (\(g ` B))" by transfer_prover end diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/List.thy --- a/src/HOL/List.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/List.thy Sat Nov 10 07:57:19 2018 +0000 @@ -2985,11 +2985,11 @@ declare Sup_set_fold [where 'a = "'a set", code] lemma (in complete_lattice) INF_set_fold: - "INFIMUM (set xs) f = fold (inf \ f) xs top" + "\(f ` set xs) = fold (inf \ f) xs top" using Inf_set_fold [of "map f xs"] by (simp add: fold_map) lemma (in complete_lattice) SUP_set_fold: - "SUPREMUM (set xs) f = fold (sup \ f) xs bot" + "\(f ` set xs) = fold (sup \ f) xs bot" using Sup_set_fold [of "map f xs"] by (simp add: fold_map) diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Main.thy --- a/src/HOL/Main.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Main.thy Sat Nov 10 07:57:19 2018 +0000 @@ -11,12 +11,50 @@ Quickcheck_Narrowing Extraction Nunchaku - BNF_Greatest_Fixpoint Filter + BNF_Greatest_Fixpoint + Filter Conditionally_Complete_Lattices Binomial GCD begin +text \Legacy\ + +context Inf +begin + +abbreviation (input) INFIMUM :: "'b set \ ('b \ 'a) \ 'a" + where "INFIMUM A f \ \(f ` A)" + +end + +context Sup +begin + +abbreviation (input) SUPREMUM :: "'b set \ ('b \ 'a) \ 'a" + where "SUPREMUM A f \ \(f ` A)" + +end + +abbreviation (input) INTER :: "'a set \ ('a \ 'b set) \ 'b set" + where "INTER \ INFIMUM" + +abbreviation (input) UNION :: "'a set \ ('a \ 'b set) \ 'b set" + where "UNION \ SUPREMUM" + + +text \Namespace cleanup\ + +hide_const (open) + czero cinfinite cfinite csum cone ctwo Csum cprod cexp image2 image2p vimage2p Gr Grp collect + fsts snds setl setr convol pick_middlep fstOp sndOp csquare relImage relInvImage Succ Shift + shift proj id_bnf + +hide_fact (open) id_bnf_def type_definition_id_bnf_UNIV + + +text \Syntax cleanup\ + no_notation bot ("\") and top ("\") and @@ -29,17 +67,10 @@ ordLess2 (infix "(_,/ _)\") - -hide_const (open) - czero cinfinite cfinite csum cone ctwo Csum cprod cexp image2 image2p vimage2p Gr Grp collect - fsts snds setl setr convol pick_middlep fstOp sndOp csquare relImage relInvImage Succ Shift - shift proj id_bnf - -hide_fact (open) id_bnf_def type_definition_id_bnf_UNIV + BNF_Cardinal_Arithmetic.csum (infixr "+c" 65) and + BNF_Cardinal_Arithmetic.cprod (infixr "*c" 80) and + BNF_Cardinal_Arithmetic.cexp (infixr "^c" 90) and + BNF_Def.convol ("\(_,/ _)\") no_syntax "_INF1" :: "pttrns \ 'b \ 'b" ("(3\_./ _)" [0, 10] 10) diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Option.thy --- a/src/HOL/Option.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Option.thy Sat Nov 10 07:57:19 2018 +0000 @@ -260,7 +260,7 @@ lemma bind_map_option: "bind (map_option f x) g = bind x (g \ f)" by(cases x) simp_all -lemma set_bind_option [simp]: "set_option (bind x f) = UNION (set_option x) (set_option \ f)" +lemma set_bind_option [simp]: "set_option (bind x f) = (\((set_option \ f) ` set_option x))" by(cases x) auto lemma map_conv_bind_option: "map_option f x = Option.bind x (Some \ f)" diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Predicate.thy --- a/src/HOL/Predicate.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Predicate.thy Sat Nov 10 07:57:19 2018 +0000 @@ -58,17 +58,17 @@ by (simp add: sup_pred_def) definition - "\A = Pred (INFIMUM A eval)" + "\A = Pred (\(eval ` A))" lemma eval_Inf [simp]: - "eval (\A) = INFIMUM A eval" + "eval (\A) = \(eval ` A)" by (simp add: Inf_pred_def) definition - "\A = Pred (SUPREMUM A eval)" + "\A = Pred (\(eval ` A))" lemma eval_Sup [simp]: - "eval (\A) = SUPREMUM A eval" + "eval (\A) = \(eval ` A)" by (simp add: Sup_pred_def) instance proof @@ -77,12 +77,12 @@ end lemma eval_INF [simp]: - "eval (INFIMUM A f) = INFIMUM A (eval \ f)" - using eval_Inf [of "f ` A"] by simp + "eval (\(f ` A)) = \((eval \ f) ` A)" + by simp lemma eval_SUP [simp]: - "eval (SUPREMUM A f) = SUPREMUM A (eval \ f)" - using eval_Sup [of "f ` A"] by simp + "eval (\(f ` A)) = \((eval \ f) ` A)" + by simp instantiation pred :: (type) complete_boolean_algebra begin @@ -103,7 +103,7 @@ instance proof fix A::"'a pred set set" - show "INFIMUM A Sup \ SUPREMUM {f ` A |f. \Y\A. f Y \ Y} Inf" + show "\(Sup ` A) \ \(Inf ` {f ` A |f. \Y\A. f Y \ Y})" proof (simp add: less_eq_pred_def Sup_fun_def Inf_fun_def, safe) fix w assume A: "\x\A. \f\x. eval f w" @@ -127,10 +127,10 @@ by (simp add: single_def) definition bind :: "'a pred \ ('a \ 'b pred) \ 'b pred" (infixl "\" 70) where - "P \ f = (SUPREMUM {x. eval P x} f)" + "P \ f = (\(f ` {x. eval P x}))" lemma eval_bind [simp]: - "eval (P \ f) = eval (SUPREMUM {x. eval P x} f)" + "eval (P \ f) = eval (\(f ` {x. eval P x}))" by (simp add: bind_def) lemma bind_bind: diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Product_Type.thy --- a/src/HOL/Product_Type.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Product_Type.thy Sat Nov 10 07:57:19 2018 +0000 @@ -1049,7 +1049,7 @@ \ A \ Collect (case_prod P) \ A \ Collect (case_prod Q)" by fastforce -lemma UN_Times_distrib: "(\(a, b)\A \ B. E a \ F b) = UNION A E \ UNION B F" +lemma UN_Times_distrib: "(\(a, b)\A \ B. E a \ F b) = \(E ` A) \ \(F ` B)" \ \Suggested by Pierre Chartier\ by blast diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Relation.thy --- a/src/HOL/Relation.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Relation.thy Sat Nov 10 07:57:19 2018 +0000 @@ -120,25 +120,25 @@ lemma SUP_UN_eq2 [pred_set_conv]: "(\i\S. (\x y. (x, y) \ r i)) = (\x y. (x, y) \ (\i\S. r i))" by (simp add: fun_eq_iff) -lemma Inf_INT_eq [pred_set_conv]: "\S = (\x. x \ INTER S Collect)" +lemma Inf_INT_eq [pred_set_conv]: "\S = (\x. x \ (\(Collect ` S)))" by (simp add: fun_eq_iff) lemma INF_Int_eq [pred_set_conv]: "(\i\S. (\x. x \ i)) = (\x. x \ \S)" by (simp add: fun_eq_iff) -lemma Inf_INT_eq2 [pred_set_conv]: "\S = (\x y. (x, y) \ INTER (case_prod ` S) Collect)" +lemma Inf_INT_eq2 [pred_set_conv]: "\S = (\x y. (x, y) \ (\(Collect ` case_prod ` S)))" by (simp add: fun_eq_iff) lemma INF_Int_eq2 [pred_set_conv]: "(\i\S. (\x y. (x, y) \ i)) = (\x y. (x, y) \ \S)" by (simp add: fun_eq_iff) -lemma Sup_SUP_eq [pred_set_conv]: "\S = (\x. x \ UNION S Collect)" +lemma Sup_SUP_eq [pred_set_conv]: "\S = (\x. x \ \(Collect ` S))" by (simp add: fun_eq_iff) lemma SUP_Sup_eq [pred_set_conv]: "(\i\S. (\x. x \ i)) = (\x. x \ \S)" by (simp add: fun_eq_iff) -lemma Sup_SUP_eq2 [pred_set_conv]: "\S = (\x y. (x, y) \ UNION (case_prod ` S) Collect)" +lemma Sup_SUP_eq2 [pred_set_conv]: "\S = (\x y. (x, y) \ (\(Collect ` case_prod ` S)))" by (simp add: fun_eq_iff) lemma SUP_Sup_eq2 [pred_set_conv]: "(\i\S. (\x y. (x, y) \ i)) = (\x y. (x, y) \ \S)" @@ -198,10 +198,10 @@ lemma reflp_sup: "reflp r \ reflp s \ reflp (r \ s)" by (auto intro: reflpI elim: reflpE) -lemma refl_on_INTER: "\x\S. refl_on (A x) (r x) \ refl_on (INTER S A) (INTER S r)" +lemma refl_on_INTER: "\x\S. refl_on (A x) (r x) \ refl_on (\(A ` S)) (\(r ` S))" unfolding refl_on_def by fast -lemma refl_on_UNION: "\x\S. refl_on (A x) (r x) \ refl_on (UNION S A) (UNION S r)" +lemma refl_on_UNION: "\x\S. refl_on (A x) (r x) \ refl_on (\(A ` S)) (\(r ` S))" unfolding refl_on_def by blast lemma refl_on_empty [simp]: "refl_on {} {}" @@ -303,16 +303,16 @@ lemma symp_sup: "symp r \ symp s \ symp (r \ s)" by (fact sym_Un [to_pred]) -lemma sym_INTER: "\x\S. sym (r x) \ sym (INTER S r)" +lemma sym_INTER: "\x\S. sym (r x) \ sym (\(r ` S))" by (fast intro: symI elim: symE) -lemma symp_INF: "\x\S. symp (r x) \ symp (INFIMUM S r)" +lemma symp_INF: "\x\S. symp (r x) \ symp (\(r ` S))" by (fact sym_INTER [to_pred]) -lemma sym_UNION: "\x\S. sym (r x) \ sym (UNION S r)" +lemma sym_UNION: "\x\S. sym (r x) \ sym (\(r ` S))" by (fast intro: symI elim: symE) -lemma symp_SUP: "\x\S. symp (r x) \ symp (SUPREMUM S r)" +lemma symp_SUP: "\x\S. symp (r x) \ symp (\(r ` S))" by (fact sym_UNION [to_pred]) @@ -411,10 +411,10 @@ lemma transp_inf: "transp r \ transp s \ transp (r \ s)" by (fact trans_Int [to_pred]) -lemma trans_INTER: "\x\S. trans (r x) \ trans (INTER S r)" +lemma trans_INTER: "\x\S. trans (r x) \ trans (\(r ` S))" by (fast intro: transI elim: transD) -lemma transp_INF: "\x\S. transp (r x) \ transp (INFIMUM S r)" +lemma transp_INF: "\x\S. transp (r x) \ transp (\(r ` S))" by (fact trans_INTER [to_pred]) lemma trans_join [code]: "trans r \ (\(x, y1) \ r. \(y2, z) \ r. y1 = y2 \ (x, z) \ r)" @@ -683,16 +683,16 @@ lemma relcompp_distrib2 [simp]: "(S \ T) OO R = S OO R \ T OO R" by (fact relcomp_distrib2 [to_pred]) -lemma relcomp_UNION_distrib: "s O UNION I r = (\i\I. s O r i) " +lemma relcomp_UNION_distrib: "s O \(r ` I) = (\i\I. s O r i) " by auto -lemma relcompp_SUP_distrib: "s OO SUPREMUM I r = (\i\I. s OO r i)" +lemma relcompp_SUP_distrib: "s OO \(r ` I) = (\i\I. s OO r i)" by (fact relcomp_UNION_distrib [to_pred]) -lemma relcomp_UNION_distrib2: "UNION I r O s = (\i\I. r i O s) " +lemma relcomp_UNION_distrib2: "\(r ` I) O s = (\i\I. r i O s) " by auto -lemma relcompp_SUP_distrib2: "SUPREMUM I r OO s = (\i\I. r i OO s)" +lemma relcompp_SUP_distrib2: "\(r ` I) OO s = (\i\I. r i OO s)" by (fact relcomp_UNION_distrib2 [to_pred]) lemma single_valued_relcomp: "single_valued r \ single_valued s \ single_valued (r O s)" @@ -781,10 +781,10 @@ lemma converse_join: "(r \ s)\\ = r\\ \ s\\" by (simp add: sup_fun_def) (iprover intro: conversepI ext dest: conversepD) -lemma converse_INTER: "(INTER S r)\ = (INT x:S. (r x)\)" +lemma converse_INTER: "(\(r ` S))\ = (\x\S. (r x)\)" by fast -lemma converse_UNION: "(UNION S r)\ = (UN x:S. (r x)\)" +lemma converse_UNION: "(\(r ` S))\ = (\x\S. (r x)\)" by blast lemma converse_mono[simp]: "r\ \ s \ \ r \ s" @@ -1078,17 +1078,17 @@ lemma Image_mono: "r' \ r \ A' \ A \ (r' `` A') \ (r `` A)" by blast -lemma Image_UN: "(r `` (UNION A B)) = (\x\A. r `` (B x))" +lemma Image_UN: "r `` (\(B ` A)) = (\x\A. r `` (B x))" by blast lemma UN_Image: "(\i\I. X i) `` S = (\i\I. X i `` S)" by auto -lemma Image_INT_subset: "(r `` INTER A B) \ (\x\A. r `` (B x))" +lemma Image_INT_subset: "(r `` (\(B ` A))) \ (\x\A. r `` (B x))" by blast text \Converse inclusion requires some assumptions\ -lemma Image_INT_eq: "single_valued (r\) \ A \ {} \ r `` INTER A B = (\x\A. r `` B x)" +lemma Image_INT_eq: "single_valued (r\) \ A \ {} \ r `` (\(B ` A)) = (\x\A. r `` B x)" apply (rule equalityI) apply (rule Image_INT_subset) apply (auto simp add: single_valued_def) diff -r ff7e6751a1a7 -r 9bbd5497befd src/HOL/Wellfounded.thy --- a/src/HOL/Wellfounded.thy Sat Nov 10 07:57:18 2018 +0000 +++ b/src/HOL/Wellfounded.thy Sat Nov 10 07:57:19 2018 +0000 @@ -325,7 +325,7 @@ proof clarify fix A and a :: "'b" assume "a \ A" - show "\z\A. \y. (y, z) \ UNION I r \ y \ A" + show "\z\A. \y. (y, z) \ \(r ` I) \ y \ A" proof (cases "\i\I. \a\A. \b\A. (b, a) \ r i") case True then obtain i b c where ibc: "i \ I" "b \ A" "c \ A" "(c,b) \ r i" @@ -344,7 +344,7 @@ lemma wfP_SUP: "\i. wfP (r i) \ \i j. r i \ r j \ inf (Domainp (r i)) (Rangep (r j)) = bot \ - wfP (SUPREMUM UNIV r)" + wfP (\(range r))" by (rule wf_UN[to_pred]) simp_all lemma wf_Union: