320 using \<mu> by simp |
320 using \<mu> by simp |
321 also have "\<dots> = (\<Prod> j\<in>J. if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))" |
321 also have "\<dots> = (\<Prod> j\<in>J. if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))" |
322 using J `I \<noteq> {}` by (subst mu_G_spec[OF _ _ _ refl]) (auto simp: emeasure_PiM Pi_iff) |
322 using J `I \<noteq> {}` by (subst mu_G_spec[OF _ _ _ refl]) (auto simp: emeasure_PiM Pi_iff) |
323 also have "\<dots> = (\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}. |
323 also have "\<dots> = (\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}. |
324 if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))" |
324 if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j)))" |
325 using J `I \<noteq> {}` by (intro setprod_mono_one_right) (auto simp: M.emeasure_space_1) |
325 using J `I \<noteq> {}` by (intro setprod.mono_neutral_right) (auto simp: M.emeasure_space_1) |
326 finally show "\<mu> (emb I J (Pi\<^sub>E J X)) = \<dots>" . |
326 finally show "\<mu> (emb I J (Pi\<^sub>E J X)) = \<dots>" . |
327 next |
327 next |
328 let ?F = "\<lambda>j. if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j))" |
328 let ?F = "\<lambda>j. if j \<in> J then emeasure (M j) (X j) else emeasure (M j) (space (M j))" |
329 have "(\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}. ?F j) = (\<Prod>j\<in>J. ?F j)" |
329 have "(\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}. ?F j) = (\<Prod>j\<in>J. ?F j)" |
330 using X `I \<noteq> {}` by (intro setprod_mono_one_right) (auto simp: M.emeasure_space_1) |
330 using X `I \<noteq> {}` by (intro setprod.mono_neutral_right) (auto simp: M.emeasure_space_1) |
331 then show "(\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}. ?F j) = |
331 then show "(\<Prod>j\<in>J \<union> {i \<in> I. emeasure (M i) (space (M i)) \<noteq> 1}. ?F j) = |
332 emeasure (Pi\<^sub>M J M) (Pi\<^sub>E J X)" |
332 emeasure (Pi\<^sub>M J M) (Pi\<^sub>E J X)" |
333 using X by (auto simp add: emeasure_PiM) |
333 using X by (auto simp add: emeasure_PiM) |
334 next |
334 next |
335 show "positive (sets (Pi\<^sub>M I M)) \<mu>" "countably_additive (sets (Pi\<^sub>M I M)) \<mu>" |
335 show "positive (sets (Pi\<^sub>M I M)) \<mu>" "countably_additive (sets (Pi\<^sub>M I M)) \<mu>" |
558 also have "\<dots> = emeasure S ?E * emeasure S ?F" |
558 also have "\<dots> = emeasure S ?E * emeasure S ?F" |
559 using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI simp: inj_on_def) |
559 using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI simp: inj_on_def) |
560 also have "emeasure S ?F = (\<Prod>j\<in>(op + i) -` J. emeasure M (E (i + j)))" |
560 also have "emeasure S ?F = (\<Prod>j\<in>(op + i) -` J. emeasure M (E (i + j)))" |
561 using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI inj_on_def) |
561 using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI inj_on_def) |
562 also have "\<dots> = (\<Prod>j\<in>J - (J \<inter> {..<i}). emeasure M (E j))" |
562 also have "\<dots> = (\<Prod>j\<in>J - (J \<inter> {..<i}). emeasure M (E j))" |
563 by (rule strong_setprod_reindex_cong[where f="\<lambda>x. x - i"]) |
563 by (rule setprod.reindex_cong [of "\<lambda>x. x - i"]) |
564 (auto simp: image_iff Bex_def not_less nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) |
564 (auto simp: image_iff Bex_def not_less nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) |
565 also have "emeasure S ?E = (\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j))" |
565 also have "emeasure S ?E = (\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j))" |
566 using J by (intro emeasure_PiM_emb) simp_all |
566 using J by (intro emeasure_PiM_emb) simp_all |
567 also have "(\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j)) * (\<Prod>j\<in>J - (J \<inter> {..<i}). emeasure M (E j)) = (\<Prod>j\<in>J. emeasure M (E j))" |
567 also have "(\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j)) * (\<Prod>j\<in>J - (J \<inter> {..<i}). emeasure M (E j)) = (\<Prod>j\<in>J. emeasure M (E j))" |
568 by (subst mult_commute) (auto simp: J setprod_subset_diff[symmetric]) |
568 by (subst mult_commute) (auto simp: J setprod.subset_diff[symmetric]) |
569 finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" . |
569 finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" . |
570 qed simp_all |
570 qed simp_all |
571 |
571 |
572 lemma PiM_iter: |
572 lemma PiM_iter: |
573 "distr (M \<Otimes>\<^sub>M S) S (\<lambda>(s, \<omega>). case_nat s \<omega>) = S" (is "?D = _") |
573 "distr (M \<Otimes>\<^sub>M S) S (\<lambda>(s, \<omega>). case_nat s \<omega>) = S" (is "?D = _") |
589 also have "\<dots> = emeasure M ?E * emeasure S ?F" |
589 also have "\<dots> = emeasure M ?E * emeasure S ?F" |
590 using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI) |
590 using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI) |
591 also have "emeasure S ?F = (\<Prod>j\<in>Suc -` J. emeasure M (E (Suc j)))" |
591 also have "emeasure S ?F = (\<Prod>j\<in>Suc -` J. emeasure M (E (Suc j)))" |
592 using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI) |
592 using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI) |
593 also have "\<dots> = (\<Prod>j\<in>J - {0}. emeasure M (E j))" |
593 also have "\<dots> = (\<Prod>j\<in>J - {0}. emeasure M (E j))" |
594 by (rule strong_setprod_reindex_cong[where f="\<lambda>x. x - 1"]) |
594 by (rule setprod.reindex_cong [of "\<lambda>x. x - 1"]) |
595 (auto simp: image_iff Bex_def not_less nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) |
595 (auto simp: image_iff Bex_def not_less nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) |
596 also have "emeasure M ?E * (\<Prod>j\<in>J - {0}. emeasure M (E j)) = (\<Prod>j\<in>J. emeasure M (E j))" |
596 also have "emeasure M ?E * (\<Prod>j\<in>J - {0}. emeasure M (E j)) = (\<Prod>j\<in>J. emeasure M (E j))" |
597 by (auto simp: M.emeasure_space_1 setprod.remove J) |
597 by (auto simp: M.emeasure_space_1 setprod.remove J) |
598 finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" . |
598 finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" . |
599 qed simp_all |
599 qed simp_all |