41 finite (g ` space M) \<and> |
41 finite (g ` space M) \<and> |
42 (\<forall>x \<in> g ` space M. g -` {x} \<inter> space M \<in> sets M)" |
42 (\<forall>x \<in> g ` space M. g -` {x} \<inter> space M \<in> sets M)" |
43 |
43 |
44 lemma (in sigma_algebra) simple_functionD: |
44 lemma (in sigma_algebra) simple_functionD: |
45 assumes "simple_function g" |
45 assumes "simple_function g" |
46 shows "finite (g ` space M)" and "g -` {x} \<inter> space M \<in> sets M" |
46 shows "finite (g ` space M)" and "g -` X \<inter> space M \<in> sets M" |
47 proof - |
47 proof - |
48 show "finite (g ` space M)" |
48 show "finite (g ` space M)" |
49 using assms unfolding simple_function_def by auto |
49 using assms unfolding simple_function_def by auto |
50 show "g -` {x} \<inter> space M \<in> sets M" |
50 have "g -` X \<inter> space M = g -` (X \<inter> g`space M) \<inter> space M" by auto |
51 proof cases |
51 also have "\<dots> = (\<Union>x\<in>X \<inter> g`space M. g-`{x} \<inter> space M)" by auto |
52 assume "x \<in> g`space M" then show ?thesis |
52 finally show "g -` X \<inter> space M \<in> sets M" using assms |
53 using assms unfolding simple_function_def by auto |
53 by (auto intro!: finite_UN simp del: UN_simps simp: simple_function_def) |
54 next |
|
55 assume "x \<notin> g`space M" |
|
56 then have "g -` {x} \<inter> space M = {}" by auto |
|
57 then show ?thesis by auto |
|
58 qed |
|
59 qed |
54 qed |
60 |
55 |
61 lemma (in sigma_algebra) simple_function_indicator_representation: |
56 lemma (in sigma_algebra) simple_function_indicator_representation: |
62 fixes f ::"'a \<Rightarrow> pinfreal" |
57 fixes f ::"'a \<Rightarrow> pinfreal" |
63 assumes f: "simple_function f" and x: "x \<in> space M" |
58 assumes f: "simple_function f" and x: "x \<in> space M" |
2307 show "integrable f" ?integral using fin f f_eq_S |
2302 show "integrable f" ?integral using fin f f_eq_S |
2308 by (simp_all add: integral_cmul_indicator borel_measurable_vimage) |
2303 by (simp_all add: integral_cmul_indicator borel_measurable_vimage) |
2309 qed |
2304 qed |
2310 |
2305 |
2311 lemma (in finite_measure_space) simple_function_finite[simp, intro]: "simple_function f" |
2306 lemma (in finite_measure_space) simple_function_finite[simp, intro]: "simple_function f" |
2312 unfolding simple_function_def sets_eq_Pow using finite_space by auto |
2307 unfolding simple_function_def using finite_space by auto |
2313 |
2308 |
2314 lemma (in finite_measure_space) borel_measurable_finite[intro, simp]: "f \<in> borel_measurable M" |
2309 lemma (in finite_measure_space) borel_measurable_finite[intro, simp]: "f \<in> borel_measurable M" |
2315 by (auto intro: borel_measurable_simple_function) |
2310 by (auto intro: borel_measurable_simple_function) |
2316 |
2311 |
2317 lemma (in finite_measure_space) positive_integral_finite_eq_setsum: |
2312 lemma (in finite_measure_space) positive_integral_finite_eq_setsum: |
2318 "positive_integral f = (\<Sum>x \<in> space M. f x * \<mu> {x})" |
2313 "positive_integral f = (\<Sum>x \<in> space M. f x * \<mu> {x})" |
2319 proof - |
2314 proof - |
2320 have *: "positive_integral f = positive_integral (\<lambda>x. \<Sum>y\<in>space M. f y * indicator {y} x)" |
2315 have *: "positive_integral f = positive_integral (\<lambda>x. \<Sum>y\<in>space M. f y * indicator {y} x)" |
2321 by (auto intro!: positive_integral_cong simp add: indicator_def if_distrib setsum_cases[OF finite_space]) |
2316 by (auto intro!: positive_integral_cong simp add: indicator_def if_distrib setsum_cases[OF finite_space]) |
2322 show ?thesis unfolding * using borel_measurable_finite[of f] |
2317 show ?thesis unfolding * using borel_measurable_finite[of f] |
2323 by (simp add: positive_integral_setsum positive_integral_cmult_indicator sets_eq_Pow) |
2318 by (simp add: positive_integral_setsum positive_integral_cmult_indicator) |
2324 qed |
2319 qed |
2325 |
2320 |
2326 lemma (in finite_measure_space) integral_finite_singleton: |
2321 lemma (in finite_measure_space) integral_finite_singleton: |
2327 shows "integrable f" |
2322 shows "integrable f" |
2328 and "integral f = (\<Sum>x \<in> space M. f x * real (\<mu> {x}))" (is ?I) |
2323 and "integral f = (\<Sum>x \<in> space M. f x * real (\<mu> {x}))" (is ?I) |
2330 have [simp]: |
2325 have [simp]: |
2331 "positive_integral (\<lambda>x. Real (f x)) = (\<Sum>x \<in> space M. Real (f x) * \<mu> {x})" |
2326 "positive_integral (\<lambda>x. Real (f x)) = (\<Sum>x \<in> space M. Real (f x) * \<mu> {x})" |
2332 "positive_integral (\<lambda>x. Real (- f x)) = (\<Sum>x \<in> space M. Real (- f x) * \<mu> {x})" |
2327 "positive_integral (\<lambda>x. Real (- f x)) = (\<Sum>x \<in> space M. Real (- f x) * \<mu> {x})" |
2333 unfolding positive_integral_finite_eq_setsum by auto |
2328 unfolding positive_integral_finite_eq_setsum by auto |
2334 show "integrable f" using finite_space finite_measure |
2329 show "integrable f" using finite_space finite_measure |
2335 by (simp add: setsum_\<omega> integrable_def sets_eq_Pow) |
2330 by (simp add: setsum_\<omega> integrable_def) |
2336 show ?I using finite_measure |
2331 show ?I using finite_measure |
2337 apply (simp add: integral_def sets_eq_Pow real_of_pinfreal_setsum[symmetric] |
2332 apply (simp add: integral_def real_of_pinfreal_setsum[symmetric] |
2338 real_of_pinfreal_mult[symmetric] setsum_subtractf[symmetric]) |
2333 real_of_pinfreal_mult[symmetric] setsum_subtractf[symmetric]) |
2339 by (rule setsum_cong) (simp_all split: split_if) |
2334 by (rule setsum_cong) (simp_all split: split_if) |
2340 qed |
2335 qed |
2341 |
2336 |
2342 end |
2337 end |