author immler@in.tum.de Wed Nov 07 11:33:27 2012 +0100 (2012-11-07) changeset 50039 bfd5198cbe40 parent 50038 8e32c9254535 child 50040 5da32dc55cd8
added projective_family; generalized generator in product_prob_space to projective_family
```     1.1 --- a/src/HOL/Probability/Infinite_Product_Measure.thy	Tue Nov 06 11:03:28 2012 +0100
1.2 +++ b/src/HOL/Probability/Infinite_Product_Measure.thy	Wed Nov 07 11:33:27 2012 +0100
1.3 @@ -5,7 +5,7 @@
1.5
1.6  theory Infinite_Product_Measure
1.7 -  imports Probability_Measure Caratheodory
1.8 +  imports Probability_Measure Caratheodory Projective_Family
1.9  begin
1.10
1.11  lemma split_merge: "P (merge I J (x,y) i) \<longleftrightarrow> (i \<in> I \<longrightarrow> P (x i)) \<and> (i \<in> J - I \<longrightarrow> P (y i)) \<and> (i \<notin> I \<union> J \<longrightarrow> P undefined)"
1.12 @@ -76,16 +76,20 @@
1.13      by (auto intro!: measurable_restrict_subset simp: space_PiM)
1.14  qed
1.15
1.16 -abbreviation (in product_prob_space)
1.17 -  "emb L K X \<equiv> prod_emb L M K X"
1.18 -
1.19  lemma (in product_prob_space) emeasure_prod_emb[simp]:
1.20    assumes L: "J \<noteq> {}" "J \<subseteq> L" "finite L" and X: "X \<in> sets (Pi\<^isub>M J M)"
1.21 -  shows "emeasure (Pi\<^isub>M L M) (emb L J X) = emeasure (Pi\<^isub>M J M) X"
1.22 +  shows "emeasure (Pi\<^isub>M L M) (prod_emb L M J X) = emeasure (Pi\<^isub>M J M) X"
1.23    by (subst distr_restrict[OF L])
1.24       (simp add: prod_emb_def space_PiM emeasure_distr measurable_restrict_subset L X)
1.25
1.26 -lemma (in product_prob_space) prod_emb_injective:
1.27 +sublocale product_prob_space \<subseteq> projective_family I "\<lambda>J. PiM J M" M
1.28 +proof
1.29 +  fix J::"'i set" assume "finite J"
1.30 +  interpret f: finite_product_prob_space M J proof qed fact
1.31 +  show "emeasure (Pi\<^isub>M J M) (space (Pi\<^isub>M J M)) \<noteq> \<infinity>" by simp
1.32 +qed simp_all
1.33 +
1.34 +lemma (in projective_family) prod_emb_injective:
1.35    assumes "J \<noteq> {}" "J \<subseteq> L" "finite J" and sets: "X \<in> sets (Pi\<^isub>M J M)" "Y \<in> sets (Pi\<^isub>M J M)"
1.36    assumes "prod_emb L M J X = prod_emb L M J Y"
1.37    shows "X = Y"
1.38 @@ -100,14 +104,17 @@
1.39      using `prod_emb L M J X = prod_emb L M J Y` by (simp add: prod_emb_def)
1.40  qed fact
1.41
1.42 -definition (in product_prob_space) generator :: "('i \<Rightarrow> 'a) set set" where
1.43 +abbreviation (in projective_family)
1.44 +  "emb L K X \<equiv> prod_emb L M K X"
1.45 +
1.46 +definition (in projective_family) generator :: "('i \<Rightarrow> 'a) set set" where
1.47    "generator = (\<Union>J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. emb I J ` sets (Pi\<^isub>M J M))"
1.48
1.49 -lemma (in product_prob_space) generatorI':
1.50 +lemma (in projective_family) generatorI':
1.51    "J \<noteq> {} \<Longrightarrow> finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> X \<in> sets (Pi\<^isub>M J M) \<Longrightarrow> emb I J X \<in> generator"
1.52    unfolding generator_def by auto
1.53
1.54 -lemma (in product_prob_space) algebra_generator:
1.55 +lemma (in projective_family) algebra_generator:
1.56    assumes "I \<noteq> {}" shows "algebra (\<Pi>\<^isub>E i\<in>I. space (M i)) generator" (is "algebra ?\<Omega> ?G")
1.57    unfolding algebra_def algebra_axioms_def ring_of_sets_iff
1.58  proof (intro conjI ballI)
1.59 @@ -135,7 +142,7 @@
1.60      unfolding * using XA XB by (safe intro!: generatorI') auto
1.61  qed
1.62
1.63 -lemma (in product_prob_space) sets_PiM_generator:
1.64 +lemma (in projective_family) sets_PiM_generator:
1.65    "sets (PiM I M) = sigma_sets (\<Pi>\<^isub>E i\<in>I. space (M i)) generator"
1.66  proof cases
1.67    assume "I = {}" then show ?thesis
1.68 @@ -154,57 +161,56 @@
1.69    qed (auto simp: generator_def space_PiM[symmetric] intro!: sigma_sets_subset)
1.70  qed
1.71
1.72 -
1.73 -lemma (in product_prob_space) generatorI:
1.74 +lemma (in projective_family) generatorI:
1.75    "J \<noteq> {} \<Longrightarrow> finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> X \<in> sets (Pi\<^isub>M J M) \<Longrightarrow> A = emb I J X \<Longrightarrow> A \<in> generator"
1.76    unfolding generator_def by auto
1.77
1.78 -definition (in product_prob_space)
1.79 +definition (in projective_family)
1.80    "\<mu>G A =
1.81 -    (THE x. \<forall>J. J \<noteq> {} \<longrightarrow> finite J \<longrightarrow> J \<subseteq> I \<longrightarrow> (\<forall>X\<in>sets (Pi\<^isub>M J M). A = emb I J X \<longrightarrow> x = emeasure (Pi\<^isub>M J M) X))"
1.82 +    (THE x. \<forall>J. J \<noteq> {} \<longrightarrow> finite J \<longrightarrow> J \<subseteq> I \<longrightarrow> (\<forall>X\<in>sets (Pi\<^isub>M J M). A = emb I J X \<longrightarrow> x = emeasure (PiP J M P) X))"
1.83
1.84 -lemma (in product_prob_space) \<mu>G_spec:
1.85 +lemma (in projective_family) \<mu>G_spec:
1.86    assumes J: "J \<noteq> {}" "finite J" "J \<subseteq> I" "A = emb I J X" "X \<in> sets (Pi\<^isub>M J M)"
1.87 -  shows "\<mu>G A = emeasure (Pi\<^isub>M J M) X"
1.88 +  shows "\<mu>G A = emeasure (PiP J M P) X"
1.89    unfolding \<mu>G_def
1.90  proof (intro the_equality allI impI ballI)
1.91    fix K Y assume K: "K \<noteq> {}" "finite K" "K \<subseteq> I" "A = emb I K Y" "Y \<in> sets (Pi\<^isub>M K M)"
1.92 -  have "emeasure (Pi\<^isub>M K M) Y = emeasure (Pi\<^isub>M (K \<union> J) M) (emb (K \<union> J) K Y)"
1.93 +  have "emeasure (PiP K M P) Y = emeasure (PiP (K \<union> J) M P) (emb (K \<union> J) K Y)"
1.94      using K J by simp
1.95    also have "emb (K \<union> J) K Y = emb (K \<union> J) J X"
1.96      using K J by (simp add: prod_emb_injective[of "K \<union> J" I])
1.97 -  also have "emeasure (Pi\<^isub>M (K \<union> J) M) (emb (K \<union> J) J X) = emeasure (Pi\<^isub>M J M) X"
1.98 +  also have "emeasure (PiP (K \<union> J) M P) (emb (K \<union> J) J X) = emeasure (PiP J M P) X"
1.99      using K J by simp
1.100 -  finally show "emeasure (Pi\<^isub>M J M) X = emeasure (Pi\<^isub>M K M) Y" ..
1.101 +  finally show "emeasure (PiP J M P) X = emeasure (PiP K M P) Y" ..
1.102  qed (insert J, force)
1.103
1.104 -lemma (in product_prob_space) \<mu>G_eq:
1.105 -  "J \<noteq> {} \<Longrightarrow> finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> X \<in> sets (Pi\<^isub>M J M) \<Longrightarrow> \<mu>G (emb I J X) = emeasure (Pi\<^isub>M J M) X"
1.106 +lemma (in projective_family) \<mu>G_eq:
1.107 +  "J \<noteq> {} \<Longrightarrow> finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> X \<in> sets (Pi\<^isub>M J M) \<Longrightarrow> \<mu>G (emb I J X) = emeasure (PiP J M P) X"
1.108    by (intro \<mu>G_spec) auto
1.109
1.110 -lemma (in product_prob_space) generator_Ex:
1.111 +lemma (in projective_family) generator_Ex:
1.112    assumes *: "A \<in> generator"
1.113 -  shows "\<exists>J X. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I \<and> X \<in> sets (Pi\<^isub>M J M) \<and> A = emb I J X \<and> \<mu>G A = emeasure (Pi\<^isub>M J M) X"
1.114 +  shows "\<exists>J X. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I \<and> X \<in> sets (Pi\<^isub>M J M) \<and> A = emb I J X \<and> \<mu>G A = emeasure (PiP J M P) X"
1.115  proof -
1.116    from * obtain J X where J: "J \<noteq> {}" "finite J" "J \<subseteq> I" "A = emb I J X" "X \<in> sets (Pi\<^isub>M J M)"
1.117      unfolding generator_def by auto
1.118    with \<mu>G_spec[OF this] show ?thesis by auto
1.119  qed
1.120
1.121 -lemma (in product_prob_space) generatorE:
1.122 +lemma (in projective_family) generatorE:
1.123    assumes A: "A \<in> generator"
1.124 -  obtains J X where "J \<noteq> {}" "finite J" "J \<subseteq> I" "X \<in> sets (Pi\<^isub>M J M)" "emb I J X = A" "\<mu>G A = emeasure (Pi\<^isub>M J M) X"
1.125 +  obtains J X where "J \<noteq> {}" "finite J" "J \<subseteq> I" "X \<in> sets (Pi\<^isub>M J M)" "emb I J X = A" "\<mu>G A = emeasure (PiP J M P) X"
1.126  proof -
1.127    from generator_Ex[OF A] obtain X J where "J \<noteq> {}" "finite J" "J \<subseteq> I" "X \<in> sets (Pi\<^isub>M J M)" "emb I J X = A"
1.128 -    "\<mu>G A = emeasure (Pi\<^isub>M J M) X" by auto
1.129 +    "\<mu>G A = emeasure (PiP J M P) X" by auto
1.130    then show thesis by (intro that) auto
1.131  qed
1.132
1.133 -lemma (in product_prob_space) merge_sets:
1.134 +lemma (in projective_family) merge_sets:
1.135    "J \<inter> K = {} \<Longrightarrow> A \<in> sets (Pi\<^isub>M (J \<union> K) M) \<Longrightarrow> x \<in> space (Pi\<^isub>M J M) \<Longrightarrow> (\<lambda>y. merge J K (x,y)) -` A \<inter> space (Pi\<^isub>M K M) \<in> sets (Pi\<^isub>M K M)"
1.136    by simp
1.137
1.138 -lemma (in product_prob_space) merge_emb:
1.139 +lemma (in projective_family) merge_emb:
1.140    assumes "K \<subseteq> I" "J \<subseteq> I" and y: "y \<in> space (Pi\<^isub>M J M)"
1.141    shows "((\<lambda>x. merge J (I - J) (y, x)) -` emb I K X \<inter> space (Pi\<^isub>M I M)) =
1.142      emb I (K - J) ((\<lambda>x. merge J (K - J) (y, x)) -` emb (J \<union> K) K X \<inter> space (Pi\<^isub>M (K - J) M))"
1.143 @@ -221,7 +227,7 @@
1.144         auto
1.145  qed
1.146
1.147 -lemma (in product_prob_space) positive_\<mu>G:
1.148 +lemma (in projective_family) positive_\<mu>G:
1.149    assumes "I \<noteq> {}"
1.150    shows "positive generator \<mu>G"
1.151  proof -
1.152 @@ -241,7 +247,7 @@
1.153    qed
1.154  qed
1.155
1.158    assumes "I \<noteq> {}"
1.160  proof -
1.161 @@ -263,7 +269,7 @@
1.162        using J K by simp_all
1.163      then have "\<mu>G (A \<union> B) = \<mu>G (emb I (J \<union> K) (emb (J \<union> K) J X \<union> emb (J \<union> K) K Y))"
1.164        by simp
1.165 -    also have "\<dots> = emeasure (Pi\<^isub>M (J \<union> K) M) (emb (J \<union> K) J X \<union> emb (J \<union> K) K Y)"
1.166 +    also have "\<dots> = emeasure (PiP (J \<union> K) M P) (emb (J \<union> K) J X \<union> emb (J \<union> K) K Y)"
1.167        using JK J(1, 4) K(1, 4) by (simp add: \<mu>G_eq Un del: prod_emb_Un)
1.168      also have "\<dots> = \<mu>G A + \<mu>G B"
1.169        using J K JK_disj by (simp add: plus_emeasure[symmetric])
1.170 @@ -271,6 +277,10 @@
1.171    qed
1.172  qed
1.173
1.174 +lemma (in product_prob_space) PiP_PiM_finite[simp]:
1.175 +  assumes "J \<noteq> {}" "finite J" "J \<subseteq> I" shows "PiP J M (\<lambda>J. PiM J M) = PiM J M"
1.176 +  using assms by (simp add: PiP_finite)
1.177 +
1.178  lemma (in product_prob_space) emeasure_PiM_emb_not_empty:
1.179    assumes X: "J \<noteq> {}" "J \<subseteq> I" "finite J" "\<forall>i\<in>J. X i \<in> sets (M i)"
1.180    shows "emeasure (Pi\<^isub>M I M) (emb I J (Pi\<^isub>E J X)) = emeasure (Pi\<^isub>M J M) (Pi\<^isub>E J X)"
1.181 @@ -295,7 +305,6 @@
1.182      ultimately have K: "K \<noteq> {}" "finite K" "K \<subseteq> I" "X \<in> sets (Pi\<^isub>M K M)" "Z = emb I K X"
1.183        "K - J \<noteq> {}" "K - J \<subseteq> I" "\<mu>G Z = emeasure (Pi\<^isub>M K M) X"
1.184        by (auto simp: subset_insertI)
1.185 -
1.186      let ?M = "\<lambda>y. (\<lambda>x. merge J (K - J) (y, x)) -` emb (J \<union> K) K X \<inter> space (Pi\<^isub>M (K - J) M)"
1.187      { fix y assume y: "y \<in> space (Pi\<^isub>M J M)"
1.188        note * = merge_emb[OF `K \<subseteq> I` `J \<subseteq> I` y, of X]
1.189 @@ -360,7 +369,7 @@
1.190          using A positive_\<mu>G[OF I_not_empty] by (auto intro!: INF_greatest simp: positive_def)
1.191        ultimately have "0 < ?a" by auto
1.192
1.193 -      have "\<forall>n. \<exists>J X. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I \<and> X \<in> sets (Pi\<^isub>M J M) \<and> A n = emb I J X \<and> \<mu>G (A n) = emeasure (Pi\<^isub>M J M) X"
1.194 +      have "\<forall>n. \<exists>J X. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I \<and> X \<in> sets (Pi\<^isub>M J M) \<and> A n = emb I J X \<and> \<mu>G (A n) = emeasure (PiP J M (\<lambda>J. (Pi\<^isub>M J M))) X"
1.195          using A by (intro allI generator_Ex) auto
1.196        then obtain J' X' where J': "\<And>n. J' n \<noteq> {}" "\<And>n. finite (J' n)" "\<And>n. J' n \<subseteq> I" "\<And>n. X' n \<in> sets (Pi\<^isub>M (J' n) M)"
1.197          and A': "\<And>n. A n = emb I (J' n) (X' n)"
```
```     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/src/HOL/Probability/Projective_Family.thy	Wed Nov 07 11:33:27 2012 +0100
2.3 @@ -0,0 +1,113 @@
2.4 +theory Projective_Family
2.5 +imports Finite_Product_Measure Probability_Measure
2.6 +begin
2.7 +
2.8 +definition
2.9 +  PiP :: "'i set \<Rightarrow> ('i \<Rightarrow> 'a measure) \<Rightarrow> ('i set \<Rightarrow> ('i \<Rightarrow> 'a) measure) \<Rightarrow> ('i \<Rightarrow> 'a) measure" where
2.10 +  "PiP I M P = extend_measure (\<Pi>\<^isub>E i\<in>I. space (M i))
2.11 +    {(J, X). (J \<noteq> {} \<or> I = {}) \<and> finite J \<and> J \<subseteq> I \<and> X \<in> (\<Pi> j\<in>J. sets (M j))}
2.12 +    (\<lambda>(J, X). prod_emb I M J (\<Pi>\<^isub>E j\<in>J. X j))
2.13 +    (\<lambda>(J, X). emeasure (P J) (Pi\<^isub>E J X))"
2.14 +
2.15 +lemma space_PiP[simp]: "space (PiP I M P) = space (PiM I M)"
2.16 +  by (auto simp add: PiP_def space_PiM prod_emb_def intro!: space_extend_measure)
2.17 +
2.18 +lemma sets_PiP[simp]: "sets (PiP I M P) = sets (PiM I M)"
2.19 +  by (auto simp add: PiP_def sets_PiM prod_algebra_def prod_emb_def intro!: sets_extend_measure)
2.20 +
2.21 +lemma measurable_PiP1[simp]: "measurable (PiP I M P) M' = measurable (\<Pi>\<^isub>M i\<in>I. M i) M'"
2.22 +  unfolding measurable_def by auto
2.23 +
2.24 +lemma measurable_PiP2[simp]: "measurable M' (PiP I M P) = measurable M' (\<Pi>\<^isub>M i\<in>I. M i)"
2.25 +  unfolding measurable_def by auto
2.26 +
2.27 +locale projective_family =
2.28 +  fixes I::"'i set" and P::"'i set \<Rightarrow> ('i \<Rightarrow> 'a) measure" and M::"('i \<Rightarrow> 'a measure)"
2.29 +  assumes projective: "\<And>J H X. J \<noteq> {} \<Longrightarrow> J \<subseteq> H \<Longrightarrow> H \<subseteq> I \<Longrightarrow> finite H \<Longrightarrow> X \<in> sets (PiM J M) \<Longrightarrow>
2.30 +     (P H) (prod_emb H M J X) = (P J) X"
2.31 +  assumes proj_space: "\<And>J. finite J \<Longrightarrow> space (P J) = space (PiM J M)"
2.32 +  assumes proj_sets: "\<And>J. finite J \<Longrightarrow> sets (P J) = sets (PiM J M)"
2.33 +  assumes proj_finite_measure: "\<And>J. finite J \<Longrightarrow> emeasure (P J) (space (PiM J M)) \<noteq> \<infinity>"
2.34 +  assumes prob_space: "\<And>i. prob_space (M i)"
2.35 +begin
2.36 +
2.37 +lemma emeasure_PiP:
2.38 +  assumes "J \<noteq> {}"
2.39 +  assumes "finite J"
2.40 +  assumes "J \<subseteq> I"
2.41 +  assumes A: "\<And>i. i\<in>J \<Longrightarrow> A i \<in> sets (M i)"
2.42 +  shows "emeasure (PiP J M P) (Pi\<^isub>E J A) = emeasure (P J) (Pi\<^isub>E J A)"
2.43 +proof -
2.44 +  have "Pi\<^isub>E J (restrict A J) \<subseteq> (\<Pi>\<^isub>E i\<in>J. space (M i))"
2.45 +  proof safe
2.46 +    fix x j assume "x \<in> Pi J (restrict A J)" "j \<in> J"
2.47 +    hence "x j \<in> restrict A J j" by (auto simp: Pi_def)
2.48 +    also have "\<dots> \<subseteq> space (M j)" using sets_into_space A `j \<in> J` by auto
2.49 +    finally show "x j \<in> space (M j)" .
2.50 +  qed
2.51 +  hence "emeasure (PiP J M P) (Pi\<^isub>E J A) =
2.52 +    emeasure (PiP J M P) (prod_emb J M J (Pi\<^isub>E J A))"
2.53 +    using assms(1-3) sets_into_space by (auto simp add: prod_emb_id Pi_def)
2.54 +  also have "\<dots> = emeasure (P J) (Pi\<^isub>E J A)"
2.55 +  proof (rule emeasure_extend_measure[OF PiP_def, where i="(J, A)", simplified,
2.56 +        of J M "P J" P])
2.57 +    show "positive (sets (PiM J M)) (P J)" unfolding positive_def by auto
2.58 +    show "countably_additive (sets (PiM J M)) (P J)" unfolding countably_additive_def
2.59 +      by (auto simp: suminf_emeasure proj_sets[OF `finite J`])
2.60 +    show "(\<lambda>(Ja, X). prod_emb J M Ja (Pi\<^isub>E Ja X)) ` {(Ja, X). (Ja = {} \<longrightarrow> J = {}) \<and>
2.61 +      finite Ja \<and> Ja \<subseteq> J \<and> X \<in> (\<Pi> j\<in>Ja. sets (M j))} \<subseteq> Pow (\<Pi> i\<in>J. space (M i)) \<and>
2.62 +      (\<lambda>(Ja, X). prod_emb J M Ja (Pi\<^isub>E Ja X)) `
2.63 +        {(Ja, X). (Ja = {} \<longrightarrow> J = {}) \<and> finite Ja \<and> Ja \<subseteq> J \<and> X \<in> (\<Pi> j\<in>Ja. sets (M j))} \<subseteq>
2.64 +        Pow (extensional J)" by (auto simp: prod_emb_def)
2.65 +    show "(J = {} \<longrightarrow> J = {}) \<and> finite J \<and> J \<subseteq> J \<and> A \<in> (\<Pi> j\<in>J. sets (M j))"
2.66 +      using assms by auto
2.67 +    fix i
2.68 +    assume
2.69 +      "case i of (Ja, X) \<Rightarrow> (Ja = {} \<longrightarrow> J = {}) \<and> finite Ja \<and> Ja \<subseteq> J \<and> X \<in> (\<Pi> j\<in>Ja. sets (M j))"
2.70 +    thus "emeasure (P J) (case i of (Ja, X) \<Rightarrow> prod_emb J M Ja (Pi\<^isub>E Ja X)) =
2.71 +        (case i of (J, X) \<Rightarrow> emeasure (P J) (Pi\<^isub>E J X))" using assms
2.72 +      by (cases i) (auto simp add: intro!: projective sets_PiM_I_finite)
2.73 +  qed
2.74 +  finally show ?thesis .
2.75 +qed
2.76 +
2.77 +lemma PiP_finite:
2.78 +  assumes "J \<noteq> {}"
2.79 +  assumes "finite J"
2.80 +  assumes "J \<subseteq> I"
2.81 +  shows "PiP J M P = P J" (is "?P = _")
2.82 +proof (rule measure_eqI_generator_eq)
2.83 +  let ?J = "{Pi\<^isub>E J E | E. \<forall>i\<in>J. E i \<in> sets (M i)}"
2.84 +  let ?F = "\<lambda>i. \<Pi>\<^isub>E k\<in>J. space (M k)"
2.85 +  let ?\<Omega> = "(\<Pi>\<^isub>E k\<in>J. space (M k))"
2.86 +  show "Int_stable ?J"
2.87 +    by (rule Int_stable_PiE)
2.88 +  interpret finite_measure "P J" using proj_finite_measure `finite J`
2.89 +    by (intro finite_measureI) (simp add: proj_space)
2.90 +  show "emeasure ?P (?F _) \<noteq> \<infinity>" using assms `finite J` by (auto simp: emeasure_PiP)
2.91 +  show "?J \<subseteq> Pow ?\<Omega>" by (auto simp: Pi_iff dest: sets_into_space)
2.92 +  show "sets (PiP J M P) = sigma_sets ?\<Omega> ?J" "sets (P J) = sigma_sets ?\<Omega> ?J"
2.93 +    using `finite J` proj_sets by (simp_all add: sets_PiM prod_algebra_eq_finite Pi_iff)
2.94 +  fix X assume "X \<in> ?J"
2.95 +  then obtain E where X: "X = Pi\<^isub>E J E" and E: "\<forall>i\<in>J. E i \<in> sets (M i)" by auto
2.96 +  with `finite J` have "X \<in> sets (PiP J M P)" by simp
2.97 +  have emb_self: "prod_emb J M J (Pi\<^isub>E J E) = Pi\<^isub>E J E"
2.98 +    using E sets_into_space
2.99 +    by (auto intro!: prod_emb_PiE_same_index)
2.100 +  show "emeasure (PiP J M P) X = emeasure (P J) X"
2.101 +    unfolding X using E
2.102 +    by (intro emeasure_PiP assms) simp
2.103 +qed (insert `finite J`, auto intro!: prod_algebraI_finite)
2.104 +
2.105 +lemma emeasure_fun_emb[simp]:
2.106 +  assumes L: "J \<noteq> {}" "J \<subseteq> L" "finite L" "L \<subseteq> I" and X: "X \<in> sets (PiM J M)"
2.107 +  shows "emeasure (PiP L M P) (prod_emb L M J X) = emeasure (PiP J M P) X"
2.108 +  using assms
2.109 +  by (subst PiP_finite) (auto simp: PiP_finite finite_subset projective)
2.110 +
2.111 +end
2.112 +
2.113 +sublocale projective_family \<subseteq> M: prob_space "M i" for i
2.114 +  by (rule prob_space)
2.115 +
2.116 +end
```