(* Title: HOL/Probability/Infinite_Product_Measure.thy Author: Johannes Hölzl, TU München *)
section‹Infinite Product Measure›
theory Infinite_Product_Measure imports Probability_Measure Projective_Family begin
lemma (in product_prob_space) distr_PiM_restrict_finite: assumes"finite J""J ⊆ I" shows"distr (PiM I M) (PiM J M) (λx. restrict x J) = PiM J M" proof (rule PiM_eqI) fix X assume X: "∧i. i ∈ J ==> X i ∈ sets (M i)"
{ fix J X assume J: "J ≠ {} ∨ I = {}""finite J""J ⊆ I"and X: "∧i. i ∈ J ==> X i ∈ sets (M i)" have"emeasure (PiM I M) (emb I J (Pi🪙E J X)) = (∏i∈J. M i (X i))" proof (subst emeasure_extend_measure_Pair[OF PiM_def, where μ'=lim], goal_cases) case 1 thenshow ?case by (simp add: M.emeasure_space_1 emeasure_PiM Pi_iff sets_PiM_I_finite emeasure_lim_emb) next case (2 J X) thenhave"emb I J (Pi🪙E J X) ∈ sets (PiM I M)" by (intro measurable_prod_emb sets_PiM_I_finite) auto from this[THEN sets.sets_into_space] show ?case by (simp add: space_PiM) qed (insert assms J X, simp_all del: sets_lim
add: M.emeasure_space_1 sets_lim[symmetric] emeasure_countably_additive emeasure_positive) } note * = this
have"emeasure (PiM I M) (emb I J (Pi🪙E J X)) = (∏i∈J. M i (X i))" proof (cases "J ≠ {} ∨ I = {}") case False thenobtain i where i: "J = {}""i ∈ I"by auto thenhave"emb I {} {λx. undefined} = emb I {i} (Π🪙E i∈{i}. space (M i))" by (auto simp: space_PiM prod_emb_def) with i show ?thesis by (simp add: * M.emeasure_space_1) next case True thenshow ?thesis by (simp add: *[OF _ assms X]) qed with assms show"emeasure (distr (Pi🪙M I M) (Pi🪙M J M) (λx. restrict x J)) (Pi🪙E J X) = (∏i∈J. emeasure (M i) (X i))" by (subst emeasure_distr_restrict[OF _ refl]) (auto intro!: sets_PiM_I_finite X) qed (insert assms, auto)
lemma (in product_prob_space) emeasure_PiM_emb': "J ⊆ I ==> finite J ==> X ∈ sets (PiM J M) ==> emeasure (Pi🪙M I M) (emb I J X) = PiM J M X" by (subst distr_PiM_restrict_finite[symmetric, of J])
(auto intro!: emeasure_distr_restrict[symmetric])
lemma (in product_prob_space) emeasure_PiM_emb: "J ⊆ I ==> finite J ==> (∧i. i ∈ J ==> X i ∈ sets (M i)) ==> emeasure (Pi🪙M I M) (emb I J (Pi🪙E J X)) = (∏ i∈J. emeasure (M i) (X i))" by (subst emeasure_PiM_emb') (auto intro!: emeasure_PiM)
sublocale product_prob_space ⊆ P?: prob_space "Pi🪙M I M" proof have *: "emb I {} {λx. undefined} = space (PiM I M)" by (auto simp: prod_emb_def space_PiM) show"emeasure (Pi🪙M I M) (space (Pi🪙M I M)) = 1" using emeasure_PiM_emb[of "{}""λ_. {}"] by (simp add: *) qed
lemma prob_space_PiM: assumes M: "∧i. i ∈ I ==> prob_space (M i)"shows"prob_space (PiM I M)" proof - let ?M = "λi. if i ∈ I then M i else count_space {undefined}" interpret M': prob_space "?M i"for i using M by (cases "i ∈ I") (auto intro!: prob_spaceI) interpret product_prob_space ?M I by unfold_locales have"prob_space (Π🪙M i∈I. ?M i)" by unfold_locales alsohave"(Π🪙M i∈I. ?M i) = (Π🪙M i∈I. M i)" by (intro PiM_cong) auto finallyshow ?thesis . qed
lemma (in product_prob_space) emeasure_PiM_Collect: assumes X: "J ⊆ I""finite J""∧i. i ∈ J ==> X i ∈ sets (M i)" shows"emeasure (Pi🪙M I M) {x∈space (Pi🪙M I M). ∀i∈J. x i ∈ X i} = (∏ i∈J. emeasure (M i) (X i))" proof - have"{x∈space (Pi🪙M I M). ∀i∈J. x i ∈ X i} = emb I J (Pi🪙E J X)" unfolding prod_emb_def using assms by (auto simp: space_PiM Pi_iff) with emeasure_PiM_emb[OF assms] show ?thesis by simp qed
lemma (in product_prob_space) emeasure_PiM_Collect_single: assumes X: "i ∈ I""A ∈ sets (M i)" shows"emeasure (Pi🪙M I M) {x∈space (Pi🪙M I M). x i ∈ A} = emeasure (M i) A" using emeasure_PiM_Collect[of "{i}""λi. A"] assms by simp
lemma (in product_prob_space) measure_PiM_emb: assumes"J ⊆ I""finite J""∧i. i ∈ J ==> X i ∈ sets (M i)" shows"measure (PiM I M) (emb I J (Pi🪙E J X)) = (∏ i∈J. measure (M i) (X i))" using emeasure_PiM_emb[OF assms] unfolding emeasure_eq_measure M.emeasure_eq_measure by (simp add: prod_ennreal measure_nonneg prod_nonneg)
lemma sets_Collect_single': "i ∈ I ==> {x∈space (M i). P x} ∈ sets (M i) ==> {x∈space (PiM I M). P (x i)} ∈sets (PiM I M)" by auto
lemma (in finite_product_prob_space) finite_measure_PiM_emb: "(∧i. i ∈ I ==> A i ∈ sets (M i)) ==> measure (PiM I M) (Pi🪙E I A) = (∏i∈I. measure (M i) (A i))" by (rule prob_times)
lemma (in product_prob_space) PiM_component: assumes"i ∈ I" shows"distr (PiM I M) (M i) (λψ. ψ i) = M i" proof (rule measure_eqI[symmetric]) fix A assume"A ∈ sets (M i)" moreoverhave"((λψ. ψ i) -` A ∩ space (PiM I M)) = {x∈space (PiM I M). x i ∈ A}" by auto ultimatelyshow"emeasure (M i) A = emeasure (distr (PiM I M) (M i) (λψ. ψ i)) A" by (auto simp: ‹i∈I› emeasure_distr measurable_component_singleton emeasure_PiM_Collect_single) qed simp
lemma (in product_prob_space) PiM_eq: assumes M': "sets M' = sets (PiM I M)" assumes eq: "∧J F. finite J ==> J ⊆ I ==> (∧j. j ∈ J ==> F j ∈ sets (M j)) ==> emeasure M' (prod_emb I M J (Π🪙E j∈J. F j)) = (∏j∈J. emeasure (M j) (F j))" shows"M' = (PiM I M)" proof (rule measure_eqI_PiM_infinite[symmetric, OF refl M']) show"finite_measure (Pi🪙M I M)" by standard (simp add: P.emeasure_space_1) qed (simp add: eq emeasure_PiM_emb)
lemma (in product_prob_space) AE_component: "i ∈ I ==> AE x in M i. P x ==> AE x in PiM I M. P (x i)" apply (rule AE_distrD[of "λψ. ψ i""PiM I M""M i" P]) apply simp apply (subst PiM_component) apply simp_all done
lemma emeasure_PiM_emb: assumes M: "∧i. i ∈ I ==> prob_space (M i)" assumes J: "J ⊆ I""finite J"and A: "∧i. i ∈ J ==> A i ∈ sets (M i)" shows"emeasure (Pi🪙M I M) (prod_emb I M J (Pi🪙E J A)) = (∏i∈J. emeasure (M i) (A i))" proof - let ?M = "λi. if i ∈ I then M i else count_space {undefined}" interpret M': prob_space "?M i"for i using M by (cases "i ∈ I") (auto intro!: prob_spaceI) interpret P: product_prob_space ?M I by unfold_locales have"emeasure (Pi🪙M I M) (prod_emb I M J (Pi🪙E J A)) = emeasure (Pi🪙M I ?M) (P.emb I J (Pi🪙E J A))" by (auto simp: prod_emb_def PiE_iff intro!: arg_cong2[where f=emeasure] PiM_cong) alsohave"… = (∏i∈J. emeasure (M i) (A i))" using J A by (subst P.emeasure_PiM_emb[OF J]) (auto intro!: prod.cong) finallyshow ?thesis . qed
lemma distr_pair_PiM_eq_PiM: fixes i' :: "'i"and I :: "'i set"and M :: "'i ==> 'a measure" assumes M: "∧i. i ∈ I ==> prob_space (M i)""prob_space (M i')" shows"distr (M i' ⨂🪙M (Π🪙M i∈I. M i)) (Π🪙M i∈insert i' I. M i) (λ(x, X). X(i' := x)) = (Π🪙M i∈insert i' I. M i)" (is"?L = _") proof (rule measure_eqI_PiM_infinite[symmetric, OF refl]) interpret M': prob_space "M i'"by fact interpret I: prob_space "(Π🪙M i∈I. M i)" using M by (intro prob_space_PiM) auto interpret I': prob_space "(Π🪙M i∈insert i' I. M i)" using M by (intro prob_space_PiM) auto show"finite_measure (Π🪙M i∈insert i' I. M i)" by unfold_locales fix J A assume J: "finite J""J ⊆ insert i' I"and A: "∧i. i ∈ J ==> A i ∈ sets (M i)" let ?X = "prod_emb (insert i' I) M J (Pi🪙E J A)" have"Pi🪙M (insert i' I) M ?X = (∏i∈J. M i (A i))" using M J A by (intro emeasure_PiM_emb) auto alsohave"… = M i' (if i' ∈ J then (A i') else space (M i')) * (∏i∈J-{i'}. M i (A i))" using prod.insert_remove[of J "λi. M i (A i)" i'] J M'.emeasure_space_1 by (cases "i' ∈ J") (auto simp: insert_absorb) alsohave"(∏i∈J-{i'}. M i (A i)) = Pi🪙M I M (prod_emb I M (J - {i'}) (Pi🪙E (J - {i'}) A))" using M J A by (intro emeasure_PiM_emb[symmetric]) auto alsohave"M i' (if i' ∈ J then (A i') else space (M i')) * … = (M i' ⨂🪙M Pi🪙M I M) ((if i' ∈ J then (A i') else space (M i')) × prod_emb I M (J - {i'}) (Pi🪙E (J - {i'}) A))" using J A by (intro I.emeasure_pair_measure_Times[symmetric] sets_PiM_I) auto alsohave"((if i' ∈ J then (A i') else space (M i')) × prod_emb I M (J - {i'}) (Pi🪙E (J - {i'}) A)) = (λ(x, X). X(i' := x)) -` ?X ∩ space (M i' ⨂🪙M Pi🪙M I M)" using A[of i', THEN sets.sets_into_space] unfolding set_eq_iff by (simp add: prod_emb_def space_pair_measure space_PiM PiE_fun_upd ac_simps cong: conj_cong)
(auto simp add: Pi_iff Ball_def all_conj_distrib) finallyshow"Pi🪙M (insert i' I) M ?X = ?L ?X" using J A by (simp add: emeasure_distr) qed simp
lemma distr_PiM_reindex: assumes M: "∧i. i ∈ K ==> prob_space (M i)" assumes f: "inj_on f I""f ∈ I → K" shows"distr (Pi🪙M K M) (Π🪙M i∈I. M (f i)) (λψ. λn∈I. ψ (f n)) = (Π🪙M i∈I. M (f i))"
(is"distr ?K ?I ?t = ?I") proof (rule measure_eqI_PiM_infinite[symmetric, OF refl]) interpret prob_space ?I using f M by (intro prob_space_PiM) auto show"finite_measure ?I" by unfold_locales fix A J assume J: "finite J""J ⊆ I"and A: "∧i. i ∈ J ==> A i ∈ sets (M (f i))" have [simp]: "i ∈ J ==> the_inv_into I f (f i) = i"for i using J f by (intro the_inv_into_f_f) auto have"?I (prod_emb I (λi. M (f i)) J (Pi🪙E J A)) = (∏j∈J. M (f j) (A j))" using f J A by (intro emeasure_PiM_emb M) auto alsohave"… = (∏j∈f`J. M j (A (the_inv_into I f j)))" using f J by (subst prod.reindex) (auto intro!: prod.cong intro: inj_on_subset simp: the_inv_into_f_f) alsohave"… = ?K (prod_emb K M (f`J) (Π🪙E j∈f`J. A (the_inv_into I f j)))" using f J A by (intro emeasure_PiM_emb[symmetric] M) (auto simp: the_inv_into_f_f) alsohave"prod_emb K M (f`J) (Π🪙E j∈f`J. A (the_inv_into I f j)) = ?t -` prod_emb I (λi. M (f i)) J (Pi🪙E J A) ∩ space ?K" using f J A by (auto simp: prod_emb_def space_PiM Pi_iff PiE_iff Int_absorb1) alsohave"?K … = distr ?K ?I ?t (prod_emb I (λi. M (f i)) J (Pi🪙E J A))" using f J A by (intro emeasure_distr[symmetric] sets_PiM_I) (auto simp: Pi_iff) finallyshow"?I (prod_emb I (λi. M (f i)) J (Pi🪙E J A)) = distr ?K ?I ?t (prod_emb I (λi. M (f i)) J (Pi🪙E J A))" . qed simp
lemma distr_PiM_component: assumes M: "∧i. i ∈ I ==> prob_space (M i)" assumes"i ∈ I" shows"distr (Pi🪙M I M) (M i) (λψ. ψ i) = M i" proof - have *: "(λψ. ψ i) -` A ∩ space (Pi🪙M I M) = prod_emb I M {i} (Π🪙E i'∈{i}. A)"for A by (auto simp: prod_emb_def space_PiM) show ?thesis apply (intro measure_eqI) apply (auto simp add: emeasure_distr ‹i∈I› * emeasure_PiM_emb M) apply (subst emeasure_PiM_emb) apply (simp_all add: M ‹i∈I›) done qed
lemma AE_PiM_component: "(∧i. i ∈ I ==> prob_space (M i)) ==> i ∈ I ==> AE x in M i. P x ==> AE x in PiM I M. P (x i)" using AE_distrD[of "λx. x i""PiM I M""M i"] by (subst (asm) distr_PiM_component[of I _ i]) (auto intro: AE_distrD[of "λx. x i" _ _ P])
lemma decseq_emb_PiE: "incseq J ==> decseq (λi. prod_emb I M (J i) (Π🪙E j∈J i. X j))" by (fastforce simp: decseq_def prod_emb_def incseq_def Pi_iff)
lemma comb_seq_less: "i < n ==> comb_seq n ψ ψ' i = ψ i" by (auto split: split_comb_seq)
lemma comb_seq_add: "comb_seq n ψ ψ' (i + n) = ψ' i" by (auto split: nat.split split_comb_seq)
lemma case_nat_comb_seq: "case_nat s' (comb_seq n ψ ψ') (i + n) = case_nat (case_nat s' ψ n) ψ' i" by (auto split: nat.split split_comb_seq)
lemma case_nat_comb_seq': "case_nat s (comb_seq i ψ ψ') = comb_seq (Suc i) (case_nat s ψ) ψ'" by (auto split: split_comb_seq nat.split)
locale sequence_space = product_prob_space "λi. M""UNIV :: nat set"for M begin
abbreviation"S ≡ Π🪙M i∈UNIV::nat set. M"
lemma infprod_in_sets[intro]: fixes E :: "nat ==> 'a set"assumes E: "∧i. E i ∈ sets M" shows"Pi UNIV E ∈ sets S" proof - have"Pi UNIV E = (∩i. emb UNIV {..i} (Π🪙E j∈{..i}. E j))" using E E[THEN sets.sets_into_space] by (auto simp: prod_emb_def Pi_iff extensional_def) with E show ?thesis by auto qed
lemma measure_PiM_countable: fixes E :: "nat ==> 'a set"assumes E: "∧i. E i ∈ sets M" shows"(λn. ∏i≤n. measure M (E i)) <---- measure S (Pi UNIV E)" proof - let ?E = "λn. emb UNIV {..n} (Pi🪙E {.. n} E)" have"∧n. (∏i≤n. measure M (E i)) = measure S (?E n)" using E by (simp add: measure_PiM_emb) moreoverhave"Pi UNIV E = (∩n. ?E n)" using E E[THEN sets.sets_into_space] by (auto simp: prod_emb_def extensional_def Pi_iff) moreoverhave"range ?E ⊆ sets S" using E by auto moreoverhave"decseq ?E" by (auto simp: prod_emb_def Pi_iff decseq_def) ultimatelyshow ?thesis by (simp add: finite_Lim_measure_decseq) qed
lemma nat_eq_diff_eq: fixes a b c :: nat shows"c ≤ b ==> a = b - c ⟷ a + c = b" by auto
lemma PiM_comb_seq: "distr (S ⨂🪙M S) S (λ(ψ, ψ'). comb_seq i ψ ψ') = S" (is"?D = _") proof (rule PiM_eq) let ?I = "UNIV::nat set"and ?M = "λn. M" let"distr _ _ ?f" = "?D"
fix J E assume J: "finite J""J ⊆ ?I""∧j. j ∈ J ==> E j ∈ sets M" let ?X = "prod_emb ?I ?M J (Π🪙E j∈J. E j)" have"∧j x. j ∈ J ==> x ∈ E j ==> x ∈ space M" using J(3)[THEN sets.sets_into_space] by (auto simp: space_PiM Pi_iff subset_eq) with J have"?f -` ?X ∩ space (S ⨂🪙M S) = (prod_emb ?I ?M (J ∩ {..🪙E j∈J ∩ {..× (prod_emb ?I ?M (((+) i) -` J) (Π🪙E j∈((+) i) -` J. E (i + j)))" (is"_ = ?E × ?F") by (auto simp: space_pair_measure space_PiM prod_emb_def all_conj_distrib PiE_iff
split: split_comb_seq split_comb_seq_asm) thenhave"emeasure ?D ?X = emeasure (S ⨂🪙M S) (?E × ?F)" by (subst emeasure_distr[OF measurable_comb_seq])
(auto intro!: sets_PiM_I simp: split_beta' J) alsohave"… = emeasure S ?E * emeasure S ?F" using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI simp: inj_on_def) alsohave"emeasure S ?F = (∏j∈((+) i) -` J. emeasure M (E (i + j)))" using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI inj_on_def) alsohave"… = (∏j∈J - (J ∩ {.. by (rule prod.reindex_cong [of "λx. x - i"])
(auto simp: image_iff ac_simps nat_eq_diff_eq cong: conj_cong intro!: inj_onI) alsohave"emeasure S ?E = (∏j∈J ∩ {.. using J by (intro emeasure_PiM_emb) simp_all alsohave"(∏j∈J ∩ {..∏j∈J - (J ∩ {..∏j∈J. emeasure M (E j))" by (subst mult.commute) (auto simp: J prod.subset_diff[symmetric]) finallyshow"emeasure ?D ?X = (∏j∈J. emeasure M (E j))" . qed simp_all
fix J E assume J: "finite J""J ⊆ ?I""∧j. j ∈ J ==> E j ∈ sets M" let ?X = "prod_emb ?I ?M J (Π🪙E j∈J. E j)" have"∧j x. j ∈ J ==> x ∈ E j ==> x ∈ space M" using J(3)[THEN sets.sets_into_space] by (auto simp: space_PiM Pi_iff subset_eq) with J have"?f -` ?X ∩ space (M ⨂🪙M S) = (if 0 ∈ J then E 0 else space M) × (prod_emb ?I ?M (Suc -` J) (Π🪙E j∈Suc -` J. E (Suc j)))" (is"_ = ?E × ?F") by (auto simp: space_pair_measure space_PiM PiE_iff prod_emb_def all_conj_distrib
split: nat.split nat.split_asm) thenhave"emeasure ?D ?X = emeasure (M ⨂🪙M S) (?E × ?F)" by (subst emeasure_distr)
(auto intro!: sets_PiM_I simp: split_beta' J) alsohave"… = emeasure M ?E * emeasure S ?F" using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI) alsohave"emeasure S ?F = (∏j∈Suc -` J. emeasure M (E (Suc j)))" using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI) alsohave"… = (∏j∈J - {0}. emeasure M (E j))" by (rule prod.reindex_cong [of "λx. x - 1"])
(auto simp: image_iff nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) alsohave"emeasure M ?E * (∏j∈J - {0}. emeasure M (E j)) = (∏j∈J. emeasure M (E j))" by (auto simp: M.emeasure_space_1 prod.remove J) finallyshow"emeasure ?D ?X = (∏j∈J. emeasure M (E j))" . qed simp_all
end
lemma PiM_return: assumes"finite I" assumes [measurable]: "∧i. i ∈ I ==> {a i} ∈ sets (M i)" shows"PiM I (λi. return (M i) (a i)) = return (PiM I M) (restrict a I)" proof - have [simp]: "a i ∈ space (M i)"if"i ∈ I"for i using assms(2)[OF that] by (meson insert_subset sets.sets_into_space) interpret prob_space "PiM I (λi. return (M i) (a i))" by (intro prob_space_PiM prob_space_return) auto have"AE x in PiM I (λi. return (M i) (a i)). ∀i∈I. x i = restrict a I i" by (intro eventually_ball_finite ballI AE_PiM_component prob_space_return assms)
(auto simp: AE_return) moreoverhave"AE x in PiM I (λi. return (M i) (a i)). x ∈ space (PiM I (λi. return (M i) (a i)))" by simp ultimatelyhave"AE x in PiM I (λi. return (M i) (a i)). x = restrict a I" by eventually_elim (auto simp: fun_eq_iff space_PiM) hence"Pi🪙M I (λi. return (M i) (a i)) = return (Pi🪙M I (λi. return (M i) (a i))) (restrict a I)" by (rule AE_eq_constD) alsohave"… = return (PiM I M) (restrict a I)" by (intro return_cong sets_PiM_cong) auto finallyshow ?thesis . qed
lemma distr_PiM_finite_prob_space': assumes fin: "finite I" assumes"∧i. i ∈ I ==> prob_space (M i)" assumes"∧i. i ∈ I ==> prob_space (M' i)" assumes [measurable]: "∧i. i ∈ I ==> f ∈ measurable (M i) (M' i)" shows"distr (PiM I M) (PiM I M') (compose I f) = PiM I (λi. distr (M i) (M' i) f)" proof -
define N where"N = (λi. if i ∈ I then M i else return (count_space UNIV) undefined)"
define N' where"N' = (λi. if i ∈ I then M' i else return (count_space UNIV) undefined)" have [simp]: "PiM I N = PiM I M""PiM I N' = PiM I M'" by (intro PiM_cong; simp add: N_def N'_def)+
have"distr (PiM I N) (PiM I N') (compose I f) = PiM I (λi. distr (N i) (N' i) f)" proof (rule distr_PiM_finite_prob_space) show"product_prob_space N" by (rule product_prob_spaceI) (auto simp: N_def intro!: prob_space_return assms) show"product_prob_space N'" by (rule product_prob_spaceI) (auto simp: N'_def intro!: prob_space_return assms) qed (auto simp: N_def N'_def fin) alsohave"Pi🪙M I (λi. distr (N i) (N' i) f) = Pi🪙M I (λi. distr (M i) (M' i) f)" by (intro PiM_cong) (simp_all add: N_def N'_def) finallyshow ?thesis by simp qed
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet am 2026-05-03)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.