963 "_almost_everywhere" :: "pttrn \<Rightarrow> 'a \<Rightarrow> bool \<Rightarrow> bool" ("AE _ in _. _" [0,0,10] 10) |
963 "_almost_everywhere" :: "pttrn \<Rightarrow> 'a \<Rightarrow> bool \<Rightarrow> bool" ("AE _ in _. _" [0,0,10] 10) |
964 |
964 |
965 translations |
965 translations |
966 "AE x in M. P" \<rightleftharpoons> "CONST almost_everywhere M (\<lambda>x. P)" |
966 "AE x in M. P" \<rightleftharpoons> "CONST almost_everywhere M (\<lambda>x. P)" |
967 |
967 |
|
968 abbreviation |
|
969 "set_almost_everywhere A M P \<equiv> AE x in M. x \<in> A \<longrightarrow> P x" |
|
970 |
|
971 syntax |
|
972 "_set_almost_everywhere" :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'a \<Rightarrow> bool \<Rightarrow> bool" |
|
973 ("AE _\<in>_ in _./ _" [0,0,0,10] 10) |
|
974 |
|
975 translations |
|
976 "AE x\<in>A in M. P" \<rightleftharpoons> "CONST set_almost_everywhere A M (\<lambda>x. P)" |
|
977 |
968 lemma eventually_ae_filter: "eventually P (ae_filter M) \<longleftrightarrow> (\<exists>N\<in>null_sets M. {x \<in> space M. \<not> P x} \<subseteq> N)" |
978 lemma eventually_ae_filter: "eventually P (ae_filter M) \<longleftrightarrow> (\<exists>N\<in>null_sets M. {x \<in> space M. \<not> P x} \<subseteq> N)" |
969 unfolding ae_filter_def by (subst eventually_INF_base) (auto simp: eventually_principal subset_eq) |
979 unfolding ae_filter_def by (subst eventually_INF_base) (auto simp: eventually_principal subset_eq) |
970 |
980 |
971 lemma AE_I': |
981 lemma AE_I': |
972 "N \<in> null_sets M \<Longrightarrow> {x\<in>space M. \<not> P x} \<subseteq> N \<Longrightarrow> (AE x in M. P x)" |
982 "N \<in> null_sets M \<Longrightarrow> {x\<in>space M. \<not> P x} \<subseteq> N \<Longrightarrow> (AE x in M. P x)" |
1574 using A fin[of i] by (intro emeasure_eq_ennreal_measure[symmetric]) auto |
1584 using A fin[of i] by (intro emeasure_eq_ennreal_measure[symmetric]) auto |
1575 ultimately show "(\<lambda>x. ennreal (Sigma_Algebra.measure M (A x))) \<longlonglongrightarrow> ennreal (Sigma_Algebra.measure M (\<Inter>i. A i))" |
1585 ultimately show "(\<lambda>x. ennreal (Sigma_Algebra.measure M (A x))) \<longlonglongrightarrow> ennreal (Sigma_Algebra.measure M (\<Inter>i. A i))" |
1576 using fin A by (auto intro!: Lim_emeasure_decseq) |
1586 using fin A by (auto intro!: Lim_emeasure_decseq) |
1577 qed auto |
1587 qed auto |
1578 |
1588 |
|
1589 subsection \<open>Set of measurable sets with finite measure\<close> |
|
1590 |
|
1591 definition fmeasurable :: "'a measure \<Rightarrow> 'a set set" |
|
1592 where |
|
1593 "fmeasurable M = {A\<in>sets M. emeasure M A < \<infinity>}" |
|
1594 |
|
1595 lemma fmeasurableD[dest, measurable_dest]: "A \<in> fmeasurable M \<Longrightarrow> A \<in> sets M" |
|
1596 by (auto simp: fmeasurable_def) |
|
1597 |
|
1598 lemma fmeasurableI: "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow> A \<in> fmeasurable M" |
|
1599 by (auto simp: fmeasurable_def) |
|
1600 |
|
1601 lemma fmeasurableI_null_sets: "A \<in> null_sets M \<Longrightarrow> A \<in> fmeasurable M" |
|
1602 by (auto simp: fmeasurable_def) |
|
1603 |
|
1604 lemma fmeasurableI2: "A \<in> fmeasurable M \<Longrightarrow> B \<subseteq> A \<Longrightarrow> B \<in> sets M \<Longrightarrow> B \<in> fmeasurable M" |
|
1605 using emeasure_mono[of B A M] by (auto simp: fmeasurable_def) |
|
1606 |
|
1607 lemma measure_mono_fmeasurable: |
|
1608 "A \<subseteq> B \<Longrightarrow> A \<in> sets M \<Longrightarrow> B \<in> fmeasurable M \<Longrightarrow> measure M A \<le> measure M B" |
|
1609 by (auto simp: measure_def fmeasurable_def intro!: emeasure_mono enn2real_mono) |
|
1610 |
|
1611 lemma emeasure_eq_measure2: "A \<in> fmeasurable M \<Longrightarrow> emeasure M A = measure M A" |
|
1612 by (simp add: emeasure_eq_ennreal_measure fmeasurable_def less_top) |
|
1613 |
|
1614 interpretation fmeasurable: ring_of_sets "space M" "fmeasurable M" |
|
1615 proof (rule ring_of_setsI) |
|
1616 show "fmeasurable M \<subseteq> Pow (space M)" "{} \<in> fmeasurable M" |
|
1617 by (auto simp: fmeasurable_def dest: sets.sets_into_space) |
|
1618 fix a b assume *: "a \<in> fmeasurable M" "b \<in> fmeasurable M" |
|
1619 then have "emeasure M (a \<union> b) \<le> emeasure M a + emeasure M b" |
|
1620 by (intro emeasure_subadditive) auto |
|
1621 also have "\<dots> < top" |
|
1622 using * by (auto simp: fmeasurable_def) |
|
1623 finally show "a \<union> b \<in> fmeasurable M" |
|
1624 using * by (auto intro: fmeasurableI) |
|
1625 show "a - b \<in> fmeasurable M" |
|
1626 using emeasure_mono[of "a - b" a M] * by (auto simp: fmeasurable_def Diff_subset) |
|
1627 qed |
|
1628 |
|
1629 lemma fmeasurable_Diff: "A \<in> fmeasurable M \<Longrightarrow> B \<in> sets M \<Longrightarrow> A - B \<in> fmeasurable M" |
|
1630 using fmeasurableI2[of A M "A - B"] by auto |
|
1631 |
|
1632 lemma fmeasurable_UN: |
|
1633 assumes "countable I" "\<And>i. i \<in> I \<Longrightarrow> F i \<subseteq> A" "\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M" "A \<in> fmeasurable M" |
|
1634 shows "(\<Union>i\<in>I. F i) \<in> fmeasurable M" |
|
1635 proof (rule fmeasurableI2) |
|
1636 show "A \<in> fmeasurable M" "(\<Union>i\<in>I. F i) \<subseteq> A" using assms by auto |
|
1637 show "(\<Union>i\<in>I. F i) \<in> sets M" |
|
1638 using assms by (intro sets.countable_UN') auto |
|
1639 qed |
|
1640 |
|
1641 lemma fmeasurable_INT: |
|
1642 assumes "countable I" "i \<in> I" "\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M" "F i \<in> fmeasurable M" |
|
1643 shows "(\<Inter>i\<in>I. F i) \<in> fmeasurable M" |
|
1644 proof (rule fmeasurableI2) |
|
1645 show "F i \<in> fmeasurable M" "(\<Inter>i\<in>I. F i) \<subseteq> F i" |
|
1646 using assms by auto |
|
1647 show "(\<Inter>i\<in>I. F i) \<in> sets M" |
|
1648 using assms by (intro sets.countable_INT') auto |
|
1649 qed |
|
1650 |
1579 subsection \<open>Measure spaces with @{term "emeasure M (space M) < \<infinity>"}\<close> |
1651 subsection \<open>Measure spaces with @{term "emeasure M (space M) < \<infinity>"}\<close> |
1580 |
1652 |
1581 locale finite_measure = sigma_finite_measure M for M + |
1653 locale finite_measure = sigma_finite_measure M for M + |
1582 assumes finite_emeasure_space: "emeasure M (space M) \<noteq> top" |
1654 assumes finite_emeasure_space: "emeasure M (space M) \<noteq> top" |
1583 |
1655 |
1585 "emeasure M (space M) \<noteq> \<infinity> \<Longrightarrow> finite_measure M" |
1657 "emeasure M (space M) \<noteq> \<infinity> \<Longrightarrow> finite_measure M" |
1586 proof qed (auto intro!: exI[of _ "{space M}"]) |
1658 proof qed (auto intro!: exI[of _ "{space M}"]) |
1587 |
1659 |
1588 lemma (in finite_measure) emeasure_finite[simp, intro]: "emeasure M A \<noteq> top" |
1660 lemma (in finite_measure) emeasure_finite[simp, intro]: "emeasure M A \<noteq> top" |
1589 using finite_emeasure_space emeasure_space[of M A] by (auto simp: top_unique) |
1661 using finite_emeasure_space emeasure_space[of M A] by (auto simp: top_unique) |
|
1662 |
|
1663 lemma (in finite_measure) fmeasurable_eq_sets: "fmeasurable M = sets M" |
|
1664 by (auto simp: fmeasurable_def less_top[symmetric]) |
1590 |
1665 |
1591 lemma (in finite_measure) emeasure_eq_measure: "emeasure M A = ennreal (measure M A)" |
1666 lemma (in finite_measure) emeasure_eq_measure: "emeasure M A = ennreal (measure M A)" |
1592 by (intro emeasure_eq_ennreal_measure) simp |
1667 by (intro emeasure_eq_ennreal_measure) simp |
1593 |
1668 |
1594 lemma (in finite_measure) emeasure_real: "\<exists>r. 0 \<le> r \<and> emeasure M A = ennreal r" |
1669 lemma (in finite_measure) emeasure_real: "\<exists>r. 0 \<le> r \<and> emeasure M A = ennreal r" |
3133 assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>" |
3208 assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>" |
3134 shows "sets (SUP m:M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))" |
3209 shows "sets (SUP m:M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))" |
3135 proof - |
3210 proof - |
3136 { fix a m assume "a \<in> sigma_sets \<Omega> m" "m \<in> M" |
3211 { fix a m assume "a \<in> sigma_sets \<Omega> m" "m \<in> M" |
3137 then have "a \<in> sigma_sets \<Omega> (\<Union>M)" |
3212 then have "a \<in> sigma_sets \<Omega> (\<Union>M)" |
3138 by induction (auto intro: sigma_sets.intros) } |
3213 by induction (auto intro: sigma_sets.intros(2-)) } |
3139 then show "sets (SUP m:M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))" |
3214 then show "sets (SUP m:M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))" |
3140 apply (subst sets_Sup_eq[where X="\<Omega>"]) |
3215 apply (subst sets_Sup_eq[where X="\<Omega>"]) |
3141 apply (auto simp add: M) [] |
3216 apply (auto simp add: M) [] |
3142 apply auto [] |
3217 apply auto [] |
3143 apply (simp add: space_measure_of_conv M Union_least) |
3218 apply (simp add: space_measure_of_conv M Union_least) |
3315 next |
3390 next |
3316 let ?M = "measure M (space M)" and ?m = "\<lambda>x. measure M {x}" |
3391 let ?M = "measure M (space M)" and ?m = "\<lambda>x. measure M {x}" |
3317 assume "?M \<noteq> 0" |
3392 assume "?M \<noteq> 0" |
3318 then have *: "{x. ?m x \<noteq> 0} = (\<Union>n. {x. ?M / Suc n < ?m x})" |
3393 then have *: "{x. ?m x \<noteq> 0} = (\<Union>n. {x. ?M / Suc n < ?m x})" |
3319 using reals_Archimedean[of "?m x / ?M" for x] |
3394 using reals_Archimedean[of "?m x / ?M" for x] |
3320 by (auto simp: field_simps not_le[symmetric] measure_nonneg divide_le_0_iff measure_le_0_iff) |
3395 by (auto simp: field_simps not_le[symmetric] divide_le_0_iff measure_le_0_iff) |
3321 have **: "\<And>n. finite {x. ?M / Suc n < ?m x}" |
3396 have **: "\<And>n. finite {x. ?M / Suc n < ?m x}" |
3322 proof (rule ccontr) |
3397 proof (rule ccontr) |
3323 fix n assume "infinite {x. ?M / Suc n < ?m x}" (is "infinite ?X") |
3398 fix n assume "infinite {x. ?M / Suc n < ?m x}" (is "infinite ?X") |
3324 then obtain X where "finite X" "card X = Suc (Suc n)" "X \<subseteq> ?X" |
3399 then obtain X where "finite X" "card X = Suc (Suc n)" "X \<subseteq> ?X" |
3325 by (metis infinite_arbitrarily_large) |
3400 by (metis infinite_arbitrarily_large) |