src/HOL/Analysis/Measure_Space.thy
changeset 64008 17a20ca86d62
parent 63968 4359400adfe7
child 64267 b9a1486e79be
equal deleted inserted replaced
64007:041cda506fb2 64008:17a20ca86d62
   836     ultimately show "emeasure M F = emeasure N F"
   836     ultimately show "emeasure M F = emeasure N F"
   837       by (simp add: image_subset_iff \<open>sets M = sets N\<close>[symmetric] F_eq[symmetric] suminf_emeasure)
   837       by (simp add: image_subset_iff \<open>sets M = sets N\<close>[symmetric] F_eq[symmetric] suminf_emeasure)
   838   qed
   838   qed
   839 qed
   839 qed
   840 
   840 
       
   841 lemma space_empty: "space M = {} \<Longrightarrow> M = count_space {}"
       
   842   by (rule measure_eqI) (simp_all add: space_empty_iff)
       
   843 
       
   844 lemma measure_eqI_generator_eq_countable:
       
   845   fixes M N :: "'a measure" and E :: "'a set set" and A :: "'a set set"
       
   846   assumes E: "Int_stable E" "E \<subseteq> Pow \<Omega>" "\<And>X. X \<in> E \<Longrightarrow> emeasure M X = emeasure N X"
       
   847     and sets: "sets M = sigma_sets \<Omega> E" "sets N = sigma_sets \<Omega> E"
       
   848   and A: "A \<subseteq> E" "(\<Union>A) = \<Omega>" "countable A" "\<And>a. a \<in> A \<Longrightarrow> emeasure M a \<noteq> \<infinity>"
       
   849   shows "M = N"
       
   850 proof cases
       
   851   assume "\<Omega> = {}"
       
   852   have *: "sigma_sets \<Omega> E = sets (sigma \<Omega> E)"
       
   853     using E(2) by simp
       
   854   have "space M = \<Omega>" "space N = \<Omega>"
       
   855     using sets E(2) unfolding * by (auto dest: sets_eq_imp_space_eq simp del: sets_measure_of)
       
   856   then show "M = N"
       
   857     unfolding \<open>\<Omega> = {}\<close> by (auto dest: space_empty)
       
   858 next
       
   859   assume "\<Omega> \<noteq> {}" with \<open>\<Union>A = \<Omega>\<close> have "A \<noteq> {}" by auto
       
   860   from this \<open>countable A\<close> have rng: "range (from_nat_into A) = A"
       
   861     by (rule range_from_nat_into)
       
   862   show "M = N"
       
   863   proof (rule measure_eqI_generator_eq[OF E sets])
       
   864     show "range (from_nat_into A) \<subseteq> E"
       
   865       unfolding rng using \<open>A \<subseteq> E\<close> .
       
   866     show "(\<Union>i. from_nat_into A i) = \<Omega>"
       
   867       unfolding rng using \<open>\<Union>A = \<Omega>\<close> .
       
   868     show "emeasure M (from_nat_into A i) \<noteq> \<infinity>" for i
       
   869       using rng by (intro A) auto
       
   870   qed
       
   871 qed
       
   872 
   841 lemma measure_of_of_measure: "measure_of (space M) (sets M) (emeasure M) = M"
   873 lemma measure_of_of_measure: "measure_of (space M) (sets M) (emeasure M) = M"
   842 proof (intro measure_eqI emeasure_measure_of_sigma)
   874 proof (intro measure_eqI emeasure_measure_of_sigma)
   843   show "sigma_algebra (space M) (sets M)" ..
   875   show "sigma_algebra (space M) (sets M)" ..
   844   show "positive (sets M) (emeasure M)"
   876   show "positive (sets M) (emeasure M)"
   845     by (simp add: positive_def)
   877     by (simp add: positive_def)
  1094   by auto
  1126   by auto
  1095 
  1127 
  1096 lemma AE_cong[cong]:
  1128 lemma AE_cong[cong]:
  1097   "(\<And>x. x \<in> space M \<Longrightarrow> P x \<longleftrightarrow> Q x) \<Longrightarrow> (AE x in M. P x) \<longleftrightarrow> (AE x in M. Q x)"
  1129   "(\<And>x. x \<in> space M \<Longrightarrow> P x \<longleftrightarrow> Q x) \<Longrightarrow> (AE x in M. P x) \<longleftrightarrow> (AE x in M. Q x)"
  1098   by auto
  1130   by auto
       
  1131 
       
  1132 lemma AE_cong_strong: "M = N \<Longrightarrow> (\<And>x. x \<in> space N =simp=> P x = Q x) \<Longrightarrow> (AE x in M. P x) \<longleftrightarrow> (AE x in N. Q x)"
       
  1133   by (auto simp: simp_implies_def)
  1099 
  1134 
  1100 lemma AE_all_countable:
  1135 lemma AE_all_countable:
  1101   "(AE x in M. \<forall>i. P i x) \<longleftrightarrow> (\<forall>i::'i::countable. AE x in M. P i x)"
  1136   "(AE x in M. \<forall>i. P i x) \<longleftrightarrow> (\<forall>i::'i::countable. AE x in M. P i x)"
  1102 proof
  1137 proof
  1103   assume "\<forall>i. AE x in M. P i x"
  1138   assume "\<forall>i. AE x in M. P i x"
  2132     assume "emeasure (count_space A) X = 0"
  2167     assume "emeasure (count_space A) X = 0"
  2133     with X show "X = {}"
  2168     with X show "X = {}"
  2134       by (subst (asm) emeasure_count_space) (auto split: if_split_asm)
  2169       by (subst (asm) emeasure_count_space) (auto split: if_split_asm)
  2135   qed simp
  2170   qed simp
  2136 qed (simp add: emeasure_notin_sets)
  2171 qed (simp add: emeasure_notin_sets)
  2137 
       
  2138 lemma space_empty: "space M = {} \<Longrightarrow> M = count_space {}"
       
  2139   by (rule measure_eqI) (simp_all add: space_empty_iff)
       
  2140 
  2172 
  2141 lemma null_sets_count_space: "null_sets (count_space A) = { {} }"
  2173 lemma null_sets_count_space: "null_sets (count_space A) = { {} }"
  2142   unfolding null_sets_def by (auto simp add: emeasure_count_space_eq_0)
  2174   unfolding null_sets_def by (auto simp add: emeasure_count_space_eq_0)
  2143 
  2175 
  2144 lemma AE_count_space: "(AE x in count_space A. P x) \<longleftrightarrow> (\<forall>x\<in>A. P x)"
  2176 lemma AE_count_space: "(AE x in count_space A. P x) \<longleftrightarrow> (\<forall>x\<in>A. P x)"