equal
deleted
inserted
replaced
1646 { fix x assume "x \<in> space M" |
1646 { fix x assume "x \<in> space M" |
1647 have "(\<lambda>i::nat. if i < f x then 1 else 0) sums ennreal_of_enat (f x)" |
1647 have "(\<lambda>i::nat. if i < f x then 1 else 0) sums ennreal_of_enat (f x)" |
1648 using sums_If_finite[of "\<lambda>r. r < f x" "\<lambda>_. 1 :: ennreal"] |
1648 using sums_If_finite[of "\<lambda>r. r < f x" "\<lambda>_. 1 :: ennreal"] |
1649 by (cases "f x") (simp_all add: sums_def of_nat_tendsto_top_ennreal) |
1649 by (cases "f x") (simp_all add: sums_def of_nat_tendsto_top_ennreal) |
1650 also have "(\<lambda>i. (if i < f x then 1 else 0)) = (\<lambda>i. indicator (F i) x)" |
1650 also have "(\<lambda>i. (if i < f x then 1 else 0)) = (\<lambda>i. indicator (F i) x)" |
1651 using `x \<in> space M` by (simp add: one_ennreal_def F_def fun_eq_iff) |
1651 using \<open>x \<in> space M\<close> by (simp add: one_ennreal_def F_def fun_eq_iff) |
1652 finally have "ennreal_of_enat (f x) = (\<Sum>i. indicator (F i) x)" |
1652 finally have "ennreal_of_enat (f x) = (\<Sum>i. indicator (F i) x)" |
1653 by (simp add: sums_iff) } |
1653 by (simp add: sums_iff) } |
1654 then have "(\<integral>\<^sup>+x. ennreal_of_enat (f x) \<partial>M) = (\<integral>\<^sup>+x. (\<Sum>i. indicator (F i) x) \<partial>M)" |
1654 then have "(\<integral>\<^sup>+x. ennreal_of_enat (f x) \<partial>M) = (\<integral>\<^sup>+x. (\<Sum>i. indicator (F i) x) \<partial>M)" |
1655 by (simp cong: nn_integral_cong) |
1655 by (simp cong: nn_integral_cong) |
1656 also have "\<dots> = (\<Sum>i. emeasure M (F i))" |
1656 also have "\<dots> = (\<Sum>i. emeasure M (F i))" |