| author | wenzelm | 
| Mon, 24 Apr 2017 11:52:51 +0200 | |
| changeset 65573 | 0f3fdf689bf9 | 
| parent 64910 | 6108dddad9f0 | 
| child 67399 | eab6ce8368fa | 
| permissions | -rw-r--r-- | 
| 42147 | 1 | (* Title: HOL/Probability/Infinite_Product_Measure.thy | 
| 2 | Author: Johannes Hölzl, TU München | |
| 3 | *) | |
| 4 | ||
| 61808 | 5 | section \<open>Infinite Product Measure\<close> | 
| 42147 | 6 | |
| 7 | theory Infinite_Product_Measure | |
| 63626 
44ce6b524ff3
move measure theory from HOL-Probability to HOL-Multivariate_Analysis
 hoelzl parents: 
63540diff
changeset | 8 | imports Probability_Measure Projective_Family | 
| 42147 | 9 | begin | 
| 10 | ||
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 11 | lemma (in product_prob_space) distr_PiM_restrict_finite: | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 12 | assumes "finite J" "J \<subseteq> I" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 13 | shows "distr (PiM I M) (PiM J M) (\<lambda>x. restrict x J) = PiM J M" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 14 | proof (rule PiM_eqI) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 15 | fix X assume X: "\<And>i. i \<in> J \<Longrightarrow> X i \<in> sets (M i)" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 16 |   { fix J X assume J: "J \<noteq> {} \<or> I = {}" "finite J" "J \<subseteq> I" and X: "\<And>i. i \<in> J \<Longrightarrow> X i \<in> sets (M i)"
 | 
| 64910 | 17 | have "emeasure (PiM I M) (emb I J (Pi\<^sub>E J X)) = (\<Prod>i\<in>J. M i (X i))" | 
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 18 | proof (subst emeasure_extend_measure_Pair[OF PiM_def, where \<mu>'=lim], goal_cases) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 19 | case 1 then show ?case | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 20 | by (simp add: M.emeasure_space_1 emeasure_PiM Pi_iff sets_PiM_I_finite emeasure_lim_emb) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 21 | next | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 22 | case (2 J X) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 23 | then have "emb I J (Pi\<^sub>E J X) \<in> sets (PiM I M)" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 24 | by (intro measurable_prod_emb sets_PiM_I_finite) auto | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 25 | from this[THEN sets.sets_into_space] show ?case | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 26 | by (simp add: space_PiM) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 27 | qed (insert assms J X, simp_all del: sets_lim | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 28 | add: M.emeasure_space_1 sets_lim[symmetric] emeasure_countably_additive emeasure_positive) } | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 29 | note * = this | 
| 42147 | 30 | |
| 64910 | 31 | have "emeasure (PiM I M) (emb I J (Pi\<^sub>E J X)) = (\<Prod>i\<in>J. M i (X i))" | 
| 63540 | 32 |   proof (cases "J \<noteq> {} \<or> I = {}")
 | 
| 33 | case False | |
| 34 |     then obtain i where i: "J = {}" "i \<in> I" by auto
 | |
| 35 |     then have "emb I {} {\<lambda>x. undefined} = emb I {i} (\<Pi>\<^sub>E i\<in>{i}. space (M i))"
 | |
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 36 | by (auto simp: space_PiM prod_emb_def) | 
| 63540 | 37 | with i show ?thesis | 
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 38 | by (simp add: * M.emeasure_space_1) | 
| 63540 | 39 | next | 
| 40 | case True | |
| 41 | then show ?thesis | |
| 42 | by (simp add: *[OF _ assms X]) | |
| 43 | qed | |
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 44 | with assms show "emeasure (distr (Pi\<^sub>M I M) (Pi\<^sub>M J M) (\<lambda>x. restrict x J)) (Pi\<^sub>E J X) = (\<Prod>i\<in>J. emeasure (M i) (X i))" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 45 | by (subst emeasure_distr_restrict[OF _ refl]) (auto intro!: sets_PiM_I_finite X) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 46 | qed (insert assms, auto) | 
| 42147 | 47 | |
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 48 | lemma (in product_prob_space) emeasure_PiM_emb': | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 49 | "J \<subseteq> I \<Longrightarrow> finite J \<Longrightarrow> X \<in> sets (PiM J M) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (emb I J X) = PiM J M X" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 50 | by (subst distr_PiM_restrict_finite[symmetric, of J]) | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 51 | (auto intro!: emeasure_distr_restrict[symmetric]) | 
| 42147 | 52 | |
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 53 | lemma (in product_prob_space) emeasure_PiM_emb: | 
| 62975 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 hoelzl parents: 
62390diff
changeset | 54 | "J \<subseteq> I \<Longrightarrow> finite J \<Longrightarrow> (\<And>i. i \<in> J \<Longrightarrow> X i \<in> sets (M i)) \<Longrightarrow> | 
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 55 | emeasure (Pi\<^sub>M I M) (emb I J (Pi\<^sub>E J X)) = (\<Prod> i\<in>J. emeasure (M i) (X i))" | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 56 | by (subst emeasure_PiM_emb') (auto intro!: emeasure_PiM) | 
| 42147 | 57 | |
| 61565 
352c73a689da
Qualifiers in locale expressions default to mandatory regardless of the command.
 ballarin parents: 
61362diff
changeset | 58 | sublocale product_prob_space \<subseteq> P?: prob_space "Pi\<^sub>M I M" | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 59 | proof | 
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 60 |   have *: "emb I {} {\<lambda>x. undefined} = space (PiM I M)"
 | 
| 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 61 | by (auto simp: prod_emb_def space_PiM) | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 62 | show "emeasure (Pi\<^sub>M I M) (space (Pi\<^sub>M I M)) = 1" | 
| 61359 
e985b52c3eb3
cleanup projective limit of probability distributions; proved Ionescu-Tulcea; used it to prove infinite prob. distribution
 hoelzl parents: 
61169diff
changeset | 63 |     using emeasure_PiM_emb[of "{}" "\<lambda>_. {}"] by (simp add: *)
 | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 64 | qed | 
| 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 65 | |
| 64008 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 66 | lemma prob_space_PiM: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 67 | assumes M: "\<And>i. i \<in> I \<Longrightarrow> prob_space (M i)" shows "prob_space (PiM I M)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 68 | proof - | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 69 |   let ?M = "\<lambda>i. if i \<in> I then M i else count_space {undefined}"
 | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 70 | interpret M': prob_space "?M i" for i | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 71 | using M by (cases "i \<in> I") (auto intro!: prob_spaceI) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 72 | interpret product_prob_space ?M I | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 73 | by unfold_locales | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 74 | have "prob_space (\<Pi>\<^sub>M i\<in>I. ?M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 75 | by unfold_locales | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 76 | also have "(\<Pi>\<^sub>M i\<in>I. ?M i) = (\<Pi>\<^sub>M i\<in>I. M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 77 | by (intro PiM_cong) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 78 | finally show ?thesis . | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 79 | qed | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 80 | |
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 81 | lemma (in product_prob_space) emeasure_PiM_Collect: | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 82 | assumes X: "J \<subseteq> I" "finite J" "\<And>i. i \<in> J \<Longrightarrow> X i \<in> sets (M i)" | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 83 |   shows "emeasure (Pi\<^sub>M I M) {x\<in>space (Pi\<^sub>M I M). \<forall>i\<in>J. x i \<in> X i} = (\<Prod> i\<in>J. emeasure (M i) (X i))"
 | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 84 | proof - | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 85 |   have "{x\<in>space (Pi\<^sub>M I M). \<forall>i\<in>J. x i \<in> X i} = emb I J (Pi\<^sub>E J X)"
 | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 86 | unfolding prod_emb_def using assms by (auto simp: space_PiM Pi_iff) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 87 | with emeasure_PiM_emb[OF assms] show ?thesis by simp | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 88 | qed | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 89 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 90 | lemma (in product_prob_space) emeasure_PiM_Collect_single: | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 91 | assumes X: "i \<in> I" "A \<in> sets (M i)" | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 92 |   shows "emeasure (Pi\<^sub>M I M) {x\<in>space (Pi\<^sub>M I M). x i \<in> A} = emeasure (M i) A"
 | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 93 |   using emeasure_PiM_Collect[of "{i}" "\<lambda>i. A"] assms
 | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 94 | by simp | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 95 | |
| 47694 | 96 | lemma (in product_prob_space) measure_PiM_emb: | 
| 97 | assumes "J \<subseteq> I" "finite J" "\<And>i. i \<in> J \<Longrightarrow> X i \<in> sets (M i)" | |
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 98 | shows "measure (PiM I M) (emb I J (Pi\<^sub>E J X)) = (\<Prod> i\<in>J. measure (M i) (X i))" | 
| 47694 | 99 | using emeasure_PiM_emb[OF assms] | 
| 62975 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 hoelzl parents: 
62390diff
changeset | 100 | unfolding emeasure_eq_measure M.emeasure_eq_measure | 
| 64272 | 101 | by (simp add: prod_ennreal measure_nonneg prod_nonneg) | 
| 42865 | 102 | |
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 103 | lemma sets_Collect_single': | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 104 |   "i \<in> I \<Longrightarrow> {x\<in>space (M i). P x} \<in> sets (M i) \<Longrightarrow> {x\<in>space (PiM I M). P (x i)} \<in> sets (PiM I M)"
 | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 105 |   using sets_Collect_single[of i I "{x\<in>space (M i). P x}" M]
 | 
| 50123 
69b35a75caf3
merge extensional dependent function space from FuncSet with the one in Finite_Product_Measure
 hoelzl parents: 
50099diff
changeset | 106 | by (simp add: space_PiM PiE_iff cong: conj_cong) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 107 | |
| 47694 | 108 | lemma (in finite_product_prob_space) finite_measure_PiM_emb: | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 109 | "(\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> measure (PiM I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. measure (M i) (A i))" | 
| 50244 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 immler parents: 
50123diff
changeset | 110 | using measure_PiM_emb[of I A] finite_index prod_emb_PiE_same_index[OF sets.sets_into_space, of I A M] | 
| 47694 | 111 | by auto | 
| 42865 | 112 | |
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 113 | lemma (in product_prob_space) PiM_component: | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 114 | assumes "i \<in> I" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 115 | shows "distr (PiM I M) (M i) (\<lambda>\<omega>. \<omega> i) = M i" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 116 | proof (rule measure_eqI[symmetric]) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 117 | fix A assume "A \<in> sets (M i)" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 118 |   moreover have "((\<lambda>\<omega>. \<omega> i) -` A \<inter> space (PiM I M)) = {x\<in>space (PiM I M). x i \<in> A}"
 | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 119 | by auto | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 120 | ultimately show "emeasure (M i) A = emeasure (distr (PiM I M) (M i) (\<lambda>\<omega>. \<omega> i)) A" | 
| 61808 | 121 | by (auto simp: \<open>i\<in>I\<close> emeasure_distr measurable_component_singleton emeasure_PiM_Collect_single) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 122 | qed simp | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 123 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 124 | lemma (in product_prob_space) PiM_eq: | 
| 61362 | 125 | assumes M': "sets M' = sets (PiM I M)" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 126 | assumes eq: "\<And>J F. finite J \<Longrightarrow> J \<subseteq> I \<Longrightarrow> (\<And>j. j \<in> J \<Longrightarrow> F j \<in> sets (M j)) \<Longrightarrow> | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 127 | emeasure M' (prod_emb I M J (\<Pi>\<^sub>E j\<in>J. F j)) = (\<Prod>j\<in>J. emeasure (M j) (F j))" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 128 | shows "M' = (PiM I M)" | 
| 61362 | 129 | proof (rule measure_eqI_PiM_infinite[symmetric, OF refl M']) | 
| 130 | show "finite_measure (Pi\<^sub>M I M)" | |
| 131 | by standard (simp add: P.emeasure_space_1) | |
| 132 | qed (simp add: eq emeasure_PiM_emb) | |
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 133 | |
| 59000 | 134 | lemma (in product_prob_space) AE_component: "i \<in> I \<Longrightarrow> AE x in M i. P x \<Longrightarrow> AE x in PiM I M. P (x i)" | 
| 135 | apply (rule AE_distrD[of "\<lambda>\<omega>. \<omega> i" "PiM I M" "M i" P]) | |
| 136 | apply simp | |
| 137 | apply (subst PiM_component) | |
| 138 | apply simp_all | |
| 139 | done | |
| 140 | ||
| 64008 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 141 | lemma emeasure_PiM_emb: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 142 | assumes M: "\<And>i. i \<in> I \<Longrightarrow> prob_space (M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 143 | assumes J: "J \<subseteq> I" "finite J" and A: "\<And>i. i \<in> J \<Longrightarrow> A i \<in> sets (M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 144 | shows "emeasure (Pi\<^sub>M I M) (prod_emb I M J (Pi\<^sub>E J A)) = (\<Prod>i\<in>J. emeasure (M i) (A i))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 145 | proof - | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 146 |   let ?M = "\<lambda>i. if i \<in> I then M i else count_space {undefined}"
 | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 147 | interpret M': prob_space "?M i" for i | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 148 | using M by (cases "i \<in> I") (auto intro!: prob_spaceI) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 149 | interpret P: product_prob_space ?M I | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 150 | by unfold_locales | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 151 | have "emeasure (Pi\<^sub>M I M) (prod_emb I M J (Pi\<^sub>E J A)) = emeasure (Pi\<^sub>M I ?M) (P.emb I J (Pi\<^sub>E J A))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 152 | by (auto simp: prod_emb_def PiE_iff intro!: arg_cong2[where f=emeasure] PiM_cong) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 153 | also have "\<dots> = (\<Prod>i\<in>J. emeasure (M i) (A i))" | 
| 64272 | 154 | using J A by (subst P.emeasure_PiM_emb[OF J]) (auto intro!: prod.cong) | 
| 64008 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 155 | finally show ?thesis . | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 156 | qed | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 157 | |
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 158 | lemma distr_pair_PiM_eq_PiM: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 159 | fixes i' :: "'i" and I :: "'i set" and M :: "'i \<Rightarrow> 'a measure" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 160 | assumes M: "\<And>i. i \<in> I \<Longrightarrow> prob_space (M i)" "prob_space (M i')" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 161 | shows "distr (M i' \<Otimes>\<^sub>M (\<Pi>\<^sub>M i\<in>I. M i)) (\<Pi>\<^sub>M i\<in>insert i' I. M i) (\<lambda>(x, X). X(i' := x)) = | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 162 | (\<Pi>\<^sub>M i\<in>insert i' I. M i)" (is "?L = _") | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 163 | proof (rule measure_eqI_PiM_infinite[symmetric, OF refl]) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 164 | interpret M': prob_space "M i'" by fact | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 165 | interpret I: prob_space "(\<Pi>\<^sub>M i\<in>I. M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 166 | using M by (intro prob_space_PiM) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 167 | interpret I': prob_space "(\<Pi>\<^sub>M i\<in>insert i' I. M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 168 | using M by (intro prob_space_PiM) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 169 | show "finite_measure (\<Pi>\<^sub>M i\<in>insert i' I. M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 170 | by unfold_locales | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 171 | fix J A assume J: "finite J" "J \<subseteq> insert i' I" and A: "\<And>i. i \<in> J \<Longrightarrow> A i \<in> sets (M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 172 | let ?X = "prod_emb (insert i' I) M J (Pi\<^sub>E J A)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 173 | have "Pi\<^sub>M (insert i' I) M ?X = (\<Prod>i\<in>J. M i (A i))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 174 | using M J A by (intro emeasure_PiM_emb) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 175 |   also have "\<dots> = M i' (if i' \<in> J then (A i') else space (M i')) * (\<Prod>i\<in>J-{i'}. M i (A i))"
 | 
| 64272 | 176 | using prod.insert_remove[of J "\<lambda>i. M i (A i)" i'] J M'.emeasure_space_1 | 
| 64008 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 177 | by (cases "i' \<in> J") (auto simp: insert_absorb) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 178 |   also have "(\<Prod>i\<in>J-{i'}. M i (A i)) = Pi\<^sub>M I M (prod_emb I M (J - {i'}) (Pi\<^sub>E (J - {i'}) A))"
 | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 179 | using M J A by (intro emeasure_PiM_emb[symmetric]) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 180 | also have "M i' (if i' \<in> J then (A i') else space (M i')) * \<dots> = | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 181 |     (M i' \<Otimes>\<^sub>M Pi\<^sub>M I M) ((if i' \<in> J then (A i') else space (M i')) \<times> prod_emb I M (J - {i'}) (Pi\<^sub>E (J - {i'}) A))"
 | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 182 | using J A by (intro I.emeasure_pair_measure_Times[symmetric] sets_PiM_I) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 183 |   also have "((if i' \<in> J then (A i') else space (M i')) \<times> prod_emb I M (J - {i'}) (Pi\<^sub>E (J - {i'}) A)) =
 | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 184 | (\<lambda>(x, X). X(i' := x)) -` ?X \<inter> space (M i' \<Otimes>\<^sub>M Pi\<^sub>M I M)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 185 | using A[of i', THEN sets.sets_into_space] unfolding set_eq_iff | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 186 | by (simp add: prod_emb_def space_pair_measure space_PiM PiE_fun_upd ac_simps cong: conj_cong) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 187 | (auto simp add: Pi_iff Ball_def all_conj_distrib) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 188 | finally show "Pi\<^sub>M (insert i' I) M ?X = ?L ?X" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 189 | using J A by (simp add: emeasure_distr) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 190 | qed simp | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 191 | |
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 192 | lemma distr_PiM_reindex: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 193 | assumes M: "\<And>i. i \<in> K \<Longrightarrow> prob_space (M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 194 | assumes f: "inj_on f I" "f \<in> I \<rightarrow> K" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 195 | shows "distr (Pi\<^sub>M K M) (\<Pi>\<^sub>M i\<in>I. M (f i)) (\<lambda>\<omega>. \<lambda>n\<in>I. \<omega> (f n)) = (\<Pi>\<^sub>M i\<in>I. M (f i))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 196 | (is "distr ?K ?I ?t = ?I") | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 197 | proof (rule measure_eqI_PiM_infinite[symmetric, OF refl]) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 198 | interpret prob_space ?I | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 199 | using f M by (intro prob_space_PiM) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 200 | show "finite_measure ?I" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 201 | by unfold_locales | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 202 | fix A J assume J: "finite J" "J \<subseteq> I" and A: "\<And>i. i \<in> J \<Longrightarrow> A i \<in> sets (M (f i))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 203 | have [simp]: "i \<in> J \<Longrightarrow> the_inv_into I f (f i) = i" for i | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 204 | using J f by (intro the_inv_into_f_f) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 205 | have "?I (prod_emb I (\<lambda>i. M (f i)) J (Pi\<^sub>E J A)) = (\<Prod>j\<in>J. M (f j) (A j))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 206 | using f J A by (intro emeasure_PiM_emb M) auto | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 207 | also have "\<dots> = (\<Prod>j\<in>f`J. M j (A (the_inv_into I f j)))" | 
| 64272 | 208 | using f J by (subst prod.reindex) (auto intro!: prod.cong intro: inj_on_subset simp: the_inv_into_f_f) | 
| 64008 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 209 | also have "\<dots> = ?K (prod_emb K M (f`J) (\<Pi>\<^sub>E j\<in>f`J. A (the_inv_into I f j)))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 210 | using f J A by (intro emeasure_PiM_emb[symmetric] M) (auto simp: the_inv_into_f_f) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 211 | also have "prod_emb K M (f`J) (\<Pi>\<^sub>E j\<in>f`J. A (the_inv_into I f j)) = ?t -` prod_emb I (\<lambda>i. M (f i)) J (Pi\<^sub>E J A) \<inter> space ?K" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 212 | using f J A by (auto simp: prod_emb_def space_PiM Pi_iff PiE_iff Int_absorb1) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 213 | also have "?K \<dots> = distr ?K ?I ?t (prod_emb I (\<lambda>i. M (f i)) J (Pi\<^sub>E J A))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 214 | using f J A by (intro emeasure_distr[symmetric] sets_PiM_I) (auto simp: Pi_iff) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 215 | finally show "?I (prod_emb I (\<lambda>i. M (f i)) J (Pi\<^sub>E J A)) = distr ?K ?I ?t (prod_emb I (\<lambda>i. M (f i)) J (Pi\<^sub>E J A))" . | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 216 | qed simp | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 217 | |
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 218 | lemma distr_PiM_component: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 219 | assumes M: "\<And>i. i \<in> I \<Longrightarrow> prob_space (M i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 220 | assumes "i \<in> I" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 221 | shows "distr (Pi\<^sub>M I M) (M i) (\<lambda>\<omega>. \<omega> i) = M i" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 222 | proof - | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 223 |   have *: "(\<lambda>\<omega>. \<omega> i) -` A \<inter> space (Pi\<^sub>M I M) = prod_emb I M {i} (\<Pi>\<^sub>E i'\<in>{i}. A)" for A
 | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 224 | by (auto simp: prod_emb_def space_PiM) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 225 | show ?thesis | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 226 | apply (intro measure_eqI) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 227 | apply (auto simp add: emeasure_distr \<open>i\<in>I\<close> * emeasure_PiM_emb M) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 228 | apply (subst emeasure_PiM_emb) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 229 | apply (simp_all add: M \<open>i\<in>I\<close>) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 230 | done | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 231 | qed | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 232 | |
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 233 | lemma AE_PiM_component: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 234 | "(\<And>i. i \<in> I \<Longrightarrow> prob_space (M i)) \<Longrightarrow> i \<in> I \<Longrightarrow> AE x in M i. P x \<Longrightarrow> AE x in PiM I M. P (x i)" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 235 | using AE_distrD[of "\<lambda>x. x i" "PiM I M" "M i"] | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 236 | by (subst (asm) distr_PiM_component[of I _ i]) (auto intro: AE_distrD[of "\<lambda>x. x i" _ _ P]) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 237 | |
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 238 | lemma decseq_emb_PiE: | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 239 | "incseq J \<Longrightarrow> decseq (\<lambda>i. prod_emb I M (J i) (\<Pi>\<^sub>E j\<in>J i. X j))" | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 240 | by (fastforce simp: decseq_def prod_emb_def incseq_def Pi_iff) | 
| 
17a20ca86d62
HOL-Probability: more about probability, prepare for Markov processes in the AFP
 hoelzl parents: 
63626diff
changeset | 241 | |
| 61808 | 242 | subsection \<open>Sequence space\<close> | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 243 | |
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 244 | definition comb_seq :: "nat \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> (nat \<Rightarrow> 'a)" where | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 245 | "comb_seq i \<omega> \<omega>' j = (if j < i then \<omega> j else \<omega>' (j - i))" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 246 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 247 | lemma split_comb_seq: "P (comb_seq i \<omega> \<omega>' j) \<longleftrightarrow> (j < i \<longrightarrow> P (\<omega> j)) \<and> (\<forall>k. j = i + k \<longrightarrow> P (\<omega>' k))" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 248 | by (auto simp: comb_seq_def not_less) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 249 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 250 | lemma split_comb_seq_asm: "P (comb_seq i \<omega> \<omega>' j) \<longleftrightarrow> \<not> ((j < i \<and> \<not> P (\<omega> j)) \<or> (\<exists>k. j = i + k \<and> \<not> P (\<omega>' k)))" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 251 | by (auto simp: comb_seq_def) | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 252 | |
| 50099 | 253 | lemma measurable_comb_seq: | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 254 | "(\<lambda>(\<omega>, \<omega>'). comb_seq i \<omega> \<omega>') \<in> measurable ((\<Pi>\<^sub>M i\<in>UNIV. M) \<Otimes>\<^sub>M (\<Pi>\<^sub>M i\<in>UNIV. M)) (\<Pi>\<^sub>M i\<in>UNIV. M)" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 255 | proof (rule measurable_PiM_single) | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 256 | show "(\<lambda>(\<omega>, \<omega>'). comb_seq i \<omega> \<omega>') \<in> space ((\<Pi>\<^sub>M i\<in>UNIV. M) \<Otimes>\<^sub>M (\<Pi>\<^sub>M i\<in>UNIV. M)) \<rightarrow> (UNIV \<rightarrow>\<^sub>E space M)" | 
| 50123 
69b35a75caf3
merge extensional dependent function space from FuncSet with the one in Finite_Product_Measure
 hoelzl parents: 
50099diff
changeset | 257 | by (auto simp: space_pair_measure space_PiM PiE_iff split: split_comb_seq) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 258 | fix j :: nat and A assume A: "A \<in> sets M" | 
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
53374diff
changeset | 259 |   then have *: "{\<omega> \<in> space ((\<Pi>\<^sub>M i\<in>UNIV. M) \<Otimes>\<^sub>M (\<Pi>\<^sub>M i\<in>UNIV. M)). case_prod (comb_seq i) \<omega> j \<in> A} =
 | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 260 |     (if j < i then {\<omega> \<in> space (\<Pi>\<^sub>M i\<in>UNIV. M). \<omega> j \<in> A} \<times> space (\<Pi>\<^sub>M i\<in>UNIV. M)
 | 
| 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 261 |               else space (\<Pi>\<^sub>M i\<in>UNIV. M) \<times> {\<omega> \<in> space (\<Pi>\<^sub>M i\<in>UNIV. M). \<omega> (j - i) \<in> A})"
 | 
| 50244 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 immler parents: 
50123diff
changeset | 262 | by (auto simp: space_PiM space_pair_measure comb_seq_def dest: sets.sets_into_space) | 
| 55414 
eab03e9cee8a
renamed '{prod,sum,bool,unit}_case' to 'case_...'
 blanchet parents: 
53374diff
changeset | 263 |   show "{\<omega> \<in> space ((\<Pi>\<^sub>M i\<in>UNIV. M) \<Otimes>\<^sub>M (\<Pi>\<^sub>M i\<in>UNIV. M)). case_prod (comb_seq i) \<omega> j \<in> A} \<in> sets ((\<Pi>\<^sub>M i\<in>UNIV. M) \<Otimes>\<^sub>M (\<Pi>\<^sub>M i\<in>UNIV. M))"
 | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 264 | unfolding * by (auto simp: A intro!: sets_Collect_single) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 265 | qed | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 266 | |
| 50099 | 267 | lemma measurable_comb_seq'[measurable (raw)]: | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 268 | assumes f: "f \<in> measurable N (\<Pi>\<^sub>M i\<in>UNIV. M)" and g: "g \<in> measurable N (\<Pi>\<^sub>M i\<in>UNIV. M)" | 
| 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 269 | shows "(\<lambda>x. comb_seq i (f x) (g x)) \<in> measurable N (\<Pi>\<^sub>M i\<in>UNIV. M)" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 270 | using measurable_compose[OF measurable_Pair[OF f g] measurable_comb_seq] by simp | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 271 | |
| 50099 | 272 | lemma comb_seq_0: "comb_seq 0 \<omega> \<omega>' = \<omega>'" | 
| 273 | by (auto simp add: comb_seq_def) | |
| 274 | ||
| 55415 | 275 | lemma comb_seq_Suc: "comb_seq (Suc n) \<omega> \<omega>' = comb_seq n \<omega> (case_nat (\<omega> n) \<omega>')" | 
| 50099 | 276 | by (auto simp add: comb_seq_def not_less less_Suc_eq le_imp_diff_is_add intro!: ext split: nat.split) | 
| 277 | ||
| 55415 | 278 | lemma comb_seq_Suc_0[simp]: "comb_seq (Suc 0) \<omega> = case_nat (\<omega> 0)" | 
| 50099 | 279 | by (intro ext) (simp add: comb_seq_Suc comb_seq_0) | 
| 280 | ||
| 281 | lemma comb_seq_less: "i < n \<Longrightarrow> comb_seq n \<omega> \<omega>' i = \<omega> i" | |
| 282 | by (auto split: split_comb_seq) | |
| 283 | ||
| 284 | lemma comb_seq_add: "comb_seq n \<omega> \<omega>' (i + n) = \<omega>' i" | |
| 285 | by (auto split: nat.split split_comb_seq) | |
| 286 | ||
| 55415 | 287 | lemma case_nat_comb_seq: "case_nat s' (comb_seq n \<omega> \<omega>') (i + n) = case_nat (case_nat s' \<omega> n) \<omega>' i" | 
| 50099 | 288 | by (auto split: nat.split split_comb_seq) | 
| 289 | ||
| 55415 | 290 | lemma case_nat_comb_seq': | 
| 291 | "case_nat s (comb_seq i \<omega> \<omega>') = comb_seq (Suc i) (case_nat s \<omega>) \<omega>'" | |
| 50099 | 292 | by (auto split: split_comb_seq nat.split) | 
| 293 | ||
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 294 | locale sequence_space = product_prob_space "\<lambda>i. M" "UNIV :: nat set" for M | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 295 | begin | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 296 | |
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 297 | abbreviation "S \<equiv> \<Pi>\<^sub>M i\<in>UNIV::nat set. M" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 298 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 299 | lemma infprod_in_sets[intro]: | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 300 | fixes E :: "nat \<Rightarrow> 'a set" assumes E: "\<And>i. E i \<in> sets M" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 301 | shows "Pi UNIV E \<in> sets S" | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 302 | proof - | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 303 |   have "Pi UNIV E = (\<Inter>i. emb UNIV {..i} (\<Pi>\<^sub>E j\<in>{..i}. E j))"
 | 
| 50244 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 immler parents: 
50123diff
changeset | 304 | using E E[THEN sets.sets_into_space] | 
| 62343 
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
 haftmann parents: 
61969diff
changeset | 305 | by (auto simp: prod_emb_def Pi_iff extensional_def) | 
| 47694 | 306 | with E show ?thesis by auto | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 307 | qed | 
| 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 308 | |
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 309 | lemma measure_PiM_countable: | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 310 | fixes E :: "nat \<Rightarrow> 'a set" assumes E: "\<And>i. E i \<in> sets M" | 
| 61969 | 311 | shows "(\<lambda>n. \<Prod>i\<le>n. measure M (E i)) \<longlonglongrightarrow> measure S (Pi UNIV E)" | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 312 | proof - | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 313 |   let ?E = "\<lambda>n. emb UNIV {..n} (Pi\<^sub>E {.. n} E)"
 | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 314 | have "\<And>n. (\<Prod>i\<le>n. measure M (E i)) = measure S (?E n)" | 
| 47694 | 315 | using E by (simp add: measure_PiM_emb) | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 316 | moreover have "Pi UNIV E = (\<Inter>n. ?E n)" | 
| 50244 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 immler parents: 
50123diff
changeset | 317 | using E E[THEN sets.sets_into_space] | 
| 62343 
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
 haftmann parents: 
61969diff
changeset | 318 | by (auto simp: prod_emb_def extensional_def Pi_iff) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 319 | moreover have "range ?E \<subseteq> sets S" | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 320 | using E by auto | 
| 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 321 | moreover have "decseq ?E" | 
| 47694 | 322 | by (auto simp: prod_emb_def Pi_iff decseq_def) | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 323 | ultimately show ?thesis | 
| 47694 | 324 | by (simp add: finite_Lim_measure_decseq) | 
| 42257 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 325 | qed | 
| 
08d717c82828
prove measurable_into_infprod_algebra and measure_infprod
 hoelzl parents: 
42166diff
changeset | 326 | |
| 62975 
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
 hoelzl parents: 
62390diff
changeset | 327 | lemma nat_eq_diff_eq: | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 328 | fixes a b c :: nat | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 329 | shows "c \<le> b \<Longrightarrow> a = b - c \<longleftrightarrow> a + c = b" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 330 | by auto | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 331 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 332 | lemma PiM_comb_seq: | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 333 | "distr (S \<Otimes>\<^sub>M S) S (\<lambda>(\<omega>, \<omega>'). comb_seq i \<omega> \<omega>') = S" (is "?D = _") | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 334 | proof (rule PiM_eq) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 335 | let ?I = "UNIV::nat set" and ?M = "\<lambda>n. M" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 336 | let "distr _ _ ?f" = "?D" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 337 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 338 | fix J E assume J: "finite J" "J \<subseteq> ?I" "\<And>j. j \<in> J \<Longrightarrow> E j \<in> sets M" | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 339 | let ?X = "prod_emb ?I ?M J (\<Pi>\<^sub>E j\<in>J. E j)" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 340 | have "\<And>j x. j \<in> J \<Longrightarrow> x \<in> E j \<Longrightarrow> x \<in> space M" | 
| 50244 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 immler parents: 
50123diff
changeset | 341 | using J(3)[THEN sets.sets_into_space] by (auto simp: space_PiM Pi_iff subset_eq) | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 342 | with J have "?f -` ?X \<inter> space (S \<Otimes>\<^sub>M S) = | 
| 64910 | 343 |     (prod_emb ?I ?M (J \<inter> {..<i}) (\<Pi>\<^sub>E j\<in>J \<inter> {..<i}. E j)) \<times>
 | 
| 344 | (prod_emb ?I ?M ((op + i) -` J) (\<Pi>\<^sub>E j\<in>(op + i) -` J. E (i + j)))" (is "_ = ?E \<times> ?F") | |
| 50123 
69b35a75caf3
merge extensional dependent function space from FuncSet with the one in Finite_Product_Measure
 hoelzl parents: 
50099diff
changeset | 345 | by (auto simp: space_pair_measure space_PiM prod_emb_def all_conj_distrib PiE_iff | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 346 | split: split_comb_seq split_comb_seq_asm) | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 347 | then have "emeasure ?D ?X = emeasure (S \<Otimes>\<^sub>M S) (?E \<times> ?F)" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 348 | by (subst emeasure_distr[OF measurable_comb_seq]) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 349 | (auto intro!: sets_PiM_I simp: split_beta' J) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 350 | also have "\<dots> = emeasure S ?E * emeasure S ?F" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 351 | using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI simp: inj_on_def) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 352 | also have "emeasure S ?F = (\<Prod>j\<in>(op + i) -` J. emeasure M (E (i + j)))" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 353 | using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI inj_on_def) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 354 |   also have "\<dots> = (\<Prod>j\<in>J - (J \<inter> {..<i}). emeasure M (E j))"
 | 
| 64272 | 355 | by (rule prod.reindex_cong [of "\<lambda>x. x - i"]) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 356 | (auto simp: image_iff Bex_def not_less nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 357 |   also have "emeasure S ?E = (\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j))"
 | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 358 | using J by (intro emeasure_PiM_emb) simp_all | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 359 |   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))"
 | 
| 64272 | 360 | by (subst mult.commute) (auto simp: J prod.subset_diff[symmetric]) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 361 | finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" . | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 362 | qed simp_all | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 363 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 364 | lemma PiM_iter: | 
| 55415 | 365 | "distr (M \<Otimes>\<^sub>M S) S (\<lambda>(s, \<omega>). case_nat s \<omega>) = S" (is "?D = _") | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 366 | proof (rule PiM_eq) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 367 | let ?I = "UNIV::nat set" and ?M = "\<lambda>n. M" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 368 | let "distr _ _ ?f" = "?D" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 369 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 370 | fix J E assume J: "finite J" "J \<subseteq> ?I" "\<And>j. j \<in> J \<Longrightarrow> E j \<in> sets M" | 
| 64910 | 371 | let ?X = "prod_emb ?I ?M J (\<Pi>\<^sub>E j\<in>J. E j)" | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 372 | have "\<And>j x. j \<in> J \<Longrightarrow> x \<in> E j \<Longrightarrow> x \<in> space M" | 
| 50244 
de72bbe42190
qualified interpretation of sigma_algebra, to avoid name clashes
 immler parents: 
50123diff
changeset | 373 | using J(3)[THEN sets.sets_into_space] by (auto simp: space_PiM Pi_iff subset_eq) | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 374 | with J have "?f -` ?X \<inter> space (M \<Otimes>\<^sub>M S) = (if 0 \<in> J then E 0 else space M) \<times> | 
| 64910 | 375 | (prod_emb ?I ?M (Suc -` J) (\<Pi>\<^sub>E j\<in>Suc -` J. E (Suc j)))" (is "_ = ?E \<times> ?F") | 
| 50123 
69b35a75caf3
merge extensional dependent function space from FuncSet with the one in Finite_Product_Measure
 hoelzl parents: 
50099diff
changeset | 376 | by (auto simp: space_pair_measure space_PiM PiE_iff prod_emb_def all_conj_distrib | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 377 | split: nat.split nat.split_asm) | 
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
51351diff
changeset | 378 | then have "emeasure ?D ?X = emeasure (M \<Otimes>\<^sub>M S) (?E \<times> ?F)" | 
| 50099 | 379 | by (subst emeasure_distr) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 380 | (auto intro!: sets_PiM_I simp: split_beta' J) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 381 | also have "\<dots> = emeasure M ?E * emeasure S ?F" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 382 | using J by (intro P.emeasure_pair_measure_Times) (auto intro!: sets_PiM_I finite_vimageI) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 383 | also have "emeasure S ?F = (\<Prod>j\<in>Suc -` J. emeasure M (E (Suc j)))" | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 384 | using J by (intro emeasure_PiM_emb) (simp_all add: finite_vimageI) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 385 |   also have "\<dots> = (\<Prod>j\<in>J - {0}. emeasure M (E j))"
 | 
| 64272 | 386 | by (rule prod.reindex_cong [of "\<lambda>x. x - 1"]) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 387 | (auto simp: image_iff Bex_def not_less nat_eq_diff_eq ac_simps cong: conj_cong intro!: inj_onI) | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 388 |   also have "emeasure M ?E * (\<Prod>j\<in>J - {0}. emeasure M (E j)) = (\<Prod>j\<in>J. emeasure M (E j))"
 | 
| 64272 | 389 | by (auto simp: M.emeasure_space_1 prod.remove J) | 
| 50000 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 390 | finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" . | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 391 | qed simp_all | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 392 | |
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 393 | end | 
| 
cfe8ee8a1371
infinite product measure is invariant under adding prefixes
 hoelzl parents: 
49804diff
changeset | 394 | |
| 62390 | 395 | end |