[STATEMENT]
lemma (in product_sigma_finite) emeasure_PiM:
  "finite I \<Longrightarrow> (\<And>i. i\<in>I \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (PiM I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. emeasure (M i) (A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite I; \<And>i. i \<in> I \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. emeasure (M i) (A i))
[PROOF STEP]
proof (induct I arbitrary: A rule: finite_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
case (insert i I)
[PROOF STATE]
proof (state)
this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> ?A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I ?A) = (\<Prod>i\<in>I. emeasure (M i) (?A i))
?i \<in> insert i I \<Longrightarrow> A ?i \<in> sets (M ?i)

goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
interpret finite_product_sigma_finite M I
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_product_sigma_finite M I
[PROOF STEP]
by standard fact
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
have "finite (insert i I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (insert i I)
[PROOF STEP]
using \<open>finite I\<close>
[PROOF STATE]
proof (prove)
using this:
finite I

goal (1 subgoal):
 1. finite (insert i I)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (insert i I)

goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
interpret I': finite_product_sigma_finite M "insert i I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_product_sigma_finite M (insert i I)
[PROOF STEP]
by standard fact
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
let ?h = "(\<lambda>(f, y). f(i := y))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
let ?P = "distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) ?h"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
let ?\<mu> = "emeasure ?P"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
let ?I = "{j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
let ?f = "\<lambda>J E j. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
have "emeasure (Pi\<^sub>M (insert i I) M) (prod_emb (insert i I) M (insert i I) (Pi\<^sub>E (insert i I) A)) =
    (\<Prod>i\<in>insert i I. emeasure (M i) (A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (Pi\<^sub>M (insert i I) M) (prod_emb (insert i I) M (insert i I) (Pi\<^sub>E (insert i I) A)) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
proof (subst emeasure_extend_measure_Pair[OF PiM_def])
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
fix J E
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
assume "(J \<noteq> {} \<or> insert i I = {}) \<and> finite J \<and> J \<subseteq> insert i I \<and> E \<in> (\<Pi> j\<in>J. sets (M j))"
[PROOF STATE]
proof (state)
this:
(J \<noteq> {} \<or> insert i I = {}) \<and> finite J \<and> J \<subseteq> insert i I \<and> E \<in> (\<Pi> j\<in>J. sets (M j))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(J \<noteq> {} \<or> insert i I = {}) \<and> finite J \<and> J \<subseteq> insert i I \<and> E \<in> (\<Pi> j\<in>J. sets (M j))
[PROOF STEP]
have J: "J \<noteq> {}" "finite J" "J \<subseteq> insert i I" and E: "\<forall>j\<in>J. E j \<in> sets (M j)"
[PROOF STATE]
proof (prove)
using this:
(J \<noteq> {} \<or> insert i I = {}) \<and> finite J \<and> J \<subseteq> insert i I \<and> E \<in> (\<Pi> j\<in>J. sets (M j))

goal (1 subgoal):
 1. (J \<noteq> {} &&& finite J &&& J \<subseteq> insert i I) &&& \<forall>j\<in>J. E j \<in> sets (M j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
J \<noteq> {}
finite J
J \<subseteq> insert i I
\<forall>j\<in>J. E j \<in> sets (M j)

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
let ?p = "prod_emb (insert i I) M J (Pi\<^sub>E J E)"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
let ?p' = "prod_emb I M (J - {i}) (\<Pi>\<^sub>E j\<in>J-{i}. E j)"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "?\<mu> ?p =
      emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M (M i)) (?h -` ?p \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) ((\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i))
[PROOF STEP]
by (intro emeasure_distr measurable_add_dim sets_PiM_I) fact+
[PROOF STATE]
proof (state)
this:
emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) ((\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) ((\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "?h -` ?p \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) = ?p' \<times> (if i \<in> J then E i else space (M i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) = prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))
[PROOF STEP]
using J E[rule_format, THEN sets.sets_into_space]
[PROOF STATE]
proof (prove)
using this:
J \<noteq> {}
finite J
J \<subseteq> insert i I
?j1 \<in> J \<Longrightarrow> E ?j1 \<subseteq> space (M ?j1)

goal (1 subgoal):
 1. (\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) = prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))
[PROOF STEP]
by (force simp: space_pair_measure space_PiM prod_emb_iff PiE_def Pi_iff split: if_split_asm)
[PROOF STATE]
proof (state)
this:
(\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) = prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>(f, y). f(i := y)) -` prod_emb (insert i I) M J (Pi\<^sub>E J E) \<inter> space (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) = prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M (M i)) (?p' \<times> (if i \<in> J then E i else space (M i))) =
      emeasure (Pi\<^sub>M I M) ?p' * emeasure (M i) (if i \<in> J then (E i) else space (M i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))) = emeasure (Pi\<^sub>M I M) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E)) * emeasure (M i) (if i \<in> J then E i else space (M i))
[PROOF STEP]
using J E
[PROOF STATE]
proof (prove)
using this:
J \<noteq> {}
finite J
J \<subseteq> insert i I
\<forall>j\<in>J. E j \<in> sets (M j)

goal (1 subgoal):
 1. emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))) = emeasure (Pi\<^sub>M I M) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E)) * emeasure (M i) (if i \<in> J then E i else space (M i))
[PROOF STEP]
by (intro M.emeasure_pair_measure_Times sets_PiM_I) auto
[PROOF STATE]
proof (state)
this:
emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))) = emeasure (Pi\<^sub>M I M) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E)) * emeasure (M i) (if i \<in> J then E i else space (M i))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) \<times> (if i \<in> J then E i else space (M i))) = emeasure (Pi\<^sub>M I M) (prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E)) * emeasure (M i) (if i \<in> J then E i else space (M i))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "?p' = (\<Pi>\<^sub>E j\<in>I. if j \<in> J-{i} then E j else space (M j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) = (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j))
[PROOF STEP]
using J E[rule_format, THEN sets.sets_into_space]
[PROOF STATE]
proof (prove)
using this:
J \<noteq> {}
finite J
J \<subseteq> insert i I
?j1 \<in> J \<Longrightarrow> E ?j1 \<subseteq> space (M ?j1)

goal (1 subgoal):
 1. prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) = (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j))
[PROOF STEP]
by (auto simp: prod_emb_iff PiE_def Pi_iff split: if_split_asm) blast+
[PROOF STATE]
proof (state)
this:
prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) = (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
prod_emb I M (J - {i}) (Pi\<^sub>E (J - {i}) E) = (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "emeasure (Pi\<^sub>M I M) (\<Pi>\<^sub>E j\<in>I. if j \<in> J-{i} then E j else space (M j)) =
      (\<Prod> j\<in>I. if j \<in> J-{i} then emeasure (M j) (E j) else emeasure (M j) (space (M j)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (Pi\<^sub>M I M) (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j)) = (\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
using E
[PROOF STATE]
proof (prove)
using this:
\<forall>j\<in>J. E j \<in> sets (M j)

goal (1 subgoal):
 1. emeasure (Pi\<^sub>M I M) (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j)) = (\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
by (subst insert) (auto intro!: prod.cong)
[PROOF STATE]
proof (state)
this:
emeasure (Pi\<^sub>M I M) (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j)) = (\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure (Pi\<^sub>M I M) (\<Pi>\<^sub>E j\<in>I. if j \<in> J - {i} then E j else space (M j)) = (\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "(\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) *
       emeasure (M i) (if i \<in> J then E i else space (M i)) = (\<Prod>j\<in>insert i I. ?f J E j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) * emeasure (M i) (if i \<in> J then E i else space (M i)) = (\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
using insert
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> ?A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I ?A) = (\<Prod>i\<in>I. emeasure (M i) (?A i))
?i \<in> insert i I \<Longrightarrow> A ?i \<in> sets (M ?i)

goal (1 subgoal):
 1. (\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) * emeasure (M i) (if i \<in> J then E i else space (M i)) = (\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
by (auto simp: mult.commute intro!: arg_cong2[where f="(*)"] prod.cong)
[PROOF STATE]
proof (state)
this:
(\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) * emeasure (M i) (if i \<in> J then E i else space (M i)) = (\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) * emeasure (M i) (if i \<in> J then E i else space (M i)) = (\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
have "\<dots> = (\<Prod>j\<in>J \<union> ?I. ?f J E j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j))) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
using insert(1,2) J E
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
J \<noteq> {}
finite J
J \<subseteq> insert i I
\<forall>j\<in>J. E j \<in> sets (M j)

goal (1 subgoal):
 1. (\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j))) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
by (intro prod.mono_neutral_right) auto
[PROOF STATE]
proof (state)
this:
(\<Prod>j\<in>insert i I. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j))) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (6 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> ?\<mu>' (prod_emb (insert i I) M ia (Pi\<^sub>E ia j)) = (\<Prod>ja\<in>ia \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if ja \<in> ia then emeasure (M ja) (j ja) else emeasure (M ja) (space (M ja)))
 2. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 3. positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 4. countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>'
 5. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 6. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
show "?\<mu> ?p = \<dots>"
[PROOF STATE]
proof (prove)
using this:
emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (1 subgoal):
 1. emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))) (prod_emb (insert i I) M J (Pi\<^sub>E J E)) = (\<Prod>j\<in>J \<union> {j \<in> insert i I. emeasure (M j) (space (M j)) \<noteq> 1}. if j \<in> J then emeasure (M j) (E j) else emeasure (M j) (space (M j)))

goal (5 subgoals):
 1. \<And>ia j. (ia \<noteq> {} \<or> insert i I = {}) \<and> finite ia \<and> ia \<subseteq> insert i I \<and> j \<in> (\<Pi> j\<in>ia. sets (M j)) \<Longrightarrow> prod_emb (insert i I) M ia (Pi\<^sub>E ia j) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
 2. positive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))))
 3. countably_additive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))))
 4. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 5. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
show "prod_emb (insert i I) M J (Pi\<^sub>E J E) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod_emb (insert i I) M J (Pi\<^sub>E J E) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
[PROOF STEP]
using J E[rule_format, THEN sets.sets_into_space]
[PROOF STATE]
proof (prove)
using this:
J \<noteq> {}
finite J
J \<subseteq> insert i I
?j1 \<in> J \<Longrightarrow> E ?j1 \<subseteq> space (M ?j1)

goal (1 subgoal):
 1. prod_emb (insert i I) M J (Pi\<^sub>E J E) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))
[PROOF STEP]
by (auto simp: prod_emb_iff PiE_def)
[PROOF STATE]
proof (state)
this:
prod_emb (insert i I) M J (Pi\<^sub>E J E) \<in> Pow (\<Pi>\<^sub>E i\<in>insert i I. space (M i))

goal (4 subgoals):
 1. positive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))))
 2. countably_additive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))))
 3. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 4. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. positive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))))
 2. countably_additive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>a. case a of (f, y) \<Rightarrow> f(i := y))))
 3. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 4. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
show "positive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>" "countably_additive (sets (Pi\<^sub>M (insert i I) M)) ?\<mu>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. positive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y)))) &&& countably_additive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))))
[PROOF STEP]
using emeasure_positive[of ?P] emeasure_countably_additive[of ?P]
[PROOF STATE]
proof (prove)
using this:
positive (sets (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y)))) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))))
countably_additive (sets (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y)))) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))))

goal (1 subgoal):
 1. positive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y)))) &&& countably_additive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))))
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
positive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))))
countably_additive (sets (Pi\<^sub>M (insert i I) M)) (emeasure (distr (Pi\<^sub>M I M \<Otimes>\<^sub>M M i) (Pi\<^sub>M (insert i I) M) (\<lambda>(f, y). f(i := y))))

goal (2 subgoals):
 1. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 2. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
 2. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
show "(insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and>
      insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
[PROOF STEP]
using insert
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> ?A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I ?A) = (\<Prod>i\<in>I. emeasure (M i) (?A i))
?i \<in> insert i I \<Longrightarrow> A ?i \<in> sets (M ?i)

goal (1 subgoal):
 1. (insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(insert i I \<noteq> {} \<or> insert i I = {}) \<and> finite (insert i I) \<and> insert i I \<subseteq> insert i I \<and> A \<in> (\<Pi> j\<in>insert i I. sets (M j))

goal (1 subgoal):
 1. (\<Prod>j\<in>insert i I \<union> {ia \<in> insert i I. emeasure (M ia) (space (M ia)) \<noteq> 1}. if j \<in> insert i I then emeasure (M j) (A j) else emeasure (M j) (space (M j))) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
qed (auto intro!: prod.cong)
[PROOF STATE]
proof (state)
this:
emeasure (Pi\<^sub>M (insert i I) M) (prod_emb (insert i I) M (insert i I) (Pi\<^sub>E (insert i I) A)) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))

goal (2 subgoals):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
 2. \<And>x F A. \<lbrakk>finite F; x \<notin> F; \<And>A. (\<And>i. i \<in> F \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M F M) (Pi\<^sub>E F A) = (\<Prod>i\<in>F. emeasure (M i) (A i)); \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> sets (M i)\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M (insert x F) M) (Pi\<^sub>E (insert x F) A) = (\<Prod>i\<in>insert x F. emeasure (M i) (A i))
[PROOF STEP]
with insert
[PROOF STATE]
proof (chain)
picking this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> ?A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I ?A) = (\<Prod>i\<in>I. emeasure (M i) (?A i))
?i \<in> insert i I \<Longrightarrow> A ?i \<in> sets (M ?i)
emeasure (Pi\<^sub>M (insert i I) M) (prod_emb (insert i I) M (insert i I) (Pi\<^sub>E (insert i I) A)) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> ?A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I ?A) = (\<Prod>i\<in>I. emeasure (M i) (?A i))
?i \<in> insert i I \<Longrightarrow> A ?i \<in> sets (M ?i)
emeasure (Pi\<^sub>M (insert i I) M) (prod_emb (insert i I) M (insert i I) (Pi\<^sub>E (insert i I) A)) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))

goal (1 subgoal):
 1. emeasure (Pi\<^sub>M (insert i I) M) (Pi\<^sub>E (insert i I) A) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))
[PROOF STEP]
by (subst (asm) prod_emb_PiE_same_index) (auto intro!: sets.sets_into_space)
[PROOF STATE]
proof (state)
this:
emeasure (Pi\<^sub>M (insert i I) M) (Pi\<^sub>E (insert i I) A) = (\<Prod>i\<in>insert i I. emeasure (M i) (A i))

goal (1 subgoal):
 1. \<And>A. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M {} M) (Pi\<^sub>E {} A) = (\<Prod>i\<in>{}. emeasure (M i) (A i))
[PROOF STEP]
qed simp


[STATEMENT]
lemma dtree_to_list_sequence_subtree':
  "\<lbrakk>max_deg t \<le> 1; strict_subtree (Node r xs) t\<rbrakk>
    \<Longrightarrow> \<exists>as e bs. dtree_to_list t = as@(r,e)#bs \<and> dtree_to_list (Node r xs) = bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>max_deg t \<le> 1; strict_subtree (Node r xs) t\<rbrakk> \<Longrightarrow> \<exists>as e bs. dtree_to_list t = as @ (r, e) # bs \<and> dtree_to_list (Node r xs) = bs
[PROOF STEP]
using dtree_to_from_list_id[of r]  dtree_to_list_sequence_subtree[of t r xs]
[PROOF STATE]
proof (prove)
using this:
dtree_to_list (dtree_from_list r ?xs) = ?xs
\<lbrakk>max_deg t \<le> 1; strict_subtree (Node r xs) t\<rbrakk> \<Longrightarrow> \<exists>as e bs. dtree_to_list t = as @ (r, e) # bs \<and> Node r xs = dtree_from_list r bs

goal (1 subgoal):
 1. \<lbrakk>max_deg t \<le> 1; strict_subtree (Node r xs) t\<rbrakk> \<Longrightarrow> \<exists>as e bs. dtree_to_list t = as @ (r, e) # bs \<and> dtree_to_list (Node r xs) = bs
[PROOF STEP]
by fastforce


[STATEMENT]
lemma (in order_topology)
  assumes "a < b"
  shows at_within_Icc_at_right: "at a within {a..b} = at_right a"
    and at_within_Icc_at_left:  "at b within {a..b} = at_left b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. at a within {a..b} = at_right a &&& at b within {a..b} = at_left b
[PROOF STEP]
using order_tendstoD(2)[OF tendsto_ident_at assms, of "{a<..}"]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_right a. x < b

goal (1 subgoal):
 1. at a within {a..b} = at_right a &&& at b within {a..b} = at_left b
[PROOF STEP]
using order_tendstoD(1)[OF tendsto_ident_at assms, of "{..<b}"]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_right a. x < b
eventually ((<) a) (at_left b)

goal (1 subgoal):
 1. at a within {a..b} = at_right a &&& at b within {a..b} = at_left b
[PROOF STEP]
by (auto intro!: order_class.order_antisym filter_leI
      simp: eventually_at_filter less_le
      elim: eventually_elim2)


[STATEMENT]
lemma gbinomial_int_binomial:
  "a gchoose k = (if 0 \<le> a then int ((nat a) choose k) else (-1::int)^k * int ((k + (nat (- a)) - 1) choose k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a gchoose k = (if 0 \<le> a then int (nat a choose k) else (- 1) ^ k * int (k + nat (- a) - 1 choose k))
[PROOF STEP]
by (auto simp: int_binomial gbinomial_int_negated_upper[of a] int_ops(6))


[STATEMENT]
lemma vrat_plus_transfer[transfer_rule]:
  includes lifting_syntax
  shows "(cr_vrat ===> cr_vrat ===> cr_vrat) (+\<^sub>\<rat>) (+)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cr_vrat ===> cr_vrat ===> cr_vrat) (+\<^sub>\<rat>) (+)
[PROOF STEP]
using vrat_fpair_in_fproduct_vrat
[PROOF STATE]
proof (prove)
using this:
[?a\<^sub>\<rat>, ?b\<^sub>\<rat>]\<^sub>\<circ> \<in>\<^sub>\<circ> \<rat>\<^sub>\<circ> ^\<^sub>\<times> 2\<^sub>\<nat>

goal (1 subgoal):
 1. (cr_vrat ===> cr_vrat ===> cr_vrat) (+\<^sub>\<rat>) (+)
[PROOF STEP]
by (intro rel_funI, unfold vrat_plus_def cr_vrat_def cr_scalar_def)
    (simp add: nat_omega_simps)


[STATEMENT]
lemma id_nat_ereal_tendsto_PInf [tendsto_intros]:
  "(\<lambda> n::nat. real n) \<longlonglongrightarrow> \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ereal (real x)) \<longlonglongrightarrow> \<infinity>
[PROOF STEP]
by (simp add: filterlim_real_sequentially tendsto_PInfty_eq_at_top)


[STATEMENT]
lemma MOST_nat_le: "(\<forall>\<^sub>\<infinity>n. P n) \<longleftrightarrow> (\<exists>m. \<forall>n\<ge>m. P n)"
  for P :: "nat \<Rightarrow> bool"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>\<^sub>\<infinity>n. P n) = (\<exists>m. \<forall>n\<ge>m. P n)
[PROOF STEP]
by (auto simp add: eventually_cofinite finite_nat_iff_bounded subset_eq simp flip: not_le)


[STATEMENT]
lemma continuous_on_closed_Un:
  "closed s \<Longrightarrow> closed t \<Longrightarrow> continuous_on s f \<Longrightarrow> continuous_on t f \<Longrightarrow> continuous_on (s \<union> t) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>closed s; closed t; continuous_on s f; continuous_on t f\<rbrakk> \<Longrightarrow> continuous_on (s \<union> t) f
[PROOF STEP]
by (auto simp add: continuous_on_closed_vimage closed_Un Int_Un_distrib)


[STATEMENT]
lemma (in encoding) indRelRPO_iff_exists_source_target_relation:
  fixes Pred :: "(('procS, 'procT) Proc \<times> ('procS, 'procT) Proc) \<Rightarrow> bool"
  shows "(\<forall>(P, Q) \<in> indRelRPO. Pred (P, Q)) = (\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel)
         \<and> (\<forall>(P, Q) \<in> Rel. Pred (P, Q)) \<and> preorder Rel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)) = (\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel)
[PROOF STEP]
proof (rule iffI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
 2. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
have "\<forall>S. SourceTerm S \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R TargetTerm (\<lbrakk>S\<rbrakk>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>S. SourceTerm S \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R TargetTerm (\<lbrakk>S\<rbrakk>)
[PROOF STEP]
by (simp add: indRelRPO.encR)
[PROOF STATE]
proof (state)
this:
\<forall>S. SourceTerm S \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R TargetTerm (\<lbrakk>S\<rbrakk>)

goal (2 subgoals):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
 2. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>S. SourceTerm S \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R TargetTerm (\<lbrakk>S\<rbrakk>)

goal (2 subgoals):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
 2. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
have "preorder indRelRPO"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. preorder indRelRPO
[PROOF STEP]
using indRelRPO_is_preorder
[PROOF STATE]
proof (prove)
using this:
preorder indRelRPO

goal (1 subgoal):
 1. preorder indRelRPO
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
preorder indRelRPO

goal (2 subgoals):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
 2. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
preorder indRelRPO

goal (2 subgoals):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
 2. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
assume "\<forall>(P, Q) \<in> indRelRPO. Pred (P, Q)"
[PROOF STATE]
proof (state)
this:
\<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)

goal (2 subgoals):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
 2. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>S. SourceTerm S \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R TargetTerm (\<lbrakk>S\<rbrakk>)
preorder indRelRPO
\<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
show "\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel)
                   \<and> (\<forall>(P, Q) \<in> Rel. Pred (P, Q)) \<and> preorder Rel"
[PROOF STATE]
proof (prove)
using this:
\<forall>S. SourceTerm S \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R TargetTerm (\<lbrakk>S\<rbrakk>)
preorder indRelRPO
\<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
assume "\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel)
          \<and> (\<forall>(P, Q) \<in> Rel. Pred (P, Q)) \<and> preorder Rel"
[PROOF STATE]
proof (state)
this:
\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel
[PROOF STEP]
obtain Rel where A1: "\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel"
                         and A2: "\<forall>(P, Q) \<in> Rel. Pred (P, Q)" and A3: "preorder Rel"
[PROOF STATE]
proof (prove)
using this:
\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel

goal (1 subgoal):
 1. (\<And>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel
\<forall>(P, Q)\<in>Rel. Pred (P, Q)
preorder Rel

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (\<forall>(P, Q)\<in>Rel. Pred (P, Q)) \<and> preorder Rel \<Longrightarrow> \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
show "\<forall>(P, Q) \<in> indRelRPO. Pred (P, Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)
[PROOF STEP]
proof clarify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R b \<Longrightarrow> Pred (a, b)
[PROOF STEP]
fix P Q
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R b \<Longrightarrow> Pred (a, b)
[PROOF STEP]
assume "P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q"
[PROOF STATE]
proof (state)
this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q

goal (1 subgoal):
 1. \<And>a b. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R b \<Longrightarrow> Pred (a, b)
[PROOF STEP]
hence "(P, Q) \<in> Rel"
[PROOF STATE]
proof (prove)
using this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q

goal (1 subgoal):
 1. (P, Q) \<in> Rel
[PROOF STEP]
proof induct
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel
 2. \<And>S. (SourceTerm S, SourceTerm S) \<in> Rel
 3. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 4. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
case (encR S)
[PROOF STATE]
proof (state)
this:

goal (4 subgoals):
 1. \<And>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel
 2. \<And>S. (SourceTerm S, SourceTerm S) \<in> Rel
 3. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 4. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
from A1
[PROOF STATE]
proof (chain)
picking this:
\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel
[PROOF STEP]
show "(SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel"
[PROOF STATE]
proof (prove)
using this:
\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel

goal (1 subgoal):
 1. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel

goal (3 subgoals):
 1. \<And>S. (SourceTerm S, SourceTerm S) \<in> Rel
 2. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 3. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>S. (SourceTerm S, SourceTerm S) \<in> Rel
 2. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 3. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
case (source S)
[PROOF STATE]
proof (state)
this:

goal (3 subgoals):
 1. \<And>S. (SourceTerm S, SourceTerm S) \<in> Rel
 2. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 3. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
from A3
[PROOF STATE]
proof (chain)
picking this:
preorder Rel
[PROOF STEP]
show "(SourceTerm S, SourceTerm S) \<in> Rel"
[PROOF STATE]
proof (prove)
using this:
preorder Rel

goal (1 subgoal):
 1. (SourceTerm S, SourceTerm S) \<in> Rel
[PROOF STEP]
unfolding preorder_on_def refl_on_def
[PROOF STATE]
proof (prove)
using this:
(Rel \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> Rel)) \<and> trans Rel

goal (1 subgoal):
 1. (SourceTerm S, SourceTerm S) \<in> Rel
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(SourceTerm S, SourceTerm S) \<in> Rel

goal (2 subgoals):
 1. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 2. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 2. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
case (target T)
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>T. (TargetTerm T, TargetTerm T) \<in> Rel
 2. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
from A3
[PROOF STATE]
proof (chain)
picking this:
preorder Rel
[PROOF STEP]
show "(TargetTerm T, TargetTerm T) \<in> Rel"
[PROOF STATE]
proof (prove)
using this:
preorder Rel

goal (1 subgoal):
 1. (TargetTerm T, TargetTerm T) \<in> Rel
[PROOF STEP]
unfolding preorder_on_def refl_on_def
[PROOF STATE]
proof (prove)
using this:
(Rel \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> Rel)) \<and> trans Rel

goal (1 subgoal):
 1. (TargetTerm T, TargetTerm T) \<in> Rel
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(TargetTerm T, TargetTerm T) \<in> Rel

goal (1 subgoal):
 1. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
case (trans P Q R)
[PROOF STATE]
proof (state)
this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q
(P, Q) \<in> Rel
Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R
(Q, R) \<in> Rel

goal (1 subgoal):
 1. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
assume "(P, Q) \<in> Rel" and "(Q, R) \<in> Rel"
[PROOF STATE]
proof (state)
this:
(P, Q) \<in> Rel
(Q, R) \<in> Rel

goal (1 subgoal):
 1. \<And>P Q R. P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R Q \<and> (P, Q) \<in> Rel \<and> Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R R \<and> (Q, R) \<in> Rel \<Longrightarrow> (P, R) \<in> Rel
[PROOF STEP]
with A3
[PROOF STATE]
proof (chain)
picking this:
preorder Rel
(P, Q) \<in> Rel
(Q, R) \<in> Rel
[PROOF STEP]
show "(P, R) \<in> Rel"
[PROOF STATE]
proof (prove)
using this:
preorder Rel
(P, Q) \<in> Rel
(Q, R) \<in> Rel

goal (1 subgoal):
 1. (P, R) \<in> Rel
[PROOF STEP]
unfolding preorder_on_def trans_def
[PROOF STATE]
proof (prove)
using this:
refl Rel \<and> (\<forall>x y z. (x, y) \<in> Rel \<longrightarrow> (y, z) \<in> Rel \<longrightarrow> (x, z) \<in> Rel)
(P, Q) \<in> Rel
(Q, R) \<in> Rel

goal (1 subgoal):
 1. (P, R) \<in> Rel
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(P, R) \<in> Rel

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(P, Q) \<in> Rel

goal (1 subgoal):
 1. \<And>a b. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>R b \<Longrightarrow> Pred (a, b)
[PROOF STEP]
with A2
[PROOF STATE]
proof (chain)
picking this:
\<forall>(P, Q)\<in>Rel. Pred (P, Q)
(P, Q) \<in> Rel
[PROOF STEP]
show "Pred (P, Q)"
[PROOF STATE]
proof (prove)
using this:
\<forall>(P, Q)\<in>Rel. Pred (P, Q)
(P, Q) \<in> Rel

goal (1 subgoal):
 1. Pred (P, Q)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Pred (P, Q)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>(P, Q)\<in>indRelRPO. Pred (P, Q)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subcocycle_lim_max:
  assumes "subcocycle u" "subcocycle v" "subcocycle_avg_ereal u > -\<infinity>" "subcocycle_avg_ereal v > -\<infinity>"
  shows "subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x)) > - \<infinity>"
        "AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x)) &&& AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x))
 2. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
show *: "subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x)) > - \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x))
[PROOF STEP]
using subcocycle_avg_max(1)[OF assms(1) assms(2)] assms(3) assms(4)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>- \<infinity> < subcocycle_avg_ereal u; - \<infinity> < subcocycle_avg_ereal v\<rbrakk> \<Longrightarrow> - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x))
- \<infinity> < subcocycle_avg_ereal u
- \<infinity> < subcocycle_avg_ereal v

goal (1 subgoal):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- \<infinity> < subcocycle_avg_ereal (\<lambda>n x. max (u n x) (v n x))

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
have "AE x in M. (\<lambda>n. max (u n x) (v n x) / n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. (\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x
[PROOF STEP]
by (rule kingman_theorem_nonergodic[OF subcocycle_max[OF assms(1) assms(2)] *])
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
have "AE x in M. (\<lambda>n. u n x / n) \<longlonglongrightarrow> subcocycle_lim u x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
[PROOF STEP]
by (rule kingman_theorem_nonergodic[OF assms(1) assms(3)])
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
have "AE x in M. (\<lambda>n. v n x / n) \<longlonglongrightarrow> subcocycle_lim v x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x
[PROOF STEP]
by (rule kingman_theorem_nonergodic[OF assms(2) assms(4)])
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
assume H: "(\<lambda>n. max (u n x) (v n x) / n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x"
                    "(\<lambda>n. u n x / n) \<longlonglongrightarrow> subcocycle_lim u x"
                    "(\<lambda>n. v n x / n) \<longlonglongrightarrow> subcocycle_lim v x"
[PROOF STATE]
proof (state)
this:
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x
(\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
(\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
have "(\<lambda>n. max (u n x / n) (v n x / n)) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. max (u n x / real n) (v n x / real n)) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
apply (rule tendsto_max)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<lambda>xa. u xa x / real xa) \<longlonglongrightarrow> subcocycle_lim u x
 2. (\<lambda>xa. v xa x / real xa) \<longlonglongrightarrow> subcocycle_lim v x
[PROOF STEP]
using H
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x
(\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
(\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (2 subgoals):
 1. (\<lambda>xa. u xa x / real xa) \<longlonglongrightarrow> subcocycle_lim u x
 2. (\<lambda>xa. v xa x / real xa) \<longlonglongrightarrow> subcocycle_lim v x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. max (u n x / real n) (v n x / real n)) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. max (u n x / real n) (v n x / real n)) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
have "max (u n x / n) (v n x / n) = max (u n x) (v n x) / n" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max (u n x / real n) (v n x / real n) = max (u n x) (v n x) / real n
[PROOF STEP]
by (simp add: max_divide_distrib_right)
[PROOF STATE]
proof (state)
this:
max (u ?n3 x / real ?n3) (v ?n3 x / real ?n3) = max (u ?n3 x) (v ?n3 x) / real ?n3

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. max (u n x / real n) (v n x / real n)) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)
max (u ?n3 x / real ?n3) (v ?n3 x / real ?n3) = max (u ?n3 x) (v ?n3 x) / real ?n3
[PROOF STEP]
have "(\<lambda>n. max (u n x) (v n x) / n) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. max (u n x / real n) (v n x / real n)) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)
max (u ?n3 x / real ?n3) (v ?n3 x / real ?n3) = max (u ?n3 x) (v ?n3 x) / real ?n3

goal (1 subgoal):
 1. (\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
have "subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)

goal (1 subgoal):
 1. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
using H(1)
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> max (subcocycle_lim u x) (subcocycle_lim v x)
(\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x

goal (1 subgoal):
 1. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
by (simp add: LIMSEQ_unique)
[PROOF STATE]
proof (state)
this:
subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>(\<lambda>n. max (u n ?x5) (v n ?x5) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) ?x5; (\<lambda>n. u n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim u ?x5; (\<lambda>n. v n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim v ?x5\<rbrakk> \<Longrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) ?x5 = max (subcocycle_lim u ?x5) (subcocycle_lim v ?x5)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
AE x in M. (\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x
\<lbrakk>(\<lambda>n. max (u n ?x5) (v n ?x5) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) ?x5; (\<lambda>n. u n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim u ?x5; (\<lambda>n. v n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim v ?x5\<rbrakk> \<Longrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) ?x5 = max (subcocycle_lim u ?x5) (subcocycle_lim v ?x5)
[PROOF STEP]
show "AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x
                    = max (subcocycle_lim u x) (subcocycle_lim v x)"
[PROOF STATE]
proof (prove)
using this:
AE x in M. (\<lambda>n. max (u n x) (v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x
\<lbrakk>(\<lambda>n. max (u n ?x5) (v n ?x5) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) ?x5; (\<lambda>n. u n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim u ?x5; (\<lambda>n. v n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim v ?x5\<rbrakk> \<Longrightarrow> subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) ?x5 = max (subcocycle_lim u ?x5) (subcocycle_lim v ?x5)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. subcocycle_lim (\<lambda>n x. max (u n x) (v n x)) x = max (subcocycle_lim u x) (subcocycle_lim v x)

goal:
No subgoals!
[PROOF STEP]
qed