diff -r cc1058b83124 -r a5f6d2fc1b1f src/HOL/Analysis/Bochner_Integration.thy --- a/src/HOL/Analysis/Bochner_Integration.thy Thu Jul 27 23:05:25 2023 +0100 +++ b/src/HOL/Analysis/Bochner_Integration.thy Thu Aug 03 19:10:36 2023 +0200 @@ -99,22 +99,19 @@ unfolding A_def by simp qed ultimately have "dist (f x) (F N x) < 1 / Suc (m N x)" - by (auto simp add: F_def L_def) } + by (auto simp: F_def L_def) } note * = this fix x assume "x \ space M" show "(\i. F i x) \ f x" - proof cases - assume "f x = z" + proof (cases "f x = z") + case True then have "\i n. x \ A i n" unfolding A_def by auto - then have "\i. F i x = z" - by (auto simp: F_def) then show ?thesis - using \f x = z\ by auto + by (metis B_imp_A F_def LIMSEQ_def True dist_self) next - assume "f x \ z" - + case False show ?thesis proof (rule tendstoI) fix e :: real assume "0 < e" @@ -148,10 +145,7 @@ finally (xtrans) have "dist (e m) z \ 2 * dist (f x) z" . } then show "dist (F i x) z \ 2 * dist (f x) z" unfolding F_def - apply auto - apply (rule LeastI2) - apply auto - done + by (smt (verit, ccfv_threshold) LeastI2 B_imp_A dist_eq_0_iff zero_le_dist) qed qed @@ -184,10 +178,7 @@ show "P u" proof (rule seq) show U': "U' i \ borel_measurable M" "\x. 0 \ U' i x" for i - using U by (auto - intro: borel_measurable_simple_function - intro!: borel_measurable_enn2real borel_measurable_times - simp: U'_def zero_le_mult_iff) + using U'_sf by (auto simp: U'_def borel_measurable_simple_function) show "incseq U'" using U(2,3) by (auto simp: incseq_def le_fun_def image_iff eq_commute U'_def indicator_def enn2real_mono) @@ -238,7 +229,7 @@ lemma scaleR_cong_right: fixes x :: "'a :: real_vector" shows "(x \ 0 \ r = p) \ r *\<^sub>R x = p *\<^sub>R x" - by (cases "x = 0") auto + by auto inductive simple_bochner_integrable :: "'a measure \ ('a \ 'b::real_vector) \ bool" for M f where "simple_function M f \ emeasure M {y\space M. f y \ 0} \ \ \ @@ -309,11 +300,7 @@ shows "simple_bochner_integrable M f" proof have "emeasure M {y \ space M. ennreal (norm (f y)) \ 0} \ \" - proof (rule simple_function_finite_support) - show "simple_function M (\x. ennreal (norm (f x)))" - using f by (rule simple_function_compose1) - show "(\\<^sup>+ y. ennreal (norm (f y)) \M) < \" by fact - qed simp + using simple_function_finite_support simple_function_compose1 f fin by force then show "emeasure M {y \ space M. f y \ 0} \ \" by simp qed fact @@ -453,18 +440,17 @@ lemma simple_bochner_integral_nonneg[simp]: fixes f :: "'a \ real" shows "(\x. 0 \ f x) \ 0 \ simple_bochner_integral M f" - by (force simp add: simple_bochner_integral_def intro: sum_nonneg) + by (force simp: simple_bochner_integral_def intro: sum_nonneg) lemma simple_bochner_integral_eq_nn_integral: assumes f: "simple_bochner_integrable M f" "\x. 0 \ f x" shows "simple_bochner_integral M f = (\\<^sup>+x. f x \M)" proof - - { fix x y z have "(x \ 0 \ y = z) \ ennreal x * y = ennreal x * z" - by (cases "x = 0") (auto simp: zero_ennreal_def[symmetric]) } - note ennreal_cong_mult = this + have ennreal_cong_mult: "(x \ 0 \ y = z) \ ennreal x * y = ennreal x * z" for x y z + by fastforce have [measurable]: "f \ borel_measurable M" - using f(1) by (auto intro: borel_measurable_simple_function elim: simple_bochner_integrable.cases) + by (meson borel_measurable_simple_function f(1) simple_bochner_integrable.cases) { fix y assume y: "y \ space M" "f y \ 0" have "ennreal (measure M {x \ space M. f x = f y}) = emeasure M {x \ space M. f x = f y}" @@ -487,8 +473,7 @@ simp flip: sum_ennreal) also have "\ = (\\<^sup>+x. f x \M)" using f - by (intro nn_integral_eq_simple_integral[symmetric]) - (auto simp: simple_function_compose1 simple_bochner_integrable.simps) + by (metis nn_integral_eq_simple_integral simple_bochner_integrable.cases simple_function_compose1) finally show ?thesis . qed @@ -512,9 +497,13 @@ using simple_bochner_integrable_compose2[of "\x y. norm (x - y)" M "s" "t"] s t by (auto intro!: simple_bochner_integral_eq_nn_integral) also have "\ \ (\\<^sup>+x. ennreal (norm (f x - s x)) + ennreal (norm (f x - t x)) \M)" - by (auto intro!: nn_integral_mono simp flip: ennreal_plus) - (metis (erased, opaque_lifting) add_diff_cancel_left add_diff_eq diff_add_eq order_trans - norm_minus_commute norm_triangle_ineq4 order_refl) + proof - + have "\x. x \ space M \ + norm (s x - t x) \ norm (f x - s x) + norm (f x - t x)" + by (metis dual_order.refl norm_diff_triangle_le norm_minus_commute) + then show ?thesis + by (metis (mono_tags, lifting) ennreal_leI ennreal_plus nn_integral_mono norm_ge_zero) + qed also have "\ = ?S + ?T" by (rule nn_integral_add) auto finally show ?thesis . @@ -555,7 +544,7 @@ by (rule has_bochner_integral.intros[where s="\_. f"]) (auto intro: borel_measurable_simple_function elim: simple_bochner_integrable.cases - simp: zero_ennreal_def[symmetric]) + simp flip: zero_ennreal_def) lemma has_bochner_integral_real_indicator: assumes [measurable]: "A \ sets M" and A: "emeasure M A < \" @@ -665,21 +654,21 @@ lemma has_bochner_integral_scaleR_left[intro]: "(c \ 0 \ has_bochner_integral M f x) \ has_bochner_integral M (\x. f x *\<^sub>R c) (x *\<^sub>R c)" - by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_left]) + by (cases "c = 0") (auto simp: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_left]) lemma has_bochner_integral_scaleR_right[intro]: "(c \ 0 \ has_bochner_integral M f x) \ has_bochner_integral M (\x. c *\<^sub>R f x) (c *\<^sub>R x)" - by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_right]) + by (cases "c = 0") (auto simp: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_right]) lemma has_bochner_integral_mult_left[intro]: fixes c :: "_::{real_normed_algebra,second_countable_topology}" shows "(c \ 0 \ has_bochner_integral M f x) \ has_bochner_integral M (\x. f x * c) (x * c)" - by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_mult_left]) + by (cases "c = 0") (auto simp: has_bochner_integral_bounded_linear[OF bounded_linear_mult_left]) lemma has_bochner_integral_mult_right[intro]: fixes c :: "_::{real_normed_algebra,second_countable_topology}" shows "(c \ 0 \ has_bochner_integral M f x) \ has_bochner_integral M (\x. c * f x) (c * x)" - by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_mult_right]) + by (cases "c = 0") (auto simp: has_bochner_integral_bounded_linear[OF bounded_linear_mult_right]) lemmas has_bochner_integral_divide = has_bochner_integral_bounded_linear[OF bounded_linear_divide] @@ -691,11 +680,11 @@ lemma has_bochner_integral_inner_left[intro]: "(c \ 0 \ has_bochner_integral M f x) \ has_bochner_integral M (\x. f x \ c) (x \ c)" - by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_inner_left]) + by (cases "c = 0") (auto simp: has_bochner_integral_bounded_linear[OF bounded_linear_inner_left]) lemma has_bochner_integral_inner_right[intro]: "(c \ 0 \ has_bochner_integral M f x) \ has_bochner_integral M (\x. c \ f x) (c \ x)" - by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_inner_right]) + by (cases "c = 0") (auto simp: has_bochner_integral_bounded_linear[OF bounded_linear_inner_right]) lemmas has_bochner_integral_minus = has_bochner_integral_bounded_linear[OF bounded_linear_minus[OF bounded_linear_ident]] @@ -857,16 +846,10 @@ qed (auto intro: g) lemma has_bochner_integral_eq_AE: - assumes f: "has_bochner_integral M f x" - and g: "has_bochner_integral M g y" - and ae: "AE x in M. f x = g x" + assumes "has_bochner_integral M f x" and "has_bochner_integral M g y" + and "AE x in M. f x = g x" shows "x = y" -proof - - from assms have "has_bochner_integral M g x" - by (auto intro: has_bochner_integralI_AE) - from this g show "x = y" - by (rule has_bochner_integral_eq) -qed + by (meson assms has_bochner_integral.simps has_bochner_integral_cong_AE has_bochner_integral_eq) lemma simple_bochner_integrable_restrict_space: fixes f :: "_ \ 'b::real_normed_vector" @@ -1082,12 +1065,7 @@ next assume not: "\ integrable M f" moreover have "\ integrable M (\x. T (f x))" - proof - assume "integrable M (\x. T (f x))" - from integrable_bounded_linear[OF T' this] not *[OF **] - show False - by auto - qed + by (metis (full_types) "*" "**" T' integrable_bounded_linear integrable_cong not) ultimately show ?thesis using T by (simp add: not_integrable_integral_eq linear_simps) qed @@ -1229,7 +1207,7 @@ show "(\i. ennreal (norm (u' x - u i x))) \ 0" by (simp add: tendsto_norm_zero_iff flip: ennreal_0) qed - qed (insert bnd w_nonneg, auto) + qed (use bnd w_nonneg in auto) then show ?thesis by simp qed @@ -1342,14 +1320,8 @@ shows "integrable M f \ g \ borel_measurable M \ (AE x in M. norm (g x) \ norm (f x)) \ integrable M g" unfolding integrable_iff_bounded -proof safe - assume "f \ borel_measurable M" "g \ borel_measurable M" - assume "AE x in M. norm (g x) \ norm (f x)" - then have "(\\<^sup>+ x. ennreal (norm (g x)) \M) \ (\\<^sup>+ x. ennreal (norm (f x)) \M)" - by (intro nn_integral_mono_AE) auto - also assume "(\\<^sup>+ x. ennreal (norm (f x)) \M) < \" - finally show "(\\<^sup>+ x. ennreal (norm (g x)) \M) < \" . -qed + by (smt (verit) AE_cong ennreal_le_iff nn_integral_mono_AE norm_ge_zero order_less_subst2 linorder_not_le order_less_le_trans) + lemma integrable_mult_indicator: fixes f :: "'a \ 'b::{banach, second_countable_topology}" @@ -1419,7 +1391,7 @@ proof cases assume *: "A \ space M \ sets M \ emeasure M (A \ space M) < \" have "integral\<^sup>L M (indicator A) = integral\<^sup>L M (indicator (A \ space M))" - by (intro integral_cong) (auto split: split_indicator) + by (metis (no_types, lifting) Int_iff indicator_simps integral_cong) also have "\ = measure M (A \ space M)" using * by (intro has_bochner_integral_integral_eq has_bochner_integral_real_indicator) auto finally show ?thesis . @@ -1434,6 +1406,26 @@ finally show ?thesis . qed +lemma integrable_discrete_difference_aux: + fixes f :: "'a \ 'b::{banach, second_countable_topology}" + assumes f: "integrable M f" and X: "countable X" + assumes null: "\x. x \ X \ emeasure M {x} = 0" + assumes sets: "\x. x \ X \ {x} \ sets M" + assumes eq: "\x. x \ space M \ x \ X \ f x = g x" + shows "integrable M g" + unfolding integrable_iff_bounded +proof + have fmeas: "f \ borel_measurable M" "(\\<^sup>+ x. ennreal (norm (f x)) \M) < \" + using f integrable_iff_bounded by auto + then show "g \ borel_measurable M" + using measurable_discrete_difference[where X=X] + by (smt (verit) UNIV_I X eq sets space_borel) + have "AE x in M. x \ X" + using AE_discrete_difference X null sets by blast + with fmeas show "(\\<^sup>+ x. ennreal (norm (g x)) \M) < \" + by (metis (mono_tags, lifting) AE_I2 AE_mp eq nn_integral_cong_AE) +qed + lemma integrable_discrete_difference: fixes f :: "'a \ 'b::{banach, second_countable_topology}" assumes X: "countable X" @@ -1441,22 +1433,7 @@ assumes sets: "\x. x \ X \ {x} \ sets M" assumes eq: "\x. x \ space M \ x \ X \ f x = g x" shows "integrable M f \ integrable M g" - unfolding integrable_iff_bounded -proof (rule conj_cong) - { assume "f \ borel_measurable M" then have "g \ borel_measurable M" - by (rule measurable_discrete_difference[where X=X]) (auto simp: assms) } - moreover - { assume "g \ borel_measurable M" then have "f \ borel_measurable M" - by (rule measurable_discrete_difference[where X=X]) (auto simp: assms) } - ultimately show "f \ borel_measurable M \ g \ borel_measurable M" .. -next - have "AE x in M. x \ X" - by (rule AE_discrete_difference) fact+ - then have "(\\<^sup>+ x. norm (f x) \M) = (\\<^sup>+ x. norm (g x) \M)" - by (intro nn_integral_cong_AE) (auto simp: eq) - then show "(\\<^sup>+ x. norm (f x) \M) < \ \ (\\<^sup>+ x. norm (g x) \M) < \" - by simp -qed + by (metis X eq integrable_discrete_difference_aux null sets) lemma integral_discrete_difference: fixes f :: "'a \ 'b::{banach, second_countable_topology}" @@ -1474,7 +1451,6 @@ proof (rule integral_cong_AE) show "f \ borel_measurable M" "g \ borel_measurable M" using f eq by (auto intro: borel_measurable_integrable) - have "AE x in M. x \ X" by (rule AE_discrete_difference) fact+ with AE_space show "AE x in M. f x = g x" @@ -1484,14 +1460,12 @@ lemma has_bochner_integral_discrete_difference: fixes f :: "'a \ 'b::{banach, second_countable_topology}" - assumes X: "countable X" - assumes null: "\x. x \ X \ emeasure M {x} = 0" - assumes sets: "\x. x \ X \ {x} \ sets M" - assumes eq: "\x. x \ space M \ x \ X \ f x = g x" + assumes "countable X" + assumes "\x. x \ X \ emeasure M {x} = 0" + assumes "\x. x \ X \ {x} \ sets M" + assumes "\x. x \ space M \ x \ X \ f x = g x" shows "has_bochner_integral M f x \ has_bochner_integral M g x" - using integrable_discrete_difference[of X M f g, OF assms] - using integral_discrete_difference[of X M f g, OF assms] - by (metis has_bochner_integral_iff) + by (metis assms has_bochner_integral_iff integrable_discrete_difference integral_discrete_difference) lemma fixes f :: "'a \ 'b::{banach, second_countable_topology}" and w :: "'a \ real" @@ -1547,7 +1521,7 @@ finally show "?d n \ (\\<^sup>+x. norm (s n x - f x) \M)" . qed show "(\n. \\<^sup>+x. norm (s n x - f x) \M) \ ennreal 0" - unfolding ennreal_0 + unfolding ennreal_0 apply (subst norm_minus_commute) proof (rule nn_integral_dominated_convergence_norm[where w=w]) show "\n. s n \ borel_measurable M" @@ -1687,7 +1661,7 @@ by (simp add: integrable_indicator_iff ennreal_indicator emeasure_eq_ennreal_measure) next case (mult f c) then show ?case - by (auto simp add: nn_integral_cmult ennreal_mult integral_nonneg_AE) + by (auto simp: nn_integral_cmult ennreal_mult integral_nonneg_AE) next case (add g f) then have "integrable M f" "integrable M g" @@ -1723,14 +1697,9 @@ qed lemma nn_integral_eq_integrable: - assumes f: "f \ M \\<^sub>M borel" "AE x in M. 0 \ f x" and "0 \ x" + assumes "f \ M \\<^sub>M borel" "AE x in M. 0 \ f x" and "0 \ x" shows "(\\<^sup>+x. f x \M) = ennreal x \ (integrable M f \ integral\<^sup>L M f = x)" -proof (safe intro!: nn_integral_eq_integral assms) - assume *: "(\\<^sup>+x. f x \M) = ennreal x" - with integrableI_nn_integral_finite[OF f this] nn_integral_eq_integral[of M f, OF _ f(2)] - show "integrable M f" "integral\<^sup>L M f = x" - by (simp_all add: * assms integral_nonneg_AE) -qed + by (metis assms ennreal_inj integrableI_nn_integral_finite integral_nonneg_AE nn_integral_eq_integral) lemma fixes f :: "_ \ _ \ 'a :: {banach, second_countable_topology}" @@ -1744,12 +1713,11 @@ proof - have 1: "integrable M (\x. \i. norm (f i x))" proof (rule integrableI_bounded) - have "(\\<^sup>+ x. ennreal (norm (\i. norm (f i x))) \M) = (\\<^sup>+ x. (\i. ennreal (norm (f i x))) \M)" - apply (intro nn_integral_cong_AE) - using summable - apply eventually_elim - apply (simp add: suminf_nonneg ennreal_suminf_neq_top) - done + have "\x. summable (\i. norm (f i x)) \ + ennreal (norm (\i. norm (f i x))) = (\i. ennreal (norm (f i x)))" + by (simp add: suminf_nonneg ennreal_suminf_neq_top) + then have "(\\<^sup>+ x. ennreal (norm (\i. norm (f i x))) \M) = (\\<^sup>+ x. (\i. ennreal (norm (f i x))) \M)" + using local.summable by (intro nn_integral_cong_AE) auto also have "\ = (\i. \\<^sup>+ x. norm (f i x) \M)" by (intro nn_integral_suminf) auto also have "\ = (\i. ennreal (\x. norm (f i x) \M))" @@ -1802,63 +1770,28 @@ using integral_norm_bound[of M f] by auto lemma integral_eq_nn_integral: - assumes [measurable]: "f \ borel_measurable M" - assumes nonneg: "AE x in M. 0 \ f x" + assumes "f \ borel_measurable M" + assumes "AE x in M. 0 \ f x" shows "integral\<^sup>L M f = enn2real (\\<^sup>+ x. ennreal (f x) \M)" -proof cases - assume *: "(\\<^sup>+ x. ennreal (f x) \M) = \" - also have "(\\<^sup>+ x. ennreal (f x) \M) = (\\<^sup>+ x. ennreal (norm (f x)) \M)" - using nonneg by (intro nn_integral_cong_AE) auto - finally have "\ integrable M f" - by (auto simp: integrable_iff_bounded) - then show ?thesis - by (simp add: * not_integrable_integral_eq) -next - assume "(\\<^sup>+ x. ennreal (f x) \M) \ \" - then have "integrable M f" - by (cases "\\<^sup>+ x. ennreal (f x) \M" rule: ennreal_cases) - (auto intro!: integrableI_nn_integral_finite assms) - from nn_integral_eq_integral[OF this] nonneg show ?thesis - by (simp add: integral_nonneg_AE) -qed + by (metis assms enn2real_ennreal enn2real_top infinity_ennreal_def integrableI_nonneg integral_nonneg_AE + less_top nn_integral_eq_integral not_integrable_integral_eq) lemma enn2real_nn_integral_eq_integral: - assumes eq: "AE x in M. f x = ennreal (g x)" and nn: "AE x in M. 0 \ g x" - and fin: "(\\<^sup>+x. f x \M) < top" - and [measurable]: "g \ M \\<^sub>M borel" + assumes "AE x in M. f x = ennreal (g x)" and nn: "AE x in M. 0 \ g x" + and "g \ M \\<^sub>M borel" shows "enn2real (\\<^sup>+x. f x \M) = (\x. g x \M)" -proof - - have "ennreal (enn2real (\\<^sup>+x. f x \M)) = (\\<^sup>+x. f x \M)" - using fin by (intro ennreal_enn2real) auto - also have "\ = (\\<^sup>+x. g x \M)" - using eq by (rule nn_integral_cong_AE) - also have "\ = (\x. g x \M)" - proof (rule nn_integral_eq_integral) - show "integrable M g" - proof (rule integrableI_bounded) - have "(\\<^sup>+ x. ennreal (norm (g x)) \M) = (\\<^sup>+ x. f x \M)" - using eq nn by (auto intro!: nn_integral_cong_AE elim!: eventually_elim2) - also note fin - finally show "(\\<^sup>+ x. ennreal (norm (g x)) \M) < \" - by simp - qed simp - qed fact - finally show ?thesis - using nn by (simp add: integral_nonneg_AE) -qed + by (metis assms integral_eq_nn_integral nn nn_integral_cong_AE) lemma has_bochner_integral_nn_integral: assumes "f \ borel_measurable M" "AE x in M. 0 \ f x" "0 \ x" assumes "(\\<^sup>+x. f x \M) = ennreal x" shows "has_bochner_integral M f x" - unfolding has_bochner_integral_iff - using assms by (auto simp: assms integral_eq_nn_integral intro: integrableI_nn_integral_finite) + by (metis assms has_bochner_integral_iff nn_integral_eq_integrable) lemma integrableI_simple_bochner_integrable: fixes f :: "'a \ 'b::{banach, second_countable_topology}" shows "simple_bochner_integrable M f \ integrable M f" - by (intro integrableI_sequence[where s="\_. f"] borel_measurable_simple_function) - (auto simp: zero_ennreal_def[symmetric] simple_bochner_integrable.simps) + using has_bochner_integral_simple_bochner_integrable integrable.intros by blast proposition integrable_induct[consumes 1, case_names base add lim, induct pred: integrable]: fixes f :: "'a \ 'b::{banach, second_countable_topology}" @@ -1896,7 +1829,7 @@ { fix i have "\z. {y. s' i z = y \ y \ s' i ` space M \ y \ 0 \ z \ space M} = (if z \ space M \ s' i z \ 0 then {s' i z} else {})" - by (auto simp add: s'_def split: split_indicator) + by (auto simp: s'_def split: split_indicator) then have "\z. s' i = (\z. \y\s' i`space M - {0}. indicator {x\space M. s' i x = y} z *\<^sub>R y)" using sf by (auto simp: fun_eq_iff simple_function_def s'_def) } note s'_eq = this @@ -1947,7 +1880,7 @@ by (simp add: nn_integral_0_iff_AE) with nonneg show "AE x in M. f x = 0" by auto -qed (auto simp add: integral_eq_zero_AE) +qed (auto simp: integral_eq_zero_AE) lemma integral_mono_AE: fixes f :: "'a \ real" @@ -1971,13 +1904,7 @@ fixes f :: "'a::euclidean_space \ 'b::{banach,second_countable_topology}" assumes "integrable M f" "integrable M g" "\x. x \ space M \ norm(f x) \ g x" shows "norm (\x. f x \M) \ (\x. g x \M)" -proof - - have "norm (\x. f x \M) \ (\x. norm (f x) \M)" - by (rule integral_norm_bound) - also have "... \ (\x. g x \M)" - using assms integrable_norm integral_mono by blast - finally show ?thesis . -qed + by (smt (verit, best) assms integrable_norm integral_mono integral_norm_bound) lemma integral_abs_bound_integral: fixes f :: "'a::euclidean_space \ real" @@ -1993,15 +1920,7 @@ fixes f::"_ \ real" assumes "integrable M f" "AE x in M. g x \ f x" "AE x in M. 0 \ f x" shows "(\x. g x \M) \ (\x. f x \M)" -proof (cases "integrable M g") - case True - show ?thesis by (rule integral_mono_AE, auto simp add: assms True) -next - case False - then have "(\x. g x \M) = 0" by (simp add: not_integrable_integral_eq) - also have "... \ (\x. f x \M)" by (simp add: integral_nonneg_AE[OF assms(3)]) - finally show ?thesis by simp -qed + by (metis assms integral_mono_AE integral_nonneg_AE not_integrable_integral_eq) lemma integral_mono': fixes f::"_ \ real" @@ -2022,21 +1941,11 @@ by (auto intro!: integrableI_bounded) qed -lemma integrableI_real_bounded: - assumes f: "f \ borel_measurable M" and ae: "AE x in M. 0 \ f x" and fin: "integral\<^sup>N M f < \" - shows "integrable M f" -proof (rule integrableI_bounded) - have "(\\<^sup>+ x. ennreal (norm (f x)) \M) = \\<^sup>+ x. ennreal (f x) \M" - using ae by (auto intro: nn_integral_cong_AE) - also note fin - finally show "(\\<^sup>+ x. ennreal (norm (f x)) \M) < \" . -qed fact - lemma nn_integral_nonneg_infinite: fixes f::"'a \ real" assumes "f \ borel_measurable M" "\ integrable M f" "AE x in M. f x \ 0" shows "(\\<^sup>+x. f x \M) = \" -using assms integrableI_real_bounded less_top by auto + using assms integrableI_nonneg less_top by auto lemma integral_real_bounded: assumes "0 \ r" "integral\<^sup>N M f \ ennreal r" @@ -2066,22 +1975,22 @@ fixes f:: "_ \ _ \ real" shows "\ finite I; I \ {}; \i. i \ I \ integrable M (f i) \ \ integrable M (\x. MIN i\I. f i x)" -by (induct rule: finite_ne_induct) simp+ + by (induct rule: finite_ne_induct) simp+ lemma integrable_MAX: fixes f:: "_ \ _ \ real" shows "\ finite I; I \ {}; \i. i \ I \ integrable M (f i) \ \ integrable M (\x. MAX i\I. f i x)" -by (induct rule: finite_ne_induct) simp+ + by (induct rule: finite_ne_induct) simp+ theorem integral_Markov_inequality: assumes [measurable]: "integrable M u" and "AE x in M. 0 \ u x" "0 < (c::real)" shows "(emeasure M) {x\space M. u x \ c} \ (1/c) * (\x. u x \M)" proof - have "(\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M) \ (\\<^sup>+ x. u x \M)" - by (rule nn_integral_mono_AE, auto simp add: \c>0\ less_eq_real_def) - also have "... = (\x. u x \M)" - by (rule nn_integral_eq_integral, auto simp add: assms) + by (rule nn_integral_mono_AE, auto simp: \c>0\ less_eq_real_def) + also have "\ = (\x. u x \M)" + by (rule nn_integral_eq_integral, auto simp: assms) finally have *: "(\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M) \ (\x. u x \M)" by simp @@ -2089,9 +1998,9 @@ using \c>0\ by (auto simp: ennreal_mult'[symmetric]) then have "emeasure M {x \ space M. u x \ c} = emeasure M ({x \ space M. ennreal(1/c) * u x \ 1})" by simp - also have "... \ ennreal(1/c) * (\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M)" - by (rule nn_integral_Markov_inequality) (auto simp add: assms) - also have "... \ ennreal(1/c) * (\x. u x \M)" + also have "\ \ ennreal(1/c) * (\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M)" + by (rule nn_integral_Markov_inequality) (auto simp: assms) + also have "\ \ ennreal(1/c) * (\x. u x \M)" by (rule mult_left_mono) (use * \c > 0\ in auto) finally show ?thesis using \0 by (simp add: ennreal_mult'[symmetric]) @@ -2109,8 +2018,7 @@ by (intro emeasure_eq_ennreal_measure [symmetric]) auto also note le finally show ?thesis - by (subst (asm) ennreal_le_iff) - (auto intro!: divide_nonneg_pos Bochner_Integration.integral_nonneg_AE assms) + by (simp add: assms divide_nonneg_pos integral_nonneg_AE) qed theorem%important (in finite_measure) second_moment_method: @@ -2149,9 +2057,10 @@ assumes "AE x in M. f x \ 0" "(\x. f x \M) > 0" and [measurable]: "f \ borel_measurable M" shows "\A e. A \ sets M \ e>0 \ emeasure M A > 0 \ (\x \ A. f x \ e)" -proof (rule not_AE_zero_E, auto simp add: assms) +proof (rule not_AE_zero_E, auto simp: assms) assume *: "AE x in M. f x = 0" - have "(\x. f x \M) = (\x. 0 \M)" by (rule integral_cong_AE, auto simp add: *) + have "(\x. f x \M) = (\x. 0 \M)" + by (rule integral_cong_AE, auto simp: *) then have "(\x. f x \M) = 0" by simp then show False using assms(2) by simp qed @@ -2163,28 +2072,31 @@ shows "((\n. (\x. u n x \M)) \ (\x. f x \M)) F" proof - have "((\n. norm((\x. u n x \M) - (\x. f x \M))) \ (0::ennreal)) F" - proof (rule tendsto_sandwich[of "\_. 0", where ?h = "\n. (\\<^sup>+x. norm(u n x - f x) \M)"], auto simp add: assms) + proof (rule tendsto_sandwich[of "\_. 0", where ?h = "\n. (\\<^sup>+x. norm(u n x - f x) \M)"], auto simp: assms) { fix n have "(\x. u n x \M) - (\x. f x \M) = (\x. u n x - f x \M)" - apply (rule Bochner_Integration.integral_diff[symmetric]) using assms by auto + by (simp add: assms) then have "norm((\x. u n x \M) - (\x. f x \M)) = norm (\x. u n x - f x \M)" by auto - also have "... \ (\x. norm(u n x - f x) \M)" + also have "\ \ (\x. norm(u n x - f x) \M)" by (rule integral_norm_bound) finally have "ennreal(norm((\x. u n x \M) - (\x. f x \M))) \ (\x. norm(u n x - f x) \M)" by simp - also have "... = (\\<^sup>+x. norm(u n x - f x) \M)" - apply (rule nn_integral_eq_integral[symmetric]) using assms by auto - finally have "norm((\x. u n x \M) - (\x. f x \M)) \ (\\<^sup>+x. norm(u n x - f x) \M)" by simp + also have "\ = (\\<^sup>+x. norm(u n x - f x) \M)" + by (simp add: assms nn_integral_eq_integral) + finally have "norm((\x. u n x \M) - (\x. f x \M)) \ (\\<^sup>+x. norm(u n x - f x) \M)" + by simp } then show "eventually (\n. norm((\x. u n x \M) - (\x. f x \M)) \ (\\<^sup>+x. norm(u n x - f x) \M)) F" by auto qed then have "((\n. norm((\x. u n x \M) - (\x. f x \M))) \ 0) F" by (simp flip: ennreal_0) - then have "((\n. ((\x. u n x \M) - (\x. f x \M))) \ 0) F" using tendsto_norm_zero_iff by blast - then show ?thesis using Lim_null by auto + then have "((\n. ((\x. u n x \M) - (\x. f x \M))) \ 0) F" + using tendsto_norm_zero_iff by blast + then show ?thesis + using Lim_null by auto qed text \The next lemma asserts that, if a sequence of functions converges in \L\<^sup>1\, then @@ -2219,7 +2131,7 @@ then have "(\x. norm(u (r n) x) \M) < (1/2)^n" unfolding r_def by auto moreover have "(\\<^sup>+x. norm(u (r n) x) \M) = (\x. norm(u (r n) x) \M)" - by (rule nn_integral_eq_integral, auto simp add: integrable_norm[OF assms(1)[of "r n"]]) + by (rule nn_integral_eq_integral, auto simp: integrable_norm[OF assms(1)[of "r n"]]) ultimately show ?thesis by (auto intro: ennreal_lessI) qed @@ -2231,31 +2143,32 @@ have A_bound: "emeasure M (A n) < (1/e) * ennreal((1/2)^n)" for n proof - have *: "indicator (A n) x \ (1/e) * ennreal(norm(u (r n) x))" for x - apply (cases "x \ A n") unfolding A_def using \0 < e\ by (auto simp: ennreal_mult[symmetric]) + using \0 < e\ by (cases "x \ A n") (auto simp: A_def ennreal_mult[symmetric]) have "emeasure M (A n) = (\\<^sup>+x. indicator (A n) x \M)" by auto - also have "... \ (\\<^sup>+x. (1/e) * ennreal(norm(u (r n) x)) \M)" - apply (rule nn_integral_mono) using * by auto - also have "... = (1/e) * (\\<^sup>+x. norm(u (r n) x) \M)" - apply (rule nn_integral_cmult) using \e > 0\ by auto - also have "... < (1/e) * ennreal((1/2)^n)" + also have "\ \ (\\<^sup>+x. (1/e) * ennreal(norm(u (r n) x)) \M)" + by (meson "*" nn_integral_mono) + also have "\ = (1/e) * (\\<^sup>+x. norm(u (r n) x) \M)" + using \e > 0\ by (force simp add: intro: nn_integral_cmult) + also have "\ < (1/e) * ennreal((1/2)^n)" using I[of n] \e > 0\ by (intro ennreal_mult_strict_left_mono) auto finally show ?thesis by simp qed have A_fin: "emeasure M (A n) < \" for n using \e > 0\ A_bound[of n] - by (auto simp add: ennreal_mult less_top[symmetric]) + by (auto simp: ennreal_mult less_top[symmetric]) have A_sum: "summable (\n. measure M (A n))" - proof (rule summable_comparison_test'[of "\n. (1/e) * (1/2)^n" 0]) - have "summable (\n. (1/(2::real))^n)" by (simp add: summable_geometric) + proof (rule summable_comparison_test') + have "summable (\n. (1/(2::real))^n)" + by (simp add: summable_geometric) then show "summable (\n. (1/e) * (1/2)^n)" using summable_mult by blast fix n::nat assume "n \ 0" have "norm(measure M (A n)) = measure M (A n)" by simp - also have "... = enn2real(emeasure M (A n))" unfolding measure_def by simp - also have "... < enn2real((1/e) * (1/2)^n)" + also have "\ = enn2real(emeasure M (A n))" unfolding measure_def by simp + also have "\ < enn2real((1/e) * (1/2)^n)" using A_bound[of n] \emeasure M (A n) < \\ \0 < e\ by (auto simp: emeasure_eq_ennreal_measure ennreal_mult[symmetric] ennreal_less_iff) - also have "... = (1/e) * (1/2)^n" + also have "\ = (1/e) * (1/2)^n" using \0 by auto finally show "norm(measure M (A n)) \ (1/e) * (1/2)^n" by simp qed @@ -2272,13 +2185,14 @@ then have "limsup (\n. ennreal (norm(u (r n) x))) \ e" by (simp add: Limsup_bounded) } - ultimately show "AE x in M. limsup (\n. ennreal (norm(u (r n) x))) \ 0 + ennreal e" by auto + ultimately show "AE x in M. limsup (\n. ennreal (norm(u (r n) x))) \ 0 + ennreal e" + by auto qed moreover { - fix x assume "limsup (\n. ennreal (norm(u (r n) x))) \ 0" - moreover then have "liminf (\n. ennreal (norm(u (r n) x))) \ 0" - by (rule order_trans[rotated]) (auto intro: Liminf_le_Limsup) + fix x assume x: "limsup (\n. ennreal (norm(u (r n) x))) \ 0" + moreover have "liminf (\n. ennreal (norm(u (r n) x))) \ 0" + by (metis x Liminf_le_Limsup le_zero_eq sequentially_bot) ultimately have "(\n. ennreal (norm(u (r n) x))) \ 0" using tendsto_Limsup[of sequentially "\n. ennreal (norm(u (r n) x))"] by auto then have "(\n. norm(u (r n) x)) \ 0" @@ -2326,7 +2240,7 @@ unfolding lim using lim by (intro integral_dominated_convergence[where w="\x. 2 * norm (indicator \ x *\<^sub>R f x)"]) - (auto simp add: space_restrict_space integrable_restrict_space simp del: norm_scaleR + (auto simp: space_restrict_space integrable_restrict_space simp del: norm_scaleR split: split_indicator) qed qed @@ -2335,11 +2249,7 @@ lemma integral_empty: assumes "space M = {}" shows "integral\<^sup>L M f = 0" -proof - - have "(\ x. f x \M) = (\ x. 0 \M)" - by(rule integral_cong)(simp_all add: assms) - thus ?thesis by simp -qed + by (metis AE_I2 assms empty_iff integral_eq_zero_AE) subsection \Measure spaces with an associated density\ @@ -2379,7 +2289,7 @@ also have "\ = integral\<^sup>L (density M g) (indicator A)" using base by simp finally show ?case - using base g + using base g apply (simp add: int integral_nonneg_AE) apply (subst (asm) ennreal_inj) apply (auto intro!: integral_nonneg_AE) @@ -2409,7 +2319,7 @@ show "(\i. integral\<^sup>L M (\x. g x *\<^sub>R s i x)) \ integral\<^sup>L (density M g) f" unfolding lim(2)[symmetric] by (rule integral_dominated_convergence[where w="\x. 2 * norm (f x)"]) - (insert lim(3-5), auto) + (use lim in auto) qed qed qed (simp add: f g integrable_density) @@ -2438,8 +2348,7 @@ lemma integrable_distr: fixes f :: "'a \ 'b::{banach, second_countable_topology}" shows "T \ measurable M M' \ integrable (distr M M' T) f \ integrable M (\x. f (T x))" - by (subst integrable_distr_eq[symmetric, where g=T]) - (auto dest: borel_measurable_integrable) + by (metis integrable_distr_eq integrable_iff_bounded measurable_distr_eq1) lemma integral_distr: fixes f :: "'a \ 'b::{banach, second_countable_topology}" @@ -2488,7 +2397,7 @@ show "(\i. integral\<^sup>L M (\x. s i (g x))) \ integral\<^sup>L (distr M N g) f" unfolding lim(2)[symmetric] by (rule integral_dominated_convergence[where w="\x. 2 * norm (f x)"]) - (insert lim(3-5), auto) + (use lim in auto) qed qed qed (simp add: f g integrable_distr_eq) @@ -2532,8 +2441,8 @@ lemma integrable_count_space_nat_iff: fixes f :: "nat \ _::{banach,second_countable_topology}" shows "integrable (count_space UNIV) f \ summable (\x. norm (f x))" - by (auto simp add: integrable_iff_bounded nn_integral_count_space_nat ennreal_suminf_neq_top - intro: summable_suminf_not_top) + by (auto simp: integrable_iff_bounded nn_integral_count_space_nat ennreal_suminf_neq_top + intro: summable_suminf_not_top) lemma sums_integral_count_space_nat: fixes f :: "nat \ _::{banach,second_countable_topology}" @@ -2563,7 +2472,7 @@ lemma integral_count_space_nat: fixes f :: "nat \ _::{banach,second_countable_topology}" shows "integrable (count_space UNIV) f \ integral\<^sup>L (count_space UNIV) f = (\x. f x)" - using sums_integral_count_space_nat by (rule sums_unique) + using sums_integral_count_space_nat sums_unique by auto lemma integrable_bij_count_space: fixes f :: "'a \ 'b::{banach, second_countable_topology}" @@ -2575,11 +2484,8 @@ fixes f :: "'a \ 'b::{banach, second_countable_topology}" assumes g: "bij_betw g A B" shows "integral\<^sup>L (count_space A) (\x. f (g x)) = integral\<^sup>L (count_space B) f" - using g[THEN bij_betw_imp_funcset] - apply (subst distr_bij_count_space[OF g, symmetric]) - apply (intro integral_distr[symmetric]) - apply auto - done + using g[THEN bij_betw_imp_funcset] distr_bij_count_space [OF g] + by (metis borel_measurable_count_space integral_distr measurable_count_space_eq1 space_count_space) lemma has_bochner_integral_count_space_nat: fixes f :: "nat \ _::{banach,second_countable_topology}" @@ -2596,29 +2502,31 @@ proposition integrable_point_measure_finite: fixes g :: "'a \ 'b::{banach, second_countable_topology}" and f :: "'a \ real" - shows "finite A \ integrable (point_measure A f) g" - unfolding point_measure_def - apply (subst density_cong[where f'="\x. ennreal (max 0 (f x))"]) - apply (auto split: split_max simp: ennreal_neg) - apply (subst integrable_density) - apply (auto simp: AE_count_space integrable_count_space) - done + assumes "finite A" + shows "integrable (point_measure A f) g" +proof - + have "integrable (density (count_space A) (\x. ennreal (max 0 (f x)))) g" + using assms + by (simp add: integrable_count_space integrable_density ) + then show ?thesis + by (smt (verit) AE_I2 borel_measurable_count_space density_cong ennreal_neg point_measure_def) +qed subsection \Lebesgue integration on \<^const>\null_measure\\ lemma has_bochner_integral_null_measure_iff[iff]: "has_bochner_integral (null_measure M) f 0 \ f \ borel_measurable M" - by (auto simp add: has_bochner_integral.simps simple_bochner_integral_def[abs_def] + by (auto simp: has_bochner_integral.simps simple_bochner_integral_def[abs_def] intro!: exI[of _ "\n x. 0"] simple_bochner_integrable.intros) lemma integrable_null_measure_iff[iff]: "integrable (null_measure M) f \ f \ borel_measurable M" - by (auto simp add: integrable.simps) + by (auto simp: integrable.simps) lemma integral_null_measure[simp]: "integral\<^sup>L (null_measure M) f = 0" - by (cases "integrable (null_measure M) f") - (auto simp add: not_integrable_integral_eq has_bochner_integral_integral_eq) + using integral_norm_bound_ennreal not_integrable_integral_eq by fastforce subsection \Legacy lemmas for the real-valued Lebesgue integral\ + theorem real_lebesgue_integral_def: assumes f[measurable]: "integrable M f" shows "integral\<^sup>L M f = enn2real (\\<^sup>+x. f x \M) - enn2real (\\<^sup>+x. ennreal (- f x) \M)" @@ -2701,18 +2609,18 @@ using i by auto next show "(\\<^sup>+ x. ennreal (u x) \M) = \\<^sup>+ x. (SUP i. ennreal (f i x)) \M" - apply (rule nn_integral_cong_AE) - using lim mono nn u_nn - apply eventually_elim - apply (simp add: LIMSEQ_unique[OF _ LIMSEQ_SUP] incseq_def) - done + proof (rule nn_integral_cong_AE) + show "AE x in M. ennreal (u x) = (SUP i. ennreal (f i x))" + using lim mono nn u_nn + by eventually_elim (simp add: LIMSEQ_unique[OF _ LIMSEQ_SUP] incseq_def) + qed qed also have "\ = ennreal x" using mono i nn unfolding nn_integral_eq_integral[OF i pos] by (subst LIMSEQ_unique[OF LIMSEQ_SUP]) (auto simp: mono_def integral_nonneg_AE pos intro!: integral_mono_AE ilim) finally have "(\\<^sup>+ x. ennreal (u x) \M) = ennreal x" . moreover have "(\\<^sup>+ x. ennreal (- u x) \M) = 0" - using u u_nn by (subst nn_integral_0_iff_AE) (auto simp add: ennreal_neg) + using u u_nn by (subst nn_integral_0_iff_AE) (auto simp: ennreal_neg) ultimately show "integrable M u" "integral\<^sup>L M u = x" by (auto simp: real_integrable_def real_lebesgue_integral_def u) qed @@ -2777,7 +2685,7 @@ proof - { assume "emeasure M (space M) = \" "a \ 0" then have ?thesis - by (auto simp add: not_integrable_integral_eq ennreal_mult_less_top measure_def integrable_iff_bounded) } + by (auto simp: not_integrable_integral_eq ennreal_mult_less_top measure_def integrable_iff_bounded) } moreover { assume "a = 0" then have ?thesis by simp } moreover @@ -2795,17 +2703,14 @@ lemma (in finite_measure) integrable_const_bound: fixes f :: "'a \ 'b::{banach,second_countable_topology}" shows "AE x in M. norm (f x) \ B \ f \ borel_measurable M \ integrable M f" - apply (rule integrable_bound[OF integrable_const[of B], of f]) - apply assumption - apply (cases "0 \ B") - apply auto - done + using integrable_bound[OF integrable_const[of B], of f] + by (smt (verit, ccfv_SIG) eventually_elim2 real_norm_def) lemma (in finite_measure) integral_bounded_eq_bound_then_AE: assumes "AE x in M. f x \ (c::real)" "integrable M f" "(\x. f x \M) = c * measure M (space M)" shows "AE x in M. f x = c" - apply (rule integral_ineq_eq_0_then_AE) using assms by auto + using assms by (intro integral_ineq_eq_0_then_AE) auto lemma integral_indicator_finite_real: fixes f :: "'a \ real" @@ -3030,13 +2935,7 @@ fixes f :: "_ \ _::{banach, second_countable_topology}" assumes "integrable (M1 \\<^sub>M M2) f" shows "integrable (M2 \\<^sub>M M1) (\(x,y). f (y,x))" -proof - - interpret Q: pair_sigma_finite M2 M1 .. - have *: "(\(x,y). f (y,x)) = (\x. f (case x of (x,y)\(y,x)))" by (auto simp: fun_eq_iff) - show ?thesis unfolding * - by (rule integrable_distr[OF measurable_pair_swap']) - (simp add: distr_pair_swap[symmetric] assms) -qed + by (smt (verit) assms distr_pair_swap integrable_cong integrable_distr measurable_pair_swap' prod.case_distrib split_cong) lemma (in pair_sigma_finite) integrable_product_swap_iff: fixes f :: "_ \ _::{banach, second_countable_topology}" @@ -3051,11 +2950,7 @@ fixes f :: "_ \ _::{banach, second_countable_topology}" assumes f: "f \ borel_measurable (M1 \\<^sub>M M2)" shows "(\(x,y). f (y,x) \(M2 \\<^sub>M M1)) = integral\<^sup>L (M1 \\<^sub>M M2) f" -proof - - have *: "(\(x,y). f (y,x)) = (\x. f (case x of (x,y)\(y,x)))" by (auto simp: fun_eq_iff) - show ?thesis unfolding * - by (simp add: integral_distr[symmetric, OF measurable_pair_swap' f] distr_pair_swap[symmetric]) -qed + by (smt (verit) distr_pair_swap f integral_cong integral_distr measurable_pair_swap' prod.case_distrib split_cong) theorem (in pair_sigma_finite) Fubini_integrable: fixes f :: "_ \ _::{banach, second_countable_topology}" @@ -3180,14 +3075,13 @@ case (add f g) then have [measurable]: "f \ borel_measurable (M1 \\<^sub>M M2)" "g \ borel_measurable (M1 \\<^sub>M M2)" by auto - have "(\ x. \ y. f (x, y) + g (x, y) \M2 \M1) = + have "AE x in M1. LINT y|M2. f (x, y) + g (x, y) = + (LINT y|M2. f (x, y)) + (LINT y|M2. g (x, y))" + using AE_integrable_fst'[OF add(1)] AE_integrable_fst'[OF add(3)] + by eventually_elim simp + then have "(\ x. \ y. f (x, y) + g (x, y) \M2 \M1) = (\ x. (\ y. f (x, y) \M2) + (\ y. g (x, y) \M2) \M1)" - apply (rule integral_cong_AE) - apply simp_all - using AE_integrable_fst'[OF add(1)] AE_integrable_fst'[OF add(3)] - apply eventually_elim - apply simp - done + by (intro integral_cong_AE) auto also have "\ = (\ x. f x \(M1 \\<^sub>M M2)) + (\ x. g x \(M1 \\<^sub>M M2))" using integrable_fst'[OF add(1)] integrable_fst'[OF add(3)] add(2,4) by simp finally show ?case @@ -3278,10 +3172,7 @@ lemma (in product_sigma_finite) product_integral_singleton: fixes f :: "_ \ _::{banach, second_countable_topology}" shows "f \ borel_measurable (M i) \ (\x. f (x i) \Pi\<^sub>M {i} M) = integral\<^sup>L (M i) f" - apply (subst distr_singleton[symmetric]) - apply (subst integral_distr) - apply simp_all - done + by (metis (no_types) distr_singleton insert_iff integral_distr measurable_component_singleton) lemma (in product_sigma_finite) product_integral_fold: fixes f :: "_ \ _::{banach, second_countable_topology}" @@ -3302,12 +3193,12 @@ using measurable_comp[OF measurable_merge f_borel] by (simp add: comp_def) have f_int: "integrable (Pi\<^sub>M I M \\<^sub>M Pi\<^sub>M J M) ?f" by (rule integrable_distr[OF measurable_merge]) (simp add: distr_merge[OF IJ fin] f) - show ?thesis + have "LINT x|(Pi\<^sub>M I M \\<^sub>M Pi\<^sub>M J M). f (merge I J x) = + LINT x|Pi\<^sub>M I M. LINT y|Pi\<^sub>M J M. f (merge I J (x, y))" + by (simp add: P.integral_fst'[symmetric, OF f_int]) + then show ?thesis apply (subst distr_merge[symmetric, OF IJ fin]) - apply (subst integral_distr[OF measurable_merge f_borel]) - apply (subst P.integral_fst'[symmetric, OF f_int]) - apply simp - done + by (simp add: integral_distr[OF measurable_merge f_borel]) qed lemma (in product_sigma_finite) product_integral_insert: @@ -3413,15 +3304,11 @@ proof (intro LIMSEQ_unique) show "(\i. integral\<^sup>L N (s i)) \ integral\<^sup>L N f" apply (rule integral_dominated_convergence[where w="\x. 2 * norm (f x)"]) - using lim - apply auto - done + using lim by auto show "(\i. integral\<^sup>L N (s i)) \ integral\<^sup>L M f" unfolding lim apply (rule integral_dominated_convergence[where w="\x. 2 * norm (f x)"]) - using lim M N(2) - apply auto - done + using lim M N by auto qed qed qed (simp add: not_integrable_integral_eq integrable_subalgebra[OF assms])