diff -r 933eb9e6a1cc -r 77b453bd616f src/HOL/Probability/Bochner_Integration.thy --- a/src/HOL/Probability/Bochner_Integration.thy Tue Nov 03 11:20:21 2015 +0100 +++ b/src/HOL/Probability/Bochner_Integration.thy Tue Nov 10 14:18:41 2015 +0000 @@ -153,7 +153,7 @@ qed qed -lemma real_indicator: "real (indicator A x :: ereal) = indicator A x" +lemma real_indicator: "real_of_ereal (indicator A x :: ereal) = indicator A x" unfolding indicator_def by auto lemma split_indicator_asm: @@ -182,9 +182,9 @@ sup: "\x. (SUP i. U i x) = max 0 (ereal (u x))" and nn: "\i x. 0 \ U i x" by blast - def U' \ "\i x. indicator (space M) x * real (U i x)" + def U' \ "\i x. indicator (space M) x * real_of_ereal (U i x)" then have U'_sf[measurable]: "\i. simple_function M (U' i)" - using U by (auto intro!: simple_function_compose1[where g=real]) + using U by (auto intro!: simple_function_compose1[where g=real_of_ereal]) show "P u" proof (rule seq) @@ -209,7 +209,7 @@ by simp next fix i - have "U' i ` space M \ real ` (U i ` space M)" "finite (U i ` space M)" + have "U' i ` space M \ real_of_ereal ` (U i ` space M)" "finite (U i ` space M)" unfolding U'_def using U(1) by (auto dest: simple_functionD) then have fin: "finite (U' i ` space M)" by (metis finite_subset finite_imageI) @@ -472,7 +472,7 @@ emeasure M ((\x. ereal (f x)) -` {ereal (f y)} \ space M)" by simp } with f have "simple_bochner_integral M f = (\\<^sup>Sx. f x \M)" unfolding simple_integral_def - by (subst simple_bochner_integral_partition[OF f(1), where g="\x. ereal (f x)" and v=real]) + by (subst simple_bochner_integral_partition[OF f(1), where g="\x. ereal (f x)" and v=real_of_ereal]) (auto intro: f simple_function_compose1 elim: simple_bochner_integrable.cases intro!: setsum.cong ereal_cong_mult simp: setsum_ereal[symmetric] times_ereal.simps(1)[symmetric] ac_simps @@ -1644,7 +1644,7 @@ lemma integral_eq_nn_integral: assumes [measurable]: "f \ borel_measurable M" assumes nonneg: "AE x in M. 0 \ f x" - shows "integral\<^sup>L M f = real (\\<^sup>+ x. ereal (f x) \M)" + shows "integral\<^sup>L M f = real_of_ereal (\\<^sup>+ x. ereal (f x) \M)" proof cases assume *: "(\\<^sup>+ x. ereal (f x) \M) = \" also have "(\\<^sup>+ x. ereal (f x) \M) = (\\<^sup>+ x. ereal (norm (f x)) \M)" @@ -2138,15 +2138,15 @@ lemma real_lebesgue_integral_def: assumes f[measurable]: "integrable M f" - shows "integral\<^sup>L M f = real (\\<^sup>+x. f x \M) - real (\\<^sup>+x. - f x \M)" + shows "integral\<^sup>L M f = real_of_ereal (\\<^sup>+x. f x \M) - real_of_ereal (\\<^sup>+x. - f x \M)" proof - have "integral\<^sup>L M f = integral\<^sup>L M (\x. max 0 (f x) - max 0 (- f x))" by (auto intro!: arg_cong[where f="integral\<^sup>L M"]) also have "\ = integral\<^sup>L M (\x. max 0 (f x)) - integral\<^sup>L M (\x. max 0 (- f x))" by (intro integral_diff integrable_max integrable_minus integrable_zero f) - also have "integral\<^sup>L M (\x. max 0 (f x)) = real (\\<^sup>+x. max 0 (f x) \M)" + also have "integral\<^sup>L M (\x. max 0 (f x)) = real_of_ereal (\\<^sup>+x. max 0 (f x) \M)" by (subst integral_eq_nn_integral[symmetric]) auto - also have "integral\<^sup>L M (\x. max 0 (- f x)) = real (\\<^sup>+x. max 0 (- f x) \M)" + also have "integral\<^sup>L M (\x. max 0 (- f x)) = real_of_ereal (\\<^sup>+x. max 0 (- f x) \M)" by (subst integral_eq_nn_integral[symmetric]) auto also have "(\x. ereal (max 0 (f x))) = (\x. max 0 (ereal (f x)))" by (auto simp: max_def) @@ -2346,13 +2346,13 @@ lemma (in finite_measure) ereal_integral_real: assumes [measurable]: "f \ borel_measurable M" assumes ae: "AE x in M. 0 \ f x" "AE x in M. f x \ ereal B" - shows "ereal (\x. real (f x) \M) = (\\<^sup>+x. f x \M)" + shows "ereal (\x. real_of_ereal (f x) \M) = (\\<^sup>+x. f x \M)" proof (subst nn_integral_eq_integral[symmetric]) - show "integrable M (\x. real (f x))" + show "integrable M (\x. real_of_ereal (f x))" using ae by (intro integrable_const_bound[where B=B]) (auto simp: real_le_ereal_iff) - show "AE x in M. 0 \ real (f x)" + show "AE x in M. 0 \ real_of_ereal (f x)" using ae by (auto simp: real_of_ereal_pos) - show "(\\<^sup>+ x. ereal (real (f x)) \M) = integral\<^sup>N M f" + show "(\\<^sup>+ x. ereal (real_of_ereal (f x)) \M) = integral\<^sup>N M f" using ae by (intro nn_integral_cong_AE) (auto simp: ereal_real) qed