author hoelzl Fri, 14 Jan 2011 14:21:48 +0100 changeset 41544 c3b977fee8a3 parent 41097 a1abfa4e2b44 child 41661 baf1964bc468 permissions -rw-r--r--
introduced integral syntax
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1` ```theory Radon_Nikodym ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 2` ```imports Lebesgue_Integration ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 3` ```begin ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 4` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 5` ```lemma less_\_Ex_of_nat: "x < \ \ (\n. x < of_nat n)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 6` ```proof safe ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 7` ``` assume "x < \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 8` ``` then obtain r where "0 \ r" "x = Real r" by (cases x) auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 9` ``` moreover obtain n where "r < of_nat n" using ex_less_of_nat by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 10` ``` ultimately show "\n. x < of_nat n" by (auto simp: real_eq_of_nat) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 11` ```qed auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 12` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 13` ```lemma (in sigma_finite_measure) Ex_finite_integrable_function: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 14` ``` shows "\h\borel_measurable M. positive_integral h \ \ \ (\x\space M. 0 < h x \ h x < \)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 15` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 16` ``` obtain A :: "nat \ 'a set" where ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 17` ``` range: "range A \ sets M" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 18` ``` space: "(\i. A i) = space M" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 19` ``` measure: "\i. \ (A i) \ \" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 20` ``` disjoint: "disjoint_family A" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 21` ``` using disjoint_sigma_finite by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 22` ``` let "?B i" = "2^Suc i * \ (A i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 23` ``` have "\i. \x. 0 < x \ x < inverse (?B i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 24` ``` proof ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 25` ``` fix i show "\x. 0 < x \ x < inverse (?B i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 26` ``` proof cases ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 27` ``` assume "\ (A i) = 0" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 28` ``` then show ?thesis by (auto intro!: exI[of _ 1]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 29` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 30` ``` assume not_0: "\ (A i) \ 0" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 31` ``` then have "?B i \ \" using measure[of i] by auto ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 32` ``` then have "inverse (?B i) \ 0" unfolding pextreal_inverse_eq_0 by simp ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 33` ``` then show ?thesis using measure[of i] not_0 ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 34` ``` by (auto intro!: exI[of _ "inverse (?B i) / 2"] ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 35` ``` simp: pextreal_noteq_omega_Ex zero_le_mult_iff zero_less_mult_iff mult_le_0_iff power_le_zero_eq) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 36` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 37` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 38` ``` from choice[OF this] obtain n where n: "\i. 0 < n i" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 39` ``` "\i. n i < inverse (2^Suc i * \ (A i))" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 40` ``` let "?h x" = "\\<^isub>\ i. n i * indicator (A i) x" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 41` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 42` ``` proof (safe intro!: bexI[of _ ?h] del: notI) ``` 39092 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 43` ``` have "\i. A i \ sets M" ``` 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 44` ``` using range by fastsimp+ ``` 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 45` ``` then have "positive_integral ?h = (\\<^isub>\ i. n i * \ (A i))" ``` 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 46` ``` by (simp add: positive_integral_psuminf positive_integral_cmult_indicator) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 47` ``` also have "\ \ (\\<^isub>\ i. Real ((1 / 2)^Suc i))" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 48` ``` proof (rule psuminf_le) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 49` ``` fix N show "n N * \ (A N) \ Real ((1 / 2) ^ Suc N)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 50` ``` using measure[of N] n[of N] ``` 39092 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 51` ``` by (cases "n N") ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 52` ``` (auto simp: pextreal_noteq_omega_Ex field_simps zero_le_mult_iff ``` 39092 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 53` ``` mult_le_0_iff mult_less_0_iff power_less_zero_eq ``` 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 54` ``` power_le_zero_eq inverse_eq_divide less_divide_eq ``` 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 55` ``` power_divide split: split_if_asm) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 56` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 57` ``` also have "\ = Real 1" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 58` ``` by (rule suminf_imp_psuminf, rule power_half_series, auto) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 59` ``` finally show "positive_integral ?h \ \" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 60` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 61` ``` fix x assume "x \ space M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 62` ``` then obtain i where "x \ A i" using space[symmetric] by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 63` ``` from psuminf_cmult_indicator[OF disjoint, OF this] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 64` ``` have "?h x = n i" by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 65` ``` then show "0 < ?h x" and "?h x < \" using n[of i] by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 66` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 67` ``` show "?h \ borel_measurable M" using range ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 68` ``` by (auto intro!: borel_measurable_psuminf borel_measurable_pextreal_times) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 69` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 70` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 71` 40871 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 72` ```subsection "Absolutely continuous" ``` 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 73` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 74` ```definition (in measure_space) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 75` ``` "absolutely_continuous \ = (\N\null_sets. \ N = (0 :: pextreal))" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 76` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 77` ```lemma (in sigma_finite_measure) absolutely_continuous_AE: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 78` ``` assumes "measure_space M \" "absolutely_continuous \" "AE x. P x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 79` ``` shows "measure_space.almost_everywhere M \ P" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 80` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 81` ``` interpret \: measure_space M \ by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 82` ``` from `AE x. P x` obtain N where N: "N \ null_sets" and "{x\space M. \ P x} \ N" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 83` ``` unfolding almost_everywhere_def by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 84` ``` show "\.almost_everywhere P" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 85` ``` proof (rule \.AE_I') ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 86` ``` show "{x\space M. \ P x} \ N" by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 87` ``` from `absolutely_continuous \` show "N \ \.null_sets" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 88` ``` using N unfolding absolutely_continuous_def by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 89` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 90` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 91` 39097 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 92` ```lemma (in finite_measure_space) absolutely_continuousI: ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 93` ``` assumes "finite_measure_space M \" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 94` ``` assumes v: "\x. \ x \ space M ; \ {x} = 0 \ \ \ {x} = 0" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 95` ``` shows "absolutely_continuous \" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 96` ```proof (unfold absolutely_continuous_def sets_eq_Pow, safe) ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 97` ``` fix N assume "\ N = 0" "N \ space M" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 98` ``` interpret v: finite_measure_space M \ by fact ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 99` ``` have "\ N = \ (\x\N. {x})" by simp ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 100` ``` also have "\ = (\x\N. \ {x})" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 101` ``` proof (rule v.measure_finitely_additive''[symmetric]) ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 102` ``` show "finite N" using `N \ space M` finite_space by (auto intro: finite_subset) ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 103` ``` show "disjoint_family_on (\i. {i}) N" unfolding disjoint_family_on_def by auto ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 104` ``` fix x assume "x \ N" thus "{x} \ sets M" using `N \ space M` sets_eq_Pow by auto ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 105` ``` qed ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 106` ``` also have "\ = 0" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 107` ``` proof (safe intro!: setsum_0') ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 108` ``` fix x assume "x \ N" ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 109` ``` hence "\ {x} \ \ N" using sets_eq_Pow `N \ space M` by (auto intro!: measure_mono) ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 110` ``` hence "\ {x} = 0" using `\ N = 0` by simp ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 111` ``` thus "\ {x} = 0" using v[of x] `x \ N` `N \ space M` by auto ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 112` ``` qed ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 113` ``` finally show "\ N = 0" . ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 114` ```qed ``` 943c7b348524 Moved lemmas to appropriate locations hoelzl parents: 39092 diff changeset ` 115` 40871 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 116` ```lemma (in measure_space) density_is_absolutely_continuous: ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 117` ``` assumes "\A. A \ sets M \ \ A = (\\<^isup>+x. f x * indicator A x)" ``` 40871 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 118` ``` shows "absolutely_continuous \" ``` 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 119` ``` using assms unfolding absolutely_continuous_def ``` 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 120` ``` by (simp add: positive_integral_null_set) ``` 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 121` 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 122` ```subsection "Existence of the Radon-Nikodym derivative" ``` 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 123` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 124` ```lemma (in finite_measure) Radon_Nikodym_aux_epsilon: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 125` ``` fixes e :: real assumes "0 < e" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 126` ``` assumes "finite_measure M s" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 127` ``` shows "\A\sets M. real (\ (space M)) - real (s (space M)) \ ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 128` ``` real (\ A) - real (s A) \ ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 129` ``` (\B\sets M. B \ A \ - e < real (\ B) - real (s B))" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 130` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 131` ``` let "?d A" = "real (\ A) - real (s A)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 132` ``` interpret M': finite_measure M s by fact ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 133` ``` let "?A A" = "if (\B\sets M. B \ space M - A \ -e < ?d B) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 134` ``` then {} ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 135` ``` else (SOME B. B \ sets M \ B \ space M - A \ ?d B \ -e)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 136` ``` def A \ "\n. ((\B. B \ ?A B) ^^ n) {}" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 137` ``` have A_simps[simp]: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 138` ``` "A 0 = {}" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 139` ``` "\n. A (Suc n) = (A n \ ?A (A n))" unfolding A_def by simp_all ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 140` ``` { fix A assume "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 141` ``` have "?A A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 142` ``` by (auto intro!: someI2[of _ _ "\A. A \ sets M"] simp: not_less) } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 143` ``` note A'_in_sets = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 144` ``` { fix n have "A n \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 145` ``` proof (induct n) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 146` ``` case (Suc n) thus "A (Suc n) \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 147` ``` using A'_in_sets[of "A n"] by (auto split: split_if_asm) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 148` ``` qed (simp add: A_def) } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 149` ``` note A_in_sets = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 150` ``` hence "range A \ sets M" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 151` ``` { fix n B ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 152` ``` assume Ex: "\B. B \ sets M \ B \ space M - A n \ ?d B \ -e" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 153` ``` hence False: "\ (\B\sets M. B \ space M - A n \ -e < ?d B)" by (auto simp: not_less) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 154` ``` have "?d (A (Suc n)) \ ?d (A n) - e" unfolding A_simps if_not_P[OF False] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 155` ``` proof (rule someI2_ex[OF Ex]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 156` ``` fix B assume "B \ sets M \ B \ space M - A n \ ?d B \ - e" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 157` ``` hence "A n \ B = {}" "B \ sets M" and dB: "?d B \ -e" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 158` ``` hence "?d (A n \ B) = ?d (A n) + ?d B" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 159` ``` using `A n \ sets M` real_finite_measure_Union M'.real_finite_measure_Union by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 160` ``` also have "\ \ ?d (A n) - e" using dB by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 161` ``` finally show "?d (A n \ B) \ ?d (A n) - e" . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 162` ``` qed } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 163` ``` note dA_epsilon = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 164` ``` { fix n have "?d (A (Suc n)) \ ?d (A n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 165` ``` proof (cases "\B. B\sets M \ B \ space M - A n \ ?d B \ - e") ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 166` ``` case True from dA_epsilon[OF this] show ?thesis using `0 < e` by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 167` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 168` ``` case False ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 169` ``` hence "\B\sets M. B \ space M - A n \ -e < ?d B" by (auto simp: not_le) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 170` ``` thus ?thesis by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 171` ``` qed } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 172` ``` note dA_mono = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 173` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 174` ``` proof (cases "\n. \B\sets M. B \ space M - A n \ -e < ?d B") ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 175` ``` case True then obtain n where B: "\B. \ B \ sets M; B \ space M - A n\ \ -e < ?d B" by blast ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 176` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 177` ``` proof (safe intro!: bexI[of _ "space M - A n"]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 178` ``` fix B assume "B \ sets M" "B \ space M - A n" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 179` ``` from B[OF this] show "-e < ?d B" . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 180` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 181` ``` show "space M - A n \ sets M" by (rule compl_sets) fact ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 182` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 183` ``` show "?d (space M) \ ?d (space M - A n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 184` ``` proof (induct n) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 185` ``` fix n assume "?d (space M) \ ?d (space M - A n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 186` ``` also have "\ \ ?d (space M - A (Suc n))" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 187` ``` using A_in_sets sets_into_space dA_mono[of n] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 188` ``` real_finite_measure_Diff[of "space M"] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 189` ``` real_finite_measure_Diff[of "space M"] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 190` ``` M'.real_finite_measure_Diff[of "space M"] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 191` ``` M'.real_finite_measure_Diff[of "space M"] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 192` ``` by (simp del: A_simps) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 193` ``` finally show "?d (space M) \ ?d (space M - A (Suc n))" . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 194` ``` qed simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 195` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 196` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 197` ``` case False hence B: "\n. \B. B\sets M \ B \ space M - A n \ ?d B \ - e" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 198` ``` by (auto simp add: not_less) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 199` ``` { fix n have "?d (A n) \ - real n * e" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 200` ``` proof (induct n) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 201` ``` case (Suc n) with dA_epsilon[of n, OF B] show ?case by (simp del: A_simps add: real_of_nat_Suc field_simps) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 202` ``` qed simp } note dA_less = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 203` ``` have decseq: "decseq (\n. ?d (A n))" unfolding decseq_eq_incseq ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 204` ``` proof (rule incseq_SucI) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 205` ``` fix n show "- ?d (A n) \ - ?d (A (Suc n))" using dA_mono[of n] by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 206` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 207` ``` from real_finite_continuity_from_below[of A] `range A \ sets M` ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 208` ``` M'.real_finite_continuity_from_below[of A] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 209` ``` have convergent: "(\i. ?d (A i)) ----> ?d (\i. A i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 210` ``` by (auto intro!: LIMSEQ_diff) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 211` ``` obtain n :: nat where "- ?d (\i. A i) / e < real n" using reals_Archimedean2 by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 212` ``` moreover from order_trans[OF decseq_le[OF decseq convergent] dA_less] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 213` ``` have "real n \ - ?d (\i. A i) / e" using `0A\sets M. real (\ (space M)) - real (s (space M)) \ ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 221` ``` real (\ A) - real (s A) \ ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 222` ``` (\B\sets M. B \ A \ 0 \ real (\ B) - real (s B))" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 223` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 224` ``` let "?d A" = "real (\ A) - real (s A)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 225` ``` let "?P A B n" = "A \ sets M \ A \ B \ ?d B \ ?d A \ (\C\sets M. C \ A \ - 1 / real (Suc n) < ?d C)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 226` ``` interpret M': finite_measure M s by fact ``` 39092 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 227` ``` let "?r S" = "restricted_space S" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 228` ``` { fix S n ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 229` ``` assume S: "S \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 230` ``` hence **: "\X. X \ op \ S ` sets M \ X \ sets M \ X \ S" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 231` ``` from M'.restricted_finite_measure[of S] restricted_finite_measure[of S] S ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 232` ``` have "finite_measure (?r S) \" "0 < 1 / real (Suc n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 233` ``` "finite_measure (?r S) s" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 234` ``` from finite_measure.Radon_Nikodym_aux_epsilon[OF this] guess X .. ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 235` ``` hence "?P X S n" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 236` ``` proof (simp add: **, safe) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 237` ``` fix C assume C: "C \ sets M" "C \ X" "X \ S" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 238` ``` *: "\B\sets M. S \ B \ X \ - (1 / real (Suc n)) < ?d (S \ B)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 239` ``` hence "C \ S" "C \ X" "S \ C = C" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 240` ``` with *[THEN bspec, OF `C \ sets M`] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 241` ``` show "- (1 / real (Suc n)) < ?d C" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 242` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 243` ``` hence "\A. ?P A S n" by auto } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 244` ``` note Ex_P = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 245` ``` def A \ "nat_rec (space M) (\n A. SOME B. ?P B A n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 246` ``` have A_Suc: "\n. A (Suc n) = (SOME B. ?P B (A n) n)" by (simp add: A_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 247` ``` have A_0[simp]: "A 0 = space M" unfolding A_def by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 248` ``` { fix i have "A i \ sets M" unfolding A_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 249` ``` proof (induct i) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 250` ``` case (Suc i) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 251` ``` from Ex_P[OF this, of i] show ?case unfolding nat_rec_Suc ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 252` ``` by (rule someI2_ex) simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 253` ``` qed simp } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 254` ``` note A_in_sets = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 255` ``` { fix n have "?P (A (Suc n)) (A n) n" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 256` ``` using Ex_P[OF A_in_sets] unfolding A_Suc ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 257` ``` by (rule someI2_ex) simp } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 258` ``` note P_A = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 259` ``` have "range A \ sets M" using A_in_sets by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 260` ``` have A_mono: "\i. A (Suc i) \ A i" using P_A by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 261` ``` have mono_dA: "mono (\i. ?d (A i))" using P_A by (simp add: mono_iff_le_Suc) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 262` ``` have epsilon: "\C i. \ C \ sets M; C \ A (Suc i) \ \ - 1 / real (Suc i) < ?d C" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 263` ``` using P_A by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 264` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 265` ``` proof (safe intro!: bexI[of _ "\i. A i"]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 266` ``` show "(\i. A i) \ sets M" using A_in_sets by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 267` ``` from `range A \ sets M` A_mono ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 268` ``` real_finite_continuity_from_above[of A] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 269` ``` M'.real_finite_continuity_from_above[of A] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 270` ``` have "(\i. ?d (A i)) ----> ?d (\i. A i)" by (auto intro!: LIMSEQ_diff) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 271` ``` thus "?d (space M) \ ?d (\i. A i)" using mono_dA[THEN monoD, of 0 _] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 272` ``` by (rule_tac LIMSEQ_le_const) (auto intro!: exI) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 273` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 274` ``` fix B assume B: "B \ sets M" "B \ (\i. A i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 275` ``` show "0 \ ?d B" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 276` ``` proof (rule ccontr) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 277` ``` assume "\ 0 \ ?d B" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 278` ``` hence "0 < - ?d B" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 279` ``` from ex_inverse_of_nat_Suc_less[OF this] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 280` ``` obtain n where *: "?d B < - 1 / real (Suc n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 281` ``` by (auto simp: real_eq_of_nat inverse_eq_divide field_simps) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 282` ``` have "B \ A (Suc n)" using B by (auto simp del: nat_rec_Suc) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 283` ``` from epsilon[OF B(1) this] * ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 284` ``` show False by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 285` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 286` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 287` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 288` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 289` ```lemma (in finite_measure) Radon_Nikodym_finite_measure: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 290` ``` assumes "finite_measure M \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 291` ``` assumes "absolutely_continuous \" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 292` ``` shows "\f \ borel_measurable M. \A\sets M. \ A = (\\<^isup>+x. f x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 293` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 294` ``` interpret M': finite_measure M \ using assms(1) . ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 295` ``` def G \ "{g \ borel_measurable M. \A\sets M. (\\<^isup>+x. g x * indicator A x) \ \ A}" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 296` ``` have "(\x. 0) \ G" unfolding G_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 297` ``` hence "G \ {}" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 298` ``` { fix f g assume f: "f \ G" and g: "g \ G" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 299` ``` have "(\x. max (g x) (f x)) \ G" (is "?max \ G") unfolding G_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 300` ``` proof safe ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 301` ``` show "?max \ borel_measurable M" using f g unfolding G_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 302` ``` let ?A = "{x \ space M. f x \ g x}" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 303` ``` have "?A \ sets M" using f g unfolding G_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 304` ``` fix A assume "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 305` ``` hence sets: "?A \ A \ sets M" "(space M - ?A) \ A \ sets M" using `?A \ sets M` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 306` ``` have union: "((?A \ A) \ ((space M - ?A) \ A)) = A" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 307` ``` using sets_into_space[OF `A \ sets M`] by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 308` ``` have "\x. x \ space M \ max (g x) (f x) * indicator A x = ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 309` ``` g x * indicator (?A \ A) x + f x * indicator ((space M - ?A) \ A) x" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 310` ``` by (auto simp: indicator_def max_def) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 311` ``` hence "(\\<^isup>+x. max (g x) (f x) * indicator A x) = ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 312` ``` (\\<^isup>+x. g x * indicator (?A \ A) x) + ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 313` ``` (\\<^isup>+x. f x * indicator ((space M - ?A) \ A) x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 314` ``` using f g sets unfolding G_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 315` ``` by (auto cong: positive_integral_cong intro!: positive_integral_add borel_measurable_indicator) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 316` ``` also have "\ \ \ (?A \ A) + \ ((space M - ?A) \ A)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 317` ``` using f g sets unfolding G_def by (auto intro!: add_mono) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 318` ``` also have "\ = \ A" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 319` ``` using M'.measure_additive[OF sets] union by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 320` ``` finally show "(\\<^isup>+x. max (g x) (f x) * indicator A x) \ \ A" . ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 321` ``` qed } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 322` ``` note max_in_G = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 323` ``` { fix f g assume "f \ g" and f: "\i. f i \ G" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 324` ``` have "g \ G" unfolding G_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 325` ``` proof safe ``` 41097 a1abfa4e2b44 use SUPR_ and INFI_apply instead of SUPR_, INFI_fun_expand hoelzl parents: 41095 diff changeset ` 326` ``` from `f \ g` have [simp]: "g = (\x. SUP i. f i x)" ``` a1abfa4e2b44 use SUPR_ and INFI_apply instead of SUPR_, INFI_fun_expand hoelzl parents: 41095 diff changeset ` 327` ``` unfolding isoton_def fun_eq_iff SUPR_apply by simp ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 328` ``` have f_borel: "\i. f i \ borel_measurable M" using f unfolding G_def by simp ``` 41097 a1abfa4e2b44 use SUPR_ and INFI_apply instead of SUPR_, INFI_fun_expand hoelzl parents: 41095 diff changeset ` 329` ``` thus "g \ borel_measurable M" by auto ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 330` ``` fix A assume "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 331` ``` hence "\i. (\x. f i x * indicator A x) \ borel_measurable M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 332` ``` using f_borel by (auto intro!: borel_measurable_indicator) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 333` ``` from positive_integral_isoton[OF isoton_indicator[OF `f \ g`] this] ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 334` ``` have SUP: "(\\<^isup>+x. g x * indicator A x) = ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 335` ``` (SUP i. (\\<^isup>+x. f i x * indicator A x))" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 336` ``` unfolding isoton_def by simp ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 337` ``` show "(\\<^isup>+x. g x * indicator A x) \ \ A" unfolding SUP ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 338` ``` using f `A \ sets M` unfolding G_def by (auto intro!: SUP_leI) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 339` ``` qed } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 340` ``` note SUP_in_G = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 341` ``` let ?y = "SUP g : G. positive_integral g" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 342` ``` have "?y \ \ (space M)" unfolding G_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 343` ``` proof (safe intro!: SUP_leI) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 344` ``` fix g assume "\A\sets M. (\\<^isup>+x. g x * indicator A x) \ \ A" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 345` ``` from this[THEN bspec, OF top] show "positive_integral g \ \ (space M)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 346` ``` by (simp cong: positive_integral_cong) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 347` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 348` ``` hence "?y \ \" using M'.finite_measure_of_space by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 349` ``` from SUPR_countable_SUPR[OF this `G \ {}`] guess ys .. note ys = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 350` ``` hence "\n. \g. g\G \ positive_integral g = ys n" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 351` ``` proof safe ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 352` ``` fix n assume "range ys \ positive_integral ` G" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 353` ``` hence "ys n \ positive_integral ` G" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 354` ``` thus "\g. g\G \ positive_integral g = ys n" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 355` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 356` ``` from choice[OF this] obtain gs where "\i. gs i \ G" "\n. positive_integral (gs n) = ys n" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 357` ``` hence y_eq: "?y = (SUP i. positive_integral (gs i))" using ys by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 358` ``` let "?g i x" = "Max ((\n. gs n x) ` {..i})" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 359` ``` def f \ "SUP i. ?g i" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 360` ``` have gs_not_empty: "\i. (\n. gs n x) ` {..i} \ {}" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 361` ``` { fix i have "?g i \ G" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 362` ``` proof (induct i) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 363` ``` case 0 thus ?case by simp fact ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 364` ``` next ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 365` ``` case (Suc i) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 366` ``` with Suc gs_not_empty `gs (Suc i) \ G` show ?case ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 367` ``` by (auto simp add: atMost_Suc intro!: max_in_G) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 368` ``` qed } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 369` ``` note g_in_G = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 370` ``` have "\x. \i. ?g i x \ ?g (Suc i) x" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 371` ``` using gs_not_empty by (simp add: atMost_Suc) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 372` ``` hence isoton_g: "?g \ f" by (simp add: isoton_def le_fun_def f_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 373` ``` from SUP_in_G[OF this g_in_G] have "f \ G" . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 374` ``` hence [simp, intro]: "f \ borel_measurable M" unfolding G_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 375` ``` have "(\i. positive_integral (?g i)) \ positive_integral f" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 376` ``` using isoton_g g_in_G by (auto intro!: positive_integral_isoton simp: G_def f_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 377` ``` hence "positive_integral f = (SUP i. positive_integral (?g i))" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 378` ``` unfolding isoton_def by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 379` ``` also have "\ = ?y" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 380` ``` proof (rule antisym) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 381` ``` show "(SUP i. positive_integral (?g i)) \ ?y" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 382` ``` using g_in_G by (auto intro!: exI Sup_mono simp: SUPR_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 383` ``` show "?y \ (SUP i. positive_integral (?g i))" unfolding y_eq ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 384` ``` by (auto intro!: SUP_mono positive_integral_mono Max_ge) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 385` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 386` ``` finally have int_f_eq_y: "positive_integral f = ?y" . ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 387` ``` let "?t A" = "\ A - (\\<^isup>+x. f x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 388` ``` have "finite_measure M ?t" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 389` ``` proof ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 390` ``` show "?t {} = 0" by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 391` ``` show "?t (space M) \ \" using M'.finite_measure by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 392` ``` show "countably_additive M ?t" unfolding countably_additive_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 393` ``` proof safe ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 394` ``` fix A :: "nat \ 'a set" assume A: "range A \ sets M" "disjoint_family A" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 395` ``` have "(\\<^isub>\ n. (\\<^isup>+x. f x * indicator (A n) x)) ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 396` ``` = (\\<^isup>+x. (\\<^isub>\n. f x * indicator (A n) x))" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 397` ``` using `range A \ sets M` ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 398` ``` by (rule_tac positive_integral_psuminf[symmetric]) (auto intro!: borel_measurable_indicator) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 399` ``` also have "\ = (\\<^isup>+x. f x * indicator (\n. A n) x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 400` ``` apply (rule positive_integral_cong) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 401` ``` apply (subst psuminf_cmult_right) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 402` ``` unfolding psuminf_indicator[OF `disjoint_family A`] .. ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 403` ``` finally have "(\\<^isub>\ n. (\\<^isup>+x. f x * indicator (A n) x)) ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 404` ``` = (\\<^isup>+x. f x * indicator (\n. A n) x)" . ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 405` ``` moreover have "(\\<^isub>\n. \ (A n)) = \ (\n. A n)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 406` ``` using M'.measure_countably_additive A by (simp add: comp_def) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 407` ``` moreover have "\i. (\\<^isup>+x. f x * indicator (A i) x) \ \ (A i)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 408` ``` using A `f \ G` unfolding G_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 409` ``` moreover have v_fin: "\ (\i. A i) \ \" using M'.finite_measure A by (simp add: countable_UN) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 410` ``` moreover { ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 411` ``` have "(\\<^isup>+x. f x * indicator (\i. A i) x) \ \ (\i. A i)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 412` ``` using A `f \ G` unfolding G_def by (auto simp: countable_UN) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 413` ``` also have "\ (\i. A i) < \" using v_fin by (simp add: pextreal_less_\) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 414` ``` finally have "(\\<^isup>+x. f x * indicator (\i. A i) x) \ \" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 415` ``` by (simp add: pextreal_less_\) } ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 416` ``` ultimately ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 417` ``` show "(\\<^isub>\ n. ?t (A n)) = ?t (\i. A i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 418` ``` apply (subst psuminf_minus) by simp_all ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 419` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 420` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 421` ``` then interpret M: finite_measure M ?t . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 422` ``` have ac: "absolutely_continuous ?t" using `absolutely_continuous \` unfolding absolutely_continuous_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 423` ``` have upper_bound: "\A\sets M. ?t A \ 0" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 424` ``` proof (rule ccontr) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 425` ``` assume "\ ?thesis" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 426` ``` then obtain A where A: "A \ sets M" and pos: "0 < ?t A" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 427` ``` by (auto simp: not_le) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 428` ``` note pos ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 429` ``` also have "?t A \ ?t (space M)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 430` ``` using M.measure_mono[of A "space M"] A sets_into_space by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 431` ``` finally have pos_t: "0 < ?t (space M)" by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 432` ``` moreover ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 433` ``` hence pos_M: "0 < \ (space M)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 434` ``` using ac top unfolding absolutely_continuous_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 435` ``` moreover ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 436` ``` have "(\\<^isup>+x. f x * indicator (space M) x) \ \ (space M)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 437` ``` using `f \ G` unfolding G_def by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 438` ``` hence "(\\<^isup>+x. f x * indicator (space M) x) \ \" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 439` ``` using M'.finite_measure_of_space by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 440` ``` moreover ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 441` ``` def b \ "?t (space M) / \ (space M) / 2" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 442` ``` ultimately have b: "b \ 0" "b \ \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 443` ``` using M'.finite_measure_of_space ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 444` ``` by (auto simp: pextreal_inverse_eq_0 finite_measure_of_space) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 445` ``` have "finite_measure M (\A. b * \ A)" (is "finite_measure M ?b") ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 446` ``` proof ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 447` ``` show "?b {} = 0" by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 448` ``` show "?b (space M) \ \" using finite_measure_of_space b by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 449` ``` show "countably_additive M ?b" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 450` ``` unfolding countably_additive_def psuminf_cmult_right ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 451` ``` using measure_countably_additive by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 452` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 453` ``` from M.Radon_Nikodym_aux[OF this] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 454` ``` obtain A0 where "A0 \ sets M" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 455` ``` space_less_A0: "real (?t (space M)) - real (b * \ (space M)) \ real (?t A0) - real (b * \ A0)" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 456` ``` *: "\B. \ B \ sets M ; B \ A0 \ \ 0 \ real (?t B) - real (b * \ B)" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 457` ``` { fix B assume "B \ sets M" "B \ A0" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 458` ``` with *[OF this] have "b * \ B \ ?t B" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 459` ``` using M'.finite_measure b finite_measure ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 460` ``` by (cases "b * \ B", cases "?t B") (auto simp: field_simps) } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 461` ``` note bM_le_t = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 462` ``` let "?f0 x" = "f x + b * indicator A0 x" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 463` ``` { fix A assume A: "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 464` ``` hence "A \ A0 \ sets M" using `A0 \ sets M` by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 465` ``` have "(\\<^isup>+x. ?f0 x * indicator A x) = ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 466` ``` (\\<^isup>+x. f x * indicator A x + b * indicator (A \ A0) x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 467` ``` by (auto intro!: positive_integral_cong simp: field_simps indicator_inter_arith) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 468` ``` hence "(\\<^isup>+x. ?f0 x * indicator A x) = ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 469` ``` (\\<^isup>+x. f x * indicator A x) + b * \ (A \ A0)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 470` ``` using `A0 \ sets M` `A \ A0 \ sets M` A ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 471` ``` by (simp add: borel_measurable_indicator positive_integral_add positive_integral_cmult_indicator) } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 472` ``` note f0_eq = this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 473` ``` { fix A assume A: "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 474` ``` hence "A \ A0 \ sets M" using `A0 \ sets M` by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 475` ``` have f_le_v: "(\\<^isup>+x. f x * indicator A x) \ \ A" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 476` ``` using `f \ G` A unfolding G_def by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 477` ``` note f0_eq[OF A] ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 478` ``` also have "(\\<^isup>+x. f x * indicator A x) + b * \ (A \ A0) \ ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 479` ``` (\\<^isup>+x. f x * indicator A x) + ?t (A \ A0)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 480` ``` using bM_le_t[OF `A \ A0 \ sets M`] `A \ sets M` `A0 \ sets M` ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 481` ``` by (auto intro!: add_left_mono) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 482` ``` also have "\ \ (\\<^isup>+x. f x * indicator A x) + ?t A" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 483` ``` using M.measure_mono[simplified, OF _ `A \ A0 \ sets M` `A \ sets M`] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 484` ``` by (auto intro!: add_left_mono) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 485` ``` also have "\ \ \ A" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 486` ``` using f_le_v M'.finite_measure[simplified, OF `A \ sets M`] ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 487` ``` by (cases "(\\<^isup>+x. f x * indicator A x)", cases "\ A", auto) ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 488` ``` finally have "(\\<^isup>+x. ?f0 x * indicator A x) \ \ A" . } ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 489` ``` hence "?f0 \ G" using `A0 \ sets M` unfolding G_def ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 490` ``` by (auto intro!: borel_measurable_indicator borel_measurable_pextreal_add borel_measurable_pextreal_times) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 491` ``` have real: "?t (space M) \ \" "?t A0 \ \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 492` ``` "b * \ (space M) \ \" "b * \ A0 \ \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 493` ``` using `A0 \ sets M` b ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 494` ``` finite_measure[of A0] M.finite_measure[of A0] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 495` ``` finite_measure_of_space M.finite_measure_of_space ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 496` ``` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 497` ``` have int_f_finite: "positive_integral f \ \" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 498` ``` using M'.finite_measure_of_space pos_t unfolding pextreal_zero_less_diff_iff ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 499` ``` by (auto cong: positive_integral_cong) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 500` ``` have "?t (space M) > b * \ (space M)" unfolding b_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 501` ``` apply (simp add: field_simps) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 502` ``` apply (subst mult_assoc[symmetric]) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 503` ``` apply (subst pextreal_mult_inverse) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 504` ``` using finite_measure_of_space M'.finite_measure_of_space pos_t pos_M ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 505` ``` using pextreal_mult_strict_right_mono[of "Real (1/2)" 1 "?t (space M)"] ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 506` ``` by simp_all ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 507` ``` hence "0 < ?t (space M) - b * \ (space M)" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 508` ``` by (simp add: pextreal_zero_less_diff_iff) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 509` ``` also have "\ \ ?t A0 - b * \ A0" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 510` ``` using space_less_A0 pos_M pos_t b real[unfolded pextreal_noteq_omega_Ex] by auto ``` 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 511` ``` finally have "b * \ A0 < ?t A0" unfolding pextreal_zero_less_diff_iff . ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 512` ``` hence "0 < ?t A0" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 513` ``` hence "0 < \ A0" using ac unfolding absolutely_continuous_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 514` ``` using `A0 \ sets M` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 515` ``` hence "0 < b * \ A0" using b by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 516` ``` from int_f_finite this ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 517` ``` have "?y + 0 < positive_integral f + b * \ A0" unfolding int_f_eq_y ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 518` ``` by (rule pextreal_less_add) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 519` ``` also have "\ = positive_integral ?f0" using f0_eq[OF top] `A0 \ sets M` sets_into_space ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 520` ``` by (simp cong: positive_integral_cong) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 521` ``` finally have "?y < positive_integral ?f0" by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 522` ``` moreover from `?f0 \ G` have "positive_integral ?f0 \ ?y" by (auto intro!: le_SUPI) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 523` ``` ultimately show False by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 524` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 525` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 526` ``` proof (safe intro!: bexI[of _ f]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 527` ``` fix A assume "A\sets M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 528` ``` show "\ A = (\\<^isup>+x. f x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 529` ``` proof (rule antisym) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 530` ``` show "(\\<^isup>+x. f x * indicator A x) \ \ A" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 531` ``` using `f \ G` `A \ sets M` unfolding G_def by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 532` ``` show "\ A \ (\\<^isup>+x. f x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 533` ``` using upper_bound[THEN bspec, OF `A \ sets M`] ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 534` ``` by (simp add: pextreal_zero_le_diff) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 535` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 536` ``` qed simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 537` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 538` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 539` ```lemma (in finite_measure) split_space_into_finite_sets_and_rest: ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 540` ``` assumes "measure_space M \" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 541` ``` assumes ac: "absolutely_continuous \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 542` ``` shows "\\0\sets M. \\::nat\'a set. disjoint_family \ \ range \ \ sets M \ \0 = space M - (\i. \ i) \ ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 543` ``` (\A\sets M. A \ \0 \ (\ A = 0 \ \ A = 0) \ (\ A > 0 \ \ A = \)) \ ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 544` ``` (\i. \ (\ i) \ \)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 545` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 546` ``` interpret v: measure_space M \ by fact ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 547` ``` let ?Q = "{Q\sets M. \ Q \ \}" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 548` ``` let ?a = "SUP Q:?Q. \ Q" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 549` ``` have "{} \ ?Q" using v.empty_measure by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 550` ``` then have Q_not_empty: "?Q \ {}" by blast ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 551` ``` have "?a \ \ (space M)" using sets_into_space ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 552` ``` by (auto intro!: SUP_leI measure_mono top) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 553` ``` then have "?a \ \" using finite_measure_of_space ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 554` ``` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 555` ``` from SUPR_countable_SUPR[OF this Q_not_empty] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 556` ``` obtain Q'' where "range Q'' \ \ ` ?Q" and a: "?a = (SUP i::nat. Q'' i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 557` ``` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 558` ``` then have "\i. \Q'. Q'' i = \ Q' \ Q' \ ?Q" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 559` ``` from choice[OF this] obtain Q' where Q': "\i. Q'' i = \ (Q' i)" "\i. Q' i \ ?Q" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 560` ``` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 561` ``` then have a_Lim: "?a = (SUP i::nat. \ (Q' i))" using a by simp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 562` ``` let "?O n" = "\i\n. Q' i" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 563` ``` have Union: "(SUP i. \ (?O i)) = \ (\i. ?O i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 564` ``` proof (rule continuity_from_below[of ?O]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 565` ``` show "range ?O \ sets M" using Q' by (auto intro!: finite_UN) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 566` ``` show "\i. ?O i \ ?O (Suc i)" by fastsimp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 567` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 568` ``` have Q'_sets: "\i. Q' i \ sets M" using Q' by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 569` ``` have O_sets: "\i. ?O i \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 570` ``` using Q' by (auto intro!: finite_UN Un) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 571` ``` then have O_in_G: "\i. ?O i \ ?Q" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 572` ``` proof (safe del: notI) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 573` ``` fix i have "Q' ` {..i} \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 574` ``` using Q' by (auto intro: finite_UN) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 575` ``` with v.measure_finitely_subadditive[of "{.. i}" Q'] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 576` ``` have "\ (?O i) \ (\i\i. \ (Q' i))" by auto ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 577` ``` also have "\ < \" unfolding setsum_\ pextreal_less_\ using Q' by auto ``` 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 578` ``` finally show "\ (?O i) \ \" unfolding pextreal_less_\ by auto ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 579` ``` qed auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 580` ``` have O_mono: "\n. ?O n \ ?O (Suc n)" by fastsimp ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 581` ``` have a_eq: "?a = \ (\i. ?O i)" unfolding Union[symmetric] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 582` ``` proof (rule antisym) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 583` ``` show "?a \ (SUP i. \ (?O i))" unfolding a_Lim ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 584` ``` using Q' by (auto intro!: SUP_mono measure_mono finite_UN) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 585` ``` show "(SUP i. \ (?O i)) \ ?a" unfolding SUPR_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 586` ``` proof (safe intro!: Sup_mono, unfold bex_simps) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 587` ``` fix i ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 588` ``` have *: "(\Q' ` {..i}) = ?O i" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 589` ``` then show "\x. (x \ sets M \ \ x \ \) \ ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 590` ``` \ (\Q' ` {..i}) \ \ x" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 591` ``` using O_in_G[of i] by (auto intro!: exI[of _ "?O i"]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 592` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 593` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 594` ``` let "?O_0" = "(\i. ?O i)" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 595` ``` have "?O_0 \ sets M" using Q' by auto ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 596` ``` def Q \ "\i. case i of 0 \ Q' 0 | Suc n \ ?O (Suc n) - ?O n" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 597` ``` { fix i have "Q i \ sets M" unfolding Q_def using Q'[of 0] by (cases i) (auto intro: O_sets) } ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 598` ``` note Q_sets = this ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 599` ``` show ?thesis ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 600` ``` proof (intro bexI exI conjI ballI impI allI) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 601` ``` show "disjoint_family Q" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 602` ``` by (fastsimp simp: disjoint_family_on_def Q_def ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 603` ``` split: nat.split_asm) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 604` ``` show "range Q \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 605` ``` using Q_sets by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 606` ``` { fix A assume A: "A \ sets M" "A \ space M - ?O_0" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 607` ``` show "\ A = 0 \ \ A = 0 \ 0 < \ A \ \ A = \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 608` ``` proof (rule disjCI, simp) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 609` ``` assume *: "0 < \ A \ \ A \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 610` ``` show "\ A = 0 \ \ A = 0" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 611` ``` proof cases ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 612` ``` assume "\ A = 0" moreover with ac A have "\ A = 0" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 613` ``` unfolding absolutely_continuous_def by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 614` ``` ultimately show ?thesis by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 615` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 616` ``` assume "\ A \ 0" with * have "\ A \ \" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 617` ``` with A have "\ ?O_0 + \ A = \ (?O_0 \ A)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 618` ``` using Q' by (auto intro!: measure_additive countable_UN) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 619` ``` also have "\ = (SUP i. \ (?O i \ A))" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 620` ``` proof (rule continuity_from_below[of "\i. ?O i \ A", symmetric, simplified]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 621` ``` show "range (\i. ?O i \ A) \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 622` ``` using `\ A \ \` O_sets A by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 623` ``` qed fastsimp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 624` ``` also have "\ \ ?a" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 625` ``` proof (safe intro!: SUPR_bound) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 626` ``` fix i have "?O i \ A \ ?Q" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 627` ``` proof (safe del: notI) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 628` ``` show "?O i \ A \ sets M" using O_sets A by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 629` ``` from O_in_G[of i] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 630` ``` moreover have "\ (?O i \ A) \ \ (?O i) + \ A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 631` ``` using v.measure_subadditive[of "?O i" A] A O_sets by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 632` ``` ultimately show "\ (?O i \ A) \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 633` ``` using `\ A \ \` by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 634` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 635` ``` then show "\ (?O i \ A) \ ?a" by (rule le_SUPI) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 636` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 637` ``` finally have "\ A = 0" unfolding a_eq using finite_measure[OF `?O_0 \ sets M`] ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 638` ``` by (cases "\ A") (auto simp: pextreal_noteq_omega_Ex) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 639` ``` with `\ A \ 0` show ?thesis by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 640` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 641` ``` qed } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 642` ``` { fix i show "\ (Q i) \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 643` ``` proof (cases i) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 644` ``` case 0 then show ?thesis ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 645` ``` unfolding Q_def using Q'[of 0] by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 646` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 647` ``` case (Suc n) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 648` ``` then show ?thesis unfolding Q_def ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 649` ``` using `?O n \ ?Q` `?O (Suc n) \ ?Q` O_mono ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 650` ``` using v.measure_Diff[of "?O n" "?O (Suc n)"] by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 651` ``` qed } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 652` ``` show "space M - ?O_0 \ sets M" using Q'_sets by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 653` ``` { fix j have "(\i\j. ?O i) = (\i\j. Q i)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 654` ``` proof (induct j) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 655` ``` case 0 then show ?case by (simp add: Q_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 656` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 657` ``` case (Suc j) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 658` ``` have eq: "\j. (\i\j. ?O i) = (\i\j. Q' i)" by fastsimp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 659` ``` have "{..j} \ {..Suc j} = {..Suc j}" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 660` ``` then have "(\i\Suc j. Q' i) = (\i\j. Q' i) \ Q (Suc j)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 661` ``` by (simp add: UN_Un[symmetric] Q_def del: UN_Un) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 662` ``` then show ?case using Suc by (auto simp add: eq atMost_Suc) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 663` ``` qed } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 664` ``` then have "(\j. (\i\j. ?O i)) = (\j. (\i\j. Q i))" by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 665` ``` then show "space M - ?O_0 = space M - (\i. Q i)" by fastsimp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 666` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 667` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 668` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 669` ```lemma (in finite_measure) Radon_Nikodym_finite_measure_infinite: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 670` ``` assumes "measure_space M \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 671` ``` assumes "absolutely_continuous \" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 672` ``` shows "\f \ borel_measurable M. \A\sets M. \ A = (\\<^isup>+x. f x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 673` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 674` ``` interpret v: measure_space M \ by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 675` ``` from split_space_into_finite_sets_and_rest[OF assms] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 676` ``` obtain Q0 and Q :: "nat \ 'a set" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 677` ``` where Q: "disjoint_family Q" "range Q \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 678` ``` and Q0: "Q0 \ sets M" "Q0 = space M - (\i. Q i)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 679` ``` and in_Q0: "\A. A \ sets M \ A \ Q0 \ \ A = 0 \ \ A = 0 \ 0 < \ A \ \ A = \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 680` ``` and Q_fin: "\i. \ (Q i) \ \" by force ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 681` ``` from Q have Q_sets: "\i. Q i \ sets M" by auto ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 682` ``` have "\i. \f. f\borel_measurable M \ (\A\sets M. ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 683` ``` \ (Q i \ A) = (\\<^isup>+x. f x * indicator (Q i \ A) x))" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 684` ``` proof ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 685` ``` fix i ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 686` ``` have indicator_eq: "\f x A. (f x :: pextreal) * indicator (Q i \ A) x * indicator (Q i) x ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 687` ``` = (f x * indicator (Q i) x) * indicator A x" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 688` ``` unfolding indicator_def by auto ``` 39092 98de40859858 move lemmas to correct theory files hoelzl parents: 38656 diff changeset ` 689` ``` have fm: "finite_measure (restricted_space (Q i)) \" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 690` ``` (is "finite_measure ?R \") by (rule restricted_finite_measure[OF Q_sets[of i]]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 691` ``` then interpret R: finite_measure ?R . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 692` ``` have fmv: "finite_measure ?R \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 693` ``` unfolding finite_measure_def finite_measure_axioms_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 694` ``` proof ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 695` ``` show "measure_space ?R \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 696` ``` using v.restricted_measure_space Q_sets[of i] by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 697` ``` show "\ (space ?R) \ \" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 698` ``` using Q_fin by simp ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 699` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 700` ``` have "R.absolutely_continuous \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 701` ``` using `absolutely_continuous \` `Q i \ sets M` ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 702` ``` by (auto simp: R.absolutely_continuous_def absolutely_continuous_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 703` ``` from finite_measure.Radon_Nikodym_finite_measure[OF fm fmv this] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 704` ``` obtain f where f: "(\x. f x * indicator (Q i) x) \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 705` ``` and f_int: "\A. A\sets M \ \ (Q i \ A) = (\\<^isup>+x. (f x * indicator (Q i) x) * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 706` ``` unfolding Bex_def borel_measurable_restricted[OF `Q i \ sets M`] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 707` ``` positive_integral_restricted[OF `Q i \ sets M`] by (auto simp: indicator_eq) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 708` ``` then show "\f. f\borel_measurable M \ (\A\sets M. ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 709` ``` \ (Q i \ A) = (\\<^isup>+x. f x * indicator (Q i \ A) x))" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 710` ``` by (fastsimp intro!: exI[of _ "\x. f x * indicator (Q i) x"] positive_integral_cong ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 711` ``` simp: indicator_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 712` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 713` ``` from choice[OF this] obtain f where borel: "\i. f i \ borel_measurable M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 714` ``` and f: "\A i. A \ sets M \ ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 715` ``` \ (Q i \ A) = (\\<^isup>+x. f i x * indicator (Q i \ A) x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 716` ``` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 717` ``` let "?f x" = ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 718` ``` "(\\<^isub>\ i. f i x * indicator (Q i) x) + \ * indicator Q0 x" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 719` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 720` ``` proof (safe intro!: bexI[of _ ?f]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 721` ``` show "?f \ borel_measurable M" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 722` ``` by (safe intro!: borel_measurable_psuminf borel_measurable_pextreal_times ``` 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 723` ``` borel_measurable_pextreal_add borel_measurable_indicator ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 724` ``` borel_measurable_const borel Q_sets Q0 Diff countable_UN) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 725` ``` fix A assume "A \ sets M" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 726` ``` have *: ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 727` ``` "\x i. indicator A x * (f i x * indicator (Q i) x) = ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 728` ``` f i x * indicator (Q i \ A) x" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 729` ``` "\x i. (indicator A x * indicator Q0 x :: pextreal) = ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 730` ``` indicator (Q0 \ A) x" by (auto simp: indicator_def) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 731` ``` have "(\\<^isup>+x. ?f x * indicator A x) = ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 732` ``` (\\<^isub>\ i. \ (Q i \ A)) + \ * \ (Q0 \ A)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 733` ``` unfolding f[OF `A \ sets M`] ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 734` ``` apply (simp del: pextreal_times(2) add: field_simps *) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 735` ``` apply (subst positive_integral_add) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 736` ``` apply (fastsimp intro: Q0 `A \ sets M`) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 737` ``` apply (fastsimp intro: Q_sets `A \ sets M` borel_measurable_psuminf borel) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 738` ``` apply (subst positive_integral_cmult_indicator) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 739` ``` apply (fastsimp intro: Q0 `A \ sets M`) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 740` ``` unfolding psuminf_cmult_right[symmetric] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 741` ``` apply (subst positive_integral_psuminf) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 742` ``` apply (fastsimp intro: `A \ sets M` Q_sets borel) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 743` ``` apply (simp add: *) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 744` ``` done ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 745` ``` moreover have "(\\<^isub>\i. \ (Q i \ A)) = \ ((\i. Q i) \ A)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 746` ``` using Q Q_sets `A \ sets M` ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 747` ``` by (intro v.measure_countably_additive[of "\i. Q i \ A", unfolded comp_def, simplified]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 748` ``` (auto simp: disjoint_family_on_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 749` ``` moreover have "\ * \ (Q0 \ A) = \ (Q0 \ A)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 750` ``` proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 751` ``` have "Q0 \ A \ sets M" using Q0(1) `A \ sets M` by blast ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 752` ``` from in_Q0[OF this] show ?thesis by auto ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 753` ``` qed ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 754` ``` moreover have "Q0 \ A \ sets M" "((\i. Q i) \ A) \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 755` ``` using Q_sets `A \ sets M` Q0(1) by (auto intro!: countable_UN) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 756` ``` moreover have "((\i. Q i) \ A) \ (Q0 \ A) = A" "((\i. Q i) \ A) \ (Q0 \ A) = {}" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 757` ``` using `A \ sets M` sets_into_space Q0 by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 758` ``` ultimately show "\ A = (\\<^isup>+x. ?f x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 759` ``` using v.measure_additive[simplified, of "(\i. Q i) \ A" "Q0 \ A"] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 760` ``` by simp ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 761` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 762` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 763` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 764` ```lemma (in sigma_finite_measure) Radon_Nikodym: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 765` ``` assumes "measure_space M \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 766` ``` assumes "absolutely_continuous \" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 767` ``` shows "\f \ borel_measurable M. \A\sets M. \ A = (\\<^isup>+x. f x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 768` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 769` ``` from Ex_finite_integrable_function ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 770` ``` obtain h where finite: "positive_integral h \ \" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 771` ``` borel: "h \ borel_measurable M" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 772` ``` pos: "\x. x \ space M \ 0 < h x" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 773` ``` "\x. x \ space M \ h x < \" by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 774` ``` let "?T A" = "(\\<^isup>+x. h x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 775` ``` from measure_space_density[OF borel] finite ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 776` ``` interpret T: finite_measure M ?T ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 777` ``` unfolding finite_measure_def finite_measure_axioms_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 778` ``` by (simp cong: positive_integral_cong) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 779` ``` have "\N. N \ sets M \ {x \ space M. h x \ 0 \ indicator N x \ (0::pextreal)} = N" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 780` ``` using sets_into_space pos by (force simp: indicator_def) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 781` ``` then have "T.absolutely_continuous \" using assms(2) borel ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 782` ``` unfolding T.absolutely_continuous_def absolutely_continuous_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 783` ``` by (fastsimp simp: borel_measurable_indicator positive_integral_0_iff) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 784` ``` from T.Radon_Nikodym_finite_measure_infinite[simplified, OF assms(1) this] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 785` ``` obtain f where f_borel: "f \ borel_measurable M" and ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 786` ``` fT: "\A. A \ sets M \ \ A = T.positive_integral (\x. f x * indicator A x)" by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 787` ``` show ?thesis ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 788` ``` proof (safe intro!: bexI[of _ "\x. h x * f x"]) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 789` ``` show "(\x. h x * f x) \ borel_measurable M" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 790` ``` using borel f_borel by (auto intro: borel_measurable_pextreal_times) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 791` ``` fix A assume "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 792` ``` then have "(\x. f x * indicator A x) \ borel_measurable M" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 793` ``` using f_borel by (auto intro: borel_measurable_pextreal_times borel_measurable_indicator) ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 794` ``` from positive_integral_translated_density[OF borel this] ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 795` ``` show "\ A = (\\<^isup>+x. h x * f x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 796` ``` unfolding fT[OF `A \ sets M`] by (simp add: field_simps) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 797` ``` qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 798` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 799` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 800` ```section "Uniqueness of densities" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 801` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 802` ```lemma (in measure_space) finite_density_unique: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 803` ``` assumes borel: "f \ borel_measurable M" "g \ borel_measurable M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 804` ``` and fin: "positive_integral f < \" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 805` ``` shows "(\A\sets M. (\\<^isup>+x. f x * indicator A x) = (\\<^isup>+x. g x * indicator A x)) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 806` ``` \ (AE x. f x = g x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 807` ``` (is "(\A\sets M. ?P f A = ?P g A) \ _") ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 808` ```proof (intro iffI ballI) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 809` ``` fix A assume eq: "AE x. f x = g x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 810` ``` show "?P f A = ?P g A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 811` ``` by (rule positive_integral_cong_AE[OF AE_mp[OF eq]]) simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 812` ```next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 813` ``` assume eq: "\A\sets M. ?P f A = ?P g A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 814` ``` from this[THEN bspec, OF top] fin ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 815` ``` have g_fin: "positive_integral g < \" by (simp cong: positive_integral_cong) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 816` ``` { fix f g assume borel: "f \ borel_measurable M" "g \ borel_measurable M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 817` ``` and g_fin: "positive_integral g < \" and eq: "\A\sets M. ?P f A = ?P g A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 818` ``` let ?N = "{x\space M. g x < f x}" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 819` ``` have N: "?N \ sets M" using borel by simp ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 820` ``` have "?P (\x. (f x - g x)) ?N = (\\<^isup>+x. f x * indicator ?N x - g x * indicator ?N x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 821` ``` by (auto intro!: positive_integral_cong simp: indicator_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 822` ``` also have "\ = ?P f ?N - ?P g ?N" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 823` ``` proof (rule positive_integral_diff) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 824` ``` show "(\x. f x * indicator ?N x) \ borel_measurable M" "(\x. g x * indicator ?N x) \ borel_measurable M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 825` ``` using borel N by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 826` ``` have "?P g ?N \ positive_integral g" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 827` ``` by (auto intro!: positive_integral_mono simp: indicator_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 828` ``` then show "?P g ?N \ \" using g_fin by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 829` ``` fix x assume "x \ space M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 830` ``` show "g x * indicator ?N x \ f x * indicator ?N x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 831` ``` by (auto simp: indicator_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 832` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 833` ``` also have "\ = 0" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 834` ``` using eq[THEN bspec, OF N] by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 835` ``` finally have "\ {x\space M. (f x - g x) * indicator ?N x \ 0} = 0" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 836` ``` using borel N by (subst (asm) positive_integral_0_iff) auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 837` ``` moreover have "{x\space M. (f x - g x) * indicator ?N x \ 0} = ?N" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 838` ``` by (auto simp: pextreal_zero_le_diff) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 839` ``` ultimately have "?N \ null_sets" using N by simp } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 840` ``` from this[OF borel g_fin eq] this[OF borel(2,1) fin] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 841` ``` have "{x\space M. g x < f x} \ {x\space M. f x < g x} \ null_sets" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 842` ``` using eq by (intro null_sets_Un) auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 843` ``` also have "{x\space M. g x < f x} \ {x\space M. f x < g x} = {x\space M. f x \ g x}" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 844` ``` by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 845` ``` finally show "AE x. f x = g x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 846` ``` unfolding almost_everywhere_def by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 847` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 848` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 849` ```lemma (in finite_measure) density_unique_finite_measure: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 850` ``` assumes borel: "f \ borel_measurable M" "f' \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 851` ``` assumes f: "\A. A \ sets M \ (\\<^isup>+x. f x * indicator A x) = (\\<^isup>+x. f' x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 852` ``` (is "\A. A \ sets M \ ?P f A = ?P f' A") ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 853` ``` shows "AE x. f x = f' x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 854` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 855` ``` let "?\ A" = "?P f A" and "?\' A" = "?P f' A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 856` ``` let "?f A x" = "f x * indicator A x" and "?f' A x" = "f' x * indicator A x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 857` ``` interpret M: measure_space M ?\ ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 858` ``` using borel(1) by (rule measure_space_density) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 859` ``` have ac: "absolutely_continuous ?\" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 860` ``` using f by (rule density_is_absolutely_continuous) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 861` ``` from split_space_into_finite_sets_and_rest[OF `measure_space M ?\` ac] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 862` ``` obtain Q0 and Q :: "nat \ 'a set" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 863` ``` where Q: "disjoint_family Q" "range Q \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 864` ``` and Q0: "Q0 \ sets M" "Q0 = space M - (\i. Q i)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 865` ``` and in_Q0: "\A. A \ sets M \ A \ Q0 \ \ A = 0 \ ?\ A = 0 \ 0 < \ A \ ?\ A = \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 866` ``` and Q_fin: "\i. ?\ (Q i) \ \" by force ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 867` ``` from Q have Q_sets: "\i. Q i \ sets M" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 868` ``` let ?N = "{x\space M. f x \ f' x}" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 869` ``` have "?N \ sets M" using borel by auto ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 870` ``` have *: "\i x A. \y::pextreal. y * indicator (Q i) x * indicator A x = y * indicator (Q i \ A) x" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 871` ``` unfolding indicator_def by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 872` ``` have 1: "\i. AE x. ?f (Q i) x = ?f' (Q i) x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 873` ``` using borel Q_fin Q ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 874` ``` by (intro finite_density_unique[THEN iffD1] allI) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 875` ``` (auto intro!: borel_measurable_pextreal_times f Int simp: *) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 876` ``` have 2: "AE x. ?f Q0 x = ?f' Q0 x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 877` ``` proof (rule AE_I') ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 878` ``` { fix f :: "'a \ pextreal" assume borel: "f \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 879` ``` and eq: "\A. A \ sets M \ ?\ A = (\\<^isup>+x. f x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 880` ``` let "?A i" = "Q0 \ {x \ space M. f x < of_nat i}" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 881` ``` have "(\i. ?A i) \ null_sets" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 882` ``` proof (rule null_sets_UN) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 883` ``` fix i have "?A i \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 884` ``` using borel Q0(1) by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 885` ``` have "?\ (?A i) \ (\\<^isup>+x. of_nat i * indicator (?A i) x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 886` ``` unfolding eq[OF `?A i \ sets M`] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 887` ``` by (auto intro!: positive_integral_mono simp: indicator_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 888` ``` also have "\ = of_nat i * \ (?A i)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 889` ``` using `?A i \ sets M` by (auto intro!: positive_integral_cmult_indicator) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 890` ``` also have "\ < \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 891` ``` using `?A i \ sets M`[THEN finite_measure] by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 892` ``` finally have "?\ (?A i) \ \" by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 893` ``` then show "?A i \ null_sets" using in_Q0[OF `?A i \ sets M`] `?A i \ sets M` by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 894` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 895` ``` also have "(\i. ?A i) = Q0 \ {x\space M. f x < \}" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 896` ``` by (auto simp: less_\_Ex_of_nat) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 897` ``` finally have "Q0 \ {x\space M. f x \ \} \ null_sets" by (simp add: pextreal_less_\) } ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 898` ``` from this[OF borel(1) refl] this[OF borel(2) f] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 899` ``` have "Q0 \ {x\space M. f x \ \} \ null_sets" "Q0 \ {x\space M. f' x \ \} \ null_sets" by simp_all ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 900` ``` then show "(Q0 \ {x\space M. f x \ \}) \ (Q0 \ {x\space M. f' x \ \}) \ null_sets" by (rule null_sets_Un) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 901` ``` show "{x \ space M. ?f Q0 x \ ?f' Q0 x} \ ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 902` ``` (Q0 \ {x\space M. f x \ \}) \ (Q0 \ {x\space M. f' x \ \})" by (auto simp: indicator_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 903` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 904` ``` have **: "\x. (?f Q0 x = ?f' Q0 x) \ (\i. ?f (Q i) x = ?f' (Q i) x) \ ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 905` ``` ?f (space M) x = ?f' (space M) x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 906` ``` by (auto simp: indicator_def Q0) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 907` ``` have 3: "AE x. ?f (space M) x = ?f' (space M) x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 908` ``` by (rule AE_mp[OF 1[unfolded all_AE_countable] AE_mp[OF 2]]) (simp add: **) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 909` ``` then show "AE x. f x = f' x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 910` ``` by (rule AE_mp) (auto intro!: AE_cong simp: indicator_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 911` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 912` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 913` ```lemma (in sigma_finite_measure) density_unique: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 914` ``` assumes borel: "f \ borel_measurable M" "f' \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 915` ``` assumes f: "\A. A \ sets M \ (\\<^isup>+x. f x * indicator A x) = (\\<^isup>+x. f' x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 916` ``` (is "\A. A \ sets M \ ?P f A = ?P f' A") ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 917` ``` shows "AE x. f x = f' x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 918` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 919` ``` obtain h where h_borel: "h \ borel_measurable M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 920` ``` and fin: "positive_integral h \ \" and pos: "\x. x \ space M \ 0 < h x \ h x < \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 921` ``` using Ex_finite_integrable_function by auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 922` ``` interpret h: measure_space M "\A. (\\<^isup>+x. h x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 923` ``` using h_borel by (rule measure_space_density) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 924` ``` interpret h: finite_measure M "\A. (\\<^isup>+x. h x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 925` ``` by default (simp cong: positive_integral_cong add: fin) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 926` ``` interpret f: measure_space M "\A. (\\<^isup>+x. f x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 927` ``` using borel(1) by (rule measure_space_density) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 928` ``` interpret f': measure_space M "\A. (\\<^isup>+x. f' x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 929` ``` using borel(2) by (rule measure_space_density) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 930` ``` { fix A assume "A \ sets M" ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 931` ``` then have " {x \ space M. h x \ 0 \ indicator A x \ (0::pextreal)} = A" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 932` ``` using pos sets_into_space by (force simp: indicator_def) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 933` ``` then have "(\\<^isup>+x. h x * indicator A x) = 0 \ A \ null_sets" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 934` ``` using h_borel `A \ sets M` by (simp add: positive_integral_0_iff) } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 935` ``` note h_null_sets = this ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 936` ``` { fix A assume "A \ sets M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 937` ``` have "(\\<^isup>+x. h x * (f x * indicator A x)) = ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 938` ``` f.positive_integral (\x. h x * indicator A x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 939` ``` using `A \ sets M` h_borel borel ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 940` ``` by (simp add: positive_integral_translated_density ac_simps cong: positive_integral_cong) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 941` ``` also have "\ = f'.positive_integral (\x. h x * indicator A x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 942` ``` by (rule f'.positive_integral_cong_measure) (rule f) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 943` ``` also have "\ = (\\<^isup>+x. h x * (f' x * indicator A x))" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 944` ``` using `A \ sets M` h_borel borel ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 945` ``` by (simp add: positive_integral_translated_density ac_simps cong: positive_integral_cong) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 946` ``` finally have "(\\<^isup>+x. h x * (f x * indicator A x)) = (\\<^isup>+x. h x * (f' x * indicator A x))" . } ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 947` ``` then have "h.almost_everywhere (\x. f x = f' x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 948` ``` using h_borel borel ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 949` ``` by (intro h.density_unique_finite_measure[OF borel]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 950` ``` (simp add: positive_integral_translated_density) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 951` ``` then show "AE x. f x = f' x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 952` ``` unfolding h.almost_everywhere_def almost_everywhere_def ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 953` ``` by (auto simp add: h_null_sets) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 954` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 955` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 956` ```lemma (in sigma_finite_measure) sigma_finite_iff_density_finite: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 957` ``` assumes \: "measure_space M \" and f: "f \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 958` ``` and eq: "\A. A \ sets M \ \ A = (\\<^isup>+x. f x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 959` ``` shows "sigma_finite_measure M \ \ (AE x. f x \ \)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 960` ```proof ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 961` ``` assume "sigma_finite_measure M \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 962` ``` then interpret \: sigma_finite_measure M \ . ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 963` ``` from \.Ex_finite_integrable_function obtain h where ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 964` ``` h: "h \ borel_measurable M" "\.positive_integral h \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 965` ``` and fin: "\x. x \ space M \ 0 < h x \ h x < \" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 966` ``` have "AE x. f x * h x \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 967` ``` proof (rule AE_I') ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 968` ``` have "\.positive_integral h = (\\<^isup>+x. f x * h x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 969` ``` by (simp add: \.positive_integral_cong_measure[symmetric, OF eq[symmetric]]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 970` ``` (intro positive_integral_translated_density f h) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 971` ``` then have "(\\<^isup>+x. f x * h x) \ \" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 972` ``` using h(2) by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 973` ``` then show "(\x. f x * h x) -` {\} \ space M \ null_sets" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 974` ``` using f h(1) by (auto intro!: positive_integral_omega borel_measurable_vimage) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 975` ``` qed auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 976` ``` then show "AE x. f x \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 977` ``` proof (rule AE_mp, intro AE_cong) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 978` ``` fix x assume "x \ space M" from this[THEN fin] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 979` ``` show "f x * h x \ \ \ f x \ \" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 980` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 981` ```next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 982` ``` assume AE: "AE x. f x \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 983` ``` from sigma_finite guess Q .. note Q = this ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 984` ``` interpret \: measure_space M \ by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 985` ``` def A \ "\i. f -` (case i of 0 \ {\} | Suc n \ {.. of_nat (Suc n)}) \ space M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 986` ``` { fix i j have "A i \ Q j \ sets M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 987` ``` unfolding A_def using f Q ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 988` ``` apply (rule_tac Int) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 989` ``` by (cases i) (auto intro: measurable_sets[OF f]) } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 990` ``` note A_in_sets = this ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 991` ``` let "?A n" = "case prod_decode n of (i,j) \ A i \ Q j" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 992` ``` show "sigma_finite_measure M \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 993` ``` proof (default, intro exI conjI subsetI allI) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 994` ``` fix x assume "x \ range ?A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 995` ``` then obtain n where n: "x = ?A n" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 996` ``` then show "x \ sets M" using A_in_sets by (cases "prod_decode n") auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 997` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 998` ``` have "(\i. ?A i) = (\i j. A i \ Q j)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 999` ``` proof safe ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1000` ``` fix x i j assume "x \ A i" "x \ Q j" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1001` ``` then show "x \ (\i. case prod_decode i of (i, j) \ A i \ Q j)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1002` ``` by (intro UN_I[of "prod_encode (i,j)"]) auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1003` ``` qed auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1004` ``` also have "\ = (\i. A i) \ space M" using Q by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1005` ``` also have "(\i. A i) = space M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1006` ``` proof safe ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1007` ``` fix x assume x: "x \ space M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1008` ``` show "x \ (\i. A i)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1009` ``` proof (cases "f x") ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1010` ``` case infinite then show ?thesis using x unfolding A_def by (auto intro: exI[of _ 0]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1011` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1012` ``` case (preal r) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1013` ``` with less_\_Ex_of_nat[of "f x"] obtain n where "f x < of_nat n" by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1014` ``` then show ?thesis using x preal unfolding A_def by (auto intro!: exI[of _ "Suc n"]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1015` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1016` ``` qed (auto simp: A_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1017` ``` finally show "(\i. ?A i) = space M" by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1018` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1019` ``` fix n obtain i j where ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1020` ``` [simp]: "prod_decode n = (i, j)" by (cases "prod_decode n") auto ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1021` ``` have "(\\<^isup>+x. f x * indicator (A i \ Q j) x) \ \" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1022` ``` proof (cases i) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1023` ``` case 0 ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1024` ``` have "AE x. f x * indicator (A i \ Q j) x = 0" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1025` ``` using AE by (rule AE_mp) (auto intro!: AE_cong simp: A_def `i = 0`) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1026` ``` then have "(\\<^isup>+x. f x * indicator (A i \ Q j) x) = 0" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1027` ``` using A_in_sets f ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1028` ``` apply (subst positive_integral_0_iff) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1029` ``` apply fast ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1030` ``` apply (subst (asm) AE_iff_null_set) ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 1031` ``` apply (intro borel_measurable_pextreal_neq_const) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1032` ``` apply fast ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1033` ``` by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1034` ``` then show ?thesis by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1035` ``` next ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1036` ``` case (Suc n) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1037` ``` then have "(\\<^isup>+x. f x * indicator (A i \ Q j) x) \ ``` c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1038` ``` (\\<^isup>+x. of_nat (Suc n) * indicator (Q j) x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1039` ``` by (auto intro!: positive_integral_mono simp: indicator_def A_def) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1040` ``` also have "\ = of_nat (Suc n) * \ (Q j)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1041` ``` using Q by (auto intro!: positive_integral_cmult_indicator) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1042` ``` also have "\ < \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1043` ``` using Q by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1044` ``` finally show ?thesis by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1045` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1046` ``` then show "\ (?A n) \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1047` ``` using A_in_sets Q eq by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1048` ``` qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1049` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1050` 40871 688f6ff859e1 Generalized simple_functionD and less_SUP_iff. hoelzl parents: 40859 diff changeset ` 1051` ```section "Radon-Nikodym derivative" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1052` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1053` ```definition (in sigma_finite_measure) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1054` ``` "RN_deriv \ \ SOME f. f \ borel_measurable M \ ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1055` ``` (\A \ sets M. \ A = (\\<^isup>+x. f x * indicator A x))" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1056` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1057` ```lemma (in sigma_finite_measure) RN_deriv_cong: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1058` ``` assumes cong: "\A. A \ sets M \ \' A = \ A" "\A. A \ sets M \ \' A = \ A" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1059` ``` shows "sigma_finite_measure.RN_deriv M \' \' x = RN_deriv \ x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1060` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1061` ``` interpret \': sigma_finite_measure M \' ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1062` ``` using cong(1) by (rule sigma_finite_measure_cong) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1063` ``` show ?thesis ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1064` ``` unfolding RN_deriv_def \'.RN_deriv_def ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1065` ``` by (simp add: cong positive_integral_cong_measure[OF cong(1)]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1066` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1067` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1068` ```lemma (in sigma_finite_measure) RN_deriv: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1069` ``` assumes "measure_space M \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1070` ``` assumes "absolutely_continuous \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1071` ``` shows "RN_deriv \ \ borel_measurable M" (is ?borel) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1072` ``` and "\A. A \ sets M \ \ A = (\\<^isup>+x. RN_deriv \ x * indicator A x)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1073` ``` (is "\A. _ \ ?int A") ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1074` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1075` ``` note Ex = Radon_Nikodym[OF assms, unfolded Bex_def] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1076` ``` thus ?borel unfolding RN_deriv_def by (rule someI2_ex) auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1077` ``` fix A assume "A \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1078` ``` from Ex show "?int A" unfolding RN_deriv_def ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1079` ``` by (rule someI2_ex) (simp add: `A \ sets M`) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1080` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1081` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1082` ```lemma (in sigma_finite_measure) RN_deriv_positive_integral: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1083` ``` assumes \: "measure_space M \" "absolutely_continuous \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1084` ``` and f: "f \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1085` ``` shows "measure_space.positive_integral M \ f = (\\<^isup>+x. RN_deriv \ x * f x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1086` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1087` ``` interpret \: measure_space M \ by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1088` ``` have "\.positive_integral f = ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1089` ``` measure_space.positive_integral M (\A. (\\<^isup>+x. RN_deriv \ x * indicator A x)) f" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1090` ``` by (intro \.positive_integral_cong_measure[symmetric] RN_deriv(2)[OF \, symmetric]) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1091` ``` also have "\ = (\\<^isup>+x. RN_deriv \ x * f x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1092` ``` by (intro positive_integral_translated_density RN_deriv[OF \] f) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1093` ``` finally show ?thesis . ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1094` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1095` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1096` ```lemma (in sigma_finite_measure) RN_deriv_unique: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1097` ``` assumes \: "measure_space M \" "absolutely_continuous \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1098` ``` and f: "f \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1099` ``` and eq: "\A. A \ sets M \ \ A = (\\<^isup>+x. f x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1100` ``` shows "AE x. f x = RN_deriv \ x" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1101` ```proof (rule density_unique[OF f RN_deriv(1)[OF \]]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1102` ``` fix A assume A: "A \ sets M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1103` ``` show "(\\<^isup>+x. f x * indicator A x) = (\\<^isup>+x. RN_deriv \ x * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1104` ``` unfolding eq[OF A, symmetric] RN_deriv(2)[OF \ A, symmetric] .. ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1105` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1106` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1107` ```lemma (in sigma_finite_measure) RN_deriv_vimage: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1108` ``` fixes f :: "'b \ 'a" ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1109` ``` assumes f: "bij_inv S (space M) f g" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1110` ``` assumes \: "measure_space M \" "absolutely_continuous \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1111` ``` shows "AE x. ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1112` ``` sigma_finite_measure.RN_deriv (vimage_algebra S f) (\A. \ (f ` A)) (\A. \ (f ` A)) (g x) = RN_deriv \ x" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1113` ```proof (rule RN_deriv_unique[OF \]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1114` ``` interpret sf: sigma_finite_measure "vimage_algebra S f" "\A. \ (f ` A)" ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1115` ``` using f by (rule sigma_finite_measure_isomorphic[OF bij_inv_bij_betw(1)]) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1116` ``` interpret \: measure_space M \ using \(1) . ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1117` ``` have \': "measure_space (vimage_algebra S f) (\A. \ (f ` A))" ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1118` ``` using f by (rule \.measure_space_isomorphic[OF bij_inv_bij_betw(1)]) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1119` ``` { fix A assume "A \ sets M" then have "f ` (f -` A \ S) = A" ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1120` ``` using sets_into_space f[THEN bij_inv_bij_betw(1), unfolded bij_betw_def] ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1121` ``` by (intro image_vimage_inter_eq[where T="space M"]) auto } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1122` ``` note A_f = this ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1123` ``` then have ac: "sf.absolutely_continuous (\A. \ (f ` A))" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1124` ``` using \(2) by (auto simp: sf.absolutely_continuous_def absolutely_continuous_def) ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1125` ``` show "(\x. sf.RN_deriv (\A. \ (f ` A)) (g x)) \ borel_measurable M" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1126` ``` using sf.RN_deriv(1)[OF \' ac] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1127` ``` unfolding measurable_vimage_iff_inv[OF f] comp_def . ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1128` ``` fix A assume "A \ sets M" ``` 41095 c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1129` ``` then have *: "\x. x \ space M \ indicator (f -` A \ S) (g x) = (indicator A x :: pextreal)" ``` c335d880ff82 cleanup bijectivity btw. product spaces and pairs hoelzl parents: 41023 diff changeset ` 1130` ``` using f by (auto simp: bij_inv_def indicator_def) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1131` ``` have "\ (f ` (f -` A \ S)) = sf.positive_integral (\x. sf.RN_deriv (\A. \ (f ` A)) x * indicator (f -` A \ S) x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1132` ``` using `A \ sets M` by (force intro!: sf.RN_deriv(2)[OF \' ac]) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1133` ``` also have "\ = (\\<^isup>+x. sf.RN_deriv (\A. \ (f ` A)) (g x) * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1134` ``` unfolding positive_integral_vimage_inv[OF f] ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1135` ``` by (simp add: * cong: positive_integral_cong) ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1136` ``` finally show "\ A = (\\<^isup>+x. sf.RN_deriv (\A. \ (f ` A)) (g x) * indicator A x)" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1137` ``` unfolding A_f[OF `A \ sets M`] . ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1138` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1139` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1140` ```lemma (in sigma_finite_measure) RN_deriv_finite: ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1141` ``` assumes sfm: "sigma_finite_measure M \" and ac: "absolutely_continuous \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1142` ``` shows "AE x. RN_deriv \ x \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1143` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1144` ``` interpret \: sigma_finite_measure M \ by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1145` ``` have \: "measure_space M \" by default ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1146` ``` from sfm show ?thesis ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1147` ``` using sigma_finite_iff_density_finite[OF \ RN_deriv[OF \ ac]] by simp ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1148` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1149` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1150` ```lemma (in sigma_finite_measure) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1151` ``` assumes \: "sigma_finite_measure M \" "absolutely_continuous \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1152` ``` and f: "f \ borel_measurable M" ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1153` ``` shows RN_deriv_integral: "measure_space.integral M \ f = (\x. real (RN_deriv \ x) * f x)" (is ?integral) ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1154` ``` and RN_deriv_integrable: "measure_space.integrable M \ f \ integrable (\x. real (RN_deriv \ x) * f x)" (is ?integrable) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1155` ```proof - ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1156` ``` interpret \: sigma_finite_measure M \ by fact ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1157` ``` have ms: "measure_space M \" by default ``` 41023 9118eb4eb8dc it is known as the extended reals, not the infinite reals hoelzl parents: 40871 diff changeset ` 1158` ``` have minus_cong: "\A B A' B'::pextreal. A = A' \ B = B' \ real A - real B = real A' - real B'" by simp ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1159` ``` have f': "(\x. - f x) \ borel_measurable M" using f by auto ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1160` ``` { fix f :: "'a \ real" assume "f \ borel_measurable M" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1161` ``` { fix x assume *: "RN_deriv \ x \ \" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1162` ``` have "Real (real (RN_deriv \ x)) * Real (f x) = Real (real (RN_deriv \ x) * f x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1163` ``` by (simp add: mult_le_0_iff) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1164` ``` then have "RN_deriv \ x * Real (f x) = Real (real (RN_deriv \ x) * f x)" ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1165` ``` using * by (simp add: Real_real) } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1166` ``` note * = this ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1167` ``` have "(\\<^isup>+x. RN_deriv \ x * Real (f x)) = (\\<^isup>+x. Real (real (RN_deriv \ x) * f x))" ``` 40859 de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1168` ``` apply (rule positive_integral_cong_AE) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1169` ``` apply (rule AE_mp[OF RN_deriv_finite[OF \]]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1170` ``` by (auto intro!: AE_cong simp: *) } ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1171` ``` with this[OF f] this[OF f'] f f' ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1172` ``` show ?integral ?integrable ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1173` ``` unfolding \.integral_def integral_def \.integrable_def integrable_def ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1174` ``` by (auto intro!: RN_deriv(1)[OF ms \(2)] minus_cong simp: RN_deriv_positive_integral[OF ms \(2)]) ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1175` ```qed ``` de0b30e6c2d2 Support product spaces on sigma finite measures. hoelzl parents: 39097 diff changeset ` 1176` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1177` ```lemma (in sigma_finite_measure) RN_deriv_singleton: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1178` ``` assumes "measure_space M \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1179` ``` and ac: "absolutely_continuous \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1180` ``` and "{x} \ sets M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1181` ``` shows "\ {x} = RN_deriv \ x * \ {x}" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1182` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1183` ``` note deriv = RN_deriv[OF assms(1, 2)] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1184` ``` from deriv(2)[OF `{x} \ sets M`] ``` 41544 c3b977fee8a3 introduced integral syntax hoelzl parents: 41097 diff changeset ` 1185` ``` have "\ {x} = (\\<^isup>+w. RN_deriv \ x * indicator {x} w)" ``` 38656 d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1186` ``` by (auto simp: indicator_def intro!: positive_integral_cong) ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1187` ``` thus ?thesis using positive_integral_cmult_indicator[OF `{x} \ sets M`] ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1188` ``` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1189` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1190` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1191` ```theorem (in finite_measure_space) RN_deriv_finite_measure: ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1192` ``` assumes "measure_space M \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1193` ``` and ac: "absolutely_continuous \" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1194` ``` and "x \ space M" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1195` ``` shows "\ {x} = RN_deriv \ x * \ {x}" ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1196` ```proof - ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1197` ``` have "{x} \ sets M" using sets_eq_Pow `x \ space M` by auto ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1198` ``` from RN_deriv_singleton[OF assms(1,2) this] show ?thesis . ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1199` ```qed ``` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1200` d5d342611edb Rewrite the Probability theory. hoelzl parents: diff changeset ` 1201` ```end ```