172 assumes S: "S \<in> sets (completion M)" shows "emeasure (completion M) S = emeasure M (main_part M S)" |
172 assumes S: "S \<in> sets (completion M)" shows "emeasure (completion M) S = emeasure M (main_part M S)" |
173 proof (subst emeasure_measure_of[OF completion_def completion_into_space]) |
173 proof (subst emeasure_measure_of[OF completion_def completion_into_space]) |
174 let ?\<mu> = "emeasure M \<circ> main_part M" |
174 let ?\<mu> = "emeasure M \<circ> main_part M" |
175 show "S \<in> sets (completion M)" "?\<mu> S = emeasure M (main_part M S) " using S by simp_all |
175 show "S \<in> sets (completion M)" "?\<mu> S = emeasure M (main_part M S) " using S by simp_all |
176 show "positive (sets (completion M)) ?\<mu>" |
176 show "positive (sets (completion M)) ?\<mu>" |
177 by (simp add: positive_def emeasure_nonneg) |
177 by (simp add: positive_def) |
178 show "countably_additive (sets (completion M)) ?\<mu>" |
178 show "countably_additive (sets (completion M)) ?\<mu>" |
179 proof (intro countably_additiveI) |
179 proof (intro countably_additiveI) |
180 fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> sets (completion M)" "disjoint_family A" |
180 fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> sets (completion M)" "disjoint_family A" |
181 have "disjoint_family (\<lambda>i. main_part M (A i))" |
181 have "disjoint_family (\<lambda>i. main_part M (A i))" |
182 proof (intro disjoint_family_on_bisimulation[OF A(2)]) |
182 proof (intro disjoint_family_on_bisimulation[OF A(2)]) |
264 show "AE x in M. f x = ?f' x" |
264 show "AE x in M. f x = ?f' x" |
265 by (rule AE_I', rule sets) auto |
265 by (rule AE_I', rule sets) auto |
266 qed |
266 qed |
267 qed |
267 qed |
268 |
268 |
269 lemma completion_ex_borel_measurable_pos: |
269 lemma completion_ex_borel_measurable: |
270 fixes g :: "'a \<Rightarrow> ereal" |
270 fixes g :: "'a \<Rightarrow> ennreal" |
271 assumes g: "g \<in> borel_measurable (completion M)" and "\<And>x. 0 \<le> g x" |
271 assumes g: "g \<in> borel_measurable (completion M)" |
272 shows "\<exists>g'\<in>borel_measurable M. (AE x in M. g x = g' x)" |
272 shows "\<exists>g'\<in>borel_measurable M. (AE x in M. g x = g' x)" |
273 proof - |
273 proof - |
274 from g[THEN borel_measurable_implies_simple_function_sequence'] guess f . note f = this |
274 from g[THEN borel_measurable_implies_simple_function_sequence'] guess f . note f = this |
275 from this(1)[THEN completion_ex_simple_function] |
275 from this(1)[THEN completion_ex_simple_function] |
276 have "\<forall>i. \<exists>f'. simple_function M f' \<and> (AE x in M. f i x = f' x)" .. |
276 have "\<forall>i. \<exists>f'. simple_function M f' \<and> (AE x in M. f i x = f' x)" .. |
282 from AE[unfolded AE_all_countable[symmetric]] |
282 from AE[unfolded AE_all_countable[symmetric]] |
283 show "AE x in M. g x = (SUP i. f' i x)" (is "AE x in M. g x = ?f x") |
283 show "AE x in M. g x = (SUP i. f' i x)" (is "AE x in M. g x = ?f x") |
284 proof (elim AE_mp, safe intro!: AE_I2) |
284 proof (elim AE_mp, safe intro!: AE_I2) |
285 fix x assume eq: "\<forall>i. f i x = f' i x" |
285 fix x assume eq: "\<forall>i. f i x = f' i x" |
286 moreover have "g x = (SUP i. f i x)" |
286 moreover have "g x = (SUP i. f i x)" |
287 unfolding f using \<open>0 \<le> g x\<close> by (auto split: split_max) |
287 unfolding f by (auto split: split_max) |
288 ultimately show "g x = ?f x" by auto |
288 ultimately show "g x = ?f x" by auto |
289 qed |
289 qed |
290 show "?f \<in> borel_measurable M" |
290 show "?f \<in> borel_measurable M" |
291 using sf[THEN borel_measurable_simple_function] by auto |
291 using sf[THEN borel_measurable_simple_function] by auto |
292 qed |
292 qed |
293 qed |
293 qed |
294 |
294 |
295 lemma completion_ex_borel_measurable: |
|
296 fixes g :: "'a \<Rightarrow> ereal" |
|
297 assumes g: "g \<in> borel_measurable (completion M)" |
|
298 shows "\<exists>g'\<in>borel_measurable M. (AE x in M. g x = g' x)" |
|
299 proof - |
|
300 have "(\<lambda>x. max 0 (g x)) \<in> borel_measurable (completion M)" "\<And>x. 0 \<le> max 0 (g x)" using g by auto |
|
301 from completion_ex_borel_measurable_pos[OF this] guess g_pos .. |
|
302 moreover |
|
303 have "(\<lambda>x. max 0 (- g x)) \<in> borel_measurable (completion M)" "\<And>x. 0 \<le> max 0 (- g x)" using g by auto |
|
304 from completion_ex_borel_measurable_pos[OF this] guess g_neg .. |
|
305 ultimately |
|
306 show ?thesis |
|
307 proof (safe intro!: bexI[of _ "\<lambda>x. g_pos x - g_neg x"]) |
|
308 show "AE x in M. max 0 (- g x) = g_neg x \<longrightarrow> max 0 (g x) = g_pos x \<longrightarrow> g x = g_pos x - g_neg x" |
|
309 proof (intro AE_I2 impI) |
|
310 fix x assume g: "max 0 (- g x) = g_neg x" "max 0 (g x) = g_pos x" |
|
311 show "g x = g_pos x - g_neg x" unfolding g[symmetric] |
|
312 by (cases "g x") (auto split: split_max) |
|
313 qed |
|
314 qed auto |
|
315 qed |
|
316 |
|
317 lemma (in prob_space) prob_space_completion: "prob_space (completion M)" |
295 lemma (in prob_space) prob_space_completion: "prob_space (completion M)" |
318 by (rule prob_spaceI) (simp add: emeasure_space_1) |
296 by (rule prob_spaceI) (simp add: emeasure_space_1) |
319 |
297 |
320 lemma null_sets_completionI: "N \<in> null_sets M \<Longrightarrow> N \<in> null_sets (completion M)" |
298 lemma null_sets_completionI: "N \<in> null_sets M \<Longrightarrow> N \<in> null_sets (completion M)" |
321 by (auto simp: null_sets_def) |
299 by (auto simp: null_sets_def) |