395 have "{x\<in>\<Omega>. \<exists>i::'i::countable. P i x} = (\<Union>i. {x\<in>\<Omega>. P i x})" by auto |
395 have "{x\<in>\<Omega>. \<exists>i::'i::countable. P i x} = (\<Union>i. {x\<in>\<Omega>. P i x})" by auto |
396 with assms show ?thesis by auto |
396 with assms show ?thesis by auto |
397 qed |
397 qed |
398 |
398 |
399 lemma (in sigma_algebra) sets_Collect_countable_Ex': |
399 lemma (in sigma_algebra) sets_Collect_countable_Ex': |
400 assumes "\<And>i. {x\<in>\<Omega>. P i x} \<in> M" |
400 assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" |
401 assumes "countable I" |
401 assumes "countable I" |
402 shows "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} \<in> M" |
402 shows "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} \<in> M" |
403 proof - |
403 proof - |
404 have "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x\<in>\<Omega>. P i x})" by auto |
404 have "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x\<in>\<Omega>. P i x})" by auto |
405 with assms show ?thesis |
405 with assms show ?thesis |
406 by (auto intro!: countable_UN') |
406 by (auto intro!: countable_UN') |
|
407 qed |
|
408 |
|
409 lemma (in sigma_algebra) sets_Collect_countable_All': |
|
410 assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" |
|
411 assumes "countable I" |
|
412 shows "{x\<in>\<Omega>. \<forall>i\<in>I. P i x} \<in> M" |
|
413 proof - |
|
414 have "{x\<in>\<Omega>. \<forall>i\<in>I. P i x} = (\<Inter>i\<in>I. {x\<in>\<Omega>. P i x}) \<inter> \<Omega>" by auto |
|
415 with assms show ?thesis |
|
416 by (cases "I = {}") (auto intro!: countable_INT') |
|
417 qed |
|
418 |
|
419 lemma (in sigma_algebra) sets_Collect_countable_Ex1': |
|
420 assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" |
|
421 assumes "countable I" |
|
422 shows "{x\<in>\<Omega>. \<exists>!i\<in>I. P i x} \<in> M" |
|
423 proof - |
|
424 have "{x\<in>\<Omega>. \<exists>!i\<in>I. P i x} = {x\<in>\<Omega>. \<exists>i\<in>I. P i x \<and> (\<forall>j\<in>I. P j x \<longrightarrow> i = j)}" |
|
425 by auto |
|
426 with assms show ?thesis |
|
427 by (auto intro!: sets_Collect_countable_All' sets_Collect_countable_Ex' sets_Collect_conj sets_Collect_imp sets_Collect_const) |
407 qed |
428 qed |
408 |
429 |
409 lemmas (in sigma_algebra) sets_Collect = |
430 lemmas (in sigma_algebra) sets_Collect = |
410 sets_Collect_imp sets_Collect_disj sets_Collect_conj sets_Collect_neg sets_Collect_const |
431 sets_Collect_imp sets_Collect_disj sets_Collect_conj sets_Collect_neg sets_Collect_const |
411 sets_Collect_countable_All sets_Collect_countable_Ex sets_Collect_countable_All |
432 sets_Collect_countable_All sets_Collect_countable_Ex sets_Collect_countable_All |
1542 lemma measurable_compose_rev: |
1563 lemma measurable_compose_rev: |
1543 assumes f: "f \<in> measurable L N" and g: "g \<in> measurable M L" |
1564 assumes f: "f \<in> measurable L N" and g: "g \<in> measurable M L" |
1544 shows "(\<lambda>x. f (g x)) \<in> measurable M N" |
1565 shows "(\<lambda>x. f (g x)) \<in> measurable M N" |
1545 using measurable_compose[OF g f] . |
1566 using measurable_compose[OF g f] . |
1546 |
1567 |
|
1568 lemma measurable_count_space_eq_countable: |
|
1569 assumes "countable A" |
|
1570 shows "f \<in> measurable M (count_space A) \<longleftrightarrow> (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))" |
|
1571 proof - |
|
1572 { fix X assume "X \<subseteq> A" "f \<in> space M \<rightarrow> A" |
|
1573 with `countable A` have "f -` X \<inter> space M = (\<Union>a\<in>X. f -` {a} \<inter> space M)" "countable X" |
|
1574 by (auto dest: countable_subset) |
|
1575 moreover assume "\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M" |
|
1576 ultimately have "f -` X \<inter> space M \<in> sets M" |
|
1577 using `X \<subseteq> A` by (auto intro!: sets.countable_UN' simp del: UN_simps) } |
|
1578 then show ?thesis |
|
1579 unfolding measurable_def by auto |
|
1580 qed |
1547 |
1581 |
1548 subsection {* Extend measure *} |
1582 subsection {* Extend measure *} |
1549 |
1583 |
1550 definition "extend_measure \<Omega> I G \<mu> = |
1584 definition "extend_measure \<Omega> I G \<mu> = |
1551 (if (\<exists>\<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G`I)) \<mu>') \<and> \<not> (\<forall>i\<in>I. \<mu> i = 0) |
1585 (if (\<exists>\<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G`I)) \<mu>') \<and> \<not> (\<forall>i\<in>I. \<mu> i = 0) |
1606 by (auto simp: subset_eq) |
1640 by (auto simp: subset_eq) |
1607 |
1641 |
1608 subsection {* Sigma algebra generated by function preimages *} |
1642 subsection {* Sigma algebra generated by function preimages *} |
1609 |
1643 |
1610 definition |
1644 definition |
1611 "vimage_algebra M S f = sigma S ((\<lambda>A. f -` A \<inter> S) ` sets M)" |
1645 "vimage_algebra M S X = sigma S ((\<lambda>A. X -` A \<inter> S) ` sets M)" |
1612 |
1646 |
1613 lemma sigma_algebra_preimages: |
1647 lemma sigma_algebra_preimages: |
1614 fixes f :: "'x \<Rightarrow> 'a" |
1648 fixes f :: "'x \<Rightarrow> 'a" |
1615 assumes "f \<in> S \<rightarrow> space M" |
1649 assumes "f \<in> S \<rightarrow> space M" |
1616 shows "sigma_algebra S ((\<lambda>A. f -` A \<inter> S) ` sets M)" |
1650 shows "sigma_algebra S ((\<lambda>A. f -` A \<inter> S) ` sets M)" |