# HG changeset patch # User hoelzl # Date 1296825415 -3600 # Node ID 1100512e16d8485b6b0f7065f7fee3f50aae0c2c # Parent 8c539202f85426b5993bbbf6bfe66d4d6257b03f add auto support for AE_mp diff -r 8c539202f854 -r 1100512e16d8 src/HOL/Probability/Complete_Measure.thy --- a/src/HOL/Probability/Complete_Measure.thy Fri Feb 04 14:16:48 2011 +0100 +++ b/src/HOL/Probability/Complete_Measure.thy Fri Feb 04 14:16:55 2011 +0100 @@ -266,7 +266,7 @@ proof (intro bexI) from AE[unfolded all_AE_countable] show "AE x. g x = (SUP i. f' i x)" (is "AE x. g x = ?f x") - proof (rule AE_mp, safe intro!: AE_cong) + proof (elim AE_mp, safe intro!: AE_I2) fix x assume eq: "\i. f i x = f' i x" moreover have "g = SUPR UNIV f" using `f \ g` unfolding isoton_def by simp ultimately show "g x = ?f x" by (simp add: SUPR_apply) diff -r 8c539202f854 -r 1100512e16d8 src/HOL/Probability/Lebesgue_Integration.thy --- a/src/HOL/Probability/Lebesgue_Integration.thy Fri Feb 04 14:16:48 2011 +0100 +++ b/src/HOL/Probability/Lebesgue_Integration.thy Fri Feb 04 14:16:55 2011 +0100 @@ -694,10 +694,7 @@ assumes "simple_function M f" and "simple_function M g" and mono: "\ x. x \ space M \ f x \ g x" shows "integral\<^isup>S M f \ integral\<^isup>S M g" -proof (rule simple_integral_mono_AE[OF assms(1, 2)]) - show "AE x. f x \ g x" - using mono by (rule AE_cong) auto -qed + using assms by (intro simple_integral_mono_AE) auto lemma (in measure_space) simple_integral_cong_AE: assumes "simple_function M f" "simple_function M g" and "AE x. f x = g x" @@ -782,20 +779,14 @@ have "AE x. indicator N x = (0 :: pextreal)" using `N \ null_sets` by (auto simp: indicator_def intro!: AE_I[of _ N]) then have "(\\<^isup>Sx. u x * indicator N x \M) = (\\<^isup>Sx. 0 \M)" - using assms by (intro simple_integral_cong_AE) (auto intro!: AE_disjI2) + using assms by (intro simple_integral_cong_AE) auto then show ?thesis by simp qed lemma (in measure_space) simple_integral_cong_AE_mult_indicator: assumes sf: "simple_function M f" and eq: "AE x. x \ S" and "S \ sets M" shows "integral\<^isup>S M f = (\\<^isup>Sx. f x * indicator S x \M)" -proof (rule simple_integral_cong_AE) - show "simple_function M f" by fact - show "simple_function M (\x. f x * indicator S x)" - using sf `S \ sets M` by auto - from eq show "AE x. f x = f x * indicator S x" - by (rule AE_mp) simp -qed + using assms by (intro simple_integral_cong_AE) auto lemma (in measure_space) simple_integral_restricted: assumes "A \ sets M" @@ -1004,7 +995,7 @@ have *: "{x \ space M. \ a x \ a x * indicator (space M - N) x} = N \ {x \ space M. a x \ 0}" (is "?N = _") using `N \ sets M`[THEN sets_into_space] by (auto simp: indicator_def) - then show "?N \ sets M" + then show "?N \ sets M" using `N \ sets M` `simple_function M a`[THEN borel_measurable_simple_function] by (auto intro!: measure_mono Int) then have "\ ?N \ \ N" @@ -1032,9 +1023,8 @@ by (auto simp: eq_iff intro!: positive_integral_mono_AE) lemma (in measure_space) positive_integral_mono: - assumes mono: "\x. x \ space M \ u x \ v x" - shows "integral\<^isup>P M u \ integral\<^isup>P M v" - using mono by (auto intro!: AE_cong positive_integral_mono_AE) + "(\x. x \ space M \ u x \ v x) \ integral\<^isup>P M u \ integral\<^isup>P M v" + by (auto intro: positive_integral_mono_AE) lemma image_set_cong: assumes A: "\x. x \ A \ \y\B. f x = g y" @@ -1487,6 +1477,16 @@ qed qed +lemma (in measure_space) positive_integral_0_iff_AE: + assumes u: "u \ borel_measurable M" + shows "integral\<^isup>P M u = 0 \ (AE x. u x = 0)" +proof - + have sets: "{x\space M. u x \ 0} \ sets M" + using u by auto + then show ?thesis + using positive_integral_0_iff[OF u] AE_iff_null_set[OF sets] by auto +qed + lemma (in measure_space) positive_integral_restricted: assumes "A \ sets M" shows "integral\<^isup>P (restricted_space A) f = (\\<^isup>+ x. f x * indicator A x \M)" @@ -1585,10 +1585,8 @@ assumes cong: "AE x. f x = g x" shows "integral\<^isup>L M f = integral\<^isup>L M g" proof - - have "AE x. Real (f x) = Real (g x)" - using cong by (rule AE_mp) simp - moreover have "AE x. Real (- f x) = Real (- g x)" - using cong by (rule AE_mp) simp + have "AE x. Real (f x) = Real (g x)" using cong by auto + moreover have "AE x. Real (- f x) = Real (- g x)" using cong by auto ultimately show ?thesis by (simp cong: positive_integral_cong_AE add: lebesgue_integral_def) qed @@ -1756,20 +1754,18 @@ shows "integral\<^isup>L M f \ integral\<^isup>L M g" proof - have "AE x. Real (f x) \ Real (g x)" - using mono by (rule AE_mp) (auto intro!: AE_cong) + using mono by auto moreover have "AE x. Real (- g x) \ Real (- f x)" - using mono by (rule AE_mp) (auto intro!: AE_cong) + using mono by auto ultimately show ?thesis using fg by (auto simp: lebesgue_integral_def integrable_def diff_minus intro!: add_mono real_of_pextreal_mono positive_integral_mono_AE) qed lemma (in measure_space) integral_mono: - assumes fg: "integrable M f" "integrable M g" - and mono: "\t. t \ space M \ f t \ g t" + assumes "integrable M f" "integrable M g" "\t. t \ space M \ f t \ g t" shows "integral\<^isup>L M f \ integral\<^isup>L M g" - apply (rule integral_mono_AE[OF fg]) - using mono by (rule AE_cong) auto + using assms by (auto intro: integral_mono_AE) lemma (in measure_space) integral_diff[simp, intro]: assumes f: "integrable M f" and g: "integrable M g" @@ -2056,14 +2052,12 @@ lemma (in measure_space) integral_real: fixes f :: "'a \ pextreal" - assumes "AE x. f x \ \" + assumes [simp]: "AE x. f x \ \" shows "(\x. real (f x) \M) = real (integral\<^isup>P M f)" (is ?plus) and "(\x. - real (f x) \M) = - real (integral\<^isup>P M f)" (is ?minus) proof - have "(\\<^isup>+ x. Real (real (f x)) \M) = integral\<^isup>P M f" - apply (rule positive_integral_cong_AE) - apply (rule AE_mp[OF assms(1)]) - by (auto intro!: AE_cong simp: Real_real) + by (auto intro!: positive_integral_cong_AE simp: Real_real) moreover have "(\\<^isup>+ x. Real (- real (f x)) \M) = (\\<^isup>+ x. 0 \M)" by (intro positive_integral_cong) auto @@ -2073,7 +2067,7 @@ lemma (in measure_space) integral_dominated_convergence: assumes u: "\i. integrable M (u i)" and bound: "\x j. x\space M \ \u j x\ \ w x" - and w: "integrable M w" "\x. x \ space M \ 0 \ w x" + and w: "integrable M w" and u': "\x. x \ space M \ (\i. u i x) ----> u' x" shows "integrable M u'" and "(\i. (\x. \u i x - u' x\ \M)) ----> 0" (is "?lim_diff") @@ -2089,13 +2083,18 @@ have u'_borel: "u' \ borel_measurable M" using u' by (blast intro: borel_measurable_LIMSEQ[of u]) + { fix x assume x: "x \ space M" + then have "0 \ \u 0 x\" by auto + also have "\ \ w x" using bound[OF x] by auto + finally have "0 \ w x" . } + note w_pos = this + show "integrable M u'" proof (rule integrable_bound) show "integrable M w" by fact show "u' \ borel_measurable M" by fact next - fix x assume x: "x \ space M" - thus "0 \ w x" by fact + fix x assume x: "x \ space M" then show "0 \ w x" by fact show "\u' x\ \ w x" using u'_bound[OF x] . qed @@ -2113,7 +2112,7 @@ have PI_diff: "\m n. (\\<^isup>+ x. Real (?diff (m + n) x) \M) = (\\<^isup>+ x. Real (2 * w x) \M) - (\\<^isup>+ x. Real \u (m + n) x - u' x\ \M)" - using diff w diff_less_2w + using diff w diff_less_2w w_pos by (subst positive_integral_diff[symmetric]) (auto simp: integrable_def intro!: positive_integral_cong) @@ -2155,7 +2154,7 @@ unfolding PI_diff pextreal_INF_minus[OF I2w_fin] pextreal_SUP_minus .. finally show ?thesis using neq_0 I2w_fin by (rule pextreal_le_minus_imp_0) qed - + have [simp]: "\n m x. Real (- \u (m + n) x - u' x\) = 0" by auto have [simp]: "\n m. (\\<^isup>+ x. Real \u (m + n) x - u' x\ \M) = @@ -2230,13 +2229,11 @@ show "(\i. integral\<^isup>L M (?w' i)) ----> x" unfolding * sums_def . qed - have 4: "\x. x \ space M \ 0 \ ?w x" using 2[of _ 0] by simp - from summable[THEN summable_rabs_cancel] - have 5: "\x. x \ space M \ (\n. \i = 0.. (\i. f i x)" + have 4: "\x. x \ space M \ (\n. \i = 0.. (\i. f i x)" by (auto intro: summable_sumr_LIMSEQ_suminf) - note int = integral_dominated_convergence(1,3)[OF 1 2 3 4 5] + note int = integral_dominated_convergence(1,3)[OF 1 2 3 4] from int show "integrable M ?S" by simp diff -r 8c539202f854 -r 1100512e16d8 src/HOL/Probability/Measure.thy --- a/src/HOL/Probability/Measure.thy Fri Feb 04 14:16:48 2011 +0100 +++ b/src/HOL/Probability/Measure.thy Fri Feb 04 14:16:55 2011 +0100 @@ -739,12 +739,25 @@ obtains N where "{x \ space M. \ P x} \ N" "\ N = 0" "N \ sets M" using assms unfolding almost_everywhere_def by auto +lemma (in measure_space) AE_E2: + assumes "AE x. P x" "{x\space M. P x} \ sets M" + shows "\ {x\space M. \ P x} = 0" (is "\ ?P = 0") +proof - + obtain A where A: "?P \ A" "A \ sets M" "\ A = 0" + using assms by (auto elim!: AE_E) + have "?P = space M - {x\space M. P x}" by auto + then have "?P \ sets M" using assms by auto + with assms `?P \ A` `A \ sets M` have "\ ?P \ \ A" + by (auto intro!: measure_mono) + then show "\ ?P = 0" using A by simp +qed + lemma (in measure_space) AE_I: assumes "{x \ space M. \ P x} \ N" "\ N = 0" "N \ sets M" shows "AE x. P x" using assms unfolding almost_everywhere_def by auto -lemma (in measure_space) AE_mp: +lemma (in measure_space) AE_mp[elim!]: assumes AE_P: "AE x. P x" and AE_imp: "AE x. P x \ Q x" shows "AE x. Q x" proof - @@ -765,56 +778,28 @@ qed qed -lemma (in measure_space) AE_iffI: - assumes P: "AE x. P x" and Q: "AE x. P x \ Q x" shows "AE x. Q x" - using AE_mp[OF Q, of "\x. P x \ Q x"] AE_mp[OF P, of Q] by auto - -lemma (in measure_space) AE_disjI1: - assumes P: "AE x. P x" shows "AE x. P x \ Q x" - by (rule AE_mp[OF P]) auto - -lemma (in measure_space) AE_disjI2: - assumes P: "AE x. Q x" shows "AE x. P x \ Q x" - by (rule AE_mp[OF P]) auto - -lemma (in measure_space) AE_conjI: - assumes AE_P: "AE x. P x" and AE_Q: "AE x. Q x" - shows "AE x. P x \ Q x" - apply (rule AE_mp[OF AE_P]) - apply (rule AE_mp[OF AE_Q]) - by simp +lemma (in measure_space) + shows AE_iffI: "AE x. P x \ AE x. P x \ Q x \ AE x. Q x" + and AE_disjI1: "AE x. P x \ AE x. P x \ Q x" + and AE_disjI2: "AE x. Q x \ AE x. P x \ Q x" + and AE_conjI: "AE x. P x \ AE x. Q x \ AE x. P x \ Q x" + and AE_conj_iff[simp]: "(AE x. P x \ Q x) \ (AE x. P x) \ (AE x. Q x)" + by auto -lemma (in measure_space) AE_conj_iff[simp]: - shows "(AE x. P x \ Q x) \ (AE x. P x) \ (AE x. Q x)" -proof (intro conjI iffI AE_conjI) - assume *: "AE x. P x \ Q x" - from * show "AE x. P x" by (rule AE_mp) auto - from * show "AE x. Q x" by (rule AE_mp) auto -qed auto - -lemma (in measure_space) AE_E2: - assumes "AE x. P x" "{x\space M. P x} \ sets M" - shows "\ {x\space M. \ P x} = 0" (is "\ ?P = 0") -proof - - obtain A where A: "?P \ A" "A \ sets M" "\ A = 0" - using assms by (auto elim!: AE_E) - have "?P = space M - {x\space M. P x}" by auto - then have "?P \ sets M" using assms by auto - with assms `?P \ A` `A \ sets M` have "\ ?P \ \ A" - by (auto intro!: measure_mono) - then show "\ ?P = 0" using A by simp -qed - -lemma (in measure_space) AE_space[simp, intro]: "AE x. x \ space M" +lemma (in measure_space) AE_space: "AE x. x \ space M" by (rule AE_I[where N="{}"]) auto -lemma (in measure_space) AE_cong: - assumes "\x. x \ space M \ P x" shows "AE x. P x" -proof - - have [simp]: "\x. (x \ space M \ P x) \ True" using assms by auto - show ?thesis - by (rule AE_mp[OF AE_space]) auto -qed +lemma (in measure_space) AE_I2[simp, intro]: + "(\x. x \ space M \ P x) \ AE x. P x" + using AE_space by auto + +lemma (in measure_space) AE_Ball_mp: + "\x\space M. P x \ AE x. P x \ Q x \ AE x. Q x" + by auto + +lemma (in measure_space) AE_cong[cong]: + "(\x. x \ space M \ P x \ Q x) \ (AE x. P x) \ (AE x. Q x)" + by auto lemma (in measure_space) all_AE_countable: "(\i::'i::countable. AE x. P i x) \ (AE x. \i. P i x)" @@ -829,11 +814,7 @@ by (intro null_sets_UN) auto ultimately show "AE x. \i. P i x" unfolding almost_everywhere_def by auto -next - assume *: "AE x. \i. P i x" - show "\i. AE x. P i x" - by (rule allI, rule AE_mp[OF *]) simp -qed +qed auto lemma (in measure_space) restricted_measure_space: assumes "S \ sets M" diff -r 8c539202f854 -r 1100512e16d8 src/HOL/Probability/Product_Measure.thy --- a/src/HOL/Probability/Product_Measure.thy Fri Feb 04 14:16:48 2011 +0100 +++ b/src/HOL/Probability/Product_Measure.thy Fri Feb 04 14:16:55 2011 +0100 @@ -1061,46 +1061,28 @@ have AE: "M1.almost_everywhere (\x. (\\<^isup>+y. Real (f (x, y)) \M2) \ \)" "M1.almost_everywhere (\x. (\\<^isup>+y. Real (- f (x, y)) \M2) \ \)" by (auto intro!: M1.positive_integral_omega_AE) - then show ?AE - apply (rule M1.AE_mp[OF _ M1.AE_mp]) - apply (rule M1.AE_cong) - using assms unfolding integrable_def - by (auto intro!: measurable_pair_image_snd) - have "integrable M1 (\x. real (\\<^isup>+y. Real (f (x, y)) \M2))" (is "integrable M1 ?f") - proof (intro integrable_def[THEN iffD2] conjI) - show "?f \ borel_measurable M1" - using borel by (auto intro!: M1.borel_measurable_real positive_integral_fst_measurable) - have "(\\<^isup>+x. Real (?f x) \M1) = (\\<^isup>+x. (\\<^isup>+y. Real (f (x, y)) \M2) \M1)" - apply (rule M1.positive_integral_cong_AE) - apply (rule M1.AE_mp[OF AE(1)]) - apply (rule M1.AE_cong) - by (auto simp: Real_real) - then show "(\\<^isup>+x. Real (?f x) \M1) \ \" - using positive_integral_fst_measurable[OF borel(2)] int by simp - have "(\\<^isup>+x. Real (- ?f x) \M1) = (\\<^isup>+x. 0 \M1)" - by (intro M1.positive_integral_cong) simp - then show "(\\<^isup>+x. Real (- ?f x) \M1) \ \" by simp - qed - moreover have "integrable M1 (\x. real (\\<^isup>+ y. Real (- f (x, y)) \M2))" - (is "integrable M1 ?f") - proof (intro integrable_def[THEN iffD2] conjI) - show "?f \ borel_measurable M1" - using borel by (auto intro!: M1.borel_measurable_real positive_integral_fst_measurable) - have "(\\<^isup>+x. Real (?f x) \M1) = (\\<^isup>+x. (\\<^isup>+y. Real (- f (x, y)) \M2) \M1)" - apply (rule M1.positive_integral_cong_AE) - apply (rule M1.AE_mp[OF AE(2)]) - apply (rule M1.AE_cong) - by (auto simp: Real_real) - then show "(\\<^isup>+x. Real (?f x) \M1) \ \" - using positive_integral_fst_measurable[OF borel(1)] int by simp - have "(\\<^isup>+x. Real (- ?f x) \M1) = (\\<^isup>+x. 0 \M1)" - by (intro M1.positive_integral_cong) simp - then show "(\\<^isup>+x. Real (- ?f x) \M1) \ \" by simp - qed - ultimately show ?INT + then show ?AE using assms + by (simp add: measurable_pair_image_snd integrable_def) + { fix f assume borel: "(\x. Real (f x)) \ borel_measurable P" + and int: "integral\<^isup>P P (\x. Real (f x)) \ \" + and AE: "M1.almost_everywhere (\x. (\\<^isup>+y. Real (f (x, y)) \M2) \ \)" + have "integrable M1 (\x. real (\\<^isup>+y. Real (f (x, y)) \M2))" (is "integrable M1 ?f") + proof (intro integrable_def[THEN iffD2] conjI) + show "?f \ borel_measurable M1" + using borel by (auto intro!: M1.borel_measurable_real positive_integral_fst_measurable) + have "(\\<^isup>+x. Real (?f x) \M1) = (\\<^isup>+x. (\\<^isup>+y. Real (f (x, y)) \M2) \M1)" + using AE by (auto intro!: M1.positive_integral_cong_AE simp: Real_real) + then show "(\\<^isup>+x. Real (?f x) \M1) \ \" + using positive_integral_fst_measurable[OF borel] int by simp + have "(\\<^isup>+x. Real (- ?f x) \M1) = (\\<^isup>+x. 0 \M1)" + by (intro M1.positive_integral_cong) simp + then show "(\\<^isup>+x. Real (- ?f x) \M1) \ \" by simp + qed } + from this[OF borel(1) int(1) AE(2)] this[OF borel(2) int(2) AE(1)] + show ?INT unfolding lebesgue_integral_def[of P] lebesgue_integral_def[of M2] borel[THEN positive_integral_fst_measurable(2), symmetric] - by (simp add: M1.integral_real[OF AE(1)] M1.integral_real[OF AE(2)]) + using AE by (simp add: M1.integral_real) qed lemma (in pair_sigma_finite) integrable_snd_measurable: diff -r 8c539202f854 -r 1100512e16d8 src/HOL/Probability/Radon_Nikodym.thy --- a/src/HOL/Probability/Radon_Nikodym.thy Fri Feb 04 14:16:48 2011 +0100 +++ b/src/HOL/Probability/Radon_Nikodym.thy Fri Feb 04 14:16:55 2011 +0100 @@ -817,8 +817,8 @@ (is "(\A\sets M. ?P f A = ?P g A) \ _") proof (intro iffI ballI) fix A assume eq: "AE x. f x = g x" - show "?P f A = ?P g A" - by (rule positive_integral_cong_AE[OF AE_mp[OF eq]]) simp + then show "?P f A = ?P g A" + by (auto intro: positive_integral_cong_AE) next assume eq: "\A\sets M. ?P f A = ?P g A" from this[THEN bspec, OF top] fin @@ -879,11 +879,10 @@ have "?N \ sets M" using borel by auto have *: "\i x A. \y::pextreal. y * indicator (Q i) x * indicator A x = y * indicator (Q i \ A) x" unfolding indicator_def by auto - have 1: "\i. AE x. ?f (Q i) x = ?f' (Q i) x" - using borel Q_fin Q + have "\i. AE x. ?f (Q i) x = ?f' (Q i) x" using borel Q_fin Q by (intro finite_density_unique[THEN iffD1] allI) (auto intro!: borel_measurable_pextreal_times f Int simp: *) - have 2: "AE x. ?f Q0 x = ?f' Q0 x" + moreover have "AE x. ?f Q0 x = ?f' Q0 x" proof (rule AE_I') { fix f :: "'a \ pextreal" assume borel: "f \ borel_measurable M" and eq: "\A. A \ sets M \ ?\ A = (\\<^isup>+x. f x * indicator A x \M)" @@ -911,13 +910,12 @@ show "{x \ space M. ?f Q0 x \ ?f' Q0 x} \ (Q0 \ {x\space M. f x \ \}) \ (Q0 \ {x\space M. f' x \ \})" by (auto simp: indicator_def) qed - have **: "\x. (?f Q0 x = ?f' Q0 x) \ (\i. ?f (Q i) x = ?f' (Q i) x) \ + moreover have "\x. (?f Q0 x = ?f' Q0 x) \ (\i. ?f (Q i) x = ?f' (Q i) x) \ ?f (space M) x = ?f' (space M) x" by (auto simp: indicator_def Q0) - have 3: "AE x. ?f (space M) x = ?f' (space M) x" - by (rule AE_mp[OF 1[unfolded all_AE_countable] AE_mp[OF 2]]) (simp add: **) - then show "AE x. f x = f' x" - by (rule AE_mp) (auto intro!: AE_cong simp: indicator_def) + ultimately have "AE x. ?f (space M) x = ?f' (space M) x" + by (auto simp: all_AE_countable) + then show "AE x. f x = f' x" by auto qed lemma (in sigma_finite_measure) density_unique: @@ -978,25 +976,20 @@ and "sets ?N = sets M" and "space ?N = space M" by (auto simp: measurable_def) from \.Ex_finite_integrable_function obtain h where h: "h \ borel_measurable M" "integral\<^isup>P ?N h \ \" - and fin: "\x. x \ space M \ 0 < h x \ h x < \" by auto + and fin: "\x\space M. 0 < h x \ h x < \" by auto have "AE x. f x * h x \ \" proof (rule AE_I') - have "integral\<^isup>P ?N h = (\\<^isup>+x. f x * h x \M)" - apply (subst \.positive_integral_cong_measure[symmetric, - of "M\ measure := \ A. \\<^isup>+x. f x * indicator A x \M \"]) - apply (simp_all add: eq) - apply (rule positive_integral_translated_density) - using f h by auto + have "integral\<^isup>P ?N h = (\\<^isup>+x. f x * h x \M)" using f h + by (subst \.positive_integral_cong_measure[symmetric, + of "M\ measure := \ A. \\<^isup>+x. f x * indicator A x \M \"]) + (auto intro!: positive_integral_translated_density simp: eq) then have "(\\<^isup>+x. f x * h x \M) \ \" using h(2) by simp then show "(\x. f x * h x) -` {\} \ space M \ null_sets" using f h(1) by (auto intro!: positive_integral_omega borel_measurable_vimage) qed auto then show "AE x. f x \ \" - proof (rule AE_mp, intro AE_cong) - fix x assume "x \ space M" from this[THEN fin] - show "f x * h x \ \ \ f x \ \" by auto - qed + using fin by (auto elim!: AE_Ball_mp) next assume AE: "AE x. f x \ \" from sigma_finite guess Q .. note Q = this @@ -1043,16 +1036,8 @@ proof (cases i) case 0 have "AE x. f x * indicator (A i \ Q j) x = 0" - using AE by (rule AE_mp) (auto intro!: AE_cong simp: A_def `i = 0`) - then have "(\\<^isup>+x. f x * indicator (A i \ Q j) x \M) = 0" - using A_in_sets f - apply (subst positive_integral_0_iff) - apply fast - apply (subst (asm) AE_iff_null_set) - apply (intro borel_measurable_pextreal_neq_const) - apply fast - by simp - then show ?thesis by simp + using AE by (auto simp: A_def `i = 0`) + from positive_integral_cong_AE[OF this] show ?thesis by simp next case (Suc n) then have "(\\<^isup>+x. f x * indicator (A i \ Q j) x \M) \ @@ -1157,11 +1142,8 @@ by (simp add: mult_le_0_iff) then have "RN_deriv M \ x * Real (f x) = Real (real (RN_deriv M \ x) * f x)" using * by (simp add: Real_real) } - note * = this - have "(\\<^isup>+x. RN_deriv M \ x * Real (f x) \M) = (\\<^isup>+x. Real (real (RN_deriv M \ x) * f x) \M)" - apply (rule positive_integral_cong_AE) - apply (rule AE_mp[OF RN_deriv_finite[OF \]]) - by (auto intro!: AE_cong simp: *) } + then have "(\\<^isup>+x. RN_deriv M \ x * Real (f x) \M) = (\\<^isup>+x. Real (real (RN_deriv M \ x) * f x) \M)" + using RN_deriv_finite[OF \] by (auto intro: positive_integral_cong_AE) } with this this f f' Nf show ?integral ?integrable unfolding lebesgue_integral_def integrable_def