src/HOL/Probability/Projective_Family.thy
author immler@in.tum.de
Wed Nov 07 11:33:27 2012 +0100 (2012-11-07)
changeset 50039 bfd5198cbe40
child 50040 5da32dc55cd8
permissions -rw-r--r--
added projective_family; generalized generator in product_prob_space to projective_family
immler@50039
     1
theory Projective_Family
immler@50039
     2
imports Finite_Product_Measure Probability_Measure
immler@50039
     3
begin
immler@50039
     4
immler@50039
     5
definition
immler@50039
     6
  PiP :: "'i set \<Rightarrow> ('i \<Rightarrow> 'a measure) \<Rightarrow> ('i set \<Rightarrow> ('i \<Rightarrow> 'a) measure) \<Rightarrow> ('i \<Rightarrow> 'a) measure" where
immler@50039
     7
  "PiP I M P = extend_measure (\<Pi>\<^isub>E i\<in>I. space (M i))
immler@50039
     8
    {(J, X). (J \<noteq> {} \<or> I = {}) \<and> finite J \<and> J \<subseteq> I \<and> X \<in> (\<Pi> j\<in>J. sets (M j))}
immler@50039
     9
    (\<lambda>(J, X). prod_emb I M J (\<Pi>\<^isub>E j\<in>J. X j))
immler@50039
    10
    (\<lambda>(J, X). emeasure (P J) (Pi\<^isub>E J X))"
immler@50039
    11
immler@50039
    12
lemma space_PiP[simp]: "space (PiP I M P) = space (PiM I M)"
immler@50039
    13
  by (auto simp add: PiP_def space_PiM prod_emb_def intro!: space_extend_measure)
immler@50039
    14
immler@50039
    15
lemma sets_PiP[simp]: "sets (PiP I M P) = sets (PiM I M)"
immler@50039
    16
  by (auto simp add: PiP_def sets_PiM prod_algebra_def prod_emb_def intro!: sets_extend_measure)
immler@50039
    17
immler@50039
    18
lemma measurable_PiP1[simp]: "measurable (PiP I M P) M' = measurable (\<Pi>\<^isub>M i\<in>I. M i) M'"
immler@50039
    19
  unfolding measurable_def by auto
immler@50039
    20
immler@50039
    21
lemma measurable_PiP2[simp]: "measurable M' (PiP I M P) = measurable M' (\<Pi>\<^isub>M i\<in>I. M i)"
immler@50039
    22
  unfolding measurable_def by auto
immler@50039
    23
immler@50039
    24
locale projective_family =
immler@50039
    25
  fixes I::"'i set" and P::"'i set \<Rightarrow> ('i \<Rightarrow> 'a) measure" and M::"('i \<Rightarrow> 'a measure)"
immler@50039
    26
  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>
immler@50039
    27
     (P H) (prod_emb H M J X) = (P J) X"
immler@50039
    28
  assumes proj_space: "\<And>J. finite J \<Longrightarrow> space (P J) = space (PiM J M)"
immler@50039
    29
  assumes proj_sets: "\<And>J. finite J \<Longrightarrow> sets (P J) = sets (PiM J M)"
immler@50039
    30
  assumes proj_finite_measure: "\<And>J. finite J \<Longrightarrow> emeasure (P J) (space (PiM J M)) \<noteq> \<infinity>"
immler@50039
    31
  assumes prob_space: "\<And>i. prob_space (M i)"
immler@50039
    32
begin
immler@50039
    33
immler@50039
    34
lemma emeasure_PiP:
immler@50039
    35
  assumes "J \<noteq> {}"
immler@50039
    36
  assumes "finite J"
immler@50039
    37
  assumes "J \<subseteq> I"
immler@50039
    38
  assumes A: "\<And>i. i\<in>J \<Longrightarrow> A i \<in> sets (M i)"
immler@50039
    39
  shows "emeasure (PiP J M P) (Pi\<^isub>E J A) = emeasure (P J) (Pi\<^isub>E J A)"
immler@50039
    40
proof -
immler@50039
    41
  have "Pi\<^isub>E J (restrict A J) \<subseteq> (\<Pi>\<^isub>E i\<in>J. space (M i))"
immler@50039
    42
  proof safe
immler@50039
    43
    fix x j assume "x \<in> Pi J (restrict A J)" "j \<in> J"
immler@50039
    44
    hence "x j \<in> restrict A J j" by (auto simp: Pi_def)
immler@50039
    45
    also have "\<dots> \<subseteq> space (M j)" using sets_into_space A `j \<in> J` by auto
immler@50039
    46
    finally show "x j \<in> space (M j)" .
immler@50039
    47
  qed
immler@50039
    48
  hence "emeasure (PiP J M P) (Pi\<^isub>E J A) =
immler@50039
    49
    emeasure (PiP J M P) (prod_emb J M J (Pi\<^isub>E J A))"
immler@50039
    50
    using assms(1-3) sets_into_space by (auto simp add: prod_emb_id Pi_def)
immler@50039
    51
  also have "\<dots> = emeasure (P J) (Pi\<^isub>E J A)"
immler@50039
    52
  proof (rule emeasure_extend_measure[OF PiP_def, where i="(J, A)", simplified,
immler@50039
    53
        of J M "P J" P])
immler@50039
    54
    show "positive (sets (PiM J M)) (P J)" unfolding positive_def by auto
immler@50039
    55
    show "countably_additive (sets (PiM J M)) (P J)" unfolding countably_additive_def
immler@50039
    56
      by (auto simp: suminf_emeasure proj_sets[OF `finite J`])
immler@50039
    57
    show "(\<lambda>(Ja, X). prod_emb J M Ja (Pi\<^isub>E Ja X)) ` {(Ja, X). (Ja = {} \<longrightarrow> J = {}) \<and>
immler@50039
    58
      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>
immler@50039
    59
      (\<lambda>(Ja, X). prod_emb J M Ja (Pi\<^isub>E Ja X)) `
immler@50039
    60
        {(Ja, X). (Ja = {} \<longrightarrow> J = {}) \<and> finite Ja \<and> Ja \<subseteq> J \<and> X \<in> (\<Pi> j\<in>Ja. sets (M j))} \<subseteq>
immler@50039
    61
        Pow (extensional J)" by (auto simp: prod_emb_def)
immler@50039
    62
    show "(J = {} \<longrightarrow> J = {}) \<and> finite J \<and> J \<subseteq> J \<and> A \<in> (\<Pi> j\<in>J. sets (M j))"
immler@50039
    63
      using assms by auto
immler@50039
    64
    fix i
immler@50039
    65
    assume
immler@50039
    66
      "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))"
immler@50039
    67
    thus "emeasure (P J) (case i of (Ja, X) \<Rightarrow> prod_emb J M Ja (Pi\<^isub>E Ja X)) =
immler@50039
    68
        (case i of (J, X) \<Rightarrow> emeasure (P J) (Pi\<^isub>E J X))" using assms
immler@50039
    69
      by (cases i) (auto simp add: intro!: projective sets_PiM_I_finite)
immler@50039
    70
  qed
immler@50039
    71
  finally show ?thesis .
immler@50039
    72
qed
immler@50039
    73
immler@50039
    74
lemma PiP_finite:
immler@50039
    75
  assumes "J \<noteq> {}"
immler@50039
    76
  assumes "finite J"
immler@50039
    77
  assumes "J \<subseteq> I"
immler@50039
    78
  shows "PiP J M P = P J" (is "?P = _")
immler@50039
    79
proof (rule measure_eqI_generator_eq)
immler@50039
    80
  let ?J = "{Pi\<^isub>E J E | E. \<forall>i\<in>J. E i \<in> sets (M i)}"
immler@50039
    81
  let ?F = "\<lambda>i. \<Pi>\<^isub>E k\<in>J. space (M k)"
immler@50039
    82
  let ?\<Omega> = "(\<Pi>\<^isub>E k\<in>J. space (M k))"
immler@50039
    83
  show "Int_stable ?J"
immler@50039
    84
    by (rule Int_stable_PiE)
immler@50039
    85
  interpret finite_measure "P J" using proj_finite_measure `finite J`
immler@50039
    86
    by (intro finite_measureI) (simp add: proj_space)
immler@50039
    87
  show "emeasure ?P (?F _) \<noteq> \<infinity>" using assms `finite J` by (auto simp: emeasure_PiP)
immler@50039
    88
  show "?J \<subseteq> Pow ?\<Omega>" by (auto simp: Pi_iff dest: sets_into_space)
immler@50039
    89
  show "sets (PiP J M P) = sigma_sets ?\<Omega> ?J" "sets (P J) = sigma_sets ?\<Omega> ?J"
immler@50039
    90
    using `finite J` proj_sets by (simp_all add: sets_PiM prod_algebra_eq_finite Pi_iff)
immler@50039
    91
  fix X assume "X \<in> ?J"
immler@50039
    92
  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
immler@50039
    93
  with `finite J` have "X \<in> sets (PiP J M P)" by simp
immler@50039
    94
  have emb_self: "prod_emb J M J (Pi\<^isub>E J E) = Pi\<^isub>E J E"
immler@50039
    95
    using E sets_into_space
immler@50039
    96
    by (auto intro!: prod_emb_PiE_same_index)
immler@50039
    97
  show "emeasure (PiP J M P) X = emeasure (P J) X"
immler@50039
    98
    unfolding X using E
immler@50039
    99
    by (intro emeasure_PiP assms) simp
immler@50039
   100
qed (insert `finite J`, auto intro!: prod_algebraI_finite)
immler@50039
   101
immler@50039
   102
lemma emeasure_fun_emb[simp]:
immler@50039
   103
  assumes L: "J \<noteq> {}" "J \<subseteq> L" "finite L" "L \<subseteq> I" and X: "X \<in> sets (PiM J M)"
immler@50039
   104
  shows "emeasure (PiP L M P) (prod_emb L M J X) = emeasure (PiP J M P) X"
immler@50039
   105
  using assms
immler@50039
   106
  by (subst PiP_finite) (auto simp: PiP_finite finite_subset projective)
immler@50039
   107
immler@50039
   108
end
immler@50039
   109
immler@50039
   110
sublocale projective_family \<subseteq> M: prob_space "M i" for i
immler@50039
   111
  by (rule prob_space)
immler@50039
   112
immler@50039
   113
end