src/HOL/Analysis/Measure_Space.thy
changeset 69313 b021008c5397
parent 69286 e4d5a07fecb6
child 69517 dc20f278e8f3
equal deleted inserted replaced
69312:e0f68a507683 69313:b021008c5397
   315   assumes f: "positive M f" "additive M f"
   315   assumes f: "positive M f" "additive M f"
   316   shows "countably_additive M f \<longleftrightarrow>
   316   shows "countably_additive M f \<longleftrightarrow>
   317     (\<forall>A. range A \<subseteq> M \<longrightarrow> incseq A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> (\<lambda>i. f (A i)) \<longlonglongrightarrow> f (\<Union>i. A i))"
   317     (\<forall>A. range A \<subseteq> M \<longrightarrow> incseq A \<longrightarrow> (\<Union>i. A i) \<in> M \<longrightarrow> (\<lambda>i. f (A i)) \<longlonglongrightarrow> f (\<Union>i. A i))"
   318   unfolding countably_additive_def
   318   unfolding countably_additive_def
   319 proof safe
   319 proof safe
   320   assume count_sum: "\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> UNION UNIV A \<in> M \<longrightarrow> (\<Sum>i. f (A i)) = f (UNION UNIV A)"
   320   assume count_sum: "\<forall>A. range A \<subseteq> M \<longrightarrow> disjoint_family A \<longrightarrow> \<Union>(A ` UNIV) \<in> M \<longrightarrow> (\<Sum>i. f (A i)) = f (\<Union>(A ` UNIV))"
   321   fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "incseq A" "(\<Union>i. A i) \<in> M"
   321   fix A :: "nat \<Rightarrow> 'a set" assume A: "range A \<subseteq> M" "incseq A" "(\<Union>i. A i) \<in> M"
   322   then have dA: "range (disjointed A) \<subseteq> M" by (auto simp: range_disjointed_sets)
   322   then have dA: "range (disjointed A) \<subseteq> M" by (auto simp: range_disjointed_sets)
   323   with count_sum[THEN spec, of "disjointed A"] A(3)
   323   with count_sum[THEN spec, of "disjointed A"] A(3)
   324   have f_UN: "(\<Sum>i. f (disjointed A i)) = f (\<Union>i. A i)"
   324   have f_UN: "(\<Sum>i. f (disjointed A i)) = f (\<Union>i. A i)"
   325     by (auto simp: UN_disjointed_eq disjoint_family_disjointed)
   325     by (auto simp: UN_disjointed_eq disjoint_family_disjointed)
  1832     measure M (\<Union>i\<in>I. F i) = (\<Sum>i\<in>I. measure M (F i))"
  1832     measure M (\<Union>i\<in>I. F i) = (\<Sum>i\<in>I. measure M (F i))"
  1833   unfolding AE_pairwise[OF countable_finite, OF I]
  1833   unfolding AE_pairwise[OF countable_finite, OF I]
  1834   using I
  1834   using I
  1835 proof (induction I rule: finite_induct)
  1835 proof (induction I rule: finite_induct)
  1836   case (insert x I)
  1836   case (insert x I)
  1837   have "measure M (F x \<union> UNION I F) = measure M (F x) + measure M (UNION I F)"
  1837   have "measure M (F x \<union> \<Union>(F ` I)) = measure M (F x) + measure M (\<Union>(F ` I))"
  1838     by (rule measure_Un_AE) (use insert in \<open>auto simp: pairwise_insert\<close>)
  1838     by (rule measure_Un_AE) (use insert in \<open>auto simp: pairwise_insert\<close>)
  1839     with insert show ?case
  1839     with insert show ?case
  1840       by (simp add: pairwise_insert )
  1840       by (simp add: pairwise_insert )
  1841 qed simp
  1841 qed simp
  1842 
  1842 
  3130   by (auto simp: le_measure_iff split: if_split_asm)
  3130   by (auto simp: le_measure_iff split: if_split_asm)
  3131 
  3131 
  3132 lemma le_measureD3: "A \<le> B \<Longrightarrow> sets A = sets B \<Longrightarrow> emeasure A X \<le> emeasure B X"
  3132 lemma le_measureD3: "A \<le> B \<Longrightarrow> sets A = sets B \<Longrightarrow> emeasure A X \<le> emeasure B X"
  3133   by (auto simp: le_measure_iff le_fun_def dest: sets_eq_imp_space_eq split: if_split_asm)
  3133   by (auto simp: le_measure_iff le_fun_def dest: sets_eq_imp_space_eq split: if_split_asm)
  3134 
  3134 
  3135 lemma UN_space_closed: "UNION S sets \<subseteq> Pow (UNION S space)"
  3135 lemma UN_space_closed: "\<Union>(sets ` S) \<subseteq> Pow (\<Union>(space ` S))"
  3136   using sets.space_closed by auto
  3136   using sets.space_closed by auto
  3137 
  3137 
  3138 definition Sup_lexord :: "('a \<Rightarrow> 'b::complete_lattice) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> 'a"
  3138 definition Sup_lexord :: "('a \<Rightarrow> 'b::complete_lattice) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> 'a"
  3139 where
  3139 where
  3140   "Sup_lexord k c s A = (let U = (SUP a\<in>A. k a) in if \<exists>a\<in>A. k a = U then c {a\<in>A. k a = U} else s A)"
  3140   "Sup_lexord k c s A = (let U = (SUP a\<in>A. k a) in if \<exists>a\<in>A. k a = U then c {a\<in>A. k a = U} else s A)"
  3243            (auto intro!: le_measureD3 sup_measure_F_mono simp: sets_sup_measure_F
  3243            (auto intro!: le_measureD3 sup_measure_F_mono simp: sets_sup_measure_F
  3244                  simp del: id_apply)
  3244                  simp del: id_apply)
  3245       with ij show "\<exists>k\<in>{P. finite P \<and> P \<subseteq> M}. \<forall>n\<in>N. ?\<mu> i (F n) \<le> ?\<mu> k (F n) \<and> ?\<mu> j (F n) \<le> ?\<mu> k (F n)"
  3245       with ij show "\<exists>k\<in>{P. finite P \<and> P \<subseteq> M}. \<forall>n\<in>N. ?\<mu> i (F n) \<le> ?\<mu> k (F n) \<and> ?\<mu> j (F n) \<le> ?\<mu> k (F n)"
  3246         by (safe intro!: bexI[of _ "i \<union> j"]) auto
  3246         by (safe intro!: bexI[of _ "i \<union> j"]) auto
  3247     next
  3247     next
  3248       show "(SUP P \<in> {P. finite P \<and> P \<subseteq> M}. \<Sum>n. ?\<mu> P (F n)) = (SUP P \<in> {P. finite P \<and> P \<subseteq> M}. ?\<mu> P (UNION UNIV F))"
  3248       show "(SUP P \<in> {P. finite P \<and> P \<subseteq> M}. \<Sum>n. ?\<mu> P (F n)) = (SUP P \<in> {P. finite P \<and> P \<subseteq> M}. ?\<mu> P (\<Union>(F ` UNIV)))"
  3249       proof (intro SUP_cong refl)
  3249       proof (intro SUP_cong refl)
  3250         fix i assume i: "i \<in> {P. finite P \<and> P \<subseteq> M}"
  3250         fix i assume i: "i \<in> {P. finite P \<and> P \<subseteq> M}"
  3251         show "(\<Sum>n. ?\<mu> i (F n)) = ?\<mu> i (UNION UNIV F)"
  3251         show "(\<Sum>n. ?\<mu> i (F n)) = ?\<mu> i (\<Union>(F ` UNIV))"
  3252         proof cases
  3252         proof cases
  3253           assume "i \<noteq> {}" with i ** show ?thesis
  3253           assume "i \<noteq> {}" with i ** show ?thesis
  3254             apply (intro suminf_emeasure \<open>disjoint_family F\<close>)
  3254             apply (intro suminf_emeasure \<open>disjoint_family F\<close>)
  3255             apply (subst sets_sup_measure_F[OF _ _ sets_eq])
  3255             apply (subst sets_sup_measure_F[OF _ _ sets_eq])
  3256             apply auto
  3256             apply auto
  3292     from this[OF \<open>x \<in> A\<close>] \<open>x \<in> A\<close> show "x \<le> sigma (\<Union>a\<in>A. space a) {}"
  3292     from this[OF \<open>x \<in> A\<close>] \<open>x \<in> A\<close> show "x \<le> sigma (\<Union>a\<in>A. space a) {}"
  3293       by (intro less_eq_measure.intros) auto
  3293       by (intro less_eq_measure.intros) auto
  3294   next
  3294   next
  3295     fix a S assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
  3295     fix a S assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
  3296       and neq: "\<And>aa. aa \<in> S \<Longrightarrow> sets aa \<noteq> (\<Union>a\<in>S. sets a)"
  3296       and neq: "\<And>aa. aa \<in> S \<Longrightarrow> sets aa \<noteq> (\<Union>a\<in>S. sets a)"
  3297     have sp_a: "space a = (UNION S space)"
  3297     have sp_a: "space a = (\<Union>(space ` S))"
  3298       using \<open>a\<in>A\<close> by (auto simp: S)
  3298       using \<open>a\<in>A\<close> by (auto simp: S)
  3299     show "x \<le> sigma (UNION S space) (UNION S sets)"
  3299     show "x \<le> sigma (\<Union>(space ` S)) (\<Union>(sets ` S))"
  3300     proof cases
  3300     proof cases
  3301       assume [simp]: "space x = space a"
  3301       assume [simp]: "space x = space a"
  3302       have "sets x \<subset> (\<Union>a\<in>S. sets a)"
  3302       have "sets x \<subset> (\<Union>a\<in>S. sets a)"
  3303         using \<open>x\<in>A\<close> neq[of x] by (auto simp: S)
  3303         using \<open>x\<in>A\<close> neq[of x] by (auto simp: S)
  3304       also have "\<dots> \<subseteq> sigma_sets (\<Union>x\<in>S. space x) (\<Union>x\<in>S. sets x)"
  3304       also have "\<dots> \<subseteq> sigma_sets (\<Union>x\<in>S. space x) (\<Union>x\<in>S. sets x)"
  3361   qed
  3361   qed
  3362   show least: "Sup A \<le> x" if x: "\<And>z. z \<in> A \<Longrightarrow> z \<le> x" for x :: "'a measure" and A
  3362   show least: "Sup A \<le> x" if x: "\<And>z. z \<in> A \<Longrightarrow> z \<le> x" for x :: "'a measure" and A
  3363     unfolding Sup_measure_def
  3363     unfolding Sup_measure_def
  3364   proof (intro Sup_lexord[where P="\<lambda>y. y \<le> x"])
  3364   proof (intro Sup_lexord[where P="\<lambda>y. y \<le> x"])
  3365     assume "\<And>a. a \<in> A \<Longrightarrow> space a \<noteq> (\<Union>a\<in>A. space a)"
  3365     assume "\<And>a. a \<in> A \<Longrightarrow> space a \<noteq> (\<Union>a\<in>A. space a)"
  3366     show "sigma (UNION A space) {} \<le> x"
  3366     show "sigma (\<Union>(space ` A)) {} \<le> x"
  3367       using x[THEN le_measureD1] by (subst sigma_le_iff) auto
  3367       using x[THEN le_measureD1] by (subst sigma_le_iff) auto
  3368   next
  3368   next
  3369     fix a S assume "a \<in> A" "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
  3369     fix a S assume "a \<in> A" "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
  3370       "\<And>a. a \<in> S \<Longrightarrow> sets a \<noteq> (\<Union>a\<in>S. sets a)"
  3370       "\<And>a. a \<in> S \<Longrightarrow> sets a \<noteq> (\<Union>a\<in>S. sets a)"
  3371     have "UNION S space \<subseteq> space x"
  3371     have "\<Union>(space ` S) \<subseteq> space x"
  3372       using S le_measureD1[OF x] by auto
  3372       using S le_measureD1[OF x] by auto
  3373     moreover
  3373     moreover
  3374     have "UNION S space = space a"
  3374     have "\<Union>(space ` S) = space a"
  3375       using \<open>a\<in>A\<close> S by auto
  3375       using \<open>a\<in>A\<close> S by auto
  3376     then have "space x = UNION S space \<Longrightarrow> UNION S sets \<subseteq> sets x"
  3376     then have "space x = \<Union>(space ` S) \<Longrightarrow> \<Union>(sets ` S) \<subseteq> sets x"
  3377       using \<open>a \<in> A\<close> le_measureD2[OF x] by (auto simp: S)
  3377       using \<open>a \<in> A\<close> le_measureD2[OF x] by (auto simp: S)
  3378     ultimately show "sigma (UNION S space) (UNION S sets) \<le> x"
  3378     ultimately show "sigma (\<Union>(space ` S)) (\<Union>(sets ` S)) \<le> x"
  3379       by (subst sigma_le_iff) simp_all
  3379       by (subst sigma_le_iff) simp_all
  3380   next
  3380   next
  3381     fix a b S S' assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
  3381     fix a b S S' assume "a \<in> A" and a: "space a = (\<Union>a\<in>A. space a)" and S: "S = {a' \<in> A. space a' = space a}"
  3382       and "b \<in> S" and b: "sets b = (\<Union>a\<in>S. sets a)" and S': "S' = {a' \<in> S. sets a' = sets b}"
  3382       and "b \<in> S" and b: "sets b = (\<Union>a\<in>S. sets a)" and S': "S' = {a' \<in> S. sets a' = sets b}"
  3383     then have "S' \<noteq> {}" "space b = space a"
  3383     then have "S' \<noteq> {}" "space b = space a"
  3502 lemma emeasure_SUP_chain:
  3502 lemma emeasure_SUP_chain:
  3503   assumes sets: "\<And>i. i \<in> A \<Longrightarrow> sets (M i) = sets N" "X \<in> sets N"
  3503   assumes sets: "\<And>i. i \<in> A \<Longrightarrow> sets (M i) = sets N" "X \<in> sets N"
  3504   assumes ch: "Complete_Partial_Order.chain (\<le>) (M ` A)" and "A \<noteq> {}"
  3504   assumes ch: "Complete_Partial_Order.chain (\<le>) (M ` A)" and "A \<noteq> {}"
  3505   shows "emeasure (SUP i\<in>A. M i) X = (SUP i\<in>A. emeasure (M i) X)"
  3505   shows "emeasure (SUP i\<in>A. M i) X = (SUP i\<in>A. emeasure (M i) X)"
  3506 proof (subst emeasure_SUP[OF sets \<open>A \<noteq> {}\<close>])
  3506 proof (subst emeasure_SUP[OF sets \<open>A \<noteq> {}\<close>])
  3507   show "(SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (SUPREMUM J M) X) = (SUP i\<in>A. emeasure (M i) X)"
  3507   show "(SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (Sup (M ` J)) X) = (SUP i\<in>A. emeasure (M i) X)"
  3508   proof (rule SUP_eq)
  3508   proof (rule SUP_eq)
  3509     fix J assume "J \<in> {J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}"
  3509     fix J assume "J \<in> {J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}"
  3510     then have J: "Complete_Partial_Order.chain (\<le>) (M ` J)" "finite J" "J \<noteq> {}" and "J \<subseteq> A"
  3510     then have J: "Complete_Partial_Order.chain (\<le>) (M ` J)" "finite J" "J \<noteq> {}" and "J \<subseteq> A"
  3511       using ch[THEN chain_subset, of "M`J"] by auto
  3511       using ch[THEN chain_subset, of "M`J"] by auto
  3512     with in_chain_finite[OF J(1)] obtain j where "j \<in> J" "(SUP j\<in>J. M j) = M j"
  3512     with in_chain_finite[OF J(1)] obtain j where "j \<in> J" "(SUP j\<in>J. M j) = M j"
  3513       by auto
  3513       by auto
  3514     with \<open>J \<subseteq> A\<close> show "\<exists>j\<in>A. emeasure (SUPREMUM J M) X \<le> emeasure (M j) X"
  3514     with \<open>J \<subseteq> A\<close> show "\<exists>j\<in>A. emeasure (Sup (M ` J)) X \<le> emeasure (M j) X"
  3515       by auto
  3515       by auto
  3516   next
  3516   next
  3517     fix j assume "j\<in>A" then show "\<exists>i\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (M j) X \<le> emeasure (SUPREMUM i M) X"
  3517     fix j assume "j\<in>A" then show "\<exists>i\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (M j) X \<le> emeasure (Sup (M ` i)) X"
  3518       by (intro bexI[of _ "{j}"]) auto
  3518       by (intro bexI[of _ "{j}"]) auto
  3519   qed
  3519   qed
  3520 qed
  3520 qed
  3521 
  3521 
  3522 subsubsection%unimportant \<open>Supremum of a set of $\sigma$-algebras\<close>
  3522 subsubsection%unimportant \<open>Supremum of a set of $\sigma$-algebras\<close>
  3582   assumes "M \<noteq> {}"
  3582   assumes "M \<noteq> {}"
  3583   assumes "\<And>m. m \<in> M \<Longrightarrow> space m = space N"
  3583   assumes "\<And>m. m \<in> M \<Longrightarrow> space m = space N"
  3584   assumes "\<And>m. m \<in> M \<Longrightarrow> sets m \<subseteq> sets N"
  3584   assumes "\<And>m. m \<in> M \<Longrightarrow> sets m \<subseteq> sets N"
  3585   shows "sets (Sup M) \<subseteq> sets N"
  3585   shows "sets (Sup M) \<subseteq> sets N"
  3586 proof -
  3586 proof -
  3587   have *: "UNION M space = space N"
  3587   have *: "\<Union>(space ` M) = space N"
  3588     using assms by auto
  3588     using assms by auto
  3589   show ?thesis
  3589   show ?thesis
  3590     unfolding * using assms by (subst sets_Sup_eq[of M "space N"]) (auto intro!: sets.sigma_sets_subset)
  3590     unfolding * using assms by (subst sets_Sup_eq[of M "space N"]) (auto intro!: sets.sigma_sets_subset)
  3591 qed
  3591 qed
  3592 
  3592 
  3610   from M obtain m where "m \<in> M" by auto
  3610   from M obtain m where "m \<in> M" by auto
  3611   have space_eq: "\<And>n. n \<in> M \<Longrightarrow> space n = space m"
  3611   have space_eq: "\<And>n. n \<in> M \<Longrightarrow> space n = space m"
  3612     by (intro const_space \<open>m \<in> M\<close>)
  3612     by (intro const_space \<open>m \<in> M\<close>)
  3613   have "f \<in> measurable N (sigma (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m))"
  3613   have "f \<in> measurable N (sigma (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m))"
  3614   proof (rule measurable_measure_of)
  3614   proof (rule measurable_measure_of)
  3615     show "f \<in> space N \<rightarrow> UNION M space"
  3615     show "f \<in> space N \<rightarrow> \<Union>(space ` M)"
  3616       using measurable_space[OF f] M by auto
  3616       using measurable_space[OF f] M by auto
  3617   qed (auto intro: measurable_sets f dest: sets.sets_into_space)
  3617   qed (auto intro: measurable_sets f dest: sets.sets_into_space)
  3618   also have "measurable N (sigma (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m)) = measurable N (Sup M)"
  3618   also have "measurable N (sigma (\<Union>m\<in>M. space m) (\<Union>m\<in>M. sets m)) = measurable N (Sup M)"
  3619     apply (intro measurable_cong_sets refl)
  3619     apply (intro measurable_cong_sets refl)
  3620     apply (subst sets_Sup_eq[OF space_eq M])
  3620     apply (subst sets_Sup_eq[OF space_eq M])