src/HOL/Probability/Projective_Family.thy
 changeset 50039 bfd5198cbe40 child 50040 5da32dc55cd8
```     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/HOL/Probability/Projective_Family.thy	Wed Nov 07 11:33:27 2012 +0100
1.3 @@ -0,0 +1,113 @@
1.4 +theory Projective_Family
1.5 +imports Finite_Product_Measure Probability_Measure
1.6 +begin
1.7 +
1.8 +definition
1.9 +  PiP :: "'i set \<Rightarrow> ('i \<Rightarrow> 'a measure) \<Rightarrow> ('i set \<Rightarrow> ('i \<Rightarrow> 'a) measure) \<Rightarrow> ('i \<Rightarrow> 'a) measure" where
1.10 +  "PiP I M P = extend_measure (\<Pi>\<^isub>E i\<in>I. space (M i))
1.11 +    {(J, X). (J \<noteq> {} \<or> I = {}) \<and> finite J \<and> J \<subseteq> I \<and> X \<in> (\<Pi> j\<in>J. sets (M j))}
1.12 +    (\<lambda>(J, X). prod_emb I M J (\<Pi>\<^isub>E j\<in>J. X j))
1.13 +    (\<lambda>(J, X). emeasure (P J) (Pi\<^isub>E J X))"
1.14 +
1.15 +lemma space_PiP[simp]: "space (PiP I M P) = space (PiM I M)"
1.16 +  by (auto simp add: PiP_def space_PiM prod_emb_def intro!: space_extend_measure)
1.17 +
1.18 +lemma sets_PiP[simp]: "sets (PiP I M P) = sets (PiM I M)"
1.19 +  by (auto simp add: PiP_def sets_PiM prod_algebra_def prod_emb_def intro!: sets_extend_measure)
1.20 +
1.21 +lemma measurable_PiP1[simp]: "measurable (PiP I M P) M' = measurable (\<Pi>\<^isub>M i\<in>I. M i) M'"
1.22 +  unfolding measurable_def by auto
1.23 +
1.24 +lemma measurable_PiP2[simp]: "measurable M' (PiP I M P) = measurable M' (\<Pi>\<^isub>M i\<in>I. M i)"
1.25 +  unfolding measurable_def by auto
1.26 +
1.27 +locale projective_family =
1.28 +  fixes I::"'i set" and P::"'i set \<Rightarrow> ('i \<Rightarrow> 'a) measure" and M::"('i \<Rightarrow> 'a measure)"
1.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>
1.30 +     (P H) (prod_emb H M J X) = (P J) X"
1.31 +  assumes proj_space: "\<And>J. finite J \<Longrightarrow> space (P J) = space (PiM J M)"
1.32 +  assumes proj_sets: "\<And>J. finite J \<Longrightarrow> sets (P J) = sets (PiM J M)"
1.33 +  assumes proj_finite_measure: "\<And>J. finite J \<Longrightarrow> emeasure (P J) (space (PiM J M)) \<noteq> \<infinity>"
1.34 +  assumes prob_space: "\<And>i. prob_space (M i)"
1.35 +begin
1.36 +
1.37 +lemma emeasure_PiP:
1.38 +  assumes "J \<noteq> {}"
1.39 +  assumes "finite J"
1.40 +  assumes "J \<subseteq> I"
1.41 +  assumes A: "\<And>i. i\<in>J \<Longrightarrow> A i \<in> sets (M i)"
1.42 +  shows "emeasure (PiP J M P) (Pi\<^isub>E J A) = emeasure (P J) (Pi\<^isub>E J A)"
1.43 +proof -
1.44 +  have "Pi\<^isub>E J (restrict A J) \<subseteq> (\<Pi>\<^isub>E i\<in>J. space (M i))"
1.45 +  proof safe
1.46 +    fix x j assume "x \<in> Pi J (restrict A J)" "j \<in> J"
1.47 +    hence "x j \<in> restrict A J j" by (auto simp: Pi_def)
1.48 +    also have "\<dots> \<subseteq> space (M j)" using sets_into_space A `j \<in> J` by auto
1.49 +    finally show "x j \<in> space (M j)" .
1.50 +  qed
1.51 +  hence "emeasure (PiP J M P) (Pi\<^isub>E J A) =
1.52 +    emeasure (PiP J M P) (prod_emb J M J (Pi\<^isub>E J A))"
1.53 +    using assms(1-3) sets_into_space by (auto simp add: prod_emb_id Pi_def)
1.54 +  also have "\<dots> = emeasure (P J) (Pi\<^isub>E J A)"
1.55 +  proof (rule emeasure_extend_measure[OF PiP_def, where i="(J, A)", simplified,
1.56 +        of J M "P J" P])
1.57 +    show "positive (sets (PiM J M)) (P J)" unfolding positive_def by auto
1.58 +    show "countably_additive (sets (PiM J M)) (P J)" unfolding countably_additive_def
1.59 +      by (auto simp: suminf_emeasure proj_sets[OF `finite J`])
1.60 +    show "(\<lambda>(Ja, X). prod_emb J M Ja (Pi\<^isub>E Ja X)) ` {(Ja, X). (Ja = {} \<longrightarrow> J = {}) \<and>
1.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>
1.62 +      (\<lambda>(Ja, X). prod_emb J M Ja (Pi\<^isub>E Ja X)) `
1.63 +        {(Ja, X). (Ja = {} \<longrightarrow> J = {}) \<and> finite Ja \<and> Ja \<subseteq> J \<and> X \<in> (\<Pi> j\<in>Ja. sets (M j))} \<subseteq>
1.64 +        Pow (extensional J)" by (auto simp: prod_emb_def)
1.65 +    show "(J = {} \<longrightarrow> J = {}) \<and> finite J \<and> J \<subseteq> J \<and> A \<in> (\<Pi> j\<in>J. sets (M j))"
1.66 +      using assms by auto
1.67 +    fix i
1.68 +    assume
1.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))"
1.70 +    thus "emeasure (P J) (case i of (Ja, X) \<Rightarrow> prod_emb J M Ja (Pi\<^isub>E Ja X)) =
1.71 +        (case i of (J, X) \<Rightarrow> emeasure (P J) (Pi\<^isub>E J X))" using assms
1.72 +      by (cases i) (auto simp add: intro!: projective sets_PiM_I_finite)
1.73 +  qed
1.74 +  finally show ?thesis .
1.75 +qed
1.76 +
1.77 +lemma PiP_finite:
1.78 +  assumes "J \<noteq> {}"
1.79 +  assumes "finite J"
1.80 +  assumes "J \<subseteq> I"
1.81 +  shows "PiP J M P = P J" (is "?P = _")
1.82 +proof (rule measure_eqI_generator_eq)
1.83 +  let ?J = "{Pi\<^isub>E J E | E. \<forall>i\<in>J. E i \<in> sets (M i)}"
1.84 +  let ?F = "\<lambda>i. \<Pi>\<^isub>E k\<in>J. space (M k)"
1.85 +  let ?\<Omega> = "(\<Pi>\<^isub>E k\<in>J. space (M k))"
1.86 +  show "Int_stable ?J"
1.87 +    by (rule Int_stable_PiE)
1.88 +  interpret finite_measure "P J" using proj_finite_measure `finite J`
1.89 +    by (intro finite_measureI) (simp add: proj_space)
1.90 +  show "emeasure ?P (?F _) \<noteq> \<infinity>" using assms `finite J` by (auto simp: emeasure_PiP)
1.91 +  show "?J \<subseteq> Pow ?\<Omega>" by (auto simp: Pi_iff dest: sets_into_space)
1.92 +  show "sets (PiP J M P) = sigma_sets ?\<Omega> ?J" "sets (P J) = sigma_sets ?\<Omega> ?J"
1.93 +    using `finite J` proj_sets by (simp_all add: sets_PiM prod_algebra_eq_finite Pi_iff)
1.94 +  fix X assume "X \<in> ?J"
1.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
1.96 +  with `finite J` have "X \<in> sets (PiP J M P)" by simp
1.97 +  have emb_self: "prod_emb J M J (Pi\<^isub>E J E) = Pi\<^isub>E J E"
1.98 +    using E sets_into_space
1.99 +    by (auto intro!: prod_emb_PiE_same_index)
1.100 +  show "emeasure (PiP J M P) X = emeasure (P J) X"
1.101 +    unfolding X using E
1.102 +    by (intro emeasure_PiP assms) simp
1.103 +qed (insert `finite J`, auto intro!: prod_algebraI_finite)
1.104 +
1.105 +lemma emeasure_fun_emb[simp]:
1.106 +  assumes L: "J \<noteq> {}" "J \<subseteq> L" "finite L" "L \<subseteq> I" and X: "X \<in> sets (PiM J M)"
1.107 +  shows "emeasure (PiP L M P) (prod_emb L M J X) = emeasure (PiP J M P) X"
1.108 +  using assms
1.109 +  by (subst PiP_finite) (auto simp: PiP_finite finite_subset projective)
1.110 +
1.111 +end
1.112 +
1.113 +sublocale projective_family \<subseteq> M: prob_space "M i" for i
1.114 +  by (rule prob_space)
1.115 +
1.116 +end
```