equal
deleted
inserted
replaced
18 proof - |
18 proof - |
19 interpret finite_measure M |
19 interpret finite_measure M |
20 proof |
20 proof |
21 show "emeasure M (space M) \<noteq> \<infinity>" using * by simp |
21 show "emeasure M (space M) \<noteq> \<infinity>" using * by simp |
22 qed |
22 qed |
23 show "prob_space M" by default fact |
23 show "prob_space M" by standard fact |
24 qed |
24 qed |
25 |
25 |
26 lemma prob_space_imp_sigma_finite: "prob_space M \<Longrightarrow> sigma_finite_measure M" |
26 lemma prob_space_imp_sigma_finite: "prob_space M \<Longrightarrow> sigma_finite_measure M" |
27 unfolding prob_space_def finite_measure_def by simp |
27 unfolding prob_space_def finite_measure_def by simp |
28 |
28 |
624 shows "distributed M (S \<Otimes>\<^sub>M T) (\<lambda>x. (X x, Y x)) f" |
624 shows "distributed M (S \<Otimes>\<^sub>M T) (\<lambda>x. (X x, Y x)) f" |
625 unfolding distributed_def |
625 unfolding distributed_def |
626 proof safe |
626 proof safe |
627 interpret S: sigma_finite_measure S by fact |
627 interpret S: sigma_finite_measure S by fact |
628 interpret T: sigma_finite_measure T by fact |
628 interpret T: sigma_finite_measure T by fact |
629 interpret ST: pair_sigma_finite S T by default |
629 interpret ST: pair_sigma_finite S T .. |
630 |
630 |
631 from ST.sigma_finite_up_in_pair_measure_generator guess F :: "nat \<Rightarrow> ('b \<times> 'c) set" .. note F = this |
631 from ST.sigma_finite_up_in_pair_measure_generator guess F :: "nat \<Rightarrow> ('b \<times> 'c) set" .. note F = this |
632 let ?E = "{a \<times> b |a b. a \<in> sets S \<and> b \<in> sets T}" |
632 let ?E = "{a \<times> b |a b. a \<in> sets S \<and> b \<in> sets T}" |
633 let ?P = "S \<Otimes>\<^sub>M T" |
633 let ?P = "S \<Otimes>\<^sub>M T" |
634 show "distr M ?P (\<lambda>x. (X x, Y x)) = density ?P f" (is "?L = ?R") |
634 show "distr M ?P (\<lambda>x. (X x, Y x)) = density ?P f" (is "?L = ?R") |
664 assumes Pxy: "distributed M (S \<Otimes>\<^sub>M T) (\<lambda>x. (X x, Y x)) Pxy" |
664 assumes Pxy: "distributed M (S \<Otimes>\<^sub>M T) (\<lambda>x. (X x, Y x)) Pxy" |
665 shows "distributed M (T \<Otimes>\<^sub>M S) (\<lambda>x. (Y x, X x)) (\<lambda>(x, y). Pxy (y, x))" |
665 shows "distributed M (T \<Otimes>\<^sub>M S) (\<lambda>x. (Y x, X x)) (\<lambda>(x, y). Pxy (y, x))" |
666 proof - |
666 proof - |
667 interpret S: sigma_finite_measure S by fact |
667 interpret S: sigma_finite_measure S by fact |
668 interpret T: sigma_finite_measure T by fact |
668 interpret T: sigma_finite_measure T by fact |
669 interpret ST: pair_sigma_finite S T by default |
669 interpret ST: pair_sigma_finite S T .. |
670 interpret TS: pair_sigma_finite T S by default |
670 interpret TS: pair_sigma_finite T S .. |
671 |
671 |
672 note Pxy[measurable] |
672 note Pxy[measurable] |
673 show ?thesis |
673 show ?thesis |
674 apply (subst TS.distr_pair_swap) |
674 apply (subst TS.distr_pair_swap) |
675 unfolding distributed_def |
675 unfolding distributed_def |
713 shows "distributed M S X Px" |
713 shows "distributed M S X Px" |
714 unfolding distributed_def |
714 unfolding distributed_def |
715 proof safe |
715 proof safe |
716 interpret S: sigma_finite_measure S by fact |
716 interpret S: sigma_finite_measure S by fact |
717 interpret T: sigma_finite_measure T by fact |
717 interpret T: sigma_finite_measure T by fact |
718 interpret ST: pair_sigma_finite S T by default |
718 interpret ST: pair_sigma_finite S T .. |
719 |
719 |
720 note Pxy[measurable] |
720 note Pxy[measurable] |
721 show X: "X \<in> measurable M S" by simp |
721 show X: "X \<in> measurable M S" by simp |
722 |
722 |
723 show borel: "Px \<in> borel_measurable S" |
723 show borel: "Px \<in> borel_measurable S" |
790 shows "distributed M (S \<Otimes>\<^sub>M T) (\<lambda>x. (X x, Y x)) (\<lambda>(x, y). Px x * Py y)" |
790 shows "distributed M (S \<Otimes>\<^sub>M T) (\<lambda>x. (X x, Y x)) (\<lambda>(x, y). Px x * Py y)" |
791 unfolding distributed_def |
791 unfolding distributed_def |
792 proof safe |
792 proof safe |
793 interpret S: sigma_finite_measure S by fact |
793 interpret S: sigma_finite_measure S by fact |
794 interpret T: sigma_finite_measure T by fact |
794 interpret T: sigma_finite_measure T by fact |
795 interpret ST: pair_sigma_finite S T by default |
795 interpret ST: pair_sigma_finite S T .. |
796 |
796 |
797 interpret X: prob_space "density S Px" |
797 interpret X: prob_space "density S Px" |
798 unfolding distributed_distr_eq_density[OF X, symmetric] |
798 unfolding distributed_distr_eq_density[OF X, symmetric] |
799 by (rule prob_space_distr) simp |
799 by (rule prob_space_distr) simp |
800 have sf_X: "sigma_finite_measure (density S Px)" .. |
800 have sf_X: "sigma_finite_measure (density S Px)" .. |
1131 using sets.sets_into_space[OF emeasure_neq_0_sets[OF A(1)]] A |
1131 using sets.sets_into_space[OF emeasure_neq_0_sets[OF A(1)]] A |
1132 by (simp add: Int_absorb2 emeasure_nonneg) |
1132 by (simp add: Int_absorb2 emeasure_nonneg) |
1133 qed |
1133 qed |
1134 |
1134 |
1135 lemma prob_space_uniform_count_measure: "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow> prob_space (uniform_count_measure A)" |
1135 lemma prob_space_uniform_count_measure: "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow> prob_space (uniform_count_measure A)" |
1136 by default (auto simp: emeasure_uniform_count_measure space_uniform_count_measure one_ereal_def) |
1136 by standard (auto simp: emeasure_uniform_count_measure space_uniform_count_measure one_ereal_def) |
1137 |
1137 |
1138 lemma (in prob_space) measure_uniform_measure_eq_cond_prob: |
1138 lemma (in prob_space) measure_uniform_measure_eq_cond_prob: |
1139 assumes [measurable]: "Measurable.pred M P" "Measurable.pred M Q" |
1139 assumes [measurable]: "Measurable.pred M P" "Measurable.pred M Q" |
1140 shows "\<P>(x in uniform_measure M {x\<in>space M. Q x}. P x) = \<P>(x in M. P x \<bar> Q x)" |
1140 shows "\<P>(x in uniform_measure M {x\<in>space M. Q x}. P x) = \<P>(x in M. P x \<bar> Q x)" |
1141 proof cases |
1141 proof cases |