# HG changeset patch # User haftmann # Date 1541664712 -3600 # Node ID 0a9688695a1b83b53a98b6e60445f66923d0c4cd # Parent 438e1a11445f4f0be3180ecc47915eb18a966504 removed relics of ASCII syntax for indexed big operators diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Binary_Product_Measure.thy --- a/src/HOL/Analysis/Binary_Product_Measure.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Binary_Product_Measure.thy Thu Nov 08 09:11:52 2018 +0100 @@ -613,7 +613,7 @@ have [simp]: "snd \ X \ Y \ Y" "fst \ X \ Y \ X" by auto let ?XY = "{{fst -` a \ X \ Y | a. a \ A}, {snd -` b \ X \ Y | b. b \ B}}" - have "sets ?P = sets (SUP xy:?XY. sigma (X \ Y) xy)" + have "sets ?P = sets (SUP xy\?XY. sigma (X \ Y) xy)" by (simp add: vimage_algebra_sigma sets_pair_eq_sets_fst_snd A B) also have "\ = sets (sigma (X \ Y) (\?XY))" by (intro Sup_sigma arg_cong[where f=sets]) auto @@ -713,7 +713,7 @@ also have "{sigma ?\ {fst -` Aa \ ?\ |Aa. Aa \ Ea}, sigma ?\ {snd -` Aa \ ?\ |Aa. Aa \ Eb}} = sigma ?\ ` {{fst -` Aa \ ?\ |Aa. Aa \ Ea}, {snd -` Aa \ ?\ |Aa. Aa \ Eb}}" by auto - also have "sets (SUP S:{{fst -` Aa \ ?\ |Aa. Aa \ Ea}, {snd -` Aa \ ?\ |Aa. Aa \ Eb}}. sigma ?\ S) = + also have "sets (SUP S\{{fst -` Aa \ ?\ |Aa. Aa \ Ea}, {snd -` Aa \ ?\ |Aa. Aa \ Eb}}. sigma ?\ S) = sets (sigma ?\ (\{{fst -` Aa \ ?\ |Aa. Aa \ Ea}, {snd -` Aa \ ?\ |Aa. Aa \ Eb}}))" using Ea(1) Eb(1) by (intro sets_Sup_sigma) auto also have "\ \ sets (sigma ?\ ?E)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Borel_Space.thy --- a/src/HOL/Analysis/Borel_Space.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Borel_Space.thy Thu Nov 08 09:11:52 2018 +0100 @@ -811,14 +811,14 @@ fixes F :: "_ \ _ \ _::{complete_linorder, linorder_topology, second_countable_topology}" assumes [simp]: "countable I" assumes [measurable]: "\i. i \ I \ F i \ borel_measurable M" - shows "(\x. SUP i:I. F i x) \ borel_measurable M" + shows "(\x. SUP i\I. F i x) \ borel_measurable M" by%unimportant (rule borel_measurableI_greater) (simp add: less_SUP_iff) lemma%unimportant borel_measurable_INF[measurable (raw)]: fixes F :: "_ \ _ \ _::{complete_linorder, linorder_topology, second_countable_topology}" assumes [simp]: "countable I" assumes [measurable]: "\i. i \ I \ F i \ borel_measurable M" - shows "(\x. INF i:I. F i x) \ borel_measurable M" + shows "(\x. INF i\I. F i x) \ borel_measurable M" by (rule borel_measurableI_less) (simp add: INF_less_iff) lemma%unimportant borel_measurable_cSUP[measurable (raw)]: @@ -826,7 +826,7 @@ assumes [simp]: "countable I" assumes [measurable]: "\i. i \ I \ F i \ borel_measurable M" assumes bdd: "\x. x \ space M \ bdd_above ((\i. F i x) ` I)" - shows "(\x. SUP i:I. F i x) \ borel_measurable M" + shows "(\x. SUP i\I. F i x) \ borel_measurable M" proof cases assume "I = {}" then show ?thesis unfolding \I = {}\ image_empty by simp @@ -837,9 +837,9 @@ fix y have "{x \ space M. \i\I. F i x \ y} \ sets M" by measurable - also have "{x \ space M. \i\I. F i x \ y} = {x \ space M. (SUP i:I. F i x) \ y}" + also have "{x \ space M. \i\I. F i x \ y} = {x \ space M. (SUP i\I. F i x) \ y}" by (simp add: cSUP_le_iff \I \ {}\ bdd cong: conj_cong) - finally show "{x \ space M. (SUP i:I. F i x) \ y} \ sets M" . + finally show "{x \ space M. (SUP i\I. F i x) \ y} \ sets M" . qed qed @@ -848,7 +848,7 @@ assumes [simp]: "countable I" assumes [measurable]: "\i. i \ I \ F i \ borel_measurable M" assumes bdd: "\x. x \ space M \ bdd_below ((\i. F i x) ` I)" - shows "(\x. INF i:I. F i x) \ borel_measurable M" + shows "(\x. INF i\I. F i x) \ borel_measurable M" proof%unimportant cases assume "I = {}" then show ?thesis unfolding \I = {}\ image_empty by simp @@ -859,9 +859,9 @@ fix y have "{x \ space M. \i\I. y \ F i x} \ sets M" by measurable - also have "{x \ space M. \i\I. y \ F i x} = {x \ space M. y \ (INF i:I. F i x)}" + also have "{x \ space M. \i\I. y \ F i x} = {x \ space M. y \ (INF i\I. F i x)}" by (simp add: le_cINF_iff \I \ {}\ bdd cong: conj_cong) - finally show "{x \ space M. y \ (INF i:I. F i x)} \ sets M" . + finally show "{x \ space M. y \ (INF i\I. F i x)} \ sets M" . qed qed @@ -1958,22 +1958,22 @@ fixes F :: "_ \ _ \ real" assumes [simp]: "countable I" assumes F[measurable]: "\i. i \ I \ F i \ borel_measurable M" - shows "(\x. INF i:I. F i x) \ borel_measurable M" + shows "(\x. INF i\I. F i x) \ borel_measurable M" proof%unimportant (rule measurable_piecewise_restrict) let ?\ = "{x\space M. bdd_below ((\i. F i x)`I)}" show "countable {?\, - ?\}" "space M \ \{?\, - ?\}" "\X. X \ {?\, - ?\} \ X \ space M \ sets M" by auto - fix X assume "X \ {?\, - ?\}" then show "(\x. INF i:I. F i x) \ borel_measurable (restrict_space M X)" + fix X assume "X \ {?\, - ?\}" then show "(\x. INF i\I. F i x) \ borel_measurable (restrict_space M X)" proof safe - show "(\x. INF i:I. F i x) \ borel_measurable (restrict_space M ?\)" + show "(\x. INF i\I. F i x) \ borel_measurable (restrict_space M ?\)" by (intro borel_measurable_cINF measurable_restrict_space1 F) (auto simp: space_restrict_space) - show "(\x. INF i:I. F i x) \ borel_measurable (restrict_space M (-?\))" + show "(\x. INF i\I. F i x) \ borel_measurable (restrict_space M (-?\))" proof (subst measurable_cong) fix x assume "x \ space (restrict_space M (-?\))" then have "\ (\i\I. - F i x \ y)" for y by (auto simp: space_restrict_space bdd_above_def bdd_above_uminus[symmetric]) - then show "(INF i:I. F i x) = - (THE x. False)" + then show "(INF i\I. F i x) = - (THE x. False)" by (auto simp: space_restrict_space Inf_real_def Sup_real_def Least_def simp del: Set.ball_simps(10)) qed simp qed diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Bounded_Continuous_Function.thy --- a/src/HOL/Analysis/Bounded_Continuous_Function.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Bounded_Continuous_Function.thy Thu Nov 08 09:11:52 2018 +0100 @@ -45,7 +45,7 @@ is "\f g. (SUP x. dist (f x) (g x))" . definition uniformity_bcontfun :: "('a \\<^sub>C 'b \ 'a \\<^sub>C 'b) filter" - where "uniformity_bcontfun = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + where "uniformity_bcontfun = (INF e\{0 <..}. principal {(x, y). dist x y < e})" definition open_bcontfun :: "('a \\<^sub>C 'b) set \ bool" where "open_bcontfun S = (\x\S. \\<^sub>F (x', y) in uniformity. x' = x \ y \ S)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Bounded_Linear_Function.thy --- a/src/HOL/Analysis/Bounded_Linear_Function.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Bounded_Linear_Function.thy Thu Nov 08 09:11:52 2018 +0100 @@ -150,7 +150,7 @@ where "dist_blinfun a b = norm (a - b)" definition [code del]: - "(uniformity :: (('a \\<^sub>L 'b) \ ('a \\<^sub>L 'b)) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + "(uniformity :: (('a \\<^sub>L 'b) \ ('a \\<^sub>L 'b)) filter) = (INF e\{0 <..}. principal {(x, y). dist x y < e})" definition open_blinfun :: "('a \\<^sub>L 'b) set \ bool" where [code del]: "open_blinfun S = (\x\S. \\<^sub>F (x', y) in uniformity. x' = x \ y \ S)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Caratheodory.thy --- a/src/HOL/Analysis/Caratheodory.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Caratheodory.thy Thu Nov 08 09:11:52 2018 +0100 @@ -22,7 +22,7 @@ using assms by (simp add: fun_eq_iff) have reindex: "\B. (\x\B. f (prod_decode x)) = sum f (prod_decode ` B)" by (simp add: sum.reindex[OF inj_prod_decode] comp_def) - have "(SUP n. \i UNIV. \ini UNIV \ UNIV. \in ('a set \ ennreal) \ 'a set \ ennreal" where "outer_measure M f X = - (INF A:{A. range A \ M \ disjoint_family A \ X \ (\i. A i)}. \i. f (A i))" + (INF A\{A. range A \ M \ disjoint_family A \ X \ (\i. A i)}. \i. f (A i))" lemma%unimportant (in ring_of_sets) outer_measure_agrees: assumes posf: "positive M f" and ca: "countably_additive M f" and s: "s \ M" @@ -321,7 +321,7 @@ next have "(\i. f (if i = 0 then s else {})) \ f s" using positiveD1[OF posf] by (subst suminf_finite[of "{0}"]) auto - with s show "(INF A:{A. range A \ M \ disjoint_family A \ s \ UNION UNIV A}. \i. f (A i)) \ f s" + with s show "(INF A\{A. range A \ M \ disjoint_family A \ s \ UNION UNIV A}. \i. f (A i)) \ f s" by (intro INF_lower2[of "\i. if i = 0 then s else {}"]) (auto simp: disjoint_family_on_def) qed diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Complete_Measure.thy --- a/src/HOL/Analysis/Complete_Measure.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Complete_Measure.thy Thu Nov 08 09:11:52 2018 +0100 @@ -452,7 +452,7 @@ locale cld_measure = complete_measure M + locally_determined_measure M for M :: "'a measure" definition outer_measure_of :: "'a measure \ 'a set \ ennreal" - where "outer_measure_of M A = (INF B : {B\sets M. A \ B}. emeasure M B)" + where "outer_measure_of M A = (INF B \ {B\sets M. A \ B}. emeasure M B)" lemma outer_measure_of_eq[simp]: "A \ sets M \ outer_measure_of M A = emeasure M A" by (auto simp: outer_measure_of_def intro!: INF_eqI emeasure_mono) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Connected.thy --- a/src/HOL/Analysis/Connected.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Connected.thy Thu Nov 08 09:11:52 2018 +0100 @@ -1057,14 +1057,14 @@ proof assume L: ?lhs then have "is_interval S" "compact S" by auto - define a where "a \ \i\Basis. (INF x:S. x \ i) *\<^sub>R i" - define b where "b \ \i\Basis. (SUP x:S. x \ i) *\<^sub>R i" - have 1: "\x i. \x \ S; i \ Basis\ \ (INF x:S. x \ i) \ x \ i" + define a where "a \ \i\Basis. (INF x\S. x \ i) *\<^sub>R i" + define b where "b \ \i\Basis. (SUP x\S. x \ i) *\<^sub>R i" + have 1: "\x i. \x \ S; i \ Basis\ \ (INF x\S. x \ i) \ x \ i" by (simp add: cInf_lower bounded_inner_imp_bdd_below compact_imp_bounded L) - have 2: "\x i. \x \ S; i \ Basis\ \ x \ i \ (SUP x:S. x \ i)" + have 2: "\x i. \x \ S; i \ Basis\ \ x \ i \ (SUP x\S. x \ i)" by (simp add: cSup_upper bounded_inner_imp_bdd_above compact_imp_bounded L) - have 3: "x \ S" if inf: "\i. i \ Basis \ (INF x:S. x \ i) \ x \ i" - and sup: "\i. i \ Basis \ x \ i \ (SUP x:S. x \ i)" for x + have 3: "x \ S" if inf: "\i. i \ Basis \ (INF x\S. x \ i) \ x \ i" + and sup: "\i. i \ Basis \ x \ i \ (SUP x\S. x \ i)" for x proof (rule mem_box_componentwiseI [OF \is_interval S\]) fix i::'a assume i: "i \ Basis" @@ -1074,14 +1074,14 @@ using continuous_attains_inf [OF \compact S\ False cont] by blast obtain b where "b \ S" and b: "\y. y\S \ y \ i \ b \ i" using continuous_attains_sup [OF \compact S\ False cont] by blast - have "a \ i \ (INF x:S. x \ i)" + have "a \ i \ (INF x\S. x \ i)" by (simp add: False a cINF_greatest) also have "\ \ x \ i" by (simp add: i inf) finally have ai: "a \ i \ x \ i" . - have "x \ i \ (SUP x:S. x \ i)" + have "x \ i \ (SUP x\S. x \ i)" by (simp add: i sup) - also have "(SUP x:S. x \ i) \ b \ i" + also have "(SUP x\S. x \ i) \ b \ i" by (simp add: False b cSUP_least) finally have bi: "x \ i \ b \ i" . show "x \ i \ (\x. x \ i) ` S" @@ -1282,12 +1282,12 @@ subsection \Infimum Distance\ -definition%important "infdist x A = (if A = {} then 0 else INF a:A. dist x a)" +definition%important "infdist x A = (if A = {} then 0 else INF a\A. dist x a)" lemma bdd_below_image_dist[intro, simp]: "bdd_below (dist x ` A)" by (auto intro!: zero_le_dist) -lemma infdist_notempty: "A \ {} \ infdist x A = (INF a:A. dist x a)" +lemma infdist_notempty: "A \ {} \ infdist x A = (INF a\A. dist x a)" by (simp add: infdist_def) lemma infdist_nonneg: "0 \ infdist x A" @@ -2665,7 +2665,7 @@ subsection \The diameter of a set\ definition%important diameter :: "'a::metric_space set \ real" where - "diameter S = (if S = {} then 0 else SUP (x,y):S\S. dist x y)" + "diameter S = (if S = {} then 0 else SUP (x,y)\S\S. dist x y)" lemma diameter_empty [simp]: "diameter{} = 0" by (auto simp: diameter_def) @@ -2696,7 +2696,7 @@ by (simp add: dist_commute) qed moreover have "(x,y) \ s\s" using s by auto - ultimately have "dist x y \ (SUP (x,y):s\s. dist x y)" + ultimately have "dist x y \ (SUP (x,y)\s\s. dist x y)" by (rule cSUP_upper2) simp with \x \ s\ show ?thesis by (auto simp: diameter_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Convex_Euclidean_Space.thy --- a/src/HOL/Analysis/Convex_Euclidean_Space.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Convex_Euclidean_Space.thy Thu Nov 08 09:11:52 2018 +0100 @@ -5474,7 +5474,7 @@ apply (erule_tac x="x - y" in ballE) apply (auto simp: inner_diff) done - define k where "k = (SUP x:T. a \ x)" + define k where "k = (SUP x\T. a \ x)" show ?thesis apply (rule_tac x="-a" in exI) apply (rule_tac x="-(k + b / 2)" in exI) @@ -5580,7 +5580,7 @@ using \T \ {}\ by (auto intro: bdd_aboveI2[OF *]) show ?thesis using \a\0\ - by (intro exI[of _ a] exI[of _ "SUP x:S. a \ x"]) + by (intro exI[of _ a] exI[of _ "SUP x\S. a \ x"]) (auto intro!: cSUP_upper bdd cSUP_least \a \ 0\ \S \ {}\ *) qed diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Embed_Measure.thy --- a/src/HOL/Analysis/Embed_Measure.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Embed_Measure.thy Thu Nov 08 09:11:52 2018 +0100 @@ -381,24 +381,24 @@ assumes nonempty: "Y \ {}" and chain: "Complete_Partial_Order.chain (\) (f ` Y)" and countable: "countable B" - shows "(\\<^sup>+ x. (SUP i:Y. f i x) \count_space B) = (SUP i:Y. (\\<^sup>+ x. f i x \count_space B))" + shows "(\\<^sup>+ x. (SUP i\Y. f i x) \count_space B) = (SUP i\Y. (\\<^sup>+ x. f i x \count_space B))" (is "?lhs = ?rhs") proof - let ?f = "(\i x. f i (from_nat_into B x) * indicator (to_nat_on B ` B) x)" - have "?lhs = \\<^sup>+ x. (SUP i:Y. f i (from_nat_into B (to_nat_on B x))) \count_space B" + have "?lhs = \\<^sup>+ x. (SUP i\Y. f i (from_nat_into B (to_nat_on B x))) \count_space B" by(rule nn_integral_cong)(simp add: countable) - also have "\ = \\<^sup>+ x. (SUP i:Y. f i (from_nat_into B x)) \count_space (to_nat_on B ` B)" + also have "\ = \\<^sup>+ x. (SUP i\Y. f i (from_nat_into B x)) \count_space (to_nat_on B ` B)" by(simp add: embed_measure_count_space'[symmetric] inj_on_to_nat_on countable nn_integral_embed_measure' measurable_embed_measure1) - also have "\ = \\<^sup>+ x. (SUP i:Y. ?f i x) \count_space UNIV" + also have "\ = \\<^sup>+ x. (SUP i\Y. ?f i x) \count_space UNIV" by(simp add: nn_integral_count_space_indicator ennreal_indicator[symmetric] SUP_mult_right_ennreal nonempty) - also have "\ = (SUP i:Y. \\<^sup>+ x. ?f i x \count_space UNIV)" + also have "\ = (SUP i\Y. \\<^sup>+ x. ?f i x \count_space UNIV)" proof(rule nn_integral_monotone_convergence_SUP_nat) show "Complete_Partial_Order.chain (\) (?f ` Y)" by(rule chain_imageI[OF chain, unfolded image_image])(auto intro!: le_funI split: split_indicator dest: le_funD) qed fact - also have "\ = (SUP i:Y. \\<^sup>+ x. f i (from_nat_into B x) \count_space (to_nat_on B ` B))" + also have "\ = (SUP i\Y. \\<^sup>+ x. f i (from_nat_into B x) \count_space (to_nat_on B ` B))" by(simp add: nn_integral_count_space_indicator) - also have "\ = (SUP i:Y. \\<^sup>+ x. f i (from_nat_into B (to_nat_on B x)) \count_space B)" + also have "\ = (SUP i\Y. \\<^sup>+ x. f i (from_nat_into B (to_nat_on B x)) \count_space B)" by(simp add: embed_measure_count_space'[symmetric] inj_on_to_nat_on countable nn_integral_embed_measure' measurable_embed_measure1) also have "\ = ?rhs" by(intro arg_cong2[where f="SUPREMUM"] ext nn_integral_cong_AE)(simp_all add: AE_count_space countable) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Thu Nov 08 09:11:52 2018 +0100 @@ -2150,7 +2150,7 @@ have D_2: "bdd_above (?f`?D)" by (metis * mem_Collect_eq bdd_aboveI2) note D = D_1 D_2 - let ?S = "SUP x:?D. ?f x" + let ?S = "SUP x\?D. ?f x" have *: "\\. gauge \ \ (\p. p tagged_division_of cbox a b \ \ fine p \ @@ -2533,7 +2533,7 @@ have D_2: "bdd_above (?f`?D)" by (intro bdd_aboveI2[where M=B] assms(2)[rule_format]) simp note D = D_1 D_2 - let ?S = "SUP d:?D. ?f d" + let ?S = "SUP d\?D. ?f d" have "\a b. f integrable_on cbox a b" using assms(1) integrable_on_subcbox by blast then have f_int: "\a b. f absolutely_integrable_on cbox a b" @@ -3807,7 +3807,7 @@ by (intro tendsto_lowerbound[OF lim]) (auto simp: eventually_at_top_linorder) - have "(SUP i::nat. ?f i x) = ?fR x" for x + have "(SUP i. ?f i x) = ?fR x" for x proof (rule LIMSEQ_unique[OF LIMSEQ_SUP]) obtain n where "x - a < real n" using reals_Archimedean2[of "x - a"] .. @@ -3816,16 +3816,16 @@ then show "(\n. ?f n x) \ ?fR x" by (rule Lim_eventually) qed (auto simp: nonneg incseq_def le_fun_def split: split_indicator) - then have "integral\<^sup>N lborel ?fR = (\\<^sup>+ x. (SUP i::nat. ?f i x) \lborel)" + then have "integral\<^sup>N lborel ?fR = (\\<^sup>+ x. (SUP i. ?f i x) \lborel)" by simp - also have "\ = (SUP i::nat. (\\<^sup>+ x. ?f i x \lborel))" + also have "\ = (SUP i. (\\<^sup>+ x. ?f i x \lborel))" proof (rule nn_integral_monotone_convergence_SUP) show "incseq ?f" using nonneg by (auto simp: incseq_def le_fun_def split: split_indicator) show "\i. (?f i) \ borel_measurable lborel" using f_borel by auto qed - also have "\ = (SUP i::nat. ennreal (F (a + real i) - F a))" + also have "\ = (SUP i. ennreal (F (a + real i) - F a))" by (subst nn_integral_FTC_Icc[OF f_borel f nonneg]) auto also have "\ = T - F a" proof (rule LIMSEQ_unique[OF LIMSEQ_SUP]) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Extended_Real_Limits.thy --- a/src/HOL/Analysis/Extended_Real_Limits.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Extended_Real_Limits.thy Thu Nov 08 09:11:52 2018 +0100 @@ -298,7 +298,7 @@ lemma%important Liminf_within: fixes f :: "'a::metric_space \ 'b::complete_lattice" - shows "Liminf (at x within S) f = (SUP e:{0<..}. INF y:(S \ ball x e - {x}). f y)" + shows "Liminf (at x within S) f = (SUP e\{0<..}. INF y\(S \ ball x e - {x}). f y)" unfolding Liminf_def eventually_at proof%unimportant (rule SUP_eq, simp_all add: Ball_def Bex_def, safe) fix P d @@ -318,7 +318,7 @@ lemma%important Limsup_within: fixes f :: "'a::metric_space \ 'b::complete_lattice" - shows "Limsup (at x within S) f = (INF e:{0<..}. SUP y:(S \ ball x e - {x}). f y)" + shows "Limsup (at x within S) f = (INF e\{0<..}. SUP y\(S \ ball x e - {x}). f y)" unfolding Limsup_def eventually_at proof%unimportant (rule INF_eq, simp_all add: Ball_def Bex_def, safe) fix P d @@ -338,17 +338,17 @@ lemma Liminf_at: fixes f :: "'a::metric_space \ 'b::complete_lattice" - shows "Liminf (at x) f = (SUP e:{0<..}. INF y:(ball x e - {x}). f y)" + shows "Liminf (at x) f = (SUP e\{0<..}. INF y\(ball x e - {x}). f y)" using Liminf_within[of x UNIV f] by simp lemma Limsup_at: fixes f :: "'a::metric_space \ 'b::complete_lattice" - shows "Limsup (at x) f = (INF e:{0<..}. SUP y:(ball x e - {x}). f y)" + shows "Limsup (at x) f = (INF e\{0<..}. SUP y\(ball x e - {x}). f y)" using Limsup_within[of x UNIV f] by simp lemma min_Liminf_at: fixes f :: "'a::metric_space \ 'b::complete_linorder" - shows "min (f x) (Liminf (at x) f) = (SUP e:{0<..}. INF y:ball x e. f y)" + shows "min (f x) (Liminf (at x) f) = (SUP e\{0<..}. INF y\ball x e. f y)" unfolding inf_min[symmetric] Liminf_at apply (subst inf_commute) apply (subst SUP_inf) @@ -1231,16 +1231,16 @@ lemma limsup_shift: "limsup (\n. u (n+1)) = limsup u" proof - - have "(SUP m:{n+1..}. u m) = (SUP m:{n..}. u (m + 1))" for n + have "(SUP m\{n+1..}. u m) = (SUP m\{n..}. u (m + 1))" for n apply (rule SUP_eq) using Suc_le_D by auto - then have a: "(INF n. SUP m:{n..}. u (m + 1)) = (INF n. (SUP m:{n+1..}. u m))" by auto - have b: "(INF n. (SUP m:{n+1..}. u m)) = (INF n:{1..}. (SUP m:{n..}. u m))" + then have a: "(INF n. SUP m\{n..}. u (m + 1)) = (INF n. (SUP m\{n+1..}. u m))" by auto + have b: "(INF n. (SUP m\{n+1..}. u m)) = (INF n\{1..}. (SUP m\{n..}. u m))" apply (rule INF_eq) using Suc_le_D by auto - have "(INF n:{1..}. v n) = (INF n. v n)" if "decseq v" for v::"nat \ 'a" + have "(INF n\{1..}. v n) = (INF n. v n)" if "decseq v" for v::"nat \ 'a" apply (rule INF_eq) using \decseq v\ decseq_Suc_iff by auto - moreover have "decseq (\n. (SUP m:{n..}. u m))" by (simp add: SUP_subset_mono decseq_def) - ultimately have c: "(INF n:{1..}. (SUP m:{n..}. u m)) = (INF n. (SUP m:{n..}. u m))" by simp - have "(INF n. SUPREMUM {n..} u) = (INF n. SUP m:{n..}. u (m + 1))" using a b c by simp + moreover have "decseq (\n. (SUP m\{n..}. u m))" by (simp add: SUP_subset_mono decseq_def) + ultimately have c: "(INF n\{1..}. (SUP m\{n..}. u m)) = (INF n. (SUP m\{n..}. u m))" by simp + have "(INF n. SUPREMUM {n..} u) = (INF n. SUP m\{n..}. u (m + 1))" using a b c by simp then show ?thesis by (auto cong: limsup_INF_SUP) qed @@ -1255,16 +1255,16 @@ lemma liminf_shift: "liminf (\n. u (n+1)) = liminf u" proof - - have "(INF m:{n+1..}. u m) = (INF m:{n..}. u (m + 1))" for n + have "(INF m\{n+1..}. u m) = (INF m\{n..}. u (m + 1))" for n apply (rule INF_eq) using Suc_le_D by (auto) - then have a: "(SUP n. INF m:{n..}. u (m + 1)) = (SUP n. (INF m:{n+1..}. u m))" by auto - have b: "(SUP n. (INF m:{n+1..}. u m)) = (SUP n:{1..}. (INF m:{n..}. u m))" + then have a: "(SUP n. INF m\{n..}. u (m + 1)) = (SUP n. (INF m\{n+1..}. u m))" by auto + have b: "(SUP n. (INF m\{n+1..}. u m)) = (SUP n\{1..}. (INF m\{n..}. u m))" apply (rule SUP_eq) using Suc_le_D by (auto) - have "(SUP n:{1..}. v n) = (SUP n. v n)" if "incseq v" for v::"nat \ 'a" + have "(SUP n\{1..}. v n) = (SUP n. v n)" if "incseq v" for v::"nat \ 'a" apply (rule SUP_eq) using \incseq v\ incseq_Suc_iff by auto - moreover have "incseq (\n. (INF m:{n..}. u m))" by (simp add: INF_superset_mono mono_def) - ultimately have c: "(SUP n:{1..}. (INF m:{n..}. u m)) = (SUP n. (INF m:{n..}. u m))" by simp - have "(SUP n. INFIMUM {n..} u) = (SUP n. INF m:{n..}. u (m + 1))" using a b c by simp + moreover have "incseq (\n. (INF m\{n..}. u m))" by (simp add: INF_superset_mono mono_def) + ultimately have c: "(SUP n\{1..}. (INF m\{n..}. u m)) = (SUP n. (INF m\{n..}. u m))" by simp + have "(SUP n. INFIMUM {n..} u) = (SUP n. INF m\{n..}. u (m + 1))" using a b c by simp then show ?thesis by (auto cong: liminf_SUP_INF) qed @@ -1281,7 +1281,7 @@ assumes "Limsup F u > c" shows "\i. u i > c" proof%unimportant - - have "(INF P:{P. eventually P F}. SUP x:{x. P x}. u x) > c" using assms by (simp add: Limsup_def) + have "(INF P\{P. eventually P F}. SUP x\{x. P x}. u x) > c" using assms by (simp add: Limsup_def) then show ?thesis by (metis eventually_True mem_Collect_eq less_INF_D less_SUP_iff) qed @@ -1297,7 +1297,7 @@ by (intro dependent_nat_choice) (auto simp: conj_commute) then obtain r :: "nat \ nat" where "strict_mono r" and mono: "\n m. r n \ m \ u m \ u (r n)" by (auto simp: strict_mono_Suc_iff) - define umax where "umax = (\n. (SUP m:{n..}. u m))" + define umax where "umax = (\n. (SUP m\{n..}. u m))" have "decseq umax" unfolding umax_def by (simp add: SUP_subset_mono antimono_def) then have "umax \ limsup u" unfolding umax_def by (metis LIMSEQ_INF limsup_INF_SUP) then have *: "(umax o r) \ limsup u" by (simp add: LIMSEQ_subseq_LIMSEQ \strict_mono r\) @@ -1373,7 +1373,7 @@ then have "u i \ u (r(Suc n))" using r by simp then have "u i \ (SUP n. (u o r) n)" unfolding o_def by (meson SUP_upper2 UNIV_I) } - then have "(SUP i:{N<..}. u i) \ (SUP n. (u o r) n)" using SUP_least by blast + then have "(SUP i\{N<..}. u i) \ (SUP n. (u o r) n)" using SUP_least by blast then have "limsup u \ (SUP n. (u o r) n)" unfolding Limsup_def by (metis (mono_tags, lifting) INF_lower2 atLeast_Suc_greaterThan atLeast_def eventually_ge_at_top mem_Collect_eq) then have "limsup u = (SUP n. (u o r) n)" using \(SUP n. (u o r) n) \ limsup u\ by simp @@ -1390,7 +1390,7 @@ by (intro dependent_nat_choice) (auto simp: conj_commute) then obtain r :: "nat \ nat" where "strict_mono r" and mono: "\n m. r n \ m \ u m \ u (r n)" by (auto simp: strict_mono_Suc_iff) - define umin where "umin = (\n. (INF m:{n..}. u m))" + define umin where "umin = (\n. (INF m\{n..}. u m))" have "incseq umin" unfolding umin_def by (simp add: INF_superset_mono incseq_def) then have "umin \ liminf u" unfolding umin_def by (metis LIMSEQ_SUP liminf_SUP_INF) then have *: "(umin o r) \ liminf u" by (simp add: LIMSEQ_subseq_LIMSEQ \strict_mono r\) @@ -1467,7 +1467,7 @@ then have "u i \ u (r(Suc n))" using r by simp then have "u i \ (INF n. (u o r) n)" unfolding o_def by (meson INF_lower2 UNIV_I) } - then have "(INF i:{N<..}. u i) \ (INF n. (u o r) n)" using INF_greatest by blast + then have "(INF i\{N<..}. u i) \ (INF n. (u o r) n)" using INF_greatest by blast then have "liminf u \ (INF n. (u o r) n)" unfolding Liminf_def by (metis (mono_tags, lifting) SUP_upper2 atLeast_Suc_greaterThan atLeast_def eventually_ge_at_top mem_Collect_eq) then have "liminf u = (INF n. (u o r) n)" using \(INF n. (u o r) n) \ liminf u\ by simp @@ -1757,7 +1757,7 @@ using * by (intro SUP_upper2[of x]) auto moreover have "0 \ (SUPREMUM {x..} u)" for x using * by (intro SUP_upper2[of x]) auto - ultimately show "(SUP n. INF n:{n..}. max 0 (u n - v n)) + ultimately show "(SUP n. INF n\{n..}. max 0 (u n - v n)) \ max 0 ((INF x. max 0 (SUPREMUM {x..} u)) - (INF x. max 0 (SUPREMUM {x..} v)))" by (auto simp: * ereal_diff_positive max.absorb2 liminf_SUP_INF[symmetric] limsup_INF_SUP[symmetric] ereal_liminf_limsup_minus) qed diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Finite_Cartesian_Product.thy --- a/src/HOL/Analysis/Finite_Cartesian_Product.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Finite_Cartesian_Product.thy Thu Nov 08 09:11:52 2018 +0100 @@ -459,7 +459,7 @@ definition%important [code del]: "(uniformity :: (('a^'b::_) \ ('a^'b::_)) filter) = - (INF e:{0 <..}. principal {(x, y). dist x y < e})" + (INF e\{0 <..}. principal {(x, y). dist x y < e})" instance%unimportant by standard (rule uniformity_vec_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Finite_Product_Measure.thy --- a/src/HOL/Analysis/Finite_Product_Measure.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Finite_Product_Measure.thy Thu Nov 08 09:11:52 2018 +0100 @@ -389,7 +389,7 @@ qed lemma%unimportant sets_PiM_eq_proj: - "I \ {} \ sets (PiM I M) = sets (SUP i:I. vimage_algebra (\\<^sub>E i\I. space (M i)) (\x. x i) (M i))" + "I \ {} \ sets (PiM I M) = sets (SUP i\I. vimage_algebra (\\<^sub>E i\I. space (M i)) (\x. x i) (M i))" apply (simp add: sets_PiM_single) apply (subst sets_Sup_eq[where X="\\<^sub>E i\I. space (M i)"]) apply auto [] @@ -422,9 +422,9 @@ let ?F = "\i. {(\x. x i) -` A \ Pi\<^sub>E I \ |A. A \ E i}" assume "I \ {}" then have "sets (Pi\<^sub>M I (\i. sigma (\ i) (E i))) = - sets (SUP i:I. vimage_algebra (\\<^sub>E i\I. \ i) (\x. x i) (sigma (\ i) (E i)))" + sets (SUP i\I. vimage_algebra (\\<^sub>E i\I. \ i) (\x. x i) (sigma (\ i) (E i)))" by (subst sets_PiM_eq_proj) (auto simp: space_measure_of_conv) - also have "\ = sets (SUP i:I. sigma (Pi\<^sub>E I \) (?F i))" + also have "\ = sets (SUP i\I. sigma (Pi\<^sub>E I \) (?F i))" using E by (intro sets_SUP_cong arg_cong[where f=sets] vimage_algebra_sigma) auto also have "\ = sets (sigma (Pi\<^sub>E I \) (\i\I. ?F i))" using \I \ {}\ by (intro arg_cong[where f=sets] SUP_sigma_sigma) auto diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Function_Topology.thy --- a/src/HOL/Analysis/Function_Topology.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Function_Topology.thy Thu Nov 08 09:11:52 2018 +0100 @@ -1220,7 +1220,7 @@ "dist x y = (\n. (1/2)^n * min (dist (x (from_nat n)) (y (from_nat n))) 1)" definition%important uniformity_fun_def: - "(uniformity::(('a \ 'b) \ ('a \ 'b)) filter) = (INF e:{0<..}. principal {(x, y). dist (x::('a\'b)) y < e})" + "(uniformity::(('a \ 'b) \ ('a \ 'b)) filter) = (INF e\{0<..}. principal {(x, y). dist (x::('a\'b)) y < e})" text \Except for the first one, the auxiliary lemmas below are only useful when proving the instance: once it is proved, they become trivial consequences of the general theory of metric diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Gamma_Function.thy --- a/src/HOL/Analysis/Gamma_Function.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Gamma_Function.thy Thu Nov 08 09:11:52 2018 +0100 @@ -372,7 +372,7 @@ shows "uniformly_convergent_on (ball z d) (\n z. ln_Gamma_series z n :: complex)" proof (intro Cauchy_uniformly_convergent uniformly_Cauchy_onI') fix e :: real assume e: "e > 0" - define e'' where "e'' = (SUP t:ball z d. norm t + norm t^2)" + define e'' where "e'' = (SUP t\ball z d. norm t + norm t^2)" define e' where "e' = e / (2*e'')" have "bounded ((\t. norm t + norm t^2) ` cball z d)" by (intro compact_imp_bounded compact_continuous_image) (auto intro!: continuous_intros) @@ -2270,7 +2270,7 @@ qed ultimately have compact: "compact B" by (subst compact_eq_bounded_closed) blast - define M where "M = (SUP z:B. norm (h' z))" + define M where "M = (SUP z\B. norm (h' z))" have "compact (h' ` B)" by (intro compact_continuous_image continuous_on_subset[OF h'_cont] compact) blast+ hence bdd: "bdd_above ((\z. norm (h' z)) ` B)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Improper_Integral.thy --- a/src/HOL/Analysis/Improper_Integral.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Improper_Integral.thy Thu Nov 08 09:11:52 2018 +0100 @@ -674,9 +674,9 @@ qed qed define \ where "\ \ \x. \0 x \ - ball x ((\/8 / (norm(f x) + 1)) * (INF m:Basis. b \ m - a \ m) / content(cbox a b))" + ball x ((\/8 / (norm(f x) + 1)) * (INF m\Basis. b \ m - a \ m) / content(cbox a b))" have "gauge (\x. ball x - (\ * (INF m:Basis. b \ m - a \ m) / ((8 * norm (f x) + 8) * content (cbox a b))))" + (\ * (INF m\Basis. b \ m - a \ m) / ((8 * norm (f x) + 8) * content (cbox a b))))" using \0 < content (cbox a b)\ \0 < \\ a_less_b apply (auto simp: gauge_def divide_simps mult_less_0_iff zero_less_mult_iff add_nonneg_eq_0_iff finite_less_Inf_iff) apply (meson add_nonneg_nonneg mult_nonneg_nonneg norm_ge_zero not_less zero_le_numeral) @@ -693,7 +693,7 @@ have "finite S" using S by blast have "\0 fine S" and fineS: - "(\x. ball x (\ * (INF m:Basis. b \ m - a \ m) / ((8 * norm (f x) + 8) * content (cbox a b)))) fine S" + "(\x. ball x (\ * (INF m\Basis. b \ m - a \ m) / ((8 * norm (f x) + 8) * content (cbox a b)))) fine S" using \\ fine S\ by (auto simp: \_def fine_Int) then have "(\(x,K) \ S. norm (content K *\<^sub>R h x - integral K h)) < \/2" by (intro \0 that fineS) @@ -735,11 +735,11 @@ using that by auto ultimately have "norm (h x) \ (\ * (b \ i - a \ i)) / (4 * content (cbox a b) * ?\)" proof - - have "dist x u < \ * (INF m:Basis. b \ m - a \ m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2" - "dist x v < \ * (INF m:Basis. b \ m - a \ m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2" + have "dist x u < \ * (INF m\Basis. b \ m - a \ m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2" + "dist x v < \ * (INF m\Basis. b \ m - a \ m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2" using fineS u_less_v uv xK by (force simp: fine_def mem_box field_simps dest!: bspec)+ - moreover have "\ * (INF m:Basis. b \ m - a \ m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2 + moreover have "\ * (INF m\Basis. b \ m - a \ m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2 \ \ * (b \ i - a \ i) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2" apply (intro mult_left_mono divide_right_mono) using \i \ Basis\ \0 < \\ apply (auto simp: intro!: cInf_le_finite) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Lebesgue_Measure.thy --- a/src/HOL/Analysis/Lebesgue_Measure.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Lebesgue_Measure.thy Thu Nov 08 09:11:52 2018 +0100 @@ -1189,7 +1189,7 @@ using emeasure_bounded_finite[of "?B n"] by (auto simp: emeasure_A) interpret A: finite_measure ?A by rule fact - have "emeasure ?A B + ?e n > (INF U:{U. B \ U \ open U}. emeasure ?A U)" + have "emeasure ?A B + ?e n > (INF U\{U. B \ U \ open U}. emeasure ?A U)" using \0 by (auto simp: outer_regular[OF _ finite_A B, symmetric]) then obtain U where U: "B \ U" "open U" and muU: "?\ (?B n \ B) + ?e n > ?\ (?B n \ U)" unfolding INF_less_iff by (auto simp: emeasure_A) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Measurable.thy --- a/src/HOL/Analysis/Measurable.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Measurable.thy Thu Nov 08 09:11:52 2018 +0100 @@ -392,32 +392,32 @@ fixes F :: "'i \ 'a \ 'b::{complete_lattice, countable}" assumes [simp]: "countable I" assumes [measurable]: "\i. i \ I \ F i \ measurable M (count_space UNIV)" - shows "(\x. SUP i:I. F i x) \ measurable M (count_space UNIV)" + shows "(\x. SUP i\I. F i x) \ measurable M (count_space UNIV)" unfolding measurable_count_space_eq2_countable proof (safe intro!: UNIV_I) fix a - have "(\x. SUP i:I. F i x) -` {a} \ space M = + have "(\x. SUP i\I. F i x) -` {a} \ space M = {x\space M. (\i\I. F i x \ a) \ (\b. (\i\I. F i x \ b) \ a \ b)}" unfolding SUP_le_iff[symmetric] by auto also have "\ \ sets M" by measurable - finally show "(\x. SUP i:I. F i x) -` {a} \ space M \ sets M" . + finally show "(\x. SUP i\I. F i x) -` {a} \ space M \ sets M" . qed lemma measurable_INF[measurable]: fixes F :: "'i \ 'a \ 'b::{complete_lattice, countable}" assumes [simp]: "countable I" assumes [measurable]: "\i. i \ I \ F i \ measurable M (count_space UNIV)" - shows "(\x. INF i:I. F i x) \ measurable M (count_space UNIV)" + shows "(\x. INF i\I. F i x) \ measurable M (count_space UNIV)" unfolding measurable_count_space_eq2_countable proof (safe intro!: UNIV_I) fix a - have "(\x. INF i:I. F i x) -` {a} \ space M = + have "(\x. INF i\I. F i x) -` {a} \ space M = {x\space M. (\i\I. a \ F i x) \ (\b. (\i\I. b \ F i x) \ b \ a)}" unfolding le_INF_iff[symmetric] by auto also have "\ \ sets M" by measurable - finally show "(\x. INF i:I. F i x) -` {a} \ space M \ sets M" . + finally show "(\x. INF i\I. F i x) -` {a} \ space M \ sets M" . qed lemma measurable_lfp_coinduct[consumes 1, case_names continuity step]: diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Measure_Space.thy --- a/src/HOL/Analysis/Measure_Space.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Measure_Space.thy Thu Nov 08 09:11:52 2018 +0100 @@ -582,12 +582,12 @@ assumes I: "I \ {}" and F: "\i j. i \ I \ j \ I \ i \ j \ F j \ F i" assumes F_sets[measurable]: "\i. i \ I \ F i \ sets M" and fin: "\i. i \ I \ emeasure M (F i) \ \" - shows "emeasure M (\i\I. F i) = (INF i:I. emeasure M (F i))" + shows "emeasure M (\i\I. F i) = (INF i\I. emeasure M (F i))" proof cases assume "finite I" have "(\i\I. F i) = F (Max I)" using I \finite I\ by (intro antisym INF_lower INF_greatest F) auto - moreover have "(INF i:I. emeasure M (F i)) = emeasure M (F (Max I))" + moreover have "(INF i\I. emeasure M (F i)) = emeasure M (F (Max I))" using I \finite I\ by (intro antisym INF_lower INF_greatest F emeasure_mono) auto ultimately show ?thesis by simp @@ -611,7 +611,7 @@ show "decseq (\i. F (L i))" using L by (intro antimonoI F L_mono) auto qed (insert L fin, auto) - also have "\ = (INF i:I. emeasure M (F i))" + also have "\ = (INF i\I. emeasure M (F i))" proof (intro antisym INF_greatest) show "i \ I \ (INF i. emeasure M (F (L i))) \ emeasure M (F i)" for i by (intro INF_lower2[of i]) auto @@ -990,7 +990,7 @@ subsection \The almost everywhere filter (i.e.\ quantifier)\ definition%important ae_filter :: "'a measure \ 'a filter" where - "ae_filter M = (INF N:null_sets M. principal (space M - N))" + "ae_filter M = (INF N\null_sets M. principal (space M - N))" abbreviation almost_everywhere :: "'a measure \ ('a \ bool) \ bool" where "almost_everywhere M P \ eventually P (ae_filter M)" @@ -2702,7 +2702,7 @@ by (intro bdd_aboveI[where M="measure M (space M)"]) (auto simp: d_def field_simps subset_eq intro!: add_increasing M.finite_measure_mono) - define \ where "\ = (SUP X:sets M. d X)" + define \ where "\ = (SUP X\sets M. d X)" have le_\[intro]: "X \ sets M \ d X \ \" for X by (auto simp: \_def intro!: cSUP_upper) @@ -2876,7 +2876,7 @@ definition%important sup_measure' :: "'a measure \ 'a measure \ 'a measure" where - "sup_measure' A B = measure_of (space A) (sets A) (\X. SUP Y:sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" + "sup_measure' A B = measure_of (space A) (sets A) (\X. SUP Y\sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" lemma assumes [simp]: "sets B = sets A" shows space_sup_measure'[simp]: "space (sup_measure' A B) = space A" @@ -2885,7 +2885,7 @@ lemma emeasure_sup_measure': assumes sets_eq[simp]: "sets B = sets A" and [simp, intro]: "X \ sets A" - shows "emeasure (sup_measure' A B) X = (SUP Y:sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" + shows "emeasure (sup_measure' A B) X = (SUP Y\sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" (is "_ = ?S X") proof - note sets_eq_imp_space_eq[OF sets_eq, simp] @@ -2893,12 +2893,12 @@ using sup_measure'_def proof (rule emeasure_measure_of) let ?d = "\X Y. emeasure A (X \ Y) + emeasure B (X \ - Y)" - show "countably_additive (sets (sup_measure' A B)) (\X. SUP Y : sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" + show "countably_additive (sets (sup_measure' A B)) (\X. SUP Y \ sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" proof (rule countably_additiveI, goal_cases) case (1 X) then have [measurable]: "\i. X i \ sets A" and "disjoint_family X" by auto - have "(\i. ?S (X i)) = (SUP Y:sets A. \i. ?d (X i) Y)" + have "(\i. ?S (X i)) = (SUP Y\sets A. \i. ?d (X i) Y)" proof (rule ennreal_suminf_SUP_eq_directed) fix J :: "nat set" and a b assume "finite J" and [measurable]: "a \ sets A" "b \ sets A" have "\c\sets A. c \ X i \ (\a\sets A. ?d (X i) a \ ?d (X i) c)" for i @@ -2988,7 +2988,7 @@ assumes B: "\Y. Y \ X \ Y \ sets A \ emeasure B Y \ emeasure C Y" shows "emeasure (sup_measure' A B) X \ emeasure C X" proof (subst emeasure_sup_measure') - show "(SUP Y:sets A. emeasure A (X \ Y) + emeasure B (X \ - Y)) \ emeasure C X" + show "(SUP Y\sets A. emeasure A (X \ Y) + emeasure B (X \ - Y)) \ emeasure C X" unfolding \sets A = sets C\ proof (intro SUP_least) fix Y assume [measurable]: "Y \ sets C" @@ -3137,10 +3137,10 @@ definition Sup_lexord :: "('a \ 'b::complete_lattice) \ ('a set \ 'a) \ ('a set \ 'a) \ 'a set \ 'a" where - "Sup_lexord k c s A = (let U = (SUP a:A. k a) in if \a\A. k a = U then c {a\A. k a = U} else s A)" + "Sup_lexord k c s A = (let U = (SUP a\A. k a) in if \a\A. k a = U then c {a\A. k a = U} else s A)" lemma Sup_lexord: - "(\a S. a \ A \ k a = (SUP a:A. k a) \ S = {a'\A. k a' = k a} \ P (c S)) \ ((\a. a \ A \ k a \ (SUP a:A. k a)) \ P (s A)) \ + "(\a S. a \ A \ k a = (SUP a\A. k a) \ S = {a'\A. k a' = k a} \ P (c S)) \ ((\a. a \ A \ k a \ (SUP a\A. k a)) \ P (s A)) \ P (Sup_lexord k c s A)" by (auto simp: Sup_lexord_def Let_def) @@ -3197,7 +3197,7 @@ definition%important Sup_measure' :: "'a measure set \ 'a measure" where "Sup_measure' M = measure_of (\a\M. space a) (\a\M. sets a) - (\X. (SUP P:{P. finite P \ P \ M }. sup_measure.F id P X))" + (\X. (SUP P\{P. finite P \ P \ M }. sup_measure.F id P X))" lemma space_Sup_measure'2: "space (Sup_measure' M) = (\m\M. space m)" unfolding Sup_measure'_def by (intro space_measure_of[OF UN_space_closed]) @@ -3218,7 +3218,7 @@ lemma emeasure_Sup_measure': assumes sets_eq[simp]: "\m. m \ M \ sets m = sets A" and "X \ sets A" "M \ {}" - shows "emeasure (Sup_measure' M) X = (SUP P:{P. finite P \ P \ M}. sup_measure.F id P X)" + shows "emeasure (Sup_measure' M) X = (SUP P\{P. finite P \ P \ M}. sup_measure.F id P X)" (is "_ = ?S X") using Sup_measure'_def proof (rule emeasure_measure_of) @@ -3245,7 +3245,7 @@ with ij show "\k\{P. finite P \ P \ M}. \n\N. ?\ i (F n) \ ?\ k (F n) \ ?\ j (F n) \ ?\ k (F n)" by (safe intro!: bexI[of _ "i \ j"]) auto next - show "(SUP P : {P. finite P \ P \ M}. \n. ?\ P (F n)) = (SUP P : {P. finite P \ P \ M}. ?\ P (UNION UNIV F))" + show "(SUP P \ {P. finite P \ P \ M}. \n. ?\ P (F n)) = (SUP P \ {P. finite P \ P \ M}. ?\ P (UNION UNIV F))" proof (intro SUP_cong refl) fix i assume i: "i \ {P. finite P \ P \ M}" show "(\n. ?\ i (F n)) = ?\ i (UNION UNIV F)" @@ -3337,7 +3337,7 @@ fix X assume "X \ sets x" show "emeasure x X \ emeasure (Sup_measure' S') X" proof (subst emeasure_Sup_measure'[OF _ \X \ sets x\]) - show "emeasure x X \ (SUP P : {P. finite P \ P \ S'}. emeasure (sup_measure.F id P) X)" + show "emeasure x X \ (SUP P \ {P. finite P \ P \ S'}. emeasure (sup_measure.F id P) X)" using \x\S'\ by (intro SUP_upper2[where i="{x}"]) auto qed (insert \x\S'\ S', auto) qed @@ -3401,7 +3401,7 @@ show "emeasure (Sup_measure' S') X \ emeasure x X" unfolding *** proof (subst emeasure_Sup_measure'[OF _ \X \ sets (Sup_measure' S')\]) - show "(SUP P : {P. finite P \ P \ S'}. emeasure (sup_measure.F id P) X) \ emeasure x X" + show "(SUP P \ {P. finite P \ P \ S'}. emeasure (sup_measure.F id P) X) \ emeasure x X" proof (safe intro!: SUP_least) fix P assume P: "finite P" "P \ S'" show "emeasure (sup_measure.F id P) X \ emeasure x X" @@ -3455,7 +3455,7 @@ lemma sets_SUP: assumes "\x. x \ I \ sets (M x) = sets N" - shows "I \ {} \ sets (SUP i:I. M i) = sets N" + shows "I \ {} \ sets (SUP i\I. M i) = sets N" unfolding Sup_measure_def using assms assms[THEN sets_eq_imp_space_eq] sets_Sup_measure'[where A=N and M="M`I"] @@ -3463,27 +3463,27 @@ lemma emeasure_SUP: assumes sets: "\i. i \ I \ sets (M i) = sets N" "X \ sets N" "I \ {}" - shows "emeasure (SUP i:I. M i) X = (SUP J:{J. J \ {} \ finite J \ J \ I}. emeasure (SUP i:J. M i) X)" + shows "emeasure (SUP i\I. M i) X = (SUP J\{J. J \ {} \ finite J \ J \ I}. emeasure (SUP i\J. M i) X)" proof - interpret sup_measure: comm_monoid_set sup "bot :: 'b measure" by standard (auto intro!: antisym) - have eq: "finite J \ sup_measure.F id J = (SUP i:J. i)" for J :: "'b measure set" + have eq: "finite J \ sup_measure.F id J = (SUP i\J. i)" for J :: "'b measure set" by (induction J rule: finite_induct) auto - have 1: "J \ {} \ J \ I \ sets (SUP x:J. M x) = sets N" for J + have 1: "J \ {} \ J \ I \ sets (SUP x\J. M x) = sets N" for J by (intro sets_SUP sets) (auto ) from \I \ {}\ obtain i where "i\I" by auto - have "Sup_measure' (M`I) X = (SUP P:{P. finite P \ P \ M`I}. sup_measure.F id P X)" + have "Sup_measure' (M`I) X = (SUP P\{P. finite P \ P \ M`I}. sup_measure.F id P X)" using sets by (intro emeasure_Sup_measure') auto - also have "Sup_measure' (M`I) = (SUP i:I. M i)" + also have "Sup_measure' (M`I) = (SUP i\I. M i)" unfolding Sup_measure_def using \I \ {}\ sets sets(1)[THEN sets_eq_imp_space_eq] by (intro Sup_lexord1[where P="\x. _ = x"]) auto - also have "(SUP P:{P. finite P \ P \ M`I}. sup_measure.F id P X) = - (SUP J:{J. J \ {} \ finite J \ J \ I}. (SUP i:J. M i) X)" + also have "(SUP P\{P. finite P \ P \ M`I}. sup_measure.F id P X) = + (SUP J\{J. J \ {} \ finite J \ J \ I}. (SUP i\J. M i) X)" proof (intro SUP_eq) fix J assume "J \ {P. finite P \ P \ M`I}" then obtain J' where J': "J' \ I" "finite J'" and J: "J = M`J'" and "finite J" using finite_subset_image[of J M I] by auto - show "\j\{J. J \ {} \ finite J \ J \ I}. sup_measure.F id J X \ (SUP i:j. M i) X" + show "\j\{J. J \ {} \ finite J \ J \ I}. sup_measure.F id J X \ (SUP i\j. M i) X" proof cases assume "J' = {}" with \i \ I\ show ?thesis by (auto simp add: J) @@ -3493,7 +3493,7 @@ qed next fix J assume J: "J \ {P. P \ {} \ finite P \ P \ I}" - show "\J'\{J. finite J \ J \ M`I}. (SUP i:J. M i) X \ sup_measure.F id J' X" + show "\J'\{J. finite J \ J \ M`I}. (SUP i\J. M i) X \ sup_measure.F id J' X" using J by (intro bexI[of _ "M`J"]) (auto simp add: eq simp del: id_apply) qed finally show ?thesis . @@ -3502,14 +3502,14 @@ lemma emeasure_SUP_chain: assumes sets: "\i. i \ A \ sets (M i) = sets N" "X \ sets N" assumes ch: "Complete_Partial_Order.chain (\) (M ` A)" and "A \ {}" - shows "emeasure (SUP i:A. M i) X = (SUP i:A. emeasure (M i) X)" + shows "emeasure (SUP i\A. M i) X = (SUP i\A. emeasure (M i) X)" proof (subst emeasure_SUP[OF sets \A \ {}\]) - show "(SUP J:{J. J \ {} \ finite J \ J \ A}. emeasure (SUPREMUM J M) X) = (SUP i:A. emeasure (M i) X)" + show "(SUP J\{J. J \ {} \ finite J \ J \ A}. emeasure (SUPREMUM J M) X) = (SUP i\A. emeasure (M i) X)" proof (rule SUP_eq) fix J assume "J \ {J. J \ {} \ finite J \ J \ A}" then have J: "Complete_Partial_Order.chain (\) (M ` J)" "finite J" "J \ {}" and "J \ A" using ch[THEN chain_subset, of "M`J"] by auto - with in_chain_finite[OF J(1)] obtain j where "j \ J" "(SUP j:J. M j) = M j" + with in_chain_finite[OF J(1)] obtain j where "j \ J" "(SUP j\J. M j) = M j" by auto with \J \ A\ show "\j\A. emeasure (SUPREMUM J M) X \ emeasure (M j) X" by auto @@ -3554,20 +3554,20 @@ lemma Sup_lexord_rel: assumes "\i. i \ I \ k (A i) = k (B i)" - "R (c (A ` {a \ I. k (B a) = (SUP x:I. k (B x))})) (c (B ` {a \ I. k (B a) = (SUP x:I. k (B x))}))" + "R (c (A ` {a \ I. k (B a) = (SUP x\I. k (B x))})) (c (B ` {a \ I. k (B a) = (SUP x\I. k (B x))}))" "R (s (A`I)) (s (B`I))" shows "R (Sup_lexord k c s (A`I)) (Sup_lexord k c s (B`I))" proof - - have "A ` {a \ I. k (B a) = (SUP x:I. k (B x))} = {a \ A ` I. k a = (SUP x:I. k (B x))}" + have "A ` {a \ I. k (B a) = (SUP x\I. k (B x))} = {a \ A ` I. k a = (SUP x\I. k (B x))}" using assms(1) by auto - moreover have "B ` {a \ I. k (B a) = (SUP x:I. k (B x))} = {a \ B ` I. k a = (SUP x:I. k (B x))}" + moreover have "B ` {a \ I. k (B a) = (SUP x\I. k (B x))} = {a \ B ` I. k a = (SUP x\I. k (B x))}" by auto ultimately show ?thesis using assms by (auto simp: Sup_lexord_def Let_def) qed lemma sets_SUP_cong: - assumes eq: "\i. i \ I \ sets (M i) = sets (N i)" shows "sets (SUP i:I. M i) = sets (SUP i:I. N i)" + assumes eq: "\i. i \ I \ sets (M i) = sets (N i)" shows "sets (SUP i\I. M i) = sets (SUP i\I. N i)" unfolding Sup_measure_def using eq eq[THEN sets_eq_imp_space_eq] apply (intro Sup_lexord_rel[where R="\x y. sets x = sets y"]) @@ -3627,17 +3627,17 @@ lemma measurable_SUP2: "I \ {} \ (\i. i \ I \ f \ measurable N (M i)) \ - (\i j. i \ I \ j \ I \ space (M i) = space (M j)) \ f \ measurable N (SUP i:I. M i)" + (\i j. i \ I \ j \ I \ space (M i) = space (M j)) \ f \ measurable N (SUP i\I. M i)" by (auto intro!: measurable_Sup2) lemma sets_Sup_sigma: assumes [simp]: "M \ {}" and M: "\m. m \ M \ m \ Pow \" - shows "sets (SUP m:M. sigma \ m) = sets (sigma \ (\M))" + shows "sets (SUP m\M. sigma \ m) = sets (sigma \ (\M))" proof - { fix a m assume "a \ sigma_sets \ m" "m \ M" then have "a \ sigma_sets \ (\M)" by induction (auto intro: sigma_sets.intros(2-)) } - then show "sets (SUP m:M. sigma \ m) = sets (sigma \ (\M))" + then show "sets (SUP m\M. sigma \ m) = sets (sigma \ (\M))" apply (subst sets_Sup_eq[where X="\"]) apply (auto simp add: M) [] apply auto [] @@ -3649,14 +3649,14 @@ lemma Sup_sigma: assumes [simp]: "M \ {}" and M: "\m. m \ M \ m \ Pow \" - shows "(SUP m:M. sigma \ m) = (sigma \ (\M))" + shows "(SUP m\M. sigma \ m) = (sigma \ (\M))" proof (intro antisym SUP_least) have *: "\M \ Pow \" using M by auto - show "sigma \ (\M) \ (SUP m:M. sigma \ m)" + show "sigma \ (\M) \ (SUP m\M. sigma \ m)" proof (intro less_eq_measure.intros(3)) - show "space (sigma \ (\M)) = space (SUP m:M. sigma \ m)" - "sets (sigma \ (\M)) = sets (SUP m:M. sigma \ m)" + show "space (sigma \ (\M)) = space (SUP m\M. sigma \ m)" + "sets (sigma \ (\M)) = sets (SUP m\M. sigma \ m)" using sets_Sup_sigma[OF assms] sets_Sup_sigma[OF assms, THEN sets_eq_imp_space_eq] by auto qed (simp add: emeasure_sigma le_fun_def) @@ -3665,12 +3665,12 @@ qed lemma SUP_sigma_sigma: - "M \ {} \ (\m. m \ M \ f m \ Pow \) \ (SUP m:M. sigma \ (f m)) = sigma \ (\m\M. f m)" + "M \ {} \ (\m. m \ M \ f m \ Pow \) \ (SUP m\M. sigma \ (f m)) = sigma \ (\m\M. f m)" using Sup_sigma[of "f`M" \] by auto lemma sets_vimage_Sup_eq: assumes *: "M \ {}" "f \ X \ Y" "\m. m \ M \ space m = Y" - shows "sets (vimage_algebra X f (Sup M)) = sets (SUP m : M. vimage_algebra X f m)" + shows "sets (vimage_algebra X f (Sup M)) = sets (SUP m \ M. vimage_algebra X f m)" (is "?IS = ?SI") proof show "?IS \ ?SI" @@ -3767,12 +3767,12 @@ using x by (induct rule: sigma_sets.induct) (insert a, auto) qed -lemma in_sets_SUP: "i \ I \ (\i. i \ I \ space (M i) = Y) \ X \ sets (M i) \ X \ sets (SUP i:I. M i)" +lemma in_sets_SUP: "i \ I \ (\i. i \ I \ space (M i) = Y) \ X \ sets (M i) \ X \ sets (SUP i\I. M i)" by (intro in_sets_Sup[where X=Y]) auto lemma measurable_SUP1: "i \ I \ f \ measurable (M i) N \ (\m n. m \ I \ n \ I \ space (M m) = space (M n)) \ - f \ measurable (SUP i:I. M i) N" + f \ measurable (SUP i\I. M i) N" by (auto intro: measurable_Sup1) lemma sets_image_in_sets': diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy --- a/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Thu Nov 08 09:11:52 2018 +0100 @@ -811,7 +811,7 @@ subsection \Integral on nonnegative functions\ definition nn_integral :: "'a measure \ ('a \ ennreal) \ ennreal" ("integral\<^sup>N") where - "integral\<^sup>N M f = (SUP g : {g. simple_function M g \ g \ f}. integral\<^sup>S M g)" + "integral\<^sup>N M f = (SUP g \ {g. simple_function M g \ g \ f}. integral\<^sup>S M g)" syntax "_nn_integral" :: "pttrn \ ennreal \ 'a measure \ ennreal" ("\\<^sup>+((2 _./ _)/ \_)" [60,61] 110) @@ -820,7 +820,7 @@ "\\<^sup>+x. f \M" == "CONST nn_integral M (\x. f)" lemma nn_integral_def_finite: - "integral\<^sup>N M f = (SUP g : {g. simple_function M g \ g \ f \ (\x. g x < top)}. integral\<^sup>S M g)" + "integral\<^sup>N M f = (SUP g \ {g. simple_function M g \ g \ f \ (\x. g x < top)}. integral\<^sup>S M g)" (is "_ = SUPREMUM ?A ?f") unfolding nn_integral_def proof (safe intro!: antisym SUP_least) @@ -1342,7 +1342,7 @@ assumes u: "\i. u i \ borel_measurable M" shows "(\\<^sup>+ x. liminf (\n. u n x) \M) \ liminf (\n. integral\<^sup>N M (u n))" proof - - have "(\\<^sup>+ x. liminf (\n. u n x) \M) = (SUP n. \\<^sup>+ x. (INF i:{n..}. u i x) \M)" + have "(\\<^sup>+ x. liminf (\n. u n x) \M) = (SUP n. \\<^sup>+ x. (INF i\{n..}. u i x) \M)" unfolding liminf_SUP_INF using u by (intro nn_integral_monotone_convergence_SUP_AE) (auto intro!: AE_I2 intro: INF_greatest INF_superset_mono) @@ -1361,7 +1361,7 @@ using bounds by (auto simp: AE_all_countable) then have "(\\<^sup>+ x. (SUP n. u n x) \M) \ (\\<^sup>+ x. w x \M)" by (auto intro!: nn_integral_mono_AE elim: eventually_mono intro: SUP_least) - then have "(\\<^sup>+ x. limsup (\n. u n x) \M) = (INF n. \\<^sup>+ x. (SUP i:{n..}. u i x) \M)" + then have "(\\<^sup>+ x. limsup (\n. u n x) \M) = (INF n. \\<^sup>+ x. (SUP i\{n..}. u i x) \M)" unfolding limsup_INF_SUP using bnd w by (intro nn_integral_monotone_convergence_INF_AE') (auto intro!: AE_I2 intro: SUP_least SUP_subset_mono) @@ -1875,24 +1875,24 @@ fixes f :: "'a \ nat \ ennreal" assumes chain: "Complete_Partial_Order.chain (\) (f ` Y)" and nonempty: "Y \ {}" - shows "(\\<^sup>+ x. (SUP i:Y. f i x) \count_space UNIV) = (SUP i:Y. (\\<^sup>+ x. f i x \count_space UNIV))" + shows "(\\<^sup>+ x. (SUP i\Y. f i x) \count_space UNIV) = (SUP i\Y. (\\<^sup>+ x. f i x \count_space UNIV))" (is "?lhs = ?rhs" is "integral\<^sup>N ?M _ = _") proof (rule order_class.order.antisym) show "?rhs \ ?lhs" by (auto intro!: SUP_least SUP_upper nn_integral_mono) next - have "\g. incseq g \ range g \ (\i. f i x) ` Y \ (SUP i:Y. f i x) = (SUP i. g i)" for x + have "\g. incseq g \ range g \ (\i. f i x) ` Y \ (SUP i\Y. f i x) = (SUP i. g i)" for x by (rule ennreal_Sup_countable_SUP) (simp add: nonempty) then obtain g where incseq: "\x. incseq (g x)" and range: "\x. range (g x) \ (\i. f i x) ` Y" - and sup: "\x. (SUP i:Y. f i x) = (SUP i. g x i)" by moura + and sup: "\x. (SUP i\Y. f i x) = (SUP i. g x i)" by moura from incseq have incseq': "incseq (\i x. g x i)" by(blast intro: incseq_SucI le_funI dest: incseq_SucD) have "?lhs = \\<^sup>+ x. (SUP i. g x i) \?M" by(simp add: sup) also have "\ = (SUP i. \\<^sup>+ x. g x i \?M)" using incseq' by(rule nn_integral_monotone_convergence_SUP) simp - also have "\ \ (SUP i:Y. \\<^sup>+ x. f i x \?M)" + also have "\ \ (SUP i\Y. \\<^sup>+ x. f i x \?M)" proof(rule SUP_least) fix n have "\x. \i. g x n = f i x \ i \ Y" using range by blast @@ -1902,7 +1902,7 @@ by(rule nn_integral_count_space_nat) also have "\ = (SUP m. \x \ (SUP i:Y. \\<^sup>+ x. f i x \?M)" + also have "\ \ (SUP i\Y. \\<^sup>+ x. f i x \?M)" proof(rule SUP_mono) fix m show "\m'\Y. (\x (\\<^sup>+ x. f m' x \?M)" @@ -1916,7 +1916,7 @@ with chain have chain': "Complete_Partial_Order.chain (\) (f ` ?Y)" by(rule chain_subset) hence "Sup (f ` ?Y) \ f ` ?Y" by(rule ccpo_class.in_chain_finite)(auto simp add: True lessThan_empty_iff) - then obtain m' where "m' < m" and m': "(SUP i:?Y. f i) = f (I m')" by auto + then obtain m' where "m' < m" and m': "(SUP i\?Y. f i) = f (I m')" by auto have "I m' \ Y" using I by blast have "(\x (\x {.. \ (SUP i:?Y. f i) x" unfolding Sup_fun_def image_image + also have "\ \ (SUP i\?Y. f i) x" unfolding Sup_fun_def image_image using \x \ {.. by (rule Sup_upper [OF imageI]) also have "\ = f (I m') x" unfolding m' by simp finally show "g x n \ f (I m') x" . diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Ordered_Euclidean_Space.thy --- a/src/HOL/Analysis/Ordered_Euclidean_Space.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Ordered_Euclidean_Space.thy Thu Nov 08 09:11:52 2018 +0100 @@ -11,8 +11,8 @@ assumes eucl_less_le_not_le: "x < y \ x \ y \ \ y \ x" assumes eucl_inf: "inf x y = (\i\Basis. inf (x \ i) (y \ i) *\<^sub>R i)" assumes eucl_sup: "sup x y = (\i\Basis. sup (x \ i) (y \ i) *\<^sub>R i)" - assumes eucl_Inf: "Inf X = (\i\Basis. (INF x:X. x \ i) *\<^sub>R i)" - assumes eucl_Sup: "Sup X = (\i\Basis. (SUP x:X. x \ i) *\<^sub>R i)" + assumes eucl_Inf: "Inf X = (\i\Basis. (INF x\X. x \ i) *\<^sub>R i)" + assumes eucl_Sup: "Sup X = (\i\Basis. (SUP x\X. x \ i) *\<^sub>R i)" assumes eucl_abs: "\x\ = (\i\Basis. \x \ i\ *\<^sub>R i)" begin @@ -49,8 +49,8 @@ by (simp_all add: eucl_inf eucl_sup inner_sum_left inner_Basis if_distrib comm_monoid_add_class.sum.delta cong: if_cong) -lemma%unimportant inner_Basis_INF_left: "i \ Basis \ (INF x:X. f x) \ i = (INF x:X. f x \ i)" - and inner_Basis_SUP_left: "i \ Basis \ (SUP x:X. f x) \ i = (SUP x:X. f x \ i)" +lemma%unimportant inner_Basis_INF_left: "i \ Basis \ (INF x\X. f x) \ i = (INF x\X. f x \ i)" + and inner_Basis_SUP_left: "i \ Basis \ (SUP x\X. f x) \ i = (SUP x\X. f x \ i)" using eucl_Sup [of "f ` X"] eucl_Inf [of "f ` X"] by (simp_all add: comp_def) lemma%unimportant abs_inner: "i \ Basis \ \x\ \ i = \x \ i\" @@ -284,8 +284,8 @@ definition%important "inf x y = (\ i. inf (x $ i) (y $ i))" definition%important "sup x y = (\ i. sup (x $ i) (y $ i))" -definition%important "Inf X = (\ i. (INF x:X. x $ i))" -definition%important "Sup X = (\ i. (SUP x:X. x $ i))" +definition%important "Inf X = (\ i. (INF x\X. x $ i))" +definition%important "Sup X = (\ i. (SUP x\X. x $ i))" definition%important "\x\ = (\ i. \x $ i\)" instance diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Polytope.thy --- a/src/HOL/Analysis/Polytope.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Polytope.thy Thu Nov 08 09:11:52 2018 +0100 @@ -2080,7 +2080,7 @@ case False then obtain h' where h': "h' \ F - {h}" by auto define inff where "inff = - (INF j:F - {h}. + (INF j\F - {h}. if 0 < a j \ y - a j \ w then (b j - a j \ w) / (a j \ y - a j \ w) else 1)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Product_Vector.thy --- a/src/HOL/Analysis/Product_Vector.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Product_Vector.thy Thu Nov 08 09:11:52 2018 +0100 @@ -127,7 +127,7 @@ definition [code del]: "(uniformity :: (('a \ 'b) \ ('a \ 'b)) filter) = - (INF e:{0 <..}. principal {(x, y). dist x y < e})" + (INF e\{0 <..}. principal {(x, y). dist x y < e})" instance by standard (rule uniformity_prod_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Radon_Nikodym.thy --- a/src/HOL/Analysis/Radon_Nikodym.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Radon_Nikodym.thy Thu Nov 08 09:11:52 2018 +0100 @@ -254,7 +254,7 @@ using f \A \ sets M\ by (auto intro!: SUP_least simp: G_D) qed } note SUP_in_G = this - let ?y = "SUP g : G. integral\<^sup>N M g" + let ?y = "SUP g \ G. integral\<^sup>N M g" have y_le: "?y \ N (space M)" unfolding G_def proof (safe intro!: SUP_least) fix g assume "\A\sets M. (\\<^sup>+x. g x * indicator A x \M) \ N A" @@ -390,7 +390,7 @@ (\A\sets M. A \ (\i. B i) = {} \ (emeasure M A = 0 \ N A = 0) \ (emeasure M A > 0 \ N A = \))" proof%unimportant - let ?Q = "{Q\sets M. N Q \ \}" - let ?a = "SUP Q:?Q. emeasure M Q" + let ?a = "SUP Q\?Q. emeasure M Q" have "{} \ ?Q" by auto then have Q_not_empty: "?Q \ {}" by blast have "?a \ emeasure M (space M)" using sets.sets_into_space @@ -404,7 +404,7 @@ then have "\i. \Q'. Q'' i = emeasure M Q' \ Q' \ ?Q" by auto from choice[OF this] obtain Q' where Q': "\i. Q'' i = emeasure M (Q' i)" "\i. Q' i \ ?Q" by auto - then have a_Lim: "?a = (SUP i::nat. emeasure M (Q' i))" using a by simp + then have a_Lim: "?a = (SUP i. emeasure M (Q' i))" using a by simp let ?O = "\n. \i\n. Q' i" have Union: "(SUP i. emeasure M (?O i)) = emeasure M (\i. ?O i)" proof (rule SUP_emeasure_incseq[of ?O]) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Regularity.thy --- a/src/HOL/Analysis/Regularity.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Regularity.thy Thu Nov 08 09:11:52 2018 +0100 @@ -14,9 +14,9 @@ assumes "emeasure M (space M) \ \" assumes "B \ sets borel" shows inner_regular: "emeasure M B = - (SUP K : {K. K \ B \ compact K}. emeasure M K)" (is "?inner B") + (SUP K \ {K. K \ B \ compact K}. emeasure M K)" (is "?inner B") and outer_regular: "emeasure M B = - (INF U : {U. B \ U \ open U}. emeasure M U)" (is "?outer B") + (INF U \ {U. B \ U \ open U}. emeasure M U)" (is "?outer B") proof%unimportant - have Us: "UNIV = space M" by (metis assms(1) sets_eq_imp_space_eq space_borel) hence sU: "space M = UNIV" by simp @@ -183,7 +183,7 @@ finally have "emeasure M A = (INF n. emeasure M {x. infdist x A < 1 / real (Suc n)})" . moreover - have "\ \ (INF U:{U. A \ U \ open U}. emeasure M U)" + have "\ \ (INF U\{U. A \ U \ open U}. emeasure M U)" proof (intro INF_mono) fix m have "?G (1 / real (Suc m)) \ {U. A \ U \ open U}" using open_G by auto @@ -193,7 +193,7 @@ by blast qed moreover - have "emeasure M A \ (INF U:{U. A \ U \ open U}. emeasure M U)" + have "emeasure M A \ (INF U\{U. A \ U \ open U}. emeasure M U)" by (rule INF_greatest) (auto intro!: emeasure_mono simp: sb) ultimately show ?thesis by simp qed (auto intro!: INF_eqI) @@ -217,38 +217,38 @@ from compl have [simp]: "B \ sets M" by (auto simp: sb borel_eq_closed) case 2 have "M (space M - B) = M (space M) - emeasure M B" by (auto simp: emeasure_compl) - also have "\ = (INF K:{K. K \ B \ compact K}. M (space M) - M K)" + also have "\ = (INF K\{K. K \ B \ compact K}. M (space M) - M K)" by (subst ennreal_SUP_const_minus) (auto simp: less_top[symmetric] inner) - also have "\ = (INF U:{U. U \ B \ compact U}. M (space M - U))" + also have "\ = (INF U\{U. U \ B \ compact U}. M (space M - U))" by (rule INF_cong) (auto simp add: emeasure_compl sb compact_imp_closed) - also have "\ \ (INF U:{U. U \ B \ closed U}. M (space M - U))" + also have "\ \ (INF U\{U. U \ B \ closed U}. M (space M - U))" by (rule INF_superset_mono) (auto simp add: compact_imp_closed) - also have "(INF U:{U. U \ B \ closed U}. M (space M - U)) = - (INF U:{U. space M - B \ U \ open U}. emeasure M U)" + also have "(INF U\{U. U \ B \ closed U}. M (space M - U)) = + (INF U\{U. space M - B \ U \ open U}. emeasure M U)" unfolding INF_image [of _ "\u. space M - u" _, symmetric, unfolded comp_def] by (rule INF_cong) (auto simp add: sU Compl_eq_Diff_UNIV [symmetric, simp]) finally have - "(INF U:{U. space M - B \ U \ open U}. emeasure M U) \ emeasure M (space M - B)" . + "(INF U\{U. space M - B \ U \ open U}. emeasure M U) \ emeasure M (space M - B)" . moreover have - "(INF U:{U. space M - B \ U \ open U}. emeasure M U) \ emeasure M (space M - B)" + "(INF U\{U. space M - B \ U \ open U}. emeasure M U) \ emeasure M (space M - B)" by (auto simp: sb sU intro!: INF_greatest emeasure_mono) ultimately show ?case by (auto intro!: antisym simp: sets_eq_imp_space_eq[OF sb]) case 1 have "M (space M - B) = M (space M) - emeasure M B" by (auto simp: emeasure_compl) - also have "\ = (SUP U: {U. B \ U \ open U}. M (space M) - M U)" + also have "\ = (SUP U\ {U. B \ U \ open U}. M (space M) - M U)" unfolding outer by (subst ennreal_INF_const_minus) auto - also have "\ = (SUP U:{U. B \ U \ open U}. M (space M - U))" + also have "\ = (SUP U\{U. B \ U \ open U}. M (space M - U))" by (rule SUP_cong) (auto simp add: emeasure_compl sb compact_imp_closed) - also have "\ = (SUP K:{K. K \ space M - B \ closed K}. emeasure M K)" + also have "\ = (SUP K\{K. K \ space M - B \ closed K}. emeasure M K)" unfolding SUP_image [of _ "\u. space M - u" _, symmetric, unfolded comp_def] by (rule SUP_cong) (auto simp add: sU) - also have "\ = (SUP K:{K. K \ space M - B \ compact K}. emeasure M K)" + also have "\ = (SUP K\{K. K \ space M - B \ compact K}. emeasure M K)" proof (safe intro!: antisym SUP_least) fix K assume "closed K" "K \ space M - B" from closed_in_D[OF \closed K\] - have K_inner: "emeasure M K = (SUP K:{Ka. Ka \ K \ compact Ka}. emeasure M K)" by simp - show "emeasure M K \ (SUP K:{K. K \ space M - B \ compact K}. emeasure M K)" + have K_inner: "emeasure M K = (SUP K\{Ka. Ka \ K \ compact Ka}. emeasure M K)" by simp + show "emeasure M K \ (SUP K\{K. K \ space M - B \ compact K}. emeasure M K)" unfolding K_inner using \K \ space M - B\ by (auto intro!: SUP_upper SUP_least) qed (fastforce intro!: SUP_least SUP_upper simp: compact_imp_closed) @@ -284,7 +284,7 @@ proof fix i from \0 < e\ have "0 < e/(2*Suc n0)" by simp - have "emeasure M (D i) = (SUP K:{K. K \ (D i) \ compact K}. emeasure M K)" + have "emeasure M (D i) = (SUP K\{K. K \ (D i) \ compact K}. emeasure M K)" using union by blast from SUP_approx_ennreal[OF \0 < e/(2*Suc n0)\ _ this] show "\K. K \ D i \ compact K \ emeasure M (D i) \ emeasure M K + e/(2*Suc n0)" @@ -327,7 +327,7 @@ proof fix i::nat from \0 < e\ have "0 < e/(2 powr Suc i)" by simp - have "emeasure M (D i) = (INF U:{U. (D i) \ U \ open U}. emeasure M U)" + have "emeasure M (D i) = (INF U\{U. (D i) \ U \ open U}. emeasure M U)" using union by blast from INF_approx_ennreal[OF \0 < e/(2 powr Suc i)\ this] show "\U. D i \ U \ open U \ e/(2 powr Suc i) > emeasure M U - emeasure M (D i)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Riemann_Mapping.thy --- a/src/HOL/Analysis/Riemann_Mapping.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Riemann_Mapping.thy Thu Nov 08 09:11:52 2018 +0100 @@ -168,7 +168,7 @@ by (simp add: deq norm_mult divide_simps o_def) qed qed - define l where "l \ SUP h:F. norm (deriv h 0)" + define l where "l \ SUP h\F. norm (deriv h 0)" have eql: "norm (deriv f 0) = l" if le: "l \ norm (deriv f 0)" and "f \ F" for f apply (rule order_antisym [OF _ le]) using \f \ F\ bdd cSUP_upper by (fastforce simp: l_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Tagged_Division.thy --- a/src/HOL/Analysis/Tagged_Division.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Tagged_Division.thy Thu Nov 08 09:11:52 2018 +0100 @@ -133,10 +133,10 @@ subsection%important \Bounds on intervals where they exist\ definition%important interval_upperbound :: "('a::euclidean_space) set \ 'a" - where "interval_upperbound s = (\i\Basis. (SUP x:s. x\i) *\<^sub>R i)" + where "interval_upperbound s = (\i\Basis. (SUP x\s. x\i) *\<^sub>R i)" definition%important interval_lowerbound :: "('a::euclidean_space) set \ 'a" - where "interval_lowerbound s = (\i\Basis. (INF x:s. x\i) *\<^sub>R i)" + where "interval_lowerbound s = (\i\Basis. (INF x\s. x\i) *\<^sub>R i)" lemma interval_upperbound[simp]: "\i\Basis. a\i \ b\i \ @@ -169,10 +169,10 @@ shows "interval_upperbound (A \ B) = (interval_upperbound A, interval_upperbound B)" proof%unimportant- from assms have fst_image_times': "A = fst ` (A \ B)" by simp - have "(\i\Basis. (SUP x:A \ B. x \ (i, 0)) *\<^sub>R i) = (\i\Basis. (SUP x:A. x \ i) *\<^sub>R i)" + have "(\i\Basis. (SUP x\A \ B. x \ (i, 0)) *\<^sub>R i) = (\i\Basis. (SUP x\A. x \ i) *\<^sub>R i)" by (subst (2) fst_image_times') (simp del: fst_image_times add: o_def inner_Pair_0) moreover from assms have snd_image_times': "B = snd ` (A \ B)" by simp - have "(\i\Basis. (SUP x:A \ B. x \ (0, i)) *\<^sub>R i) = (\i\Basis. (SUP x:B. x \ i) *\<^sub>R i)" + have "(\i\Basis. (SUP x\A \ B. x \ (0, i)) *\<^sub>R i) = (\i\Basis. (SUP x\B. x \ i) *\<^sub>R i)" by (subst (2) snd_image_times') (simp del: snd_image_times add: o_def inner_Pair_0) ultimately show ?thesis unfolding interval_upperbound_def by (subst sum_Basis_prod_eq) (auto simp add: sum_prod) @@ -183,10 +183,10 @@ shows "interval_lowerbound (A \ B) = (interval_lowerbound A, interval_lowerbound B)" proof%unimportant- from assms have fst_image_times': "A = fst ` (A \ B)" by simp - have "(\i\Basis. (INF x:A \ B. x \ (i, 0)) *\<^sub>R i) = (\i\Basis. (INF x:A. x \ i) *\<^sub>R i)" + have "(\i\Basis. (INF x\A \ B. x \ (i, 0)) *\<^sub>R i) = (\i\Basis. (INF x\A. x \ i) *\<^sub>R i)" by (subst (2) fst_image_times') (simp del: fst_image_times add: o_def inner_Pair_0) moreover from assms have snd_image_times': "B = snd ` (A \ B)" by simp - have "(\i\Basis. (INF x:A \ B. x \ (0, i)) *\<^sub>R i) = (\i\Basis. (INF x:B. x \ i) *\<^sub>R i)" + have "(\i\Basis. (INF x\A \ B. x \ (0, i)) *\<^sub>R i) = (\i\Basis. (INF x\B. x \ i) *\<^sub>R i)" by (subst (2) snd_image_times') (simp del: snd_image_times add: o_def inner_Pair_0) ultimately show ?thesis unfolding interval_lowerbound_def by (subst sum_Basis_prod_eq) (auto simp add: sum_prod) @@ -2576,7 +2576,7 @@ text \Divisions over all gauges towards finer divisions.\ definition%important division_filter :: "'a::euclidean_space set \ ('a \ 'a set) set filter" - where "division_filter s = (INF g:{g. gauge g}. principal {p. p tagged_division_of s \ g fine p})" + where "division_filter s = (INF g\{g. gauge g}. principal {p. p tagged_division_of s \ g fine p})" lemma%important eventually_division_filter: "(\\<^sub>F p in division_filter s. P p) \ diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy Thu Nov 08 09:11:52 2018 +0100 @@ -4189,7 +4189,7 @@ next fix A assume A: "\a\A. closed a" "\B\A. finite B \ U \ \B \ {}" "U \ \A = {}" - define F where "F = (INF a:insert U A. principal a)" + define F where "F = (INF a\insert U A. principal a)" have "F \ bot" unfolding F_def proof (rule INF_filter_not_bot) @@ -4197,7 +4197,7 @@ assume X: "X \ insert U A" "finite X" with A(2)[THEN spec, of "X - {U}"] have "U \ \(X - {U}) \ {}" by auto - with X show "(INF a:X. principal a) \ bot" + with X show "(INF a\X. principal a) \ bot" by (auto simp: INF_principal_finite principal_eq_bot_iff) qed moreover diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Uniform_Limit.thy --- a/src/HOL/Analysis/Uniform_Limit.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Uniform_Limit.thy Thu Nov 08 09:11:52 2018 +0100 @@ -13,7 +13,7 @@ subsection \Definition\ definition%important uniformly_on :: "'a set \ ('a \ 'b::metric_space) \ ('a \ 'b) filter" - where "uniformly_on S l = (INF e:{0 <..}. principal {f. \x\S. dist (f x) (l x) < e})" + where "uniformly_on S l = (INF e\{0 <..}. principal {f. \x\S. dist (f x) (l x) < e})" abbreviation%important "uniform_limit S f l \ filterlim f (uniformly_on S l)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Analysis/Weierstrass_Theorems.thy --- a/src/HOL/Analysis/Weierstrass_Theorems.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Analysis/Weierstrass_Theorems.thy Thu Nov 08 09:11:52 2018 +0100 @@ -202,7 +202,7 @@ by (induct I rule: finite_induct; simp add: const mult) definition%important normf :: "('a::t2_space \ real) \ real" - where "normf f \ SUP x:S. \f x\" + where "normf f \ SUP x\S. \f x\" lemma%unimportant normf_upper: "\continuous_on S f; x \ S\ \ \f x\ \ normf f" apply (simp add: normf_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Complete_Lattices.thy --- a/src/HOL/Complete_Lattices.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Complete_Lattices.thy Thu Nov 08 09:11:52 2018 +0100 @@ -32,12 +32,6 @@ end -syntax (input) - "_INF1" :: "pttrns \ 'b \ 'b" ("(3INF _./ _)" [0, 10] 10) - "_INF" :: "pttrn \ 'a set \ 'b \ 'b" ("(3INF _:_./ _)" [0, 0, 10] 10) - "_SUP1" :: "pttrns \ 'b \ 'b" ("(3SUP _./ _)" [0, 10] 10) - "_SUP" :: "pttrn \ 'a set \ 'b \ 'b" ("(3SUP _:_./ _)" [0, 0, 10] 10) - syntax "_INF1" :: "pttrns \ 'b \ 'b" ("(3INF _./ _)" [0, 10] 10) "_INF" :: "pttrn \ 'a set \ 'b \ 'b" ("(3INF _\_./ _)" [0, 0, 10] 10) @@ -50,6 +44,12 @@ "_SUP1" :: "pttrns \ 'b \ 'b" ("(3\_./ _)" [0, 10] 10) "_SUP" :: "pttrn \ 'a set \ 'b \ 'b" ("(3\_\_./ _)" [0, 0, 10] 10) +syntax (input) \ \legacy input syntax\ + "_INF1" :: "pttrns \ 'b \ 'b" ("(3INF _./ _)" [0, 10] 10) + "_INF" :: "pttrn \ 'a set \ 'b \ 'b" ("(3INF _:_./ _)" [0, 0, 10] 10) + "_SUP1" :: "pttrns \ 'b \ 'b" ("(3SUP _./ _)" [0, 10] 10) + "_SUP" :: "pttrn \ 'a set \ 'b \ 'b" ("(3SUP _:_./ _)" [0, 0, 10] 10) + translations "\x y. f" \ "\x. \y. f" "\x. f" \ "\CONST range (\x. f)" @@ -236,7 +236,7 @@ lemma INF_mono: "(\m. m \ B \ \n\A. f n \ g m) \ (\n\A. f n) \ (\n\B. g n)" using Inf_mono [of "g ` B" "f ` A"] by auto -lemma INF_mono': "(\x. f x \ g x) \ (INF x:A. f x) \ (INF x:A. g x)" +lemma INF_mono': "(\x. f x \ g x) \ (\x\A. f x) \ (\x\A. g x)" by (rule INF_mono) auto lemma Sup_mono: @@ -252,7 +252,7 @@ lemma SUP_mono: "(\n. n \ A \ \m\B. f n \ g m) \ (\n\A. f n) \ (\n\B. g n)" using Sup_mono [of "f ` A" "g ` B"] by auto -lemma SUP_mono': "(\x. f x \ g x) \ (SUP x:A. f x) \ (SUP x:A. g x)" +lemma SUP_mono': "(\x. f x \ g x) \ (\x\A. f x) \ (\x\A. g x)" by (rule SUP_mono) auto lemma INF_superset_mono: "B \ A \ (\x. x \ B \ f x \ g x) \ (\x\A. f x) \ (\x\B. g x)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Complex.thy --- a/src/HOL/Complex.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Complex.thy Thu Nov 08 09:11:52 2018 +0100 @@ -308,7 +308,7 @@ definition dist_complex_def: "dist x y = cmod (x - y)" definition uniformity_complex_def [code del]: - "(uniformity :: (complex \ complex) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + "(uniformity :: (complex \ complex) filter) = (INF e\{0 <..}. principal {(x, y). dist x y < e})" definition open_complex_def [code del]: "open (U :: complex set) \ (\x\U. eventually (\(x', y). x' = x \ y \ U) uniformity)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Computational_Algebra/Formal_Power_Series.thy --- a/src/HOL/Computational_Algebra/Formal_Power_Series.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Computational_Algebra/Formal_Power_Series.thy Thu Nov 08 09:11:52 2018 +0100 @@ -821,7 +821,7 @@ begin definition uniformity_fps_def [code del]: - "(uniformity :: ('a fps \ 'a fps) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + "(uniformity :: ('a fps \ 'a fps) filter) = (INF e\{0 <..}. principal {(x, y). dist x y < e})" definition open_fps_def' [code del]: "open (U :: 'a fps set) \ (\x\U. eventually (\(x', y). x' = x \ y \ U) uniformity)" @@ -1470,40 +1470,40 @@ lemma fps_Gcd: assumes "A - {0} \ {}" - shows "Gcd A = fps_X ^ (INF f:A-{0}. subdegree f)" + shows "Gcd A = fps_X ^ (INF f\A-{0}. subdegree f)" proof (rule sym, rule GcdI) fix f assume "f \ A" - thus "fps_X ^ (INF f:A - {0}. subdegree f) dvd f" + thus "fps_X ^ (INF f\A - {0}. subdegree f) dvd f" by (cases "f = 0") (auto simp: fps_dvd_iff intro!: cINF_lower) next fix d assume d: "\f. f \ A \ d dvd f" from assms obtain f where "f \ A - {0}" by auto with d[of f] have [simp]: "d \ 0" by auto - from d assms have "subdegree d \ (INF f:A-{0}. subdegree f)" + from d assms have "subdegree d \ (INF f\A-{0}. subdegree f)" by (intro cINF_greatest) (auto simp: fps_dvd_iff[symmetric]) - with d assms show "d dvd fps_X ^ (INF f:A-{0}. subdegree f)" by (simp add: fps_dvd_iff) + with d assms show "d dvd fps_X ^ (INF f\A-{0}. subdegree f)" by (simp add: fps_dvd_iff) qed simp_all lemma fps_Gcd_altdef: "Gcd (A :: 'a :: field fps set) = - (if A \ {0} then 0 else fps_X ^ (INF f:A-{0}. subdegree f))" + (if A \ {0} then 0 else fps_X ^ (INF f\A-{0}. subdegree f))" using fps_Gcd by auto lemma fps_Lcm: assumes "A \ {}" "0 \ A" "bdd_above (subdegree`A)" - shows "Lcm A = fps_X ^ (SUP f:A. subdegree f)" + shows "Lcm A = fps_X ^ (SUP f\A. subdegree f)" proof (rule sym, rule LcmI) fix f assume "f \ A" moreover from assms(3) have "bdd_above (subdegree ` A)" by auto - ultimately show "f dvd fps_X ^ (SUP f:A. subdegree f)" using assms(2) + ultimately show "f dvd fps_X ^ (SUP f\A. subdegree f)" using assms(2) by (cases "f = 0") (auto simp: fps_dvd_iff intro!: cSUP_upper) next fix d assume d: "\f. f \ A \ f dvd d" from assms obtain f where f: "f \ A" "f \ 0" by auto - show "fps_X ^ (SUP f:A. subdegree f) dvd d" + show "fps_X ^ (SUP f\A. subdegree f) dvd d" proof (cases "d = 0") assume "d \ 0" moreover from d have "\f. f \ A \ f \ 0 \ f dvd d" by blast - ultimately have "subdegree d \ (SUP f:A. subdegree f)" using assms + ultimately have "subdegree d \ (SUP f\A. subdegree f)" using assms by (intro cSUP_least) (auto simp: fps_dvd_iff) with \d \ 0\ show ?thesis by (simp add: fps_dvd_iff) qed simp_all @@ -1512,7 +1512,7 @@ lemma fps_Lcm_altdef: "Lcm (A :: 'a :: field fps set) = (if 0 \ A \ \bdd_above (subdegree`A) then 0 else - if A = {} then 1 else fps_X ^ (SUP f:A. subdegree f))" + if A = {} then 1 else fps_X ^ (SUP f\A. subdegree f))" proof (cases "bdd_above (subdegree`A)") assume unbounded: "\bdd_above (subdegree`A)" have "Lcm A = 0" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Filter.thy --- a/src/HOL/Filter.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Filter.thy Thu Nov 08 09:11:52 2018 +0100 @@ -524,14 +524,14 @@ lemma eventually_INF_finite: assumes "finite A" - shows "eventually P (INF x:A. F x) \ + shows "eventually P (\ x\A. F x) \ (\Q. (\x\A. eventually (Q x) (F x)) \ (\y. (\x\A. Q x y) \ P y))" using assms proof (induction arbitrary: P rule: finite_induct) case (insert a A P) from insert.hyps have [simp]: "x \ a" if "x \ A" for x using that by auto - have "eventually P (INF x:insert a A. F x) \ + have "eventually P (\ x\insert a A. F x) \ (\Q R S. eventually Q (F a) \ (( (\x\A. eventually (S x) (F x)) \ (\y. (\x\A. S x y) \ R y)) \ (\x. Q x \ R x \ P x)))" unfolding ex_simps by (simp add: eventually_inf insert.IH) @@ -915,7 +915,7 @@ subsection \Increasing finite subsets\ definition finite_subsets_at_top where - "finite_subsets_at_top A = (INF X:{X. finite X \ X \ A}. principal {Y. finite Y \ X \ Y \ Y \ A})" + "finite_subsets_at_top A = (\ X\{X. finite X \ X \ A}. principal {Y. finite Y \ X \ Y \ Y \ A})" lemma eventually_finite_subsets_at_top: "eventually P (finite_subsets_at_top A) \ @@ -1345,7 +1345,7 @@ "(\m. m \ J \ \i\I. filtermap f (F i) \ G m) \ LIM x (\i\I. F i). f x :> (\j\J. G j)" unfolding filterlim_def by (rule order_trans[OF filtermap_INF INF_mono]) -lemma filterlim_INF': "x \ A \ filterlim f F (G x) \ filterlim f F (INF x:A. G x)" +lemma filterlim_INF': "x \ A \ filterlim f F (G x) \ filterlim f F (\ x\A. G x)" unfolding filterlim_def by (rule order.trans[OF filtermap_mono[OF INF_lower]]) lemma filterlim_filtercomap_iff: "filterlim f (filtercomap g G) F \ filterlim (g \ f) G F" @@ -1859,7 +1859,7 @@ if "(F, G) \ SS'" for P Q F G by simp_all show "rel_filter A (Sup S) (Sup S')" proof - let ?Z = "SUP (F, G):SS'. Z F G" + let ?Z = "\(F, G)\SS'. Z F G" show *: "\\<^sub>F (x, y) in ?Z. A x y" using Z by(auto simp add: eventually_Sup) show "map_filter_on {(x, y). A x y} fst ?Z = Sup S" "map_filter_on {(x, y). A x y} snd ?Z = Sup S'" unfolding filter_eq_iff diff -r 438e1a11445f -r 0a9688695a1b src/HOL/IMP/Collecting.thy --- a/src/HOL/IMP/Collecting.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/IMP/Collecting.thy Thu Nov 08 09:11:52 2018 +0100 @@ -94,7 +94,7 @@ dest: size_annos_same) definition Inf_acom :: "com \ 'a::complete_lattice acom set \ 'a acom" where -"Inf_acom c M = annotate (\p. INF C:M. anno C p) c" +"Inf_acom c M = annotate (\p. INF C\M. anno C p) c" global_interpretation Complete_Lattice "{C. strip C = c}" "Inf_acom c" for c diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Countable_Complete_Lattices.thy --- a/src/HOL/Library/Countable_Complete_Lattices.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Countable_Complete_Lattices.thy Thu Nov 08 09:11:52 2018 +0100 @@ -27,58 +27,58 @@ show "a \ top" by (auto intro: ccInf_greatest simp only: ccInf_empty [symmetric]) qed -lemma ccINF_lower: "countable A \ i \ A \ (INF i :A. f i) \ f i" +lemma ccINF_lower: "countable A \ i \ A \ (INF i \ A. f i) \ f i" using ccInf_lower [of "f ` A"] by simp -lemma ccINF_greatest: "countable A \ (\i. i \ A \ u \ f i) \ u \ (INF i :A. f i)" +lemma ccINF_greatest: "countable A \ (\i. i \ A \ u \ f i) \ u \ (INF i \ A. f i)" using ccInf_greatest [of "f ` A"] by auto -lemma ccSUP_upper: "countable A \ i \ A \ f i \ (SUP i :A. f i)" +lemma ccSUP_upper: "countable A \ i \ A \ f i \ (SUP i \ A. f i)" using ccSup_upper [of "f ` A"] by simp -lemma ccSUP_least: "countable A \ (\i. i \ A \ f i \ u) \ (SUP i :A. f i) \ u" +lemma ccSUP_least: "countable A \ (\i. i \ A \ f i \ u) \ (SUP i \ A. f i) \ u" using ccSup_least [of "f ` A"] by auto lemma ccInf_lower2: "countable A \ u \ A \ u \ v \ Inf A \ v" using ccInf_lower [of A u] by auto -lemma ccINF_lower2: "countable A \ i \ A \ f i \ u \ (INF i :A. f i) \ u" +lemma ccINF_lower2: "countable A \ i \ A \ f i \ u \ (INF i \ A. f i) \ u" using ccINF_lower [of A i f] by auto lemma ccSup_upper2: "countable A \ u \ A \ v \ u \ v \ Sup A" using ccSup_upper [of A u] by auto -lemma ccSUP_upper2: "countable A \ i \ A \ u \ f i \ u \ (SUP i :A. f i)" +lemma ccSUP_upper2: "countable A \ i \ A \ u \ f i \ u \ (SUP i \ A. f i)" using ccSUP_upper [of A i f] by auto lemma le_ccInf_iff: "countable A \ b \ Inf A \ (\a\A. b \ a)" by (auto intro: ccInf_greatest dest: ccInf_lower) -lemma le_ccINF_iff: "countable A \ u \ (INF i :A. f i) \ (\i\A. u \ f i)" +lemma le_ccINF_iff: "countable A \ u \ (INF i \ A. f i) \ (\i\A. u \ f i)" using le_ccInf_iff [of "f ` A"] by simp lemma ccSup_le_iff: "countable A \ Sup A \ b \ (\a\A. a \ b)" by (auto intro: ccSup_least dest: ccSup_upper) -lemma ccSUP_le_iff: "countable A \ (SUP i :A. f i) \ u \ (\i\A. f i \ u)" +lemma ccSUP_le_iff: "countable A \ (SUP i \ A. f i) \ u \ (\i\A. f i \ u)" using ccSup_le_iff [of "f ` A"] by simp lemma ccInf_insert [simp]: "countable A \ Inf (insert a A) = inf a (Inf A)" by (force intro: le_infI le_infI1 le_infI2 antisym ccInf_greatest ccInf_lower) -lemma ccINF_insert [simp]: "countable A \ (INF x:insert a A. f x) = inf (f a) (INFIMUM A f)" +lemma ccINF_insert [simp]: "countable A \ (INF x\insert a A. f x) = inf (f a) (INFIMUM A f)" unfolding image_insert by simp lemma ccSup_insert [simp]: "countable A \ Sup (insert a A) = sup a (Sup A)" by (force intro: le_supI le_supI1 le_supI2 antisym ccSup_least ccSup_upper) -lemma ccSUP_insert [simp]: "countable A \ (SUP x:insert a A. f x) = sup (f a) (SUPREMUM A f)" +lemma ccSUP_insert [simp]: "countable A \ (SUP x\insert a A. f x) = sup (f a) (SUPREMUM A f)" unfolding image_insert by simp -lemma ccINF_empty [simp]: "(INF x:{}. f x) = top" +lemma ccINF_empty [simp]: "(INF x\{}. f x) = top" unfolding image_empty by simp -lemma ccSUP_empty [simp]: "(SUP x:{}. f x) = bot" +lemma ccSUP_empty [simp]: "(SUP x\{}. f x) = bot" unfolding image_empty by simp lemma ccInf_superset_mono: "countable A \ B \ A \ Inf A \ Inf B" @@ -99,7 +99,7 @@ qed auto lemma ccINF_mono: - "countable A \ countable B \ (\m. m \ B \ \n\A. f n \ g m) \ (INF n:A. f n) \ (INF n:B. g n)" + "countable A \ countable B \ (\m. m \ B \ \n\A. f n \ g m) \ (INF n\A. f n) \ (INF n\B. g n)" using ccInf_mono [of "g ` B" "f ` A"] by auto lemma ccSup_mono: @@ -114,15 +114,15 @@ qed auto lemma ccSUP_mono: - "countable A \ countable B \ (\n. n \ A \ \m\B. f n \ g m) \ (SUP n:A. f n) \ (SUP n:B. g n)" + "countable A \ countable B \ (\n. n \ A \ \m\B. f n \ g m) \ (SUP n\A. f n) \ (SUP n\B. g n)" using ccSup_mono [of "g ` B" "f ` A"] by auto lemma ccINF_superset_mono: - "countable A \ B \ A \ (\x. x \ B \ f x \ g x) \ (INF x:A. f x) \ (INF x:B. g x)" + "countable A \ B \ A \ (\x. x \ B \ f x \ g x) \ (INF x\A. f x) \ (INF x\B. g x)" by (blast intro: ccINF_mono countable_subset dest: subsetD) lemma ccSUP_subset_mono: - "countable B \ A \ B \ (\x. x \ A \ f x \ g x) \ (SUP x:A. f x) \ (SUP x:B. g x)" + "countable B \ A \ B \ (\x. x \ A \ f x \ g x) \ (SUP x\A. f x) \ (SUP x\B. g x)" by (blast intro: ccSUP_mono countable_subset dest: subsetD) @@ -136,38 +136,38 @@ by (rule antisym) (auto intro: ccInf_greatest ccInf_lower le_infI1 le_infI2) lemma ccINF_union: - "countable A \ countable B \ (INF i:A \ B. M i) = inf (INF i:A. M i) (INF i:B. M i)" + "countable A \ countable B \ (INF i\A \ B. M i) = inf (INF i\A. M i) (INF i\B. M i)" by (auto intro!: antisym ccINF_mono intro: le_infI1 le_infI2 ccINF_greatest ccINF_lower) lemma ccSup_union_distrib: "countable A \ countable B \ Sup (A \ B) = sup (Sup A) (Sup B)" by (rule antisym) (auto intro: ccSup_least ccSup_upper le_supI1 le_supI2) lemma ccSUP_union: - "countable A \ countable B \ (SUP i:A \ B. M i) = sup (SUP i:A. M i) (SUP i:B. M i)" + "countable A \ countable B \ (SUP i\A \ B. M i) = sup (SUP i\A. M i) (SUP i\B. M i)" by (auto intro!: antisym ccSUP_mono intro: le_supI1 le_supI2 ccSUP_least ccSUP_upper) -lemma ccINF_inf_distrib: "countable A \ inf (INF a:A. f a) (INF a:A. g a) = (INF a:A. inf (f a) (g a))" +lemma ccINF_inf_distrib: "countable A \ inf (INF a\A. f a) (INF a\A. g a) = (INF a\A. inf (f a) (g a))" by (rule antisym) (rule ccINF_greatest, auto intro: le_infI1 le_infI2 ccINF_lower ccINF_mono) -lemma ccSUP_sup_distrib: "countable A \ sup (SUP a:A. f a) (SUP a:A. g a) = (SUP a:A. sup (f a) (g a))" +lemma ccSUP_sup_distrib: "countable A \ sup (SUP a\A. f a) (SUP a\A. g a) = (SUP a\A. sup (f a) (g a))" by (rule antisym[rotated]) (rule ccSUP_least, auto intro: le_supI1 le_supI2 ccSUP_upper ccSUP_mono) -lemma ccINF_const [simp]: "A \ {} \ (INF i :A. f) = f" +lemma ccINF_const [simp]: "A \ {} \ (INF i \ A. f) = f" unfolding image_constant_conv by auto -lemma ccSUP_const [simp]: "A \ {} \ (SUP i :A. f) = f" +lemma ccSUP_const [simp]: "A \ {} \ (SUP i \ A. f) = f" unfolding image_constant_conv by auto -lemma ccINF_top [simp]: "(INF x:A. top) = top" +lemma ccINF_top [simp]: "(INF x\A. top) = top" by (cases "A = {}") simp_all -lemma ccSUP_bot [simp]: "(SUP x:A. bot) = bot" +lemma ccSUP_bot [simp]: "(SUP x\A. bot) = bot" by (cases "A = {}") simp_all -lemma ccINF_commute: "countable A \ countable B \ (INF i:A. INF j:B. f i j) = (INF j:B. INF i:A. f i j)" +lemma ccINF_commute: "countable A \ countable B \ (INF i\A. INF j\B. f i j) = (INF j\B. INF i\A. f i j)" by (iprover intro: ccINF_lower ccINF_greatest order_trans antisym) -lemma ccSUP_commute: "countable A \ countable B \ (SUP i:A. SUP j:B. f i j) = (SUP j:B. SUP i:A. f i j)" +lemma ccSUP_commute: "countable A \ countable B \ (SUP i\A. SUP j\B. f i j) = (SUP j\B. SUP i\A. f i j)" by (iprover intro: ccSUP_upper ccSUP_least order_trans antisym) end @@ -179,61 +179,61 @@ lemma less_ccSup_iff: "countable S \ a < Sup S \ (\x\S. a < x)" unfolding not_le [symmetric] by (subst ccSup_le_iff) auto -lemma less_ccSUP_iff: "countable A \ a < (SUP i:A. f i) \ (\x\A. a < f x)" +lemma less_ccSUP_iff: "countable A \ a < (SUP i\A. f i) \ (\x\A. a < f x)" using less_ccSup_iff [of "f ` A"] by simp lemma ccInf_less_iff: "countable S \ Inf S < a \ (\x\S. x < a)" unfolding not_le [symmetric] by (subst le_ccInf_iff) auto -lemma ccINF_less_iff: "countable A \ (INF i:A. f i) < a \ (\x\A. f x < a)" +lemma ccINF_less_iff: "countable A \ (INF i\A. f i) < a \ (\x\A. f x < a)" using ccInf_less_iff [of "f ` A"] by simp end class countable_complete_distrib_lattice = countable_complete_lattice + - assumes sup_ccInf: "countable B \ sup a (Inf B) = (INF b:B. sup a b)" - assumes inf_ccSup: "countable B \ inf a (Sup B) = (SUP b:B. inf a b)" + assumes sup_ccInf: "countable B \ sup a (Inf B) = (INF b\B. sup a b)" + assumes inf_ccSup: "countable B \ inf a (Sup B) = (SUP b\B. inf a b)" begin lemma sup_ccINF: - "countable B \ sup a (INF b:B. f b) = (INF b:B. sup a (f b))" + "countable B \ sup a (INF b\B. f b) = (INF b\B. sup a (f b))" by (simp only: sup_ccInf image_image countable_image) lemma inf_ccSUP: - "countable B \ inf a (SUP b:B. f b) = (SUP b:B. inf a (f b))" + "countable B \ inf a (SUP b\B. f b) = (SUP b\B. inf a (f b))" by (simp only: inf_ccSup image_image countable_image) subclass distrib_lattice proof fix a b c - from sup_ccInf[of "{b, c}" a] have "sup a (Inf {b, c}) = (INF d:{b, c}. sup a d)" + from sup_ccInf[of "{b, c}" a] have "sup a (Inf {b, c}) = (INF d\{b, c}. sup a d)" by simp then show "sup a (inf b c) = inf (sup a b) (sup a c)" by simp qed lemma ccInf_sup: - "countable B \ sup (Inf B) a = (INF b:B. sup b a)" + "countable B \ sup (Inf B) a = (INF b\B. sup b a)" by (simp add: sup_ccInf sup_commute) lemma ccSup_inf: - "countable B \ inf (Sup B) a = (SUP b:B. inf b a)" + "countable B \ inf (Sup B) a = (SUP b\B. inf b a)" by (simp add: inf_ccSup inf_commute) lemma ccINF_sup: - "countable B \ sup (INF b:B. f b) a = (INF b:B. sup (f b) a)" + "countable B \ sup (INF b\B. f b) a = (INF b\B. sup (f b) a)" by (simp add: sup_ccINF sup_commute) lemma ccSUP_inf: - "countable B \ inf (SUP b:B. f b) a = (SUP b:B. inf (f b) a)" + "countable B \ inf (SUP b\B. f b) a = (SUP b\B. inf (f b) a)" by (simp add: inf_ccSUP inf_commute) lemma ccINF_sup_distrib2: - "countable A \ countable B \ sup (INF a:A. f a) (INF b:B. g b) = (INF a:A. INF b:B. sup (f a) (g b))" + "countable A \ countable B \ sup (INF a\A. f a) (INF b\B. g b) = (INF a\A. INF b\B. sup (f a) (g b))" by (subst ccINF_commute) (simp_all add: sup_ccINF ccINF_sup) lemma ccSUP_inf_distrib2: - "countable A \ countable B \ inf (SUP a:A. f a) (SUP b:B. g b) = (SUP a:A. SUP b:B. inf (f a) (g b))" + "countable A \ countable B \ inf (SUP a\A. f a) (SUP b\B. g b) = (SUP a\A. SUP b\B. inf (f a) (g b))" by (subst ccSUP_commute) (simp_all add: inf_ccSUP ccSUP_inf) context @@ -242,20 +242,20 @@ begin lemma mono_ccInf: - "countable A \ f (Inf A) \ (INF x:A. f x)" + "countable A \ f (Inf A) \ (INF x\A. f x)" using \mono f\ by (auto intro!: countable_complete_lattice_class.ccINF_greatest intro: ccInf_lower dest: monoD) lemma mono_ccSup: - "countable A \ (SUP x:A. f x) \ f (Sup A)" + "countable A \ (SUP x\A. f x) \ f (Sup A)" using \mono f\ by (auto intro: countable_complete_lattice_class.ccSUP_least ccSup_upper dest: monoD) lemma mono_ccINF: - "countable I \ f (INF i : I. A i) \ (INF x : I. f (A x))" + "countable I \ f (INF i \ I. A i) \ (INF x \ I. f (A x))" by (intro countable_complete_lattice_class.ccINF_greatest monoD[OF \mono f\] ccINF_lower) lemma mono_ccSUP: - "countable I \ (SUP x : I. f (A x)) \ f (SUP i : I. A i)" + "countable I \ (SUP x \ I. f (A x)) \ f (SUP i \ I. A i)" by (intro countable_complete_lattice_class.ccSUP_least monoD[OF \mono f\] ccSUP_upper) end diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Extended_Nonnegative_Real.thy --- a/src/HOL/Library/Extended_Nonnegative_Real.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Extended_Nonnegative_Real.thy Thu Nov 08 09:11:52 2018 +0100 @@ -108,12 +108,12 @@ lemma sup_continuous_SUP[order_continuous_intros]: fixes M :: "_ \ _ \ 'a::complete_lattice" assumes M: "\i. i \ I \ sup_continuous (M i)" - shows "sup_continuous (SUP i:I. M i)" + shows "sup_continuous (SUP i\I. M i)" unfolding sup_continuous_def by (auto simp add: sup_continuousD[OF M] intro: SUP_commute) lemma sup_continuous_apply_SUP[order_continuous_intros]: fixes M :: "_ \ _ \ 'a::complete_lattice" - shows "(\i. i \ I \ sup_continuous (M i)) \ sup_continuous (\x. SUP i:I. M i x)" + shows "(\i. i \ I \ sup_continuous (M i)) \ sup_continuous (\x. SUP i\I. M i x)" unfolding SUP_apply[symmetric] by (rule sup_continuous_SUP) lemma sup_continuous_lfp'[order_continuous_intros]: @@ -145,7 +145,7 @@ qed lemma mono_INF_fun: - "(\x y. mono (F x y)) \ mono (\z x. INF y : X x. F x y z :: 'a :: complete_lattice)" + "(\x y. mono (F x y)) \ mono (\z x. INF y \ X x. F x y z :: 'a :: complete_lattice)" by (auto intro!: INF_mono[OF bexI] simp: le_fun_def mono_def) lemma continuous_on_max: @@ -160,22 +160,22 @@ lemma real_of_nat_Sup: assumes "A \ {}" "bdd_above A" - shows "of_nat (Sup A) = (SUP a:A. of_nat a :: real)" + shows "of_nat (Sup A) = (SUP a\A. of_nat a :: real)" proof (intro antisym) - show "(SUP a:A. of_nat a::real) \ of_nat (Sup A)" + show "(SUP a\A. of_nat a::real) \ of_nat (Sup A)" using assms by (intro cSUP_least of_nat_mono) (auto intro: cSup_upper) have "Sup A \ A" unfolding Sup_nat_def using assms by (intro Max_in) (auto simp: bdd_above_nat) - then show "of_nat (Sup A) \ (SUP a:A. of_nat a::real)" + then show "of_nat (Sup A) \ (SUP a\A. of_nat a::real)" by (intro cSUP_upper bdd_above_image_mono assms) (auto simp: mono_def) qed lemma (in complete_lattice) SUP_sup_const1: - "I \ {} \ (SUP i:I. sup c (f i)) = sup c (SUP i:I. f i)" + "I \ {} \ (SUP i\I. sup c (f i)) = sup c (SUP i\I. f i)" using SUP_sup_distrib[of "\_. c" I f] by simp lemma (in complete_lattice) SUP_sup_const2: - "I \ {} \ (SUP i:I. sup (f i) c) = sup (SUP i:I. f i) c" + "I \ {} \ (SUP i\I. sup (f i) c) = sup (SUP i\I. f i) c" using SUP_sup_distrib[of f I "\_. c"] by simp lemma one_less_of_natD: @@ -350,7 +350,7 @@ lemma rel_fun_limsup[transfer_rule]: "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal limsup limsup" proof - - have "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal (\x. INF n. sup 0 (SUP i:{n..}. x i)) limsup" + have "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal (\x. INF n. sup 0 (SUP i\{n..}. x i)) limsup" unfolding limsup_INF_SUP[abs_def] by (transfer_prover_start, transfer_step+; simp) then show ?thesis unfolding limsup_INF_SUP[abs_def] @@ -1140,13 +1140,13 @@ lemma of_nat_less_ennreal_of_nat[simp]: "of_nat n \ ennreal_of_enat x \ of_nat n \ x" by (cases x) (auto simp: of_nat_eq_enat) -lemma ennreal_of_enat_Sup: "ennreal_of_enat (Sup X) = (SUP x:X. ennreal_of_enat x)" +lemma ennreal_of_enat_Sup: "ennreal_of_enat (Sup X) = (SUP x\X. ennreal_of_enat x)" proof - - have "ennreal_of_enat (Sup X) \ (SUP x : X. ennreal_of_enat x)" + have "ennreal_of_enat (Sup X) \ (SUP x \ X. ennreal_of_enat x)" unfolding Sup_enat_def proof (clarsimp, intro conjI impI) fix x assume "finite X" "X \ {}" - then show "ennreal_of_enat (Max X) \ (SUP x : X. ennreal_of_enat x)" + then show "ennreal_of_enat (Max X) \ (SUP x \ X. ennreal_of_enat x)" by (intro SUP_upper Max_in) next assume "infinite X" "X \ {}" @@ -1162,9 +1162,9 @@ with x show ?thesis by (auto intro!: bexI[of _ x] less_le_trans[OF n]) qed - then have "(SUP x : X. ennreal_of_enat x) = top" + then have "(SUP x \ X. ennreal_of_enat x) = top" by simp - then show "top \ (SUP x : X. ennreal_of_enat x)" + then show "top \ (SUP x \ X. ennreal_of_enat x)" unfolding top_unique by simp qed then show ?thesis @@ -1395,7 +1395,7 @@ lemma ennreal_suminf_SUP_eq_directed: fixes f :: "'a \ nat \ ennreal" assumes *: "\N i j. i \ I \ j \ I \ finite N \ \k\I. \n\N. f i n \ f k n \ f j n \ f k n" - shows "(\n. SUP i:I. f i n) = (SUP i:I. \n. f i n)" + shows "(\n. SUP i\I. f i n) = (SUP i\I. \n. f i n)" proof cases assume "I \ {}" then obtain i where "i \ I" by auto @@ -1417,16 +1417,16 @@ shows "(INF i. c + f i) = c + (INF i. f i)" using INF_ennreal_add_const[of f c] by (simp add: ac_simps) -lemma SUP_mult_left_ennreal: "c * (SUP i:I. f i) = (SUP i:I. c * f i ::ennreal)" +lemma SUP_mult_left_ennreal: "c * (SUP i\I. f i) = (SUP i\I. c * f i ::ennreal)" proof cases assume "I \ {}" then show ?thesis by transfer (auto simp add: SUP_ereal_mult_left max_absorb2 SUP_upper2) qed (simp add: bot_ennreal) -lemma SUP_mult_right_ennreal: "(SUP i:I. f i) * c = (SUP i:I. f i * c ::ennreal)" +lemma SUP_mult_right_ennreal: "(SUP i\I. f i) * c = (SUP i\I. f i * c ::ennreal)" using SUP_mult_left_ennreal by (simp add: mult.commute) -lemma SUP_divide_ennreal: "(SUP i:I. f i) / c = (SUP i:I. f i / c ::ennreal)" +lemma SUP_divide_ennreal: "(SUP i\I. f i) / c = (SUP i\I. f i / c ::ennreal)" using SUP_mult_right_ennreal by (simp add: divide_ennreal_def) lemma ennreal_SUP_of_nat_eq_top: "(SUP x. of_nat x :: ennreal) = top" @@ -1442,9 +1442,9 @@ lemma ennreal_SUP_eq_top: fixes f :: "'a \ ennreal" assumes "\n. \i\I. of_nat n \ f i" - shows "(SUP i : I. f i) = top" + shows "(SUP i \ I. f i) = top" proof - - have "(SUP x. of_nat x :: ennreal) \ (SUP i : I. f i)" + have "(SUP x. of_nat x :: ennreal) \ (SUP i \ I. f i)" using assms by (auto intro!: SUP_least intro: SUP_upper2) then show ?thesis by (auto simp: ennreal_SUP_of_nat_eq_top top_unique) @@ -1452,19 +1452,19 @@ lemma ennreal_INF_const_minus: fixes f :: "'a \ ennreal" - shows "I \ {} \ (SUP x:I. c - f x) = c - (INF x:I. f x)" + shows "I \ {} \ (SUP x\I. c - f x) = c - (INF x\I. f x)" by (transfer fixing: I) (simp add: sup_max[symmetric] SUP_sup_const1 SUP_ereal_minus_right del: sup_ereal_def) lemma of_nat_Sup_ennreal: assumes "A \ {}" "bdd_above A" - shows "of_nat (Sup A) = (SUP a:A. of_nat a :: ennreal)" + shows "of_nat (Sup A) = (SUP a\A. of_nat a :: ennreal)" proof (intro antisym) - show "(SUP a:A. of_nat a::ennreal) \ of_nat (Sup A)" + show "(SUP a\A. of_nat a::ennreal) \ of_nat (Sup A)" by (intro SUP_least of_nat_mono) (auto intro: cSup_upper assms) have "Sup A \ A" unfolding Sup_nat_def using assms by (intro Max_in) (auto simp: bdd_above_nat) - then show "of_nat (Sup A) \ (SUP a:A. of_nat a::ennreal)" + then show "of_nat (Sup A) \ (SUP a\A. of_nat a::ennreal)" by (intro SUP_upper) qed @@ -1601,18 +1601,18 @@ lemma SUP_sup_continuous_ennreal: fixes f :: "ennreal \ 'a::complete_lattice" assumes f: "sup_continuous f" and "I \ {}" - shows "(SUP i:I. f (g i)) = f (SUP i:I. g i)" + shows "(SUP i\I. f (g i)) = f (SUP i\I. g i)" proof (rule antisym) - show "(SUP i:I. f (g i)) \ f (SUP i:I. g i)" + show "(SUP i\I. f (g i)) \ f (SUP i\I. g i)" by (rule mono_SUP[OF sup_continuous_mono[OF f]]) from ennreal_Sup_countable_SUP[of "g`I"] \I \ {}\ - obtain M :: "nat \ ennreal" where "incseq M" and M: "range M \ g ` I" and eq: "(SUP i : I. g i) = (SUP i. M i)" + obtain M :: "nat \ ennreal" where "incseq M" and M: "range M \ g ` I" and eq: "(SUP i \ I. g i) = (SUP i. M i)" by auto - have "f (SUP i : I. g i) = (SUP i : range M. f i)" + have "f (SUP i \ I. g i) = (SUP i \ range M. f i)" unfolding eq sup_continuousD[OF f \mono M\] by simp - also have "\ \ (SUP i : I. f (g i))" + also have "\ \ (SUP i \ I. f (g i))" by (insert M, drule SUP_subset_mono) auto - finally show "f (SUP i : I. g i) \ (SUP i : I. f (g i))" . + finally show "f (SUP i \ I. g i) \ (SUP i \ I. f (g i))" . qed lemma ennreal_suminf_SUP_eq: @@ -1625,7 +1625,7 @@ lemma ennreal_SUP_add_left: fixes c :: ennreal - shows "I \ {} \ (SUP i:I. f i + c) = (SUP i:I. f i) + c" + shows "I \ {} \ (SUP i\I. f i + c) = (SUP i\I. f i) + c" apply transfer apply (simp add: SUP_ereal_add_left) apply (subst (1 2) max.absorb2) @@ -1634,7 +1634,7 @@ lemma ennreal_SUP_const_minus: (* TODO: rename: ennreal_SUP_const_minus *) fixes f :: "'a \ ennreal" - shows "I \ {} \ c < top \ (INF x:I. c - f x) = c - (SUP x:I. f x)" + shows "I \ {} \ c < top \ (INF x\I. c - f x) = c - (SUP x\I. f x)" apply (transfer fixing: I) unfolding ex_in_conv[symmetric] apply (auto simp add: sup_max[symmetric] SUP_upper2 sup_absorb2 @@ -1648,11 +1648,11 @@ lemma INF_approx_ennreal: fixes x::ennreal and e::real assumes "e > 0" - assumes INF: "x = (INF i : A. f i)" + assumes INF: "x = (INF i \ A. f i)" assumes "x \ \" shows "\i \ A. f i < x + e" proof - - have "(INF i : A. f i) < x + e" + have "(INF i \ A. f i) < x + e" unfolding INF[symmetric] using \0 \x \ \\ by (cases x) auto then show ?thesis unfolding INF_less_iff . @@ -1661,13 +1661,13 @@ lemma SUP_approx_ennreal: fixes x::ennreal and e::real assumes "e > 0" "A \ {}" - assumes SUP: "x = (SUP i : A. f i)" + assumes SUP: "x = (SUP i \ A. f i)" assumes "x \ \" shows "\i \ A. x < f i + e" proof - have "x < x + e" using \0 \x \ \\ by (cases x) auto - also have "x + e = (SUP i : A. f i + e)" + also have "x + e = (SUP i \ A. f i + e)" unfolding SUP ennreal_SUP_add_left[OF \A \ {}\] .. finally show ?thesis unfolding less_SUP_iff . @@ -1677,17 +1677,17 @@ fixes x::ennreal assumes f_bound: "\i. i \ A \ f i \ x" assumes approx: "\e. (e::real) > 0 \ \i \ A. x \ f i + e" - shows "x = (SUP i : A. f i)" + shows "x = (SUP i \ A. f i)" proof (rule antisym) - show "x \ (SUP i:A. f i)" + show "x \ (SUP i\A. f i)" proof (rule ennreal_le_epsilon) fix e :: real assume "0 < e" from approx[OF this] guess i .. then have "x \ f i + e" by simp - also have "\ \ (SUP i:A. f i) + e" + also have "\ \ (SUP i\A. f i) + e" by (intro add_mono \i \ A\ SUP_upper order_refl) - finally show "x \ (SUP i:A. f i) + e" . + finally show "x \ (SUP i\A. f i) + e" . qed qed (intro SUP_least f_bound) @@ -1695,17 +1695,17 @@ fixes x::ennreal assumes f_bound: "\i. i \ A \ x \ f i" assumes approx: "\e. (e::real) > 0 \ \i \ A. f i \ x + e" - shows "x = (INF i : A. f i)" + shows "x = (INF i \ A. f i)" proof (rule antisym) - show "(INF i:A. f i) \ x" + show "(INF i\A. f i) \ x" proof (rule ennreal_le_epsilon) fix e :: real assume "0 < e" from approx[OF this] guess i .. note i = this - then have "(INF i:A. f i) \ f i" + then have "(INF i\A. f i) \ f i" by (intro INF_lower) also have "\ \ x + e" by fact - finally show "(INF i:A. f i) \ x + e" . + finally show "(INF i\A. f i) \ x + e" . qed qed (intro INF_greatest f_bound) @@ -1786,7 +1786,7 @@ by (cases "0 \ x") (auto simp: ennreal_neg ennreal_less_iff simp flip: ennreal_1) lemma SUP_const_minus_ennreal: - fixes f :: "'a \ ennreal" shows "I \ {} \ (SUP x:I. c - f x) = c - (INF x:I. f x)" + fixes f :: "'a \ ennreal" shows "I \ {} \ (SUP x\I. c - f x) = c - (INF x\I. f x)" including ennreal.lifting by (transfer fixing: I) (simp add: SUP_sup_distrib[symmetric] SUP_ereal_minus_right @@ -1929,18 +1929,18 @@ done lemma SUP_diff_ennreal: - "c < top \ (SUP i:I. f i - c :: ennreal) = (SUP i:I. f i) - c" + "c < top \ (SUP i\I. f i - c :: ennreal) = (SUP i\I. f i) - c" by (auto intro!: SUP_eqI ennreal_minus_mono SUP_least intro: SUP_upper simp: ennreal_minus_cancel_iff ennreal_minus_le_iff less_top[symmetric]) lemma ennreal_SUP_add_right: - fixes c :: ennreal shows "I \ {} \ c + (SUP i:I. f i) = (SUP i:I. c + f i)" + fixes c :: ennreal shows "I \ {} \ c + (SUP i\I. f i) = (SUP i\I. c + f i)" using ennreal_SUP_add_left[of I f c] by (simp add: add.commute) lemma SUP_add_directed_ennreal: fixes f g :: "_ \ ennreal" assumes directed: "\i j. i \ I \ j \ I \ \k\I. f i + g j \ f k + g k" - shows "(SUP i:I. f i + g i) = (SUP i:I. f i) + (SUP i:I. g i)" + shows "(SUP i\I. f i + g i) = (SUP i\I. f i) + (SUP i\I. g i)" proof cases assume "I = {}" then show ?thesis by (simp add: bot_ereal_def) @@ -1948,16 +1948,16 @@ assume "I \ {}" show ?thesis proof (rule antisym) - show "(SUP i:I. f i + g i) \ (SUP i:I. f i) + (SUP i:I. g i)" + show "(SUP i\I. f i + g i) \ (SUP i\I. f i) + (SUP i\I. g i)" by (rule SUP_least; intro add_mono SUP_upper) next - have "(SUP i:I. f i) + (SUP i:I. g i) = (SUP i:I. f i + (SUP i:I. g i))" + have "(SUP i\I. f i) + (SUP i\I. g i) = (SUP i\I. f i + (SUP i\I. g i))" by (intro ennreal_SUP_add_left[symmetric] \I \ {}\) - also have "\ = (SUP i:I. (SUP j:I. f i + g j))" + also have "\ = (SUP i\I. (SUP j\I. f i + g j))" by (intro SUP_cong refl ennreal_SUP_add_right \I \ {}\) - also have "\ \ (SUP i:I. f i + g i)" + also have "\ \ (SUP i\I. f i + g i)" using directed by (intro SUP_least) (blast intro: SUP_upper2) - finally show "(SUP i:I. f i) + (SUP i:I. g i) \ (SUP i:I. f i + g i)" . + finally show "(SUP i\I. f i) + (SUP i\I. g i) \ (SUP i\I. f i + g i)" . qed qed diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Extended_Real.thy --- a/src/HOL/Library/Extended_Real.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Extended_Real.thy Thu Nov 08 09:11:52 2018 +0100 @@ -2149,23 +2149,23 @@ unfolding continuous_def by auto lemma ereal_Sup: - assumes *: "\SUP a:A. ereal a\ \ \" - shows "ereal (Sup A) = (SUP a:A. ereal a)" + assumes *: "\SUP a\A. ereal a\ \ \" + shows "ereal (Sup A) = (SUP a\A. ereal a)" proof (rule continuous_at_Sup_mono) - obtain r where r: "ereal r = (SUP a:A. ereal a)" "A \ {}" + obtain r where r: "ereal r = (SUP a\A. ereal a)" "A \ {}" using * by (force simp: bot_ereal_def) then show "bdd_above A" "A \ {}" by (auto intro!: SUP_upper bdd_aboveI[of _ r] simp flip: ereal_less_eq) qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ereal) -lemma ereal_SUP: "\SUP a:A. ereal (f a)\ \ \ \ ereal (SUP a:A. f a) = (SUP a:A. ereal (f a))" +lemma ereal_SUP: "\SUP a\A. ereal (f a)\ \ \ \ ereal (SUP a\A. f a) = (SUP a\A. ereal (f a))" using ereal_Sup[of "f`A"] by auto lemma ereal_Inf: - assumes *: "\INF a:A. ereal a\ \ \" - shows "ereal (Inf A) = (INF a:A. ereal a)" + assumes *: "\INF a\A. ereal a\ \ \" + shows "ereal (Inf A) = (INF a\A. ereal a)" proof (rule continuous_at_Inf_mono) - obtain r where r: "ereal r = (INF a:A. ereal a)" "A \ {}" + obtain r where r: "ereal r = (INF a\A. ereal a)" "A \ {}" using * by (force simp: top_ereal_def) then show "bdd_below A" "A \ {}" by (auto intro!: INF_lower bdd_belowI[of _ r] simp flip: ereal_less_eq) @@ -2173,17 +2173,17 @@ lemma ereal_Inf': assumes *: "bdd_below A" "A \ {}" - shows "ereal (Inf A) = (INF a:A. ereal a)" + shows "ereal (Inf A) = (INF a\A. ereal a)" proof (rule ereal_Inf) from * obtain l u where "x \ A \ l \ x" "u \ A" for x by (auto simp: bdd_below_def) - then have "l \ (INF x:A. ereal x)" "(INF x:A. ereal x) \ u" + then have "l \ (INF x\A. ereal x)" "(INF x\A. ereal x) \ u" by (auto intro!: INF_greatest INF_lower) - then show "\INF a:A. ereal a\ \ \" + then show "\INF a\A. ereal a\ \ \" by auto qed -lemma ereal_INF: "\INF a:A. ereal (f a)\ \ \ \ ereal (INF a:A. f a) = (INF a:A. ereal (f a))" +lemma ereal_INF: "\INF a\A. ereal (f a)\ \ \ \ ereal (INF a\A. f a) = (INF a\A. ereal (f a))" using ereal_Inf[of "f`A"] by auto lemma ereal_Sup_uminus_image_eq: "Sup (uminus ` S::ereal set) = - Inf S" @@ -2193,7 +2193,7 @@ lemma ereal_SUP_uminus_eq: fixes f :: "'a \ ereal" - shows "(SUP x:S. uminus (f x)) = - (INF x:S. f x)" + shows "(SUP x\S. uminus (f x)) = - (INF x\S. f x)" using ereal_Sup_uminus_image_eq [of "f ` S"] by (simp add: comp_def) lemma ereal_inj_on_uminus[intro, simp]: "inj_on uminus (A :: ereal set)" @@ -2204,12 +2204,12 @@ lemma ereal_INF_uminus_eq: fixes f :: "'a \ ereal" - shows "(INF x:S. - f x) = - (SUP x:S. f x)" + shows "(INF x\S. - f x) = - (SUP x\S. f x)" using ereal_Inf_uminus_image_eq [of "f ` S"] by (simp add: comp_def) lemma ereal_SUP_uminus: fixes f :: "'a \ ereal" - shows "(SUP i : R. - f i) = - (INF i : R. f i)" + shows "(SUP i \ R. - f i) = - (INF i \ R. f i)" using ereal_Sup_uminus_image_eq[of "f`R"] by (simp add: image_image) @@ -2278,17 +2278,17 @@ qed lemma SUP_PInfty: - "(\n::nat. \i\A. ereal (real n) \ f i) \ (SUP i:A. f i :: ereal) = \" + "(\n::nat. \i\A. ereal (real n) \ f i) \ (SUP i\A. f i :: ereal) = \" unfolding top_ereal_def[symmetric] SUP_eq_top_iff by (metis MInfty_neq_PInfty(2) PInfty_neq_ereal(2) less_PInf_Ex_of_nat less_ereal.elims(2) less_le_trans) -lemma SUP_nat_Infty: "(SUP i::nat. ereal (real i)) = \" +lemma SUP_nat_Infty: "(SUP i. ereal (real i)) = \" by (rule SUP_PInfty) auto lemma SUP_ereal_add_left: assumes "I \ {}" "c \ -\" - shows "(SUP i:I. f i + c :: ereal) = (SUP i:I. f i) + c" -proof (cases "(SUP i:I. f i) = - \") + shows "(SUP i\I. f i + c :: ereal) = (SUP i\I. f i) + c" +proof (cases "(SUP i\I. f i) = - \") case True then have "\i. i \ I \ f i = -\" unfolding Sup_eq_MInfty by auto @@ -2303,23 +2303,23 @@ lemma SUP_ereal_add_right: fixes c :: ereal - shows "I \ {} \ c \ -\ \ (SUP i:I. c + f i) = c + (SUP i:I. f i)" + shows "I \ {} \ c \ -\ \ (SUP i\I. c + f i) = c + (SUP i\I. f i)" using SUP_ereal_add_left[of I c f] by (simp add: add.commute) lemma SUP_ereal_minus_right: assumes "I \ {}" "c \ -\" - shows "(SUP i:I. c - f i :: ereal) = c - (INF i:I. f i)" + shows "(SUP i\I. c - f i :: ereal) = c - (INF i\I. f i)" using SUP_ereal_add_right[OF assms, of "\i. - f i"] by (simp add: ereal_SUP_uminus minus_ereal_def) lemma SUP_ereal_minus_left: assumes "I \ {}" "c \ \" - shows "(SUP i:I. f i - c:: ereal) = (SUP i:I. f i) - c" + shows "(SUP i\I. f i - c:: ereal) = (SUP i\I. f i) - c" using SUP_ereal_add_left[OF \I \ {}\, of "-c" f] by (simp add: \c \ \\ minus_ereal_def) lemma INF_ereal_minus_right: assumes "I \ {}" and "\c\ \ \" - shows "(INF i:I. c - f i) = c - (SUP i:I. f i::ereal)" + shows "(INF i\I. c - f i) = c - (SUP i\I. f i::ereal)" proof - { fix b have "(-c) + b = - (c - b)" using \\c\ \ \\ by (cases c b rule: ereal2_cases) auto } @@ -2339,7 +2339,7 @@ lemma SUP_combine: fixes f :: "'a::semilattice_sup \ 'a::semilattice_sup \ 'b::complete_lattice" assumes mono: "\a b c d. a \ b \ c \ d \ f a c \ f b d" - shows "(SUP i:UNIV. SUP j:UNIV. f i j) = (SUP i. f i i)" + shows "(SUP i\UNIV. SUP j\UNIV. f i j) = (SUP i. f i i)" proof (rule antisym) show "(SUP i j. f i j) \ (SUP i. f i i)" by (rule SUP_least SUP_upper2[where i="sup i j" for i j] UNIV_I mono sup_ge1 sup_ge2)+ @@ -2360,14 +2360,14 @@ apply (rule SUP_combine[symmetric] add_mono inc[THEN monoD] | assumption)+ done -lemma INF_eq_minf: "(INF i:I. f i::ereal) \ -\ \ (\b>-\. \i\I. b \ f i)" +lemma INF_eq_minf: "(INF i\I. f i::ereal) \ -\ \ (\b>-\. \i\I. b \ f i)" unfolding bot_ereal_def[symmetric] INF_eq_bot_iff by (auto simp: not_less) lemma INF_ereal_add_left: assumes "I \ {}" "c \ -\" "\x. x \ I \ 0 \ f x" - shows "(INF i:I. f i + c :: ereal) = (INF i:I. f i) + c" + shows "(INF i\I. f i + c :: ereal) = (INF i\I. f i) + c" proof - - have "(INF i:I. f i) \ -\" + have "(INF i\I. f i) \ -\" unfolding INF_eq_minf using assms by (intro exI[of _ 0]) auto then show ?thesis by (subst continuous_at_Inf_mono[where f="\x. x + c"]) @@ -2376,14 +2376,14 @@ lemma INF_ereal_add_right: assumes "I \ {}" "c \ -\" "\x. x \ I \ 0 \ f x" - shows "(INF i:I. c + f i :: ereal) = c + (INF i:I. f i)" + shows "(INF i\I. c + f i :: ereal) = c + (INF i\I. f i)" using INF_ereal_add_left[OF assms] by (simp add: ac_simps) lemma INF_ereal_add_directed: fixes f g :: "'a \ ereal" assumes nonneg: "\i. i \ I \ 0 \ f i" "\i. i \ I \ 0 \ g i" assumes directed: "\i j. i \ I \ j \ I \ \k\I. f i + g j \ f k + g k" - shows "(INF i:I. f i + g i) = (INF i:I. f i) + (INF i:I. g i)" + shows "(INF i\I. f i + g i) = (INF i\I. f i) + (INF i\I. g i)" proof cases assume "I = {}" then show ?thesis by (simp add: top_ereal_def) @@ -2391,16 +2391,16 @@ assume "I \ {}" show ?thesis proof (rule antisym) - show "(INF i:I. f i) + (INF i:I. g i) \ (INF i:I. f i + g i)" + show "(INF i\I. f i) + (INF i\I. g i) \ (INF i\I. f i + g i)" by (rule INF_greatest; intro add_mono INF_lower) next - have "(INF i:I. f i + g i) \ (INF i:I. (INF j:I. f i + g j))" + have "(INF i\I. f i + g i) \ (INF i\I. (INF j\I. f i + g j))" using directed by (intro INF_greatest) (blast intro: INF_lower2) - also have "\ = (INF i:I. f i + (INF i:I. g i))" + also have "\ = (INF i\I. f i + (INF i\I. g i))" using nonneg by (intro INF_cong refl INF_ereal_add_right \I \ {}\) (auto simp: INF_eq_minf intro!: exI[of _ 0]) - also have "\ = (INF i:I. f i) + (INF i:I. g i)" + also have "\ = (INF i\I. f i) + (INF i\I. g i)" using nonneg by (intro INF_ereal_add_left \I \ {}\) (auto simp: INF_eq_minf intro!: exI[of _ 0]) - finally show "(INF i:I. f i + g i) \ (INF i:I. f i) + (INF i:I. g i)" . + finally show "(INF i\I. f i + g i) \ (INF i\I. f i) + (INF i\I. g i)" . qed qed @@ -2454,8 +2454,8 @@ fixes f :: "'a \ ereal" assumes "I \ {}" assumes f: "\i. i \ I \ 0 \ f i" and c: "0 \ c" - shows "(SUP i:I. c * f i) = c * (SUP i:I. f i)" -proof (cases "(SUP i: I. f i) = 0") + shows "(SUP i\I. c * f i) = c * (SUP i\I. f i)" +proof (cases "(SUP i \ I. f i) = 0") case True then have "\i. i \ I \ f i = 0" by (metis SUP_upper f antisym) @@ -2595,9 +2595,9 @@ by(cases n) simp_all lemma ereal_of_enat_Sup: - assumes "A \ {}" shows "ereal_of_enat (Sup A) = (SUP a : A. ereal_of_enat a)" + assumes "A \ {}" shows "ereal_of_enat (Sup A) = (SUP a \ A. ereal_of_enat a)" proof (intro antisym mono_Sup) - show "ereal_of_enat (Sup A) \ (SUP a : A. ereal_of_enat a)" + show "ereal_of_enat (Sup A) \ (SUP a \ A. ereal_of_enat a)" proof cases assume "finite A" with \A \ {}\ obtain a where "a \ A" "ereal_of_enat (Sup A) = ereal_of_enat a" @@ -2606,7 +2606,7 @@ by (auto intro: SUP_upper) next assume "\ finite A" - have [simp]: "(SUP a : A. ereal_of_enat a) = top" + have [simp]: "(SUP a \ A. ereal_of_enat a) = top" unfolding SUP_eq_top_iff proof safe fix x :: ereal assume "x < top" @@ -2626,7 +2626,7 @@ qed (simp add: mono_def) lemma ereal_of_enat_SUP: - "A \ {} \ ereal_of_enat (SUP a:A. f a) = (SUP a : A. ereal_of_enat (f a))" + "A \ {} \ ereal_of_enat (SUP a\A. f a) = (SUP a \ A. ereal_of_enat (f a))" using ereal_of_enat_Sup[of "f`A"] by auto subsection "Limits on @{typ ereal}" @@ -3225,43 +3225,43 @@ let ?INF = "\P g. INFIMUM (Collect P) g" show "?F \ {}" by (auto intro: eventually_True) - show "(SUP P:?F. ?INF P g) \ - \" + show "(SUP P\?F. ?INF P g) \ - \" unfolding bot_ereal_def[symmetric] SUP_bot_conv INF_eq_bot_iff by (auto intro!: exI[of _ 0] ev simp: bot_ereal_def) - have "(SUP P:?F. ?INF P f + (SUP P:?F. ?INF P g)) \ (SUP P:?F. (SUP P':?F. ?INF P f + ?INF P' g))" + have "(SUP P\?F. ?INF P f + (SUP P\?F. ?INF P g)) \ (SUP P\?F. (SUP P'\?F. ?INF P f + ?INF P' g))" proof (safe intro!: SUP_mono bexI[of _ "\x. P x \ 0 \ f x" for P]) fix P let ?P' = "\x. P x \ 0 \ f x" assume "eventually P F" with ev show "eventually ?P' F" by eventually_elim auto - have "?INF P f + (SUP P:?F. ?INF P g) \ ?INF ?P' f + (SUP P:?F. ?INF P g)" + have "?INF P f + (SUP P\?F. ?INF P g) \ ?INF ?P' f + (SUP P\?F. ?INF P g)" by (intro add_mono INF_mono) auto - also have "\ = (SUP P':?F. ?INF ?P' f + ?INF P' g)" + also have "\ = (SUP P'\?F. ?INF ?P' f + ?INF P' g)" proof (rule SUP_ereal_add_right[symmetric]) show "INFIMUM {x. P x \ 0 \ f x} f \ - \" unfolding bot_ereal_def[symmetric] INF_eq_bot_iff by (auto intro!: exI[of _ 0] ev simp: bot_ereal_def) qed fact - finally show "?INF P f + (SUP P:?F. ?INF P g) \ (SUP P':?F. ?INF ?P' f + ?INF P' g)" . + finally show "?INF P f + (SUP P\?F. ?INF P g) \ (SUP P'\?F. ?INF ?P' f + ?INF P' g)" . qed - also have "\ \ (SUP P:?F. INF x:Collect P. f x + g x)" + also have "\ \ (SUP P\?F. INF x\Collect P. f x + g x)" proof (safe intro!: SUP_least) fix P Q assume *: "eventually P F" "eventually Q F" - show "?INF P f + ?INF Q g \ (SUP P:?F. INF x:Collect P. f x + g x)" + show "?INF P f + ?INF Q g \ (SUP P\?F. INF x\Collect P. f x + g x)" proof (rule SUP_upper2) show "(\x. P x \ Q x) \ ?F" using * by (auto simp: eventually_conj) - show "?INF P f + ?INF Q g \ (INF x:{x. P x \ Q x}. f x + g x)" + show "?INF P f + ?INF Q g \ (INF x\{x. P x \ Q x}. f x + g x)" by (intro INF_greatest add_mono) (auto intro: INF_lower) qed qed - finally show "(SUP P:?F. ?INF P f + (SUP P:?F. ?INF P g)) \ (SUP P:?F. INF x:Collect P. f x + g x)" . + finally show "(SUP P\?F. ?INF P f + (SUP P\?F. ?INF P g)) \ (SUP P\?F. INF x\Collect P. f x + g x)" . qed lemma Sup_ereal_mult_right': assumes nonempty: "Y \ {}" and x: "x \ 0" - shows "(SUP i:Y. f i) * ereal x = (SUP i:Y. f i * ereal x)" (is "?lhs = ?rhs") + shows "(SUP i\Y. f i) * ereal x = (SUP i\Y. f i * ereal x)" (is "?lhs = ?rhs") proof(cases "x = 0") case True thus ?thesis by(auto simp add: nonempty zero_ereal_def[symmetric]) next @@ -3271,8 +3271,8 @@ show "?rhs \ ?lhs" by(rule SUP_least)(simp add: ereal_mult_right_mono SUP_upper x) next - have "?lhs / ereal x = (SUP i:Y. f i) * (ereal x / ereal x)" by(simp only: ereal_times_divide_eq) - also have "\ = (SUP i:Y. f i)" using False by simp + have "?lhs / ereal x = (SUP i\Y. f i) * (ereal x / ereal x)" by(simp only: ereal_times_divide_eq) + also have "\ = (SUP i\Y. f i)" using False by simp also have "\ \ ?rhs / x" proof(rule SUP_least) fix i @@ -3292,7 +3292,7 @@ qed lemma Sup_ereal_mult_left': - "\ Y \ {}; x \ 0 \ \ ereal x * (SUP i:Y. f i) = (SUP i:Y. ereal x * f i)" + "\ Y \ {}; x \ 0 \ \ ereal x * (SUP i\Y. f i) = (SUP i\Y. ereal x * f i)" by(subst (1 2) mult.commute)(rule Sup_ereal_mult_right') lemma sup_continuous_add[order_continuous_intros]: @@ -3676,7 +3676,7 @@ fixes f g :: "'a \ ereal" assumes nonneg: "\i. i \ I \ 0 \ f i" "\i. i \ I \ 0 \ g i" assumes directed: "\i j. i \ I \ j \ I \ \k\I. f i + g j \ f k + g k" - shows "(SUP i:I. f i + g i) = (SUP i:I. f i) + (SUP i:I. g i)" + shows "(SUP i\I. f i + g i) = (SUP i\I. f i) + (SUP i\I. g i)" proof cases assume "I = {}" then show ?thesis by (simp add: bot_ereal_def) @@ -3684,18 +3684,18 @@ assume "I \ {}" show ?thesis proof (rule antisym) - show "(SUP i:I. f i + g i) \ (SUP i:I. f i) + (SUP i:I. g i)" + show "(SUP i\I. f i + g i) \ (SUP i\I. f i) + (SUP i\I. g i)" by (rule SUP_least; intro add_mono SUP_upper) next - have "bot < (SUP i:I. g i)" + have "bot < (SUP i\I. g i)" using \I \ {}\ nonneg(2) by (auto simp: bot_ereal_def less_SUP_iff) - then have "(SUP i:I. f i) + (SUP i:I. g i) = (SUP i:I. f i + (SUP i:I. g i))" + then have "(SUP i\I. f i) + (SUP i\I. g i) = (SUP i\I. f i + (SUP i\I. g i))" by (intro SUP_ereal_add_left[symmetric] \I \ {}\) auto - also have "\ = (SUP i:I. (SUP j:I. f i + g j))" + also have "\ = (SUP i\I. (SUP j\I. f i + g j))" using nonneg(1) by (intro SUP_cong refl SUP_ereal_add_right[symmetric] \I \ {}\) auto - also have "\ \ (SUP i:I. f i + g i)" + also have "\ \ (SUP i\I. f i + g i)" using directed by (intro SUP_least) (blast intro: SUP_upper2) - finally show "(SUP i:I. f i) + (SUP i:I. g i) \ (SUP i:I. f i + g i)" . + finally show "(SUP i\I. f i) + (SUP i\I. g i) \ (SUP i\I. f i + g i)" . qed qed @@ -3704,12 +3704,12 @@ assumes "I \ {}" assumes directed: "\N i j. N \ A \ i \ I \ j \ I \ \k\I. \n\N. f n i \ f n k \ f n j \ f n k" assumes nonneg: "\n i. i \ I \ n \ A \ 0 \ f n i" - shows "(SUP i:I. \n\A. f n i) = (\n\A. SUP i:I. f n i)" + shows "(SUP i\I. \n\A. f n i) = (\n\A. SUP i\I. f n i)" proof - - have "N \ A \ (SUP i:I. \n\N. f n i) = (\n\N. SUP i:I. f n i)" for N + have "N \ A \ (SUP i\I. \n\N. f n i) = (\n\N. SUP i\I. f n i)" for N proof (induction N rule: infinite_finite_induct) case (insert n N) - moreover have "(SUP i:I. f n i + (\l\N. f l i)) = (SUP i:I. f n i) + (SUP i:I. \l\N. f l i)" + moreover have "(SUP i\I. f n i + (\l\N. f l i)) = (SUP i\I. f n i) + (SUP i\I. \l\N. f l i)" proof (rule SUP_ereal_add_directed) fix i assume "i \ I" then show "0 \ f n i" "0 \ (\l\N. f l i)" using insert by (auto intro!: sum_nonneg nonneg) @@ -3730,11 +3730,11 @@ assumes "I \ {}" assumes directed: "\N i j. i \ I \ j \ I \ finite N \ \k\I. \n\N. f i n \ f k n \ f j n \ f k n" assumes nonneg: "\n i. 0 \ f n i" - shows "(\i. SUP n:I. f n i) = (SUP n:I. \i. f n i)" + shows "(\i. SUP n\I. f n i) = (SUP n\I. \i. f n i)" proof (subst (1 2) suminf_ereal_eq_SUP) - show "\n i. 0 \ f n i" "\i. 0 \ (SUP n:I. f n i)" + show "\n i. 0 \ f n i" "\i. 0 \ (SUP n\I. f n i)" using \I \ {}\ nonneg by (auto intro: SUP_upper2) - show "(SUP n. \iiiI. f n i) = (SUP n\I. SUP j. \i ereal" and A assumes nonneg: "\x\A. f x \ 0" and A:"A \ {}" - shows "(SUP x:A. f x) = 0 \ (\x\A. f x = 0)" (is "?lhs \ ?rhs") + shows "(SUP x\A. f x) = 0 \ (\x\A. f x = 0)" (is "?lhs \ ?rhs") proof(intro iffI ballI) fix x assume "?lhs" "x \ A" - from \x \ A\ have "f x \ (SUP x:A. f x)" by(rule SUP_upper) + from \x \ A\ have "f x \ (SUP x\A. f x)" by(rule SUP_upper) with \?lhs\ show "f x = 0" using nonneg \x \ A\ by auto qed(simp cong: SUP_cong add: A) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Finite_Lattice.thy --- a/src/HOL/Library/Finite_Lattice.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Finite_Lattice.thy Thu Nov 08 09:11:52 2018 +0100 @@ -159,12 +159,12 @@ distrib_lattice + finite_lattice_complete lemma finite_distrib_lattice_complete_sup_Inf: - "sup (x::'a::finite_distrib_lattice_complete) (Inf A) = (INF y:A. sup x y)" + "sup (x::'a::finite_distrib_lattice_complete) (Inf A) = (INF y\A. sup x y)" using finite by (induct A rule: finite_induct) (simp_all add: sup_inf_distrib1) lemma finite_distrib_lattice_complete_inf_Sup: - "inf (x::'a::finite_distrib_lattice_complete) (Sup A) = (SUP y:A. inf x y)" + "inf (x::'a::finite_distrib_lattice_complete) (Sup A) = (SUP y\A. inf x y)" using finite [of A] by induct (simp_all add: inf_sup_distrib1) context finite_distrib_lattice_complete diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Liminf_Limsup.thy --- a/src/HOL/Library/Liminf_Limsup.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Liminf_Limsup.thy Thu Nov 08 09:11:52 2018 +0100 @@ -25,13 +25,13 @@ lemma le_cSup_iff_less: fixes x :: "'a :: {conditionally_complete_linorder, dense_linorder}" - shows "A \ {} \ bdd_above (f`A) \ x \ (SUP i:A. f i) \ (\yi\A. y \ f i)" + shows "A \ {} \ bdd_above (f`A) \ x \ (SUP i\A. f i) \ (\yi\A. y \ f i)" by (simp add: le_cSUP_iff) (blast intro: less_imp_le less_trans less_le_trans dest: dense) lemma le_Sup_iff_less: fixes x :: "'a :: {complete_linorder, dense_linorder}" - shows "x \ (SUP i:A. f i) \ (\yi\A. y \ f i)" (is "?lhs = ?rhs") + shows "x \ (SUP i\A. f i) \ (\yi\A. y \ f i)" (is "?lhs = ?rhs") unfolding le_SUP_iff by (blast intro: less_imp_le less_trans less_le_trans dest: dense) @@ -51,38 +51,38 @@ lemma cInf_le_iff_less: fixes x :: "'a :: {conditionally_complete_linorder, dense_linorder}" - shows "A \ {} \ bdd_below (f`A) \ (INF i:A. f i) \ x \ (\y>x. \i\A. f i \ y)" + shows "A \ {} \ bdd_below (f`A) \ (INF i\A. f i) \ x \ (\y>x. \i\A. f i \ y)" by (simp add: cINF_le_iff) (blast intro: less_imp_le less_trans le_less_trans dest: dense) lemma Inf_le_iff_less: fixes x :: "'a :: {complete_linorder, dense_linorder}" - shows "(INF i:A. f i) \ x \ (\y>x. \i\A. f i \ y)" + shows "(INF i\A. f i) \ x \ (\y>x. \i\A. f i \ y)" unfolding INF_le_iff by (blast intro: less_imp_le less_trans le_less_trans dest: dense) lemma SUP_pair: fixes f :: "_ \ _ \ _ :: complete_lattice" - shows "(SUP i : A. SUP j : B. f i j) = (SUP p : A \ B. f (fst p) (snd p))" + shows "(SUP i \ A. SUP j \ B. f i j) = (SUP p \ A \ B. f (fst p) (snd p))" by (rule antisym) (auto intro!: SUP_least SUP_upper2) lemma INF_pair: fixes f :: "_ \ _ \ _ :: complete_lattice" - shows "(INF i : A. INF j : B. f i j) = (INF p : A \ B. f (fst p) (snd p))" + shows "(INF i \ A. INF j \ B. f i j) = (INF p \ A \ B. f (fst p) (snd p))" by (rule antisym) (auto intro!: INF_greatest INF_lower2) lemma INF_Sigma: fixes f :: "_ \ _ \ _ :: complete_lattice" - shows "(INF i : A. INF j : B i. f i j) = (INF p : Sigma A B. f (fst p) (snd p))" + shows "(INF i \ A. INF j \ B i. f i j) = (INF p \ Sigma A B. f (fst p) (snd p))" by (rule antisym) (auto intro!: INF_greatest INF_lower2) subsubsection \\Liminf\ and \Limsup\\ definition Liminf :: "'a filter \ ('a \ 'b) \ 'b :: complete_lattice" where - "Liminf F f = (SUP P:{P. eventually P F}. INF x:{x. P x}. f x)" + "Liminf F f = (SUP P\{P. eventually P F}. INF x\{x. P x}. f x)" definition Limsup :: "'a filter \ ('a \ 'b) \ 'b :: complete_lattice" where - "Limsup F f = (INF P:{P. eventually P F}. SUP x:{x. P x}. f x)" + "Limsup F f = (INF P\{P. eventually P F}. SUP x\{x. P x}. f x)" abbreviation "liminf \ Liminf sequentially" @@ -98,11 +98,11 @@ (\y. (\P. eventually P F \ y \ SUPREMUM (Collect P) f) \ y \ x) \ Limsup F f = x" unfolding Limsup_def by (auto intro!: INF_eqI) -lemma liminf_SUP_INF: "liminf f = (SUP n. INF m:{n..}. f m)" +lemma liminf_SUP_INF: "liminf f = (SUP n. INF m\{n..}. f m)" unfolding Liminf_def eventually_sequentially by (rule SUP_eq) (auto simp: atLeast_def intro!: INF_mono) -lemma limsup_INF_SUP: "limsup f = (INF n. SUP m:{n..}. f m)" +lemma limsup_INF_SUP: "limsup f = (INF n. SUP m\{n..}. f m)" unfolding Limsup_def eventually_sequentially by (rule INF_eq) (auto simp: atLeast_def intro!: SUP_mono) @@ -111,7 +111,7 @@ shows "Limsup F (\x. c) = c" proof - have *: "\P. Ex P \ P \ (\x. False)" by auto - have "\P. eventually P F \ (SUP x : {x. P x}. c) = c" + have "\P. eventually P F \ (SUP x \ {x. P x}. c) = c" using ntriv by (intro SUP_const) (auto simp: eventually_False *) then show ?thesis unfolding Limsup_def using eventually_True @@ -124,7 +124,7 @@ shows "Liminf F (\x. c) = c" proof - have *: "\P. Ex P \ P \ (\x. False)" by auto - have "\P. eventually P F \ (INF x : {x. P x}. c) = c" + have "\P. eventually P F \ (INF x \ {x. P x}. c) = c" using ntriv by (intro INF_const) (auto simp: eventually_False *) then show ?thesis unfolding Liminf_def using eventually_True @@ -387,7 +387,7 @@ assumes "strict_mono r" shows "liminf X \ liminf (X \ r) " proof- - have "\n. (INF m:{n..}. X m) \ (INF m:{n..}. (X \ r) m)" + have "\n. (INF m\{n..}. X m) \ (INF m\{n..}. (X \ r) m)" proof (safe intro!: INF_mono) fix n m :: nat assume "n \ m" then show "\ma\{n..}. X ma \ (X \ r) m" using seq_suble[OF \strict_mono r\, of m] by (intro bexI[of _ "r m"]) auto @@ -400,7 +400,7 @@ assumes "strict_mono r" shows "limsup (X \ r) \ limsup X" proof- - have "(SUP m:{n..}. (X \ r) m) \ (SUP m:{n..}. X m)" for n + have "(SUP m\{n..}. (X \ r) m) \ (SUP m\{n..}. X m)" for n proof (safe intro!: SUP_mono) fix m :: nat assume "n \ m" @@ -431,11 +431,11 @@ qed } note * = this - have "f (Liminf F g) = (SUP P : {P. eventually P F}. f (Inf (g ` Collect P)))" + have "f (Liminf F g) = (SUP P \ {P. eventually P F}. f (Inf (g ` Collect P)))" unfolding Liminf_def by (subst continuous_at_Sup_mono[OF am continuous_on_imp_continuous_within[OF c]]) (auto intro: eventually_True) - also have "\ = (SUP P : {P. eventually P F}. INFIMUM (g ` Collect P) f)" + also have "\ = (SUP P \ {P. eventually P F}. INFIMUM (g ` Collect P) f)" by (intro SUP_cong refl continuous_at_Inf_mono[OF am continuous_on_imp_continuous_within[OF c]]) (auto dest!: eventually_happens simp: F) finally show ?thesis by (auto simp: Liminf_def) @@ -456,11 +456,11 @@ qed } note * = this - have "f (Limsup F g) = (INF P : {P. eventually P F}. f (Sup (g ` Collect P)))" + have "f (Limsup F g) = (INF P \ {P. eventually P F}. f (Sup (g ` Collect P)))" unfolding Limsup_def by (subst continuous_at_Inf_mono[OF am continuous_on_imp_continuous_within[OF c]]) (auto intro: eventually_True) - also have "\ = (INF P : {P. eventually P F}. SUPREMUM (g ` Collect P) f)" + also have "\ = (INF P \ {P. eventually P F}. SUPREMUM (g ` Collect P) f)" by (intro INF_cong refl continuous_at_Sup_mono[OF am continuous_on_imp_continuous_within[OF c]]) (auto dest!: eventually_happens simp: F) finally show ?thesis by (auto simp: Limsup_def) @@ -480,11 +480,11 @@ with \eventually P F\ F show False by auto qed - have "f (Limsup F g) = (SUP P : {P. eventually P F}. f (Sup (g ` Collect P)))" + have "f (Limsup F g) = (SUP P \ {P. eventually P F}. f (Sup (g ` Collect P)))" unfolding Limsup_def by (subst continuous_at_Inf_antimono[OF am continuous_on_imp_continuous_within[OF c]]) (auto intro: eventually_True) - also have "\ = (SUP P : {P. eventually P F}. INFIMUM (g ` Collect P) f)" + also have "\ = (SUP P \ {P. eventually P F}. INFIMUM (g ` Collect P) f)" by (intro SUP_cong refl continuous_at_Sup_antimono[OF am continuous_on_imp_continuous_within[OF c]]) (auto dest!: eventually_happens simp: F) finally show ?thesis @@ -506,11 +506,11 @@ qed } note * = this - have "f (Liminf F g) = (INF P : {P. eventually P F}. f (Inf (g ` Collect P)))" + have "f (Liminf F g) = (INF P \ {P. eventually P F}. f (Inf (g ` Collect P)))" unfolding Liminf_def by (subst continuous_at_Sup_antimono[OF am continuous_on_imp_continuous_within[OF c]]) (auto intro: eventually_True) - also have "\ = (INF P : {P. eventually P F}. SUPREMUM (g ` Collect P) f)" + also have "\ = (INF P \ {P. eventually P F}. SUPREMUM (g ` Collect P) f)" by (intro INF_cong refl continuous_at_Inf_antimono[OF am continuous_on_imp_continuous_within[OF c]]) (auto dest!: eventually_happens simp: F) finally show ?thesis @@ -527,10 +527,10 @@ by (subst Limsup_def) (auto simp add: SUP_upper Limsup_bounded eventually_filtermap eventually_mono intro!: INF_greatest) -lemma Liminf_least: "(\P. eventually P F \ (INF x:Collect P. f x) \ x) \ Liminf F f \ x" +lemma Liminf_least: "(\P. eventually P F \ (INF x\Collect P. f x) \ x) \ Liminf F f \ x" by (auto intro!: SUP_least simp: Liminf_def) -lemma Limsup_greatest: "(\P. eventually P F \ x \ (SUP x:Collect P. f x)) \ Limsup F f \ x" +lemma Limsup_greatest: "(\P. eventually P F \ x \ (SUP x\Collect P. f x)) \ Limsup F f \ x" by (auto intro!: INF_greatest simp: Limsup_def) lemma Liminf_filtermap_ge: "inj f \ Liminf (filtermap f F) g \ Liminf F (\x. g (f x))" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Multiset.thy Thu Nov 08 09:11:52 2018 +0100 @@ -1035,7 +1035,7 @@ ultimately have "finite {i. Inf ((\f. f i) ` A) > 0}" by (rule finite_subset) with False show ?thesis by simp qed simp_all - thus "(\i. if A = {} then 0 else INF f:A. f i) \ multiset" by (simp add: multiset_def) + thus "(\i. if A = {} then 0 else INF f\A. f i) \ multiset" by (simp add: multiset_def) qed instance .. @@ -1094,17 +1094,17 @@ lemma Sup_multiset_in_multiset: assumes "A \ {}" "subset_mset.bdd_above A" - shows "(\i. SUP X:A. count X i) \ multiset" + shows "(\i. SUP X\A. count X i) \ multiset" unfolding multiset_def proof have "{i. Sup ((\X. count X i) ` A) > 0} \ (\X\A. {i. 0 < count X i})" proof safe - fix i assume pos: "(SUP X:A. count X i) > 0" + fix i assume pos: "(SUP X\A. count X i) > 0" show "i \ (\X\A. {i. 0 < count X i})" proof (rule ccontr) assume "i \ (\X\A. {i. 0 < count X i})" hence "\X\A. count X i \ 0" by (auto simp: count_eq_zero_iff) - with assms have "(SUP X:A. count X i) \ 0" + with assms have "(SUP X\A. count X i) \ 0" by (intro cSup_least bdd_above_multiset_imp_bdd_above_count) auto with pos show False by simp qed @@ -1115,7 +1115,7 @@ lemma count_Sup_multiset_nonempty: assumes "A \ {}" "subset_mset.bdd_above A" - shows "count (Sup A) x = (SUP X:A. count X x)" + shows "count (Sup A) x = (SUP X\A. count X x)" using assms by (simp add: Sup_multiset_def Abs_multiset_inverse Sup_multiset_in_multiset) @@ -1127,7 +1127,7 @@ proof (rule mset_subset_eqI) fix x from \X \ A\ have "A \ {}" by auto - hence "count (Inf A) x = (INF X:A. count X x)" + hence "count (Inf A) x = (INF X\A. count X x)" by (simp add: count_Inf_multiset_nonempty) also from \X \ A\ have "\ \ count X x" by (intro cInf_lower) simp_all @@ -1139,7 +1139,7 @@ show "X \# Inf A" proof (rule mset_subset_eqI) fix x - from nonempty have "count X x \ (INF X:A. count X x)" + from nonempty have "count X x \ (INF X\A. count X x)" by (intro cInf_greatest) (auto intro: mset_subset_eq_count le) also from nonempty have "\ = count (Inf A) x" by (simp add: count_Inf_multiset_nonempty) finally show "count X x \ count (Inf A) x" . @@ -1151,10 +1151,10 @@ proof (rule mset_subset_eqI) fix x from X have "A \ {}" by auto - have "count X x \ (SUP X:A. count X x)" + have "count X x \ (SUP X\A. count X x)" by (intro cSUP_upper X bdd_above_multiset_imp_bdd_above_count bdd) also from count_Sup_multiset_nonempty[OF \A \ {}\ bdd] - have "(SUP X:A. count X x) = count (Sup A) x" by simp + have "(SUP X\A. count X x) = count (Sup A) x" by simp finally show "count X x \ count (Sup A) x" . qed next @@ -1165,7 +1165,7 @@ proof (rule mset_subset_eqI) fix x from count_Sup_multiset_nonempty[OF \A \ {}\ bdd] - have "count (Sup A) x = (SUP X:A. count X x)" . + have "count (Sup A) x = (SUP X\A. count X x)" . also from nonempty have "\ \ count X x" by (intro cSup_least) (auto intro: mset_subset_eq_count ge) finally show "count (Sup A) x \ count X x" . diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Library/Product_Order.thy --- a/src/HOL/Library/Product_Order.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Library/Product_Order.thy Thu Nov 08 09:11:52 2018 +0100 @@ -161,7 +161,7 @@ instantiation prod :: (Inf, Inf) Inf begin -definition "Inf A = (INF x:A. fst x, INF x:A. snd x)" +definition "Inf A = (INF x\A. fst x, INF x\A. snd x)" instance .. @@ -170,7 +170,7 @@ instantiation prod :: (Sup, Sup) Sup begin -definition "Sup A = (SUP x:A. fst x, SUP x:A. snd x)" +definition "Sup A = (SUP x\A. fst x, SUP x\A. snd x)" instance .. @@ -185,34 +185,34 @@ by standard (simp_all add: less_eq_prod_def Inf_prod_def Sup_prod_def INF_lower SUP_upper le_INF_iff SUP_le_iff bot_prod_def top_prod_def) -lemma fst_Sup: "fst (Sup A) = (SUP x:A. fst x)" +lemma fst_Sup: "fst (Sup A) = (SUP x\A. fst x)" unfolding Sup_prod_def by simp -lemma snd_Sup: "snd (Sup A) = (SUP x:A. snd x)" +lemma snd_Sup: "snd (Sup A) = (SUP x\A. snd x)" unfolding Sup_prod_def by simp -lemma fst_Inf: "fst (Inf A) = (INF x:A. fst x)" +lemma fst_Inf: "fst (Inf A) = (INF x\A. fst x)" unfolding Inf_prod_def by simp -lemma snd_Inf: "snd (Inf A) = (INF x:A. snd x)" +lemma snd_Inf: "snd (Inf A) = (INF x\A. snd x)" unfolding Inf_prod_def by simp -lemma fst_SUP: "fst (SUP x:A. f x) = (SUP x:A. fst (f x))" +lemma fst_SUP: "fst (SUP x\A. f x) = (SUP x\A. fst (f x))" using fst_Sup [of "f ` A", symmetric] by (simp add: comp_def) -lemma snd_SUP: "snd (SUP x:A. f x) = (SUP x:A. snd (f x))" +lemma snd_SUP: "snd (SUP x\A. f x) = (SUP x\A. snd (f x))" using snd_Sup [of "f ` A", symmetric] by (simp add: comp_def) -lemma fst_INF: "fst (INF x:A. f x) = (INF x:A. fst (f x))" +lemma fst_INF: "fst (INF x\A. f x) = (INF x\A. fst (f x))" using fst_Inf [of "f ` A", symmetric] by (simp add: comp_def) -lemma snd_INF: "snd (INF x:A. f x) = (INF x:A. snd (f x))" +lemma snd_INF: "snd (INF x\A. f x) = (INF x\A. snd (f x))" using snd_Inf [of "f ` A", symmetric] by (simp add: comp_def) -lemma SUP_Pair: "(SUP x:A. (f x, g x)) = (SUP x:A. f x, SUP x:A. g x)" +lemma SUP_Pair: "(SUP x\A. (f x, g x)) = (SUP x\A. f x, SUP x\A. g x)" unfolding Sup_prod_def by (simp add: comp_def) -lemma INF_Pair: "(INF x:A. (f x, g x)) = (INF x:A. f x, INF x:A. g x)" +lemma INF_Pair: "(INF x\A. (f x, g x)) = (INF x\A. f x, INF x\A. g x)" unfolding Inf_prod_def by (simp add: comp_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Discrete_Topology.thy --- a/src/HOL/Probability/Discrete_Topology.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Discrete_Topology.thy Thu Nov 08 09:11:52 2018 +0100 @@ -19,7 +19,7 @@ where "dist_discrete n m = (if n = m then 0 else 1)" definition uniformity_discrete :: "('a discrete \ 'a discrete) filter" where - "(uniformity::('a discrete \ 'a discrete) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + "(uniformity::('a discrete \ 'a discrete) filter) = (INF e\{0 <..}. principal {(x, y). dist x y < e})" definition "open_discrete" :: "'a discrete set \ bool" where "(open::'a discrete set \ bool) U \ (\x\U. eventually (\(x', y). x' = x \ y \ U) uniformity)" diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Distribution_Functions.thy --- a/src/HOL/Probability/Distribution_Functions.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Distribution_Functions.thy Thu Nov 08 09:11:52 2018 +0100 @@ -220,13 +220,13 @@ and finite_borel_measure_interval_measure: "finite_borel_measure (interval_measure F)" proof - let ?F = "interval_measure F" - { have "ennreal (m - 0) = (SUP i::nat. ennreal (F (real i) - F (- real i)))" + { have "ennreal (m - 0) = (SUP i. ennreal (F (real i) - F (- real i)))" by (intro LIMSEQ_unique[OF _ LIMSEQ_SUP] tendsto_ennrealI tendsto_intros lim_F_at_bot[THEN filterlim_compose] lim_F_at_top[THEN filterlim_compose] lim_F_at_bot[THEN filterlim_compose] filterlim_real_sequentially filterlim_uminus_at_top[THEN iffD1]) (auto simp: incseq_def nondecF intro!: diff_mono) - also have "\ = (SUP i::nat. emeasure ?F {- real i<..real i})" + also have "\ = (SUP i. emeasure ?F {- real i<..real i})" by (subst emeasure_interval_measure_Ioc) (simp_all add: nondecF right_cont_F) also have "\ = emeasure ?F (\i::nat. {- real i<..real i})" by (rule SUP_emeasure_incseq) (auto simp: incseq_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Essential_Supremum.thy --- a/src/HOL/Probability/Essential_Supremum.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Essential_Supremum.thy Thu Nov 08 09:11:52 2018 +0100 @@ -30,13 +30,13 @@ fix y assume "AE x in M. f x \ y" then have "(\x. f x \ y) \ {P. AE x in M. P x}" by simp - then show "(INF P:{P. AE x in M. P x}. SUP x:Collect P. f x) \ y" + then show "(INF P\{P. AE x in M. P x}. SUP x\Collect P. f x) \ y" by (rule INF_lower2) (auto intro: SUP_least) next fix P assume P: "AE x in M. P x" - show "Inf {z. AE x in M. f x \ z} \ (SUP x:Collect P. f x)" + show "Inf {z. AE x in M. f x \ z} \ (SUP x\Collect P. f x)" proof (rule Inf_lower; clarsimp) - show "AE x in M. f x \ (SUP x:Collect P. f x)" + show "AE x in M. f x \ (SUP x\Collect P. f x)" using P by (auto elim: eventually_mono simp: SUP_upper) qed qed diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Fin_Map.thy --- a/src/HOL/Probability/Fin_Map.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Fin_Map.thy Thu Nov 08 09:11:52 2018 +0100 @@ -258,7 +258,7 @@ definition [code del]: "(uniformity :: (('a, 'b) fmap \ ('a \\<^sub>F 'b)) filter) = - (INF e:{0 <..}. principal {(x, y). dist x y < e})" + (INF e\{0 <..}. principal {(x, y). dist x y < e})" instance by standard (rule uniformity_fmap_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Giry_Monad.thy --- a/src/HOL/Probability/Giry_Monad.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Giry_Monad.thy Thu Nov 08 09:11:52 2018 +0100 @@ -165,7 +165,7 @@ definition subprob_algebra :: "'a measure \ 'a measure measure" where "subprob_algebra K = - (SUP A : sets K. vimage_algebra {M. subprob_space M \ sets M = sets K} (\M. emeasure M A) borel)" + (SUP A \ sets K. vimage_algebra {M. subprob_space M \ sets M = sets K} (\M. emeasure M A) borel)" lemma space_subprob_algebra: "space (subprob_algebra A) = {M. subprob_space M \ sets M = sets A}" by (auto simp add: subprob_algebra_def space_Sup_eq_UN) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Helly_Selection.thy --- a/src/HOL/Probability/Helly_Selection.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Helly_Selection.thy Thu Nov 08 09:11:52 2018 +0100 @@ -87,7 +87,7 @@ by auto define F where "F x = Inf {lim (?f n) |n. x < r n}" for x - have F_eq: "ereal (F x) = (INF n:{n. x < r n}. ereal (lim (?f n)))" for x + have F_eq: "ereal (F x) = (INF n\{n. x < r n}. ereal (lim (?f n)))" for x unfolding F_def by (subst ereal_Inf'[OF bdd_below nonempty]) (simp add: setcompr_eq_image) have mono_F: "mono F" using nonempty by (auto intro!: cInf_superset_mono simp: F_def bdd_below mono_def) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Projective_Family.thy --- a/src/HOL/Probability/Projective_Family.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Projective_Family.thy Thu Nov 08 09:11:52 2018 +0100 @@ -470,7 +470,7 @@ next assume *: "{i. J i \ {0..< n}} \ {}" have "(INF i. CI (J i) (X' i)) \ - (INF i:{i. J i \ {0.._. undefined) (PF.emb {0..{i. J i \ {0.._. undefined) (PF.emb {0.. = C 0 n (\_. undefined) (\i\{i. J i \ {0..0 < ?a\) - also have "\ = (SUP K:{K. K \ fm n ` B n \ compact K}. emeasure (P' n) K + 2 powr (-n) * ?a)" + also have "\ = (SUP K\{K. K \ fm n ` B n \ compact K}. emeasure (P' n) K + 2 powr (-n) * ?a)" by (rule ennreal_SUP_add_left[symmetric]) auto also have "\ \ ?SUP n" proof (intro SUP_least) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/SPMF.thy --- a/src/HOL/Probability/SPMF.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/SPMF.thy Thu Nov 08 09:11:52 2018 +0100 @@ -10,7 +10,7 @@ subsection \Auxiliary material\ -lemma cSUP_singleton [simp]: "(SUP x:{x}. f x :: _ :: conditionally_complete_lattice) = f x" +lemma cSUP_singleton [simp]: "(SUP x\{x}. f x :: _ :: conditionally_complete_lattice) = f x" by (metis cSup_singleton image_empty image_insert) subsubsection \More about extended reals\ @@ -33,18 +33,18 @@ unfolding continuous_def by auto lemma ennreal_Sup: - assumes *: "(SUP a:A. ennreal a) \ \" + assumes *: "(SUP a\A. ennreal a) \ \" and "A \ {}" - shows "ennreal (Sup A) = (SUP a:A. ennreal a)" + shows "ennreal (Sup A) = (SUP a\A. ennreal a)" proof (rule continuous_at_Sup_mono) - obtain r where r: "ennreal r = (SUP a:A. ennreal a)" "r \ 0" - using * by(cases "(SUP a:A. ennreal a)") simp_all + obtain r where r: "ennreal r = (SUP a\A. ennreal a)" "r \ 0" + using * by(cases "(SUP a\A. ennreal a)") simp_all then show "bdd_above A" by(auto intro!: SUP_upper bdd_aboveI[of _ r] simp add: ennreal_le_iff[symmetric]) qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ennreal ennreal_leI assms) lemma ennreal_SUP: - "\ (SUP a:A. ennreal (f a)) \ \; A \ {} \ \ ennreal (SUP a:A. f a) = (SUP a:A. ennreal (f a))" + "\ (SUP a\A. ennreal (f a)) \ \; A \ {} \ \ ennreal (SUP a\A. f a) = (SUP a\A. ennreal (f a))" using ennreal_Sup[of "f ` A"] by auto lemma ennreal_lt_0: "x < 0 \ ennreal x = 0" @@ -333,9 +333,9 @@ lemma nn_integral_spmf_neq_top: "(\\<^sup>+ x. spmf p x \count_space UNIV) \ \" using nn_integral_measure_spmf[where f="\_. 1", of p, symmetric] by simp -lemma SUP_spmf_neq_top': "(SUP p:Y. ennreal (spmf p x)) \ \" +lemma SUP_spmf_neq_top': "(SUP p\Y. ennreal (spmf p x)) \ \" proof(rule neq_top_trans) - show "(SUP p:Y. ennreal (spmf p x)) \ 1" by(rule SUP_least)(simp add: pmf_le_1) + show "(SUP p\Y. ennreal (spmf p x)) \ 1" by(rule SUP_least)(simp add: pmf_le_1) qed simp lemma SUP_spmf_neq_top: "(SUP i. ennreal (spmf (Y i) x)) \ \" @@ -343,9 +343,9 @@ show "(SUP i. ennreal (spmf (Y i) x)) \ 1" by(rule SUP_least)(simp add: pmf_le_1) qed simp -lemma SUP_emeasure_spmf_neq_top: "(SUP p:Y. emeasure (measure_spmf p) A) \ \" +lemma SUP_emeasure_spmf_neq_top: "(SUP p\Y. emeasure (measure_spmf p) A) \ \" proof(rule neq_top_trans) - show "(SUP p:Y. emeasure (measure_spmf p) A) \ 1" + show "(SUP p\Y. emeasure (measure_spmf p) A) \ 1" by(rule SUP_least)(simp add: measure_spmf.subprob_emeasure_le_1) qed simp @@ -1228,7 +1228,7 @@ context fixes Y :: "'a spmf set" begin definition lub_spmf :: "'a spmf" -where "lub_spmf = embed_spmf (\x. enn2real (SUP p : Y. ennreal (spmf p x)))" +where "lub_spmf = embed_spmf (\x. enn2real (SUP p \ Y. ennreal (spmf p x)))" \ \We go through @{typ ennreal} to have a sensible definition even if @{term Y} is empty.\ lemma lub_spmf_empty [simp]: "SPMF.lub_spmf {} = return_pmf None" @@ -1339,7 +1339,7 @@ qed qed simp -lemma lub_spmf_subprob: "(\\<^sup>+ x. (SUP p : Y. ennreal (spmf p x)) \count_space UNIV) \ 1" +lemma lub_spmf_subprob: "(\\<^sup>+ x. (SUP p \ Y. ennreal (spmf p x)) \count_space UNIV) \ 1" proof(cases "Y = {}") case True thus ?thesis by(simp add: bot_ennreal) @@ -1348,13 +1348,13 @@ let ?B = "\p\Y. set_spmf p" have countable: "countable ?B" by(rule spmf_chain_countable) - have "(\\<^sup>+ x. (SUP p:Y. ennreal (spmf p x)) \count_space UNIV) = - (\\<^sup>+ x. (SUP p:Y. ennreal (spmf p x) * indicator ?B x) \count_space UNIV)" + have "(\\<^sup>+ x. (SUP p\Y. ennreal (spmf p x)) \count_space UNIV) = + (\\<^sup>+ x. (SUP p\Y. ennreal (spmf p x) * indicator ?B x) \count_space UNIV)" by(intro nn_integral_cong SUP_cong)(auto split: split_indicator simp add: spmf_eq_0_set_spmf) - also have "\ = (\\<^sup>+ x. (SUP p:Y. ennreal (spmf p x)) \count_space ?B)" + also have "\ = (\\<^sup>+ x. (SUP p\Y. ennreal (spmf p x)) \count_space ?B)" unfolding ennreal_indicator[symmetric] using False by(subst SUP_mult_right_ennreal[symmetric])(simp add: ennreal_indicator nn_integral_count_space_indicator) - also have "\ = (SUP p:Y. \\<^sup>+ x. spmf p x \count_space ?B)" using False _ countable + also have "\ = (SUP p\Y. \\<^sup>+ x. spmf p x \count_space ?B)" using False _ countable by(rule nn_integral_monotone_convergence_SUP_countable)(rule chain_ord_spmf_eqD) also have "\ \ 1" proof(rule SUP_least) @@ -1373,23 +1373,23 @@ lemma spmf_lub_spmf: assumes "Y \ {}" - shows "spmf lub_spmf x = (SUP p : Y. spmf p x)" + shows "spmf lub_spmf x = (SUP p \ Y. spmf p x)" proof - from assms obtain p where "p \ Y" by auto - have "spmf lub_spmf x = max 0 (enn2real (SUP p:Y. ennreal (spmf p x)))" unfolding lub_spmf_def + have "spmf lub_spmf x = max 0 (enn2real (SUP p\Y. ennreal (spmf p x)))" unfolding lub_spmf_def by(rule spmf_embed_spmf)(simp del: SUP_eq_top_iff Sup_eq_top_iff add: ennreal_enn2real_if SUP_spmf_neq_top' lub_spmf_subprob) - also have "\ = enn2real (SUP p:Y. ennreal (spmf p x))" + also have "\ = enn2real (SUP p\Y. ennreal (spmf p x))" by(rule max_absorb2)(simp) - also have "\ = enn2real (ennreal (SUP p : Y. spmf p x))" using assms + also have "\ = enn2real (ennreal (SUP p \ Y. spmf p x))" using assms by(subst ennreal_SUP[symmetric])(simp_all add: SUP_spmf_neq_top' del: SUP_eq_top_iff Sup_eq_top_iff) also have "0 \ (\p\Y. spmf p x)" using assms by(auto intro!: cSUP_upper2 bdd_aboveI[where M=1] simp add: pmf_le_1) - then have "enn2real (ennreal (SUP p : Y. spmf p x)) = (SUP p : Y. spmf p x)" + then have "enn2real (ennreal (SUP p \ Y. spmf p x)) = (SUP p \ Y. spmf p x)" by(rule enn2real_ennreal) finally show ?thesis . qed -lemma ennreal_spmf_lub_spmf: "Y \ {} \ ennreal (spmf lub_spmf x) = (SUP p:Y. ennreal (spmf p x))" +lemma ennreal_spmf_lub_spmf: "Y \ {} \ ennreal (spmf lub_spmf x) = (SUP p\Y. ennreal (spmf p x))" unfolding spmf_lub_spmf by(subst ennreal_SUP)(simp_all add: SUP_spmf_neq_top' del: SUP_eq_top_iff Sup_eq_top_iff) lemma lub_spmf_upper: @@ -1398,7 +1398,7 @@ proof(rule ord_pmf_increaseI) fix x from p have [simp]: "Y \ {}" by auto - from p have "ennreal (spmf p x) \ (SUP p:Y. ennreal (spmf p x))" by(rule SUP_upper) + from p have "ennreal (spmf p x) \ (SUP p\Y. ennreal (spmf p x))" by(rule SUP_upper) also have "\ = ennreal (spmf lub_spmf x)" using p by(subst spmf_lub_spmf)(auto simp add: ennreal_SUP SUP_spmf_neq_top' simp del: SUP_eq_top_iff Sup_eq_top_iff) finally show "spmf p x \ spmf lub_spmf x" by simp @@ -1413,7 +1413,7 @@ proof(rule ord_pmf_increaseI) fix x from nonempty obtain p where p: "p \ Y" by auto - have "ennreal (spmf lub_spmf x) = (SUP p:Y. ennreal (spmf p x))" + have "ennreal (spmf lub_spmf x) = (SUP p\Y. ennreal (spmf p x))" by(subst spmf_lub_spmf)(auto simp add: ennreal_SUP SUP_spmf_neq_top' nonempty simp del: SUP_eq_top_iff Sup_eq_top_iff) also have "\ \ ennreal (spmf z x)" by(rule SUP_least)(simp add: ord_spmf_eq_leD z) finally show "spmf lub_spmf x \ spmf z x" by simp @@ -1438,16 +1438,16 @@ lemma emeasure_lub_spmf: assumes Y: "Y \ {}" - shows "emeasure (measure_spmf lub_spmf) A = (SUP y:Y. emeasure (measure_spmf y) A)" + shows "emeasure (measure_spmf lub_spmf) A = (SUP y\Y. emeasure (measure_spmf y) A)" (is "?lhs = ?rhs") proof - let ?M = "count_space (set_spmf lub_spmf)" have "?lhs = \\<^sup>+ x. ennreal (spmf lub_spmf x) * indicator A x \?M" by(auto simp add: nn_integral_indicator[symmetric] nn_integral_measure_spmf') - also have "\ = \\<^sup>+ x. (SUP y:Y. ennreal (spmf y x) * indicator A x) \?M" + also have "\ = \\<^sup>+ x. (SUP y\Y. ennreal (spmf y x) * indicator A x) \?M" unfolding ennreal_indicator[symmetric] by(simp add: spmf_lub_spmf assms ennreal_SUP[OF SUP_spmf_neq_top'] SUP_mult_right_ennreal) - also from assms have "\ = (SUP y:Y. \\<^sup>+ x. ennreal (spmf y x) * indicator A x \?M)" + also from assms have "\ = (SUP y\Y. \\<^sup>+ x. ennreal (spmf y x) * indicator A x \?M)" proof(rule nn_integral_monotone_convergence_SUP_countable) have "(\i x. ennreal (spmf i x) * indicator A x) ` Y = (\f x. f x * indicator A x) ` (\p x. ennreal (spmf p x)) ` Y" by(simp add: image_image) @@ -1455,7 +1455,7 @@ by(rule chain_imageI)(auto simp add: le_fun_def split: split_indicator) finally show "Complete_Partial_Order.chain (\) ((\i x. ennreal (spmf i x) * indicator A x) ` Y)" . qed simp - also have "\ = (SUP y:Y. \\<^sup>+ x. ennreal (spmf y x) * indicator A x \count_space UNIV)" + also have "\ = (SUP y\Y. \\<^sup>+ x. ennreal (spmf y x) * indicator A x \count_space UNIV)" by(auto simp add: nn_integral_count_space_indicator set_lub_spmf spmf_eq_0_set_spmf split: split_indicator intro!: SUP_cong nn_integral_cong) also have "\ = ?rhs" by(auto simp add: nn_integral_indicator[symmetric] nn_integral_measure_spmf) @@ -1464,7 +1464,7 @@ lemma measure_lub_spmf: assumes Y: "Y \ {}" - shows "measure (measure_spmf lub_spmf) A = (SUP y:Y. measure (measure_spmf y) A)" (is "?lhs = ?rhs") + shows "measure (measure_spmf lub_spmf) A = (SUP y\Y. measure (measure_spmf y) A)" (is "?lhs = ?rhs") proof - have "ennreal ?lhs = ennreal ?rhs" using emeasure_lub_spmf[OF assms] SUP_emeasure_spmf_neq_top[of A Y] Y @@ -1476,12 +1476,12 @@ lemma weight_lub_spmf: assumes Y: "Y \ {}" - shows "weight_spmf lub_spmf = (SUP y:Y. weight_spmf y)" + shows "weight_spmf lub_spmf = (SUP y\Y. weight_spmf y)" unfolding weight_spmf_def by(rule measure_lub_spmf) fact lemma measure_spmf_lub_spmf: assumes Y: "Y \ {}" - shows "measure_spmf lub_spmf = (SUP p:Y. measure_spmf p)" (is "?lhs = ?rhs") + shows "measure_spmf lub_spmf = (SUP p\Y. measure_spmf p)" (is "?lhs = ?rhs") proof(rule measure_eqI) from assms obtain p where p: "p \ Y" by auto from chain have chain': "Complete_Partial_Order.chain (\) (measure_spmf ` Y)" @@ -1583,11 +1583,11 @@ let ?M = "count_space (set_spmf (lub_spmf Y))" have "ennreal (spmf ?lhs i) = \\<^sup>+ x. ennreal (spmf (lub_spmf Y) x) * ennreal (spmf (f x) i) \?M" by(auto simp add: ennreal_spmf_lub_spmf ennreal_spmf_bind nn_integral_measure_spmf') - also have "\ = \\<^sup>+ x. (SUP p:Y. ennreal (spmf p x * spmf (f x) i)) \?M" + also have "\ = \\<^sup>+ x. (SUP p\Y. ennreal (spmf p x * spmf (f x) i)) \?M" by(subst ennreal_spmf_lub_spmf[OF chain Y])(subst SUP_mult_right_ennreal, simp_all add: ennreal_mult Y) - also have "\ = (SUP p:Y. \\<^sup>+ x. ennreal (spmf p x * spmf (f x) i) \?M)" + also have "\ = (SUP p\Y. \\<^sup>+ x. ennreal (spmf p x * spmf (f x) i) \?M)" using Y chain' by(rule nn_integral_monotone_convergence_SUP_countable) simp - also have "\ = (SUP p:Y. ennreal (spmf (bind_spmf p f) i))" + also have "\ = (SUP p\Y. ennreal (spmf (bind_spmf p f) i))" by(auto simp add: ennreal_spmf_bind nn_integral_measure_spmf nn_integral_count_space_indicator set_lub_spmf[OF chain] in_set_spmf_iff_spmf ennreal_mult intro!: SUP_cong nn_integral_cong split: split_indicator) also have "\ = ennreal (spmf ?rhs i)" using chain'' by(simp add: ennreal_spmf_lub_spmf Y) finally show "spmf ?lhs i = spmf ?rhs i" by simp @@ -1619,12 +1619,12 @@ have chain''': "Complete_Partial_Order.chain (ord_spmf (=)) ((\p. bind_spmf x (\y. g y p)) ` Y)" using chain by(rule chain_imageI)(rule monotone_bind_spmf2[OF g, THEN monotoneD]) - have "ennreal (spmf ?lhs i) = \\<^sup>+ y. (SUP p:Y. ennreal (spmf x y * spmf (g y p) i)) \count_space (set_spmf x)" + have "ennreal (spmf ?lhs i) = \\<^sup>+ y. (SUP p\Y. ennreal (spmf x y * spmf (g y p) i)) \count_space (set_spmf x)" by(simp add: ennreal_spmf_bind ennreal_spmf_lub_spmf[OF chain'] Y nn_integral_measure_spmf' SUP_mult_left_ennreal ennreal_mult) - also have "\ = (SUP p:Y. \\<^sup>+ y. ennreal (spmf x y * spmf (g y p) i) \count_space (set_spmf x))" + also have "\ = (SUP p\Y. \\<^sup>+ y. ennreal (spmf x y * spmf (g y p) i) \count_space (set_spmf x))" unfolding nn_integral_measure_spmf' using Y chain'' by(rule nn_integral_monotone_convergence_SUP_countable) simp - also have "\ = (SUP p:Y. ennreal (spmf (bind_spmf x (\y. g y p)) i))" + also have "\ = (SUP p\Y. ennreal (spmf (bind_spmf x (\y. g y p)) i))" by(simp add: ennreal_spmf_bind nn_integral_measure_spmf' ennreal_mult) also have "\ = ennreal (spmf ?rhs i)" using chain''' by(auto simp add: ennreal_spmf_lub_spmf Y) @@ -1775,9 +1775,9 @@ by(auto simp add: weight_lub_spmf chain1 chain2 Y rel_spmf_weightD[OF R, symmetric] intro!: cSUP_least intro: cSUP_upper2[OF bdd_aboveI2[OF weight_spmf_le_1]]) fix A - have "measure (measure_spmf (lub_spmf (fst ` Y))) A = (SUP y:fst ` Y. measure (measure_spmf y) A)" + have "measure (measure_spmf (lub_spmf (fst ` Y))) A = (SUP y\fst ` Y. measure (measure_spmf y) A)" using chain1 Y1 by(rule measure_lub_spmf) - also have "\ \ (SUP y:snd ` Y. measure (measure_spmf y) {y. \x\A. R x y})" using Y1 + also have "\ \ (SUP y\snd ` Y. measure (measure_spmf y) {y. \x\A. R x y})" using Y1 by(rule cSUP_least)(auto intro!: cSUP_upper2[OF bdd_aboveI2[OF measure_spmf.subprob_measure_le_1]] rel_spmf_measureD R) also have "\ = measure (measure_spmf (lub_spmf (snd ` Y))) {y. \x\A. R x y}" using chain2 Y2 by(rule measure_lub_spmf[symmetric]) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Stream_Space.thy --- a/src/HOL/Probability/Stream_Space.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Stream_Space.thy Thu Nov 08 09:11:52 2018 +0100 @@ -279,7 +279,7 @@ simp add: sets_PiM_eq_proj snth_in space sets cong: measurable_cong_sets) lemma sets_stream_space_eq: "sets (stream_space M) = - sets (SUP i:UNIV. vimage_algebra (streams (space M)) (\s. s !! i) M)" + sets (SUP i\UNIV. vimage_algebra (streams (space M)) (\s. s !! i) M)" by (auto intro!: sets_stream_space_in_sets sets_Sup_in_sets sets_image_in_sets measurable_Sup1 snth_in measurable_vimage_algebra1 del: subsetI simp: space_Sup_eq_UN space_stream_space) diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Probability/Weak_Convergence.thy --- a/src/HOL/Probability/Weak_Convergence.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Probability/Weak_Convergence.thy Thu Nov 08 09:11:52 2018 +0100 @@ -53,7 +53,7 @@ by (auto intro!: cInf_lower bdd) { assume *: "I \ \ x" - have "\ \ (INF s:{x. \ \ f x}. f s)" + have "\ \ (INF s\{x. \ \ f x}. f s)" by (rule cINF_greatest[OF ne]) auto also have "\ = f (I \)" using continuous_at_Inf_mono[OF mono cont ne bdd] .. diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Real_Vector_Spaces.thy --- a/src/HOL/Real_Vector_Spaces.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Real_Vector_Spaces.thy Thu Nov 08 09:11:52 2018 +0100 @@ -597,7 +597,7 @@ assumes dist_norm: "dist x y = norm (x - y)" class uniformity_dist = dist + uniformity + - assumes uniformity_dist: "uniformity = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + assumes uniformity_dist: "uniformity = (INF e\{0 <..}. principal {(x, y). dist x y < e})" begin lemma eventually_uniformity_metric: @@ -1133,7 +1133,7 @@ definition dist_real_def: "dist x y = \x - y\" definition uniformity_real_def [code del]: - "(uniformity :: (real \ real) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})" + "(uniformity :: (real \ real) filter) = (INF e\{0 <..}. principal {(x, y). dist x y < e})" definition open_real_def [code del]: "open (U :: real set) \ (\x\U. eventually (\(x', y). x' = x \ y \ U) uniformity)" @@ -1611,7 +1611,7 @@ subsection \Filters and Limits on Metric Space\ -lemma (in metric_space) nhds_metric: "nhds x = (INF e:{0 <..}. principal {y. dist y x < e})" +lemma (in metric_space) nhds_metric: "nhds x = (INF e\{0 <..}. principal {y. dist y x < e})" unfolding nhds_def proof (safe intro!: INF_eq) fix S diff -r 438e1a11445f -r 0a9688695a1b src/HOL/Topological_Spaces.thy --- a/src/HOL/Topological_Spaces.thy Wed Nov 07 23:03:45 2018 +0100 +++ b/src/HOL/Topological_Spaces.thy Thu Nov 08 09:11:52 2018 +0100 @@ -517,7 +517,7 @@ by (auto simp: nhds_discrete filterlim_principal) lemma (in topological_space) at_within_eq: - "at x within s = (INF S:{S. open S \ x \ S}. principal (S \ s - {x}))" + "at x within s = (INF S\{S. open S \ x \ S}. principal (S \ s - {x}))" unfolding nhds_def at_within_def by (subst INF_inf_const2[symmetric]) (auto simp: Diff_Int_distrib) @@ -575,7 +575,7 @@ by (simp add: at_eq_bot_iff not_open_singleton) lemma (in order_topology) nhds_order: - "nhds x = inf (INF a:{x <..}. principal {..< a}) (INF a:{..< x}. principal {a <..})" + "nhds x = inf (INF a\{x <..}. principal {..< a}) (INF a\{..< x}. principal {a <..})" proof - have 1: "{S \ range lessThan \ range greaterThan. x \ S} = (\a. {..< a}) ` {x <..} \ (\a. {a <..}) ` {..< x}" @@ -616,8 +616,8 @@ lemma (in linorder_topology) at_within_order: assumes "UNIV \ {x}" shows "at x within s = - inf (INF a:{x <..}. principal ({..< a} \ s - {x})) - (INF a:{..< x}. principal ({a <..} \ s - {x}))" + inf (INF a\{x <..}. principal ({..< a} \ s - {x})) + (INF a\{..< x}. principal ({a <..} \ s - {x}))" proof (cases "{x <..} = {}" "{..< x} = {}" rule: case_split [case_product case_split]) case True_True have "UNIV = {..< x} \ {x} \ {x <..}" @@ -628,7 +628,7 @@ inf_principal[symmetric] INF_inf_const2 inf_sup_aci[where 'a="'a filter"]) lemma (in linorder_topology) at_left_eq: - "y < x \ at_left x = (INF a:{..< x}. principal {a <..< x})" + "y < x \ at_left x = (INF a\{..< x}. principal {a <..< x})" by (subst at_within_order) (auto simp: greaterThan_Int_greaterThan greaterThanLessThan_eq[symmetric] min.absorb2 INF_constant intro!: INF_lower2 inf_absorb2) @@ -639,7 +639,7 @@ by (subst eventually_INF_base) (auto simp: eventually_principal Ball_def) lemma (in linorder_topology) at_right_eq: - "x < y \ at_right x = (INF a:{x <..}. principal {x <..< a})" + "x < y \ at_right x = (INF a\{x <..}. principal {x <..< a})" by (subst at_within_order) (auto simp: lessThan_Int_lessThan greaterThanLessThan_eq[symmetric] max.absorb2 INF_constant Int_commute intro!: INF_lower2 inf_absorb1) @@ -3039,11 +3039,11 @@ assumes "mono f" and cont: "continuous (at_left (Sup S)) f" and S: "S \ {}" "bdd_above S" - shows "f (Sup S) = (SUP s:S. f s)" + shows "f (Sup S) = (SUP s\S. f s)" proof (rule antisym) have f: "(f \ f (Sup S)) (at_left (Sup S))" using cont unfolding continuous_within . - show "f (Sup S) \ (SUP s:S. f s)" + show "f (Sup S) \ (SUP s\S. f s)" proof cases assume "Sup S \ S" then show ?thesis @@ -3057,8 +3057,8 @@ show ?thesis proof (rule ccontr) assume "\ ?thesis" - with order_tendstoD(1)[OF f, of "SUP s:S. f s"] obtain b where "b < Sup S" - and *: "\y. b < y \ y < Sup S \ (SUP s:S. f s) < f y" + with order_tendstoD(1)[OF f, of "SUP s\S. f s"] obtain b where "b < Sup S" + and *: "\y. b < y \ y < Sup S \ (SUP s\S. f s) < f y" by (auto simp: not_le eventually_at_left[OF \s < Sup S\]) with \S \ {}\ obtain c where "c \ S" "b < c" using less_cSupD[of S b] by auto @@ -3077,11 +3077,11 @@ assumes "antimono f" and cont: "continuous (at_left (Sup S)) f" and S: "S \ {}" "bdd_above S" - shows "f (Sup S) = (INF s:S. f s)" + shows "f (Sup S) = (INF s\S. f s)" proof (rule antisym) have f: "(f \ f (Sup S)) (at_left (Sup S))" using cont unfolding continuous_within . - show "(INF s:S. f s) \ f (Sup S)" + show "(INF s\S. f s) \ f (Sup S)" proof cases assume "Sup S \ S" then show ?thesis @@ -3095,8 +3095,8 @@ show ?thesis proof (rule ccontr) assume "\ ?thesis" - with order_tendstoD(2)[OF f, of "INF s:S. f s"] obtain b where "b < Sup S" - and *: "\y. b < y \ y < Sup S \ f y < (INF s:S. f s)" + with order_tendstoD(2)[OF f, of "INF s\S. f s"] obtain b where "b < Sup S" + and *: "\y. b < y \ y < Sup S \ f y < (INF s\S. f s)" by (auto simp: not_le eventually_at_left[OF \s < Sup S\]) with \S \ {}\ obtain c where "c \ S" "b < c" using less_cSupD[of S b] by auto @@ -3115,11 +3115,11 @@ assumes "mono f" and cont: "continuous (at_right (Inf S)) f" and S: "S \ {}" "bdd_below S" - shows "f (Inf S) = (INF s:S. f s)" + shows "f (Inf S) = (INF s\S. f s)" proof (rule antisym) have f: "(f \ f (Inf S)) (at_right (Inf S))" using cont unfolding continuous_within . - show "(INF s:S. f s) \ f (Inf S)" + show "(INF s\S. f s) \ f (Inf S)" proof cases assume "Inf S \ S" then show ?thesis @@ -3133,8 +3133,8 @@ show ?thesis proof (rule ccontr) assume "\ ?thesis" - with order_tendstoD(2)[OF f, of "INF s:S. f s"] obtain b where "Inf S < b" - and *: "\y. Inf S < y \ y < b \ f y < (INF s:S. f s)" + with order_tendstoD(2)[OF f, of "INF s\S. f s"] obtain b where "Inf S < b" + and *: "\y. Inf S < y \ y < b \ f y < (INF s\S. f s)" by (auto simp: not_le eventually_at_right[OF \Inf S < s\]) with \S \ {}\ obtain c where "c \ S" "c < b" using cInf_lessD[of S b] by auto @@ -3153,11 +3153,11 @@ assumes "antimono f" and cont: "continuous (at_right (Inf S)) f" and S: "S \ {}" "bdd_below S" - shows "f (Inf S) = (SUP s:S. f s)" + shows "f (Inf S) = (SUP s\S. f s)" proof (rule antisym) have f: "(f \ f (Inf S)) (at_right (Inf S))" using cont unfolding continuous_within . - show "f (Inf S) \ (SUP s:S. f s)" + show "f (Inf S) \ (SUP s\S. f s)" proof cases assume "Inf S \ S" then show ?thesis @@ -3171,8 +3171,8 @@ show ?thesis proof (rule ccontr) assume "\ ?thesis" - with order_tendstoD(1)[OF f, of "SUP s:S. f s"] obtain b where "Inf S < b" - and *: "\y. Inf S < y \ y < b \ (SUP s:S. f s) < f y" + with order_tendstoD(1)[OF f, of "SUP s\S. f s"] obtain b where "Inf S < b" + and *: "\y. Inf S < y \ y < b \ (SUP s\S. f s) < f y" by (auto simp: not_le eventually_at_right[OF \Inf S < s\]) with \S \ {}\ obtain c where "c \ S" "c < b" using cInf_lessD[of S b] by auto @@ -3529,14 +3529,14 @@ proof (subst prod_filter_INF, auto intro!: antisym INF_greatest simp: principal_prod_principal) fix S T assume "open S" "a \ S" "open T" "b \ T" - then show "(INF x : {S. open S \ (a, b) \ S}. principal x) \ principal (S \ T)" + then show "(INF x \ {S. open S \ (a, b) \ S}. principal x) \ principal (S \ T)" by (intro INF_lower) (auto intro!: open_Times) next fix S' assume "open S'" "(a, b) \ S'" then obtain S T where "open S" "a \ S" "open T" "b \ T" "S \ T \ S'" by (auto elim: open_prod_elim) - then show "(INF x : {S. open S \ a \ S}. INF y : {S. open S \ b \ S}. + then show "(INF x \ {S. open S \ a \ S}. INF y \ {S. open S \ b \ S}. principal (x \ y)) \ principal S'" by (auto intro!: INF_lower2) qed