[STATEMENT]
lemma (in infinite_cts_filtration) F_n_nn_integral_pos:
  fixes f::"bool stream\<Rightarrow>real"
  shows "\<And>f. (\<forall>x. 0 \<le> f x) \<Longrightarrow> f \<in> borel_measurable (F n) \<Longrightarrow> integral\<^sup>N M f =
    (\<Sum> w\<in> range (pseudo_proj_True n). (emeasure M ((pseudo_proj_True n) -`{w} \<inter> space M)) *  ennreal (f w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F 0)

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "range (pseudo_proj_True 0) = {sconst True}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (pseudo_proj_True 0) = {sconst True}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. range (pseudo_proj_True 0) \<subseteq> {sconst True}
 2. {sconst True} \<subseteq> range (pseudo_proj_True 0)
[PROOF STEP]
have "\<And>w. pseudo_proj_True 0 w = sconst True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>w. pseudo_proj_True 0 w = sconst True
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>w. pseudo_proj_True 0 w = sconst True
[PROOF STEP]
fix w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>w. pseudo_proj_True 0 w = sconst True
[PROOF STEP]
show "pseudo_proj_True 0 w = sconst True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True 0 w = sconst True
[PROOF STEP]
unfolding pseudo_proj_True_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stake 0 w @- sconst True = sconst True
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pseudo_proj_True 0 w = sconst True

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
pseudo_proj_True 0 ?w1 = sconst True

goal (2 subgoals):
 1. range (pseudo_proj_True 0) \<subseteq> {sconst True}
 2. {sconst True} \<subseteq> range (pseudo_proj_True 0)
[PROOF STEP]
thus "range (pseudo_proj_True 0) \<subseteq> {sconst True}"
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True 0 ?w1 = sconst True

goal (1 subgoal):
 1. range (pseudo_proj_True 0) \<subseteq> {sconst True}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range (pseudo_proj_True 0) \<subseteq> {sconst True}

goal (1 subgoal):
 1. {sconst True} \<subseteq> range (pseudo_proj_True 0)
[PROOF STEP]
show "{sconst True} \<subseteq> range (pseudo_proj_True 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {sconst True} \<subseteq> range (pseudo_proj_True 0)
[PROOF STEP]
using \<open>range (pseudo_proj_True 0) \<subseteq> {sconst True}\<close> subset_singletonD
[PROOF STATE]
proof (prove)
using this:
range (pseudo_proj_True 0) \<subseteq> {sconst True}
?A \<subseteq> {?x} \<Longrightarrow> ?A = {} \<or> ?A = {?x}

goal (1 subgoal):
 1. {sconst True} \<subseteq> range (pseudo_proj_True 0)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
{sconst True} \<subseteq> range (pseudo_proj_True 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
range (pseudo_proj_True 0) = {sconst True}

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
hence "(emeasure M ((pseudo_proj_True 0) -`{sconst True} \<inter> space M)) = ennreal 1"
[PROOF STATE]
proof (prove)
using this:
range (pseudo_proj_True 0) = {sconst True}

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True 0 -` {sconst True} \<inter> space M) = ennreal 1
[PROOF STEP]
by (metis Int_absorb1 UNIV_I emeasure_eq_measure image_eqI prob_space subsetI vimage_eq)
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True 0 -` {sconst True} \<inter> space M) = ennreal 1

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "(\<Sum> w\<in> range (pseudo_proj_True 0). f w) = (\<Sum> w\<in> {sconst True}. f w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f (range (pseudo_proj_True 0)) = sum f {sconst True}
[PROOF STEP]
using \<open>range (pseudo_proj_True 0) = {sconst True}\<close>
    sum.cong[of "range (pseudo_proj_True n)" "{sconst True}" f f]
[PROOF STATE]
proof (prove)
using this:
range (pseudo_proj_True 0) = {sconst True}
\<lbrakk>range (pseudo_proj_True n) = {sconst True}; \<And>x. x \<in> {sconst True} \<Longrightarrow> f x = f x\<rbrakk> \<Longrightarrow> sum f (range (pseudo_proj_True n)) = sum f {sconst True}

goal (1 subgoal):
 1. sum f (range (pseudo_proj_True 0)) = sum f {sconst True}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sum f (range (pseudo_proj_True 0)) = sum f {sconst True}

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum f (range (pseudo_proj_True 0)) = sum f {sconst True}

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = f (sconst True)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f {sconst True} = f (sconst True)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sum f {sconst True} = f (sconst True)

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sum f (range (pseudo_proj_True 0)) = f (sconst True)
[PROOF STEP]
have "(\<Sum> w\<in> range (pseudo_proj_True 0). f w) = f (sconst True)"
[PROOF STATE]
proof (prove)
using this:
sum f (range (pseudo_proj_True 0)) = f (sconst True)

goal (1 subgoal):
 1. sum f (range (pseudo_proj_True 0)) = f (sconst True)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sum f (range (pseudo_proj_True 0)) = f (sconst True)

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
hence "(\<Sum> w\<in> range (pseudo_proj_True 0). (emeasure M ((pseudo_proj_True 0) -`{w} \<inter> space M)) * f w) = f (sconst True)"
[PROOF STATE]
proof (prove)
using this:
sum f (range (pseudo_proj_True 0)) = f (sconst True)

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w)) = ennreal (f (sconst True))
[PROOF STEP]
using \<open>(emeasure M ((pseudo_proj_True 0) -`{sconst True} \<inter> space M)) = ennreal 1\<close>
[PROOF STATE]
proof (prove)
using this:
sum f (range (pseudo_proj_True 0)) = f (sconst True)
emeasure M (pseudo_proj_True 0 -` {sconst True} \<inter> space M) = ennreal 1

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w)) = ennreal (f (sconst True))
[PROOF STEP]
by (simp add: \<open>range (pseudo_proj_True 0) = {sconst True}\<close>)
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w)) = ennreal (f (sconst True))

goal (2 subgoals):
 1. \<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F 0)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
 2. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
thus "integral\<^sup>N M f = (\<Sum> w\<in> range (pseudo_proj_True 0). (emeasure M ((pseudo_proj_True 0) -`{w} \<inter> space M)) * f w)"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w)) = ennreal (f (sconst True))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
using 0
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w)) = ennreal (f (sconst True))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F 0)

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
by (simp add:cst_nn_integral)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True 0). emeasure M (pseudo_proj_True 0 -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
define BP where "BP = measure_pmf (bernoulli_pmf p)"
[PROOF STATE]
proof (state)
this:
BP = measure_pmf (bernoulli_pmf p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "integral\<^sup>N M f = integral\<^sup>N (stream_space BP) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP
[PROOF STEP]
using bernoulli
[PROOF STATE]
proof (prove)
using this:
M = bernoulli_stream p

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP
[PROOF STEP]
unfolding bernoulli_stream_def BP_def
[PROOF STATE]
proof (prove)
using this:
M = stream_space (measure_pmf (bernoulli_pmf p))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space (measure_pmf (bernoulli_pmf p))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = \<integral>\<^sup>+ x. \<integral>\<^sup>+ X. f (x ## X) \<partial>stream_space BP \<partial>BP"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP = \<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP
[PROOF STEP]
proof (rule prob_space.nn_integral_stream_space)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. prob_space BP
 2. (\<lambda>X. ennreal (f X)) \<in> borel_measurable (stream_space BP)
[PROOF STEP]
show "prob_space BP"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prob_space BP
[PROOF STEP]
unfolding BP_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prob_space (measure_pmf (bernoulli_pmf p))
[PROOF STEP]
by (simp add: bernoulli bernoulli_stream_def
      prob_space.prob_space_stream_space prob_space_measure_pmf)
[PROOF STATE]
proof (state)
this:
prob_space BP

goal (1 subgoal):
 1. (\<lambda>X. ennreal (f X)) \<in> borel_measurable (stream_space BP)
[PROOF STEP]
have "f\<in> borel_measurable (stream_space BP)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable (stream_space BP)
[PROOF STEP]
using bernoulli Suc
[PROOF STATE]
proof (prove)
using this:
M = bernoulli_stream p
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. f \<in> borel_measurable (stream_space BP)
[PROOF STEP]
unfolding bernoulli_stream_def BP_def
[PROOF STATE]
proof (prove)
using this:
M = stream_space (measure_pmf (bernoulli_pmf p))
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. f \<in> borel_measurable (stream_space (measure_pmf (bernoulli_pmf p)))
[PROOF STEP]
using measurable_from_subalg nat_filtration_subalgebra natural_filtration
[PROOF STATE]
proof (prove)
using this:
M = stream_space (measure_pmf (bernoulli_pmf p))
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))
\<lbrakk>subalgebra ?M ?F; ?f \<in> ?F \<rightarrow>\<^sub>M ?N\<rbrakk> \<Longrightarrow> ?f \<in> ?M \<rightarrow>\<^sub>M ?N
subalgebra M (nat_filtration ?n)
F = nat_filtration

goal (1 subgoal):
 1. f \<in> borel_measurable (stream_space (measure_pmf (bernoulli_pmf p)))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f \<in> borel_measurable (stream_space BP)

goal (1 subgoal):
 1. (\<lambda>X. ennreal (f X)) \<in> borel_measurable (stream_space BP)
[PROOF STEP]
thus "(\<lambda>X. ennreal (f X)) \<in> borel_measurable (stream_space BP)"
[PROOF STATE]
proof (prove)
using this:
f \<in> borel_measurable (stream_space BP)

goal (1 subgoal):
 1. (\<lambda>X. ennreal (f X)) \<in> borel_measurable (stream_space BP)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>X. ennreal (f X)) \<in> borel_measurable (stream_space BP)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP = \<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>stream_space BP = \<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<lambda>x. (\<integral>\<^sup>+ X. f (x ## X) \<partial>stream_space BP)) True * ennreal p +
    (\<lambda>x. (\<integral>\<^sup>+ X. f (x ## X) \<partial>stream_space BP)) False * ennreal (1 -p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p)
[PROOF STEP]
using  p_gt_0 p_lt_1
[PROOF STATE]
proof (prove)
using this:
0 \<le> p
p \<le> 1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p)
[PROOF STEP]
unfolding BP_def
[PROOF STATE]
proof (prove)
using this:
0 \<le> p
p \<le> 1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space (measure_pmf (bernoulli_pmf p)) \<partial>measure_pmf (bernoulli_pmf p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space (measure_pmf (bernoulli_pmf p)) * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space (measure_pmf (bernoulli_pmf p)) * ennreal (1 - p)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ xa. ennreal (f (x ## xa)) \<partial>stream_space BP \<partial>BP = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<integral>\<^sup>+ X. f (True ## X) \<partial>stream_space BP) * p +
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (False ## w))) * (1-p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
define ff where "ff = (\<lambda>w. f (False ## w))"
[PROOF STATE]
proof (state)
this:
ff = (\<lambda>w. f (False ## w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
have "\<And>x. 0 \<le> ff x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. 0 \<le> ff x
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<And>x. 0 \<le> ff x
[PROOF STEP]
unfolding ff_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<And>x. 0 \<le> f (False ## x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> ff ?x1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> ff ?x1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
have "ff\<in> borel_measurable (F n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ff \<in> borel_measurable (F n)
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. ff \<in> borel_measurable (F n)
[PROOF STEP]
unfolding ff_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. (\<lambda>w. f (False ## w)) \<in> borel_measurable (F n)
[PROOF STEP]
by (simp add:suc_measurable)
[PROOF STATE]
proof (state)
this:
ff \<in> borel_measurable (F n)

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> ff ?x1
ff \<in> borel_measurable (F n)
[PROOF STEP]
have "(\<integral>\<^sup>+ x. ennreal (ff x) \<partial>M) =
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ff w))"
[PROOF STATE]
proof (prove)
using this:
0 \<le> ff ?x1
ff \<in> borel_measurable (F n)

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (ff x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ff w))
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
0 \<le> ff ?x1
ff \<in> borel_measurable (F n)
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (ff x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ff w))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (ff x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ff w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (ff x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ff w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
unfolding ff_def
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
by (simp add: BP_def bernoulli bernoulli_stream_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + \<integral>\<^sup>+ x. ennreal (f (False ## x)) \<partial>stream_space BP * ennreal (1 - p) = \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (True ## w))) * p +
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (False ## w))) * (1-p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
define ft where "ft = (\<lambda>w. f (True ## w))"
[PROOF STATE]
proof (state)
this:
ft = (\<lambda>w. f (True ## w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
have "\<And>x. 0 \<le> ft x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. 0 \<le> ft x
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<And>x. 0 \<le> ft x
[PROOF STEP]
unfolding ft_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<And>x. 0 \<le> f (True ## x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> ft ?x1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> ft ?x1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
have "ft\<in> borel_measurable (F n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ft \<in> borel_measurable (F n)
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. ft \<in> borel_measurable (F n)
[PROOF STEP]
unfolding ft_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. (\<lambda>w. f (True ## w)) \<in> borel_measurable (F n)
[PROOF STEP]
by (simp add:suc_measurable)
[PROOF STATE]
proof (state)
this:
ft \<in> borel_measurable (F n)

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> ft ?x1
ft \<in> borel_measurable (F n)
[PROOF STEP]
have "(\<integral>\<^sup>+ x. ennreal (ft x) \<partial>M) =
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ft w))"
[PROOF STATE]
proof (prove)
using this:
0 \<le> ft ?x1
ft \<in> borel_measurable (F n)

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (ft x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ft w))
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
0 \<le> ft ?x1
ft \<in> borel_measurable (F n)
\<lbrakk>\<forall>x. 0 \<le> ?f1 x; ?f1 \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (?f1 x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (?f1 w))
\<forall>x. 0 \<le> f x
f \<in> borel_measurable (F (Suc n))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (ft x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ft w))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (ft x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ft w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (ft x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (ft w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
unfolding ft_def
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
by (simp add: BP_def bernoulli bernoulli_stream_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f (True ## x)) \<partial>stream_space BP * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * p *  (f (True ## w))) +
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M)  *  (f (False ## w)))* (1-p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (True ## w))) * p =
      (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (True ## w)) * p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p)
[PROOF STEP]
by (rule sum_distrib_right)
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p)

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p)

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
have "... = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * p * (f (True ## w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))
[PROOF STEP]
proof (rule sum.cong, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (f (True ## x)) * ennreal p = emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal p * ennreal (f (True ## x))
[PROOF STEP]
fix w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (f (True ## x)) * ennreal p = emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal p * ennreal (f (True ## x))
[PROOF STEP]
assume "w\<in> range (pseudo_proj_True n)"
[PROOF STATE]
proof (state)
this:
w \<in> range (pseudo_proj_True n)

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (f (True ## x)) * ennreal p = emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal p * ennreal (f (True ## x))
[PROOF STEP]
show "emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p =
         emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))
[PROOF STEP]
have "ennreal (f (True ## w)) * ennreal p = ennreal p * ennreal (f (True ## w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (f (True ## w)) * ennreal p = ennreal p * ennreal (f (True ## w))
[PROOF STEP]
by (simp add:mult.commute)
[PROOF STATE]
proof (state)
this:
ennreal (f (True ## w)) * ennreal p = ennreal p * ennreal (f (True ## w))

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))
[PROOF STEP]
hence "\<And>x. x * ennreal (f (True ## w)) * ennreal p = x * ennreal p * ennreal (f (True ## w))"
[PROOF STATE]
proof (prove)
using this:
ennreal (f (True ## w)) * ennreal p = ennreal p * ennreal (f (True ## w))

goal (1 subgoal):
 1. \<And>x. x * ennreal (f (True ## w)) * ennreal p = x * ennreal p * ennreal (f (True ## w))
[PROOF STEP]
by (simp add: semiring_normalization_rules(16))
[PROOF STATE]
proof (state)
this:
?x1 * ennreal (f (True ## w)) * ennreal p = ?x1 * ennreal p * ennreal (f (True ## w))

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
?x1 * ennreal (f (True ## w)) * ennreal p = ?x1 * ennreal p * ennreal (f (True ## w))

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w)) * ennreal p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (True ## w))) * p =
      (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * p * (f (True ## w)))"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (True ## w))) * ennreal p + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p)

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * p *  (f (True ## w))) +
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * (1-p) *  (f (False ## w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (False ## w))) * (1-p) =
      (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (False ## w)) * (1-p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p))
[PROOF STEP]
by (rule sum_distrib_right)
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
have "... = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * (1-p) * (f (False ## w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
proof (rule sum.cong, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (f (False ## x)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## x))
[PROOF STEP]
fix w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (f (False ## x)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## x))
[PROOF STEP]
assume "w\<in> range (pseudo_proj_True n)"
[PROOF STATE]
proof (state)
this:
w \<in> range (pseudo_proj_True n)

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (f (False ## x)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {x} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## x))
[PROOF STEP]
show "emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1-p) =
         emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1-p) * ennreal (f (False ## w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
have "ennreal (f (False ## w)) * ennreal (1-p) = ennreal (1-p) * ennreal (f (False ## w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (f (False ## w)) * ennreal (1 - p) = ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
by (simp add:mult.commute)
[PROOF STATE]
proof (state)
this:
ennreal (f (False ## w)) * ennreal (1 - p) = ennreal (1 - p) * ennreal (f (False ## w))

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
hence "\<And>x. x * ennreal (f (False ## w)) * ennreal (1-p) = x * ennreal (1-p) * ennreal (f (False ## w))"
[PROOF STATE]
proof (prove)
using this:
ennreal (f (False ## w)) * ennreal (1 - p) = ennreal (1 - p) * ennreal (f (False ## w))

goal (1 subgoal):
 1. \<And>x. x * ennreal (f (False ## w)) * ennreal (1 - p) = x * ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
by (simp add: semiring_normalization_rules(16))
[PROOF STATE]
proof (state)
this:
?x1 * ennreal (f (False ## w)) * ennreal (1 - p) = ?x1 * ennreal (1 - p) * ennreal (f (False ## w))

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
?x1 * ennreal (f (False ## w)) * ennreal (1 - p) = ?x1 * ennreal (1 - p) * ennreal (f (False ## w))

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p) = emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w)) * ennreal (1 - p)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) *  (f (False ## w))) * (1-p) =
      (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * (1-p) * (f (False ## w)))"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f (False ## w))) * ennreal (1 - p) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p *  (f (y))) +
    (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * (1-p) *  (f (False ## w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * p *  (f (True ## w))) =
      (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (True##w)} \<inter> space M) * p *  (f (True ## w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (True ## w)} \<inter> space M) * ennreal p * ennreal (f (True ## w)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (True ## w)} \<inter> space M) * ennreal p * ennreal (f (True ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (True ## w)} \<inter> space M) * ennreal p * ennreal (f (True ## w)))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
have "... =
      (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p *  (f (y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (True ## w)} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))
[PROOF STEP]
by (rule reindex_pseudo_proj)
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (True ## w)} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * p *  (f (True ## w))) =
      (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p *  (f (y)))"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal p * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p *  (f (y))) +
    (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) *  (f (y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * (1-p) *  (f (False ## w))) =
      (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (False##w)} \<inter> space M) * (1-p) *  (f (False ## w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (False ## w)} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (False ## w)} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (False ## w)} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w)))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
have "... =
      (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) *  (f (y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (False ## w)} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
by (rule reindex_pseudo_proj)
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {stl (False ## w)} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
have "(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * (1-p) *  (f (False ## w))) =
      (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) *  (f (y)))"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (1 - p) * ennreal (f (False ## w))) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) *  (f (y))) +
    (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) *  (f (y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
have "\<forall>y \<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p =
      prob_component p y 0 * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y\<in>{y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
assume "y \<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}"
[PROOF STATE]
proof (state)
this:
y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
hence "\<exists>w \<in> range (pseudo_proj_True n). y = True ## w"
[PROOF STATE]
proof (prove)
using this:
y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}

goal (1 subgoal):
 1. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>w\<in>range (pseudo_proj_True n). y = True ## w

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>w\<in>range (pseudo_proj_True n). y = True ## w
[PROOF STEP]
obtain w where "w\<in> range (pseudo_proj_True n)" and "y = True ## w"
[PROOF STATE]
proof (prove)
using this:
\<exists>w\<in>range (pseudo_proj_True n). y = True ## w

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<in> range (pseudo_proj_True n); y = True ## w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> range (pseudo_proj_True n)
y = True ## w

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
have "emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p = p *emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
by (simp add:mult.commute)
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
have "... = prob_component p y 0 * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
using \<open>y = True ## w\<close>
[PROOF STATE]
proof (prove)
using this:
y = True ## w

goal (1 subgoal):
 1. ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
unfolding prob_component_def
[PROOF STATE]
proof (prove)
using this:
y = True ## w

goal (1 subgoal):
 1. ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (if y !! 0 then p else 1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ennreal p * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
show "emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * p =
        prob_component p y 0 * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
using this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>y\<in>{y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>y\<in>{y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal p * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) *  (f (y))) +
    (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) *  (f (y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
have "\<forall>y \<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) =
      prob_component p y 0 * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y\<in>{y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
assume "y \<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}"
[PROOF STATE]
proof (state)
this:
y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
hence "\<exists>w \<in> range (pseudo_proj_True n). y = False ## w"
[PROOF STATE]
proof (prove)
using this:
y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}

goal (1 subgoal):
 1. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>w\<in>range (pseudo_proj_True n). y = False ## w

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>w\<in>range (pseudo_proj_True n). y = False ## w
[PROOF STEP]
obtain w where "w\<in> range (pseudo_proj_True n)" and "y = False ## w"
[PROOF STATE]
proof (prove)
using this:
\<exists>w\<in>range (pseudo_proj_True n). y = False ## w

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<in> range (pseudo_proj_True n); y = False ## w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> range (pseudo_proj_True n)
y = False ## w

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
have "emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) = (1-p) *emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
by (simp add:mult.commute)
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
have "... = prob_component p y 0 * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
using \<open>y = False ## w\<close>
[PROOF STATE]
proof (prove)
using this:
y = False ## w

goal (1 subgoal):
 1. ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
unfolding prob_component_def
[PROOF STATE]
proof (prove)
using this:
y = False ## w

goal (1 subgoal):
 1. ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (if y !! 0 then p else 1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ennreal (1 - p) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. \<And>y. y \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
show "emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (1-p) =
        prob_component p y 0 * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)"
[PROOF STATE]
proof (prove)
using this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>y\<in>{y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>y\<in>{y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) = ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M)

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (1 - p) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} *  (f y)) +
    (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) *  (f (y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
have "(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w.
       ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (f y)) =
      (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * (f y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y))
[PROOF STEP]
proof (rule sum.cong, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = True ## x} * ennreal (f x)
[PROOF STEP]
fix xx
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = True ## x} * ennreal (f x)
[PROOF STEP]
assume "xx \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}"
[PROOF STATE]
proof (state)
this:
xx \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = True ## x} * ennreal (f x)
[PROOF STEP]
hence "\<exists>w\<in>range (pseudo_proj_True n). xx = True ## w"
[PROOF STATE]
proof (prove)
using this:
xx \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w}

goal (1 subgoal):
 1. \<exists>w\<in>range (pseudo_proj_True n). xx = True ## w
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>w\<in>range (pseudo_proj_True n). xx = True ## w

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = True ## x} * ennreal (f x)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>w\<in>range (pseudo_proj_True n). xx = True ## w
[PROOF STEP]
obtain ww where "ww\<in>range (pseudo_proj_True n)" and "xx = True## ww"
[PROOF STATE]
proof (prove)
using this:
\<exists>w\<in>range (pseudo_proj_True n). xx = True ## w

goal (1 subgoal):
 1. (\<And>ww. \<lbrakk>ww \<in> range (pseudo_proj_True n); xx = True ## ww\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ww \<in> range (pseudo_proj_True n)
xx = True ## ww

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = True ## x} * ennreal (f x)
[PROOF STEP]
have "ennreal (prob_component p (True##ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) =
         emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = True ## x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (prob_component p (True ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = True ## x}
[PROOF STEP]
using \<open>ww\<in>range (pseudo_proj_True n)\<close>
[PROOF STATE]
proof (prove)
using this:
ww \<in> range (pseudo_proj_True n)

goal (1 subgoal):
 1. ennreal (prob_component p (True ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = True ## x}
[PROOF STEP]
by (rule pseudo_proj_element_prob_pref[symmetric])
[PROOF STATE]
proof (state)
this:
ennreal (prob_component p (True ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = True ## x}

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = True ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = True ## x} * ennreal (f x)
[PROOF STEP]
thus "ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * (f xx) =
         emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = True ## x} * (f xx)"
[PROOF STATE]
proof (prove)
using this:
ennreal (prob_component p (True ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = True ## x}

goal (1 subgoal):
 1. ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * ennreal (f xx) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = True ## x} * ennreal (f xx)
[PROOF STEP]
using \<open>xx = True##ww\<close>
[PROOF STATE]
proof (prove)
using this:
ennreal (prob_component p (True ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = True ## x}
xx = True ## ww

goal (1 subgoal):
 1. ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * ennreal (f xx) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = True ## x} * ennreal (f xx)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * ennreal (f xx) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = True ## x} * ennreal (f xx)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = True ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} *  (f y)) +
    (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} *  (f y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))
[PROOF STEP]
have "(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w.
       ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * (f y)) =
      (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = False ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * (f y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))
[PROOF STEP]
proof (rule sum.cong, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = False ## x} * ennreal (f x)
[PROOF STEP]
fix xx
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = False ## x} * ennreal (f x)
[PROOF STEP]
assume "xx \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}"
[PROOF STATE]
proof (state)
this:
xx \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = False ## x} * ennreal (f x)
[PROOF STEP]
hence "\<exists>w\<in>range (pseudo_proj_True n). xx = False ## w"
[PROOF STATE]
proof (prove)
using this:
xx \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w}

goal (1 subgoal):
 1. \<exists>w\<in>range (pseudo_proj_True n). xx = False ## w
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>w\<in>range (pseudo_proj_True n). xx = False ## w

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = False ## x} * ennreal (f x)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>w\<in>range (pseudo_proj_True n). xx = False ## w
[PROOF STEP]
obtain ww where "ww\<in>range (pseudo_proj_True n)" and "xx = False## ww"
[PROOF STATE]
proof (prove)
using this:
\<exists>w\<in>range (pseudo_proj_True n). xx = False ## w

goal (1 subgoal):
 1. (\<And>ww. \<lbrakk>ww \<in> range (pseudo_proj_True n); xx = False ## ww\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ww \<in> range (pseudo_proj_True n)
xx = False ## ww

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = False ## x} * ennreal (f x)
[PROOF STEP]
have "ennreal (prob_component p (False##ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) =
         emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = False ## x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (prob_component p (False ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = False ## x}
[PROOF STEP]
using \<open>ww\<in>range (pseudo_proj_True n)\<close>
[PROOF STATE]
proof (prove)
using this:
ww \<in> range (pseudo_proj_True n)

goal (1 subgoal):
 1. ennreal (prob_component p (False ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = False ## x}
[PROOF STEP]
by (rule pseudo_proj_element_prob_pref[symmetric])
[PROOF STATE]
proof (state)
this:
ennreal (prob_component p (False ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = False ## x}

goal (1 subgoal):
 1. \<And>x. x \<in> {y. \<exists>w\<in>range (pseudo_proj_True n). y = False ## w} \<Longrightarrow> ennreal (prob_component p x 0) * emeasure M (pseudo_proj_True n -` {stl x} \<inter> space M) * ennreal (f x) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = False ## x} * ennreal (f x)
[PROOF STEP]
thus "ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * (f xx) =
         emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = False ## x} * (f xx)"
[PROOF STATE]
proof (prove)
using this:
ennreal (prob_component p (False ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = False ## x}

goal (1 subgoal):
 1. ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * ennreal (f xx) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = False ## x} * ennreal (f xx)
[PROOF STEP]
using \<open>xx = False##ww\<close>
[PROOF STATE]
proof (prove)
using this:
ennreal (prob_component p (False ## ww) 0) * emeasure M (pseudo_proj_True n -` {ww} \<inter> space M) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {ww}. z = False ## x}
xx = False ## ww

goal (1 subgoal):
 1. ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * ennreal (f xx) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = False ## x} * ennreal (f xx)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ennreal (prob_component p xx 0) * emeasure M (pseudo_proj_True n -` {stl xx} \<inter> space M) * ennreal (f xx) = emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl xx}. z = False ## x} * ennreal (f xx)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. ennreal (prob_component p y 0) * emeasure M (pseudo_proj_True n -` {stl y} \<inter> space M) * ennreal (f y)) = (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} *  (f (True##w))) +
    (\<Sum>w \<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} *  (f (False##w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))
[PROOF STEP]
have "\<And>c. (\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = c ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} *  (f y)) =
      (\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} *  (f (c##w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>c. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
fix c
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
have "(\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = c ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} *  (f y)) =
      (\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl (c##w)}. z = c ## x} *  (f (c##w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl (c ## w)}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
by (rule reindex_pseudo_proj[symmetric])
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl (c ## w)}. z = c ## x} * ennreal (f (c ## w)))

goal (1 subgoal):
 1. \<And>c. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl (c ## w)}. z = c ## x} * ennreal (f (c ## w)))

goal (1 subgoal):
 1. \<And>c. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
have "... = (\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} *  (f (c##w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl (c ## w)}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl (c ## w)}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))

goal (1 subgoal):
 1. \<And>c. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
show "(\<Sum>y\<in>{y. \<exists>w \<in> range (pseudo_proj_True n). y = c ## w}. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} *  (f y)) =
        (\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} *  (f (c##w)))"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = c ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = c ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = ?c1 ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = ?c1 ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = ?c1 ## x} * ennreal (f (?c1 ## w)))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = ?c1 ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = ?c1 ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = ?c1 ## x} * ennreal (f (?c1 ## w)))

goal (1 subgoal):
 1. (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = True ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = True ## x} * ennreal (f y)) + (\<Sum>y | \<exists>w\<in>range (pseudo_proj_True n). y = False ## w. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl y}. z = False ## x} * ennreal (f y)) = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w)))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in> {w. w\<in> range (pseudo_proj_True (Suc n)) \<and> w!!0 = True}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> (space M)) *  (f w)) +
    (\<Sum>w\<in> {w. w\<in> range (pseudo_proj_True (Suc n)) \<and> w!!0 = False}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> (space M)) *  (f w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "\<And>c. (\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} *  (f (c##w))) =
      (\<Sum>w\<in> {w. w\<in> range (pseudo_proj_True (Suc n)) \<and> w!!0 = c}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> (space M)) *  (f w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>c. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = c. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = c. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
fix c
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = c. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
show "(\<Sum>w\<in> range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} *  (f (c##w))) =
        (\<Sum>w\<in> {w. w\<in> range (pseudo_proj_True (Suc n)) \<and> w!!0 = c}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> (space M)) *  (f w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = c. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
proof (rule sum.reindex_cong)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. inj_on ?l {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
 2. range (pseudo_proj_True n) = ?l ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
 3. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {?l x}. z = c ## x} * ennreal (f (c ## ?l x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
show "inj_on stl {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on stl {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; stl x = stl y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; stl x = stl y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
assume "x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
            and "y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
            and "stl x = stl y"
[PROOF STATE]
proof (state)
this:
x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
stl x = stl y

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; stl x = stl y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "x!!0 = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x !! 0 = c
[PROOF STEP]
using \<open>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. x !! 0 = c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x !! 0 = c

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; stl x = stl y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x !! 0 = c

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; stl x = stl y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "y!!0 = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y !! 0 = c
[PROOF STEP]
using \<open>y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}\<close>
[PROOF STATE]
proof (prove)
using this:
y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. y !! 0 = c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y !! 0 = c

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; y \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; stl x = stl y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x !! 0 = c
y !! 0 = c
[PROOF STEP]
show "x = y"
[PROOF STATE]
proof (prove)
using this:
x !! 0 = c
y !! 0 = c

goal (1 subgoal):
 1. x = y
[PROOF STEP]
using \<open>stl x=  stl y\<close>
[PROOF STATE]
proof (prove)
using this:
x !! 0 = c
y !! 0 = c
stl x = stl y

goal (1 subgoal):
 1. x = y
[PROOF STEP]
by (smt snth.simps(1) stream_eq_Stream_iff)
[PROOF STATE]
proof (state)
this:
x = y

goal:
No subgoals!
[PROOF STEP]
(*by (metis (full_types, opaque_lifting)  pmf_bernoulli_True snth.simps(1) stream_eq_Stream_iff) *)
[PROOF STATE]
proof (state)
this:
x = y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on stl {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (2 subgoals):
 1. range (pseudo_proj_True n) = stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
 2. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
show "range (pseudo_proj_True n) = stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (pseudo_proj_True n) = stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. range (pseudo_proj_True n) \<subseteq> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
 2. stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<subseteq> range (pseudo_proj_True n)
[PROOF STEP]
show "range (pseudo_proj_True n) \<subseteq> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (pseudo_proj_True n) \<subseteq> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
assume "x\<in> range (pseudo_proj_True n)"
[PROOF STATE]
proof (state)
this:
x \<in> range (pseudo_proj_True n)

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
hence "pseudo_proj_True n x = x"
[PROOF STATE]
proof (prove)
using this:
x \<in> range (pseudo_proj_True n)

goal (1 subgoal):
 1. pseudo_proj_True n x = x
[PROOF STEP]
using pseudo_proj_True_proj
[PROOF STATE]
proof (prove)
using this:
x \<in> range (pseudo_proj_True n)
pseudo_proj_True ?n (pseudo_proj_True ?n ?w) = pseudo_proj_True ?n ?w

goal (1 subgoal):
 1. pseudo_proj_True n x = x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n x = x

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
have "pseudo_proj_True (Suc n) (c##x) = c##x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
have "pseudo_proj_True (Suc n) (c##x) = c ## pseudo_proj_True n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## pseudo_proj_True n x
[PROOF STEP]
using pseudo_proj_True_Suc_prefix[of n "c##x"]
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc n) (c ## x) = (c ## x) !! 0 ## pseudo_proj_True n (stl (c ## x))

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## pseudo_proj_True n x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) (c ## x) = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) (c ## x) = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
have "... = c## x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ## pseudo_proj_True n x = c ## x
[PROOF STEP]
using \<open>pseudo_proj_True n x = x\<close>
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True n x = x

goal (1 subgoal):
 1. c ## pseudo_proj_True n x = c ## x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c ## pseudo_proj_True n x = c ## x

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc n) (c ## x) = c ## x

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) (c ## x) = c ## x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) (c ## x) = c ## x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) (c ## x) = c ## x

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
hence "c##x\<in> range (pseudo_proj_True (Suc n))"
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc n) (c ## x) = c ## x

goal (1 subgoal):
 1. c ## x \<in> range (pseudo_proj_True (Suc n))
[PROOF STEP]
by (simp add: pseudo_proj_True_img)
[PROOF STATE]
proof (state)
this:
c ## x \<in> range (pseudo_proj_True (Suc n))

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True n) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
thus "x\<in> stl`{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
[PROOF STATE]
proof (prove)
using this:
c ## x \<in> range (pseudo_proj_True (Suc n))

goal (1 subgoal):
 1. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c ## x \<in> range (pseudo_proj_True (Suc n)) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
have "\<exists>s. (s \<in> range (pseudo_proj_True (Suc n)) \<and> s !! 0 = c) \<and> stl s = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>s. (s \<in> range (pseudo_proj_True (Suc n)) \<and> s !! 0 = c) \<and> stl s = x
[PROOF STEP]
by (metis (no_types) \<open>c ## x \<in> range (pseudo_proj_True (Suc n))\<close> snth.simps(1) stream.sel(1) stream.sel(2))
[PROOF STATE]
proof (state)
this:
\<exists>s. (s \<in> range (pseudo_proj_True (Suc n)) \<and> s !! 0 = c) \<and> stl s = x

goal (1 subgoal):
 1. c ## x \<in> range (pseudo_proj_True (Suc n)) \<Longrightarrow> x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>s. (s \<in> range (pseudo_proj_True (Suc n)) \<and> s !! 0 = c) \<and> stl s = x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>s. (s \<in> range (pseudo_proj_True (Suc n)) \<and> s !! 0 = c) \<and> stl s = x

goal (1 subgoal):
 1. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
range (pseudo_proj_True n) \<subseteq> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<subseteq> range (pseudo_proj_True n)
[PROOF STEP]
show "stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<subseteq> range (pseudo_proj_True n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<subseteq> range (pseudo_proj_True n)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
assume "x\<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
[PROOF STATE]
proof (state)
this:
x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
hence "\<exists> w\<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}. x = stl w"
[PROOF STATE]
proof (prove)
using this:
x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. \<exists>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}. x = stl w
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}. x = stl w

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}. x = stl w
[PROOF STEP]
obtain w where "w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}" and "x = stl w"
[PROOF STATE]
proof (prove)
using this:
\<exists>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}. x = stl w

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}; x = stl w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}
x = stl w

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
have "w\<in> range (pseudo_proj_True (Suc n))" and "w!!0 = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w \<in> range (pseudo_proj_True (Suc n)) &&& w !! 0 = c
[PROOF STEP]
using \<open>w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}\<close>
[PROOF STATE]
proof (prove)
using this:
w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. w \<in> range (pseudo_proj_True (Suc n)) &&& w !! 0 = c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> range (pseudo_proj_True (Suc n))
w !! 0 = c

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
have "c##x = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ## x = w
[PROOF STEP]
using \<open>x = stl w\<close> \<open>w!!0 = c\<close>
[PROOF STATE]
proof (prove)
using this:
x = stl w
w !! 0 = c

goal (1 subgoal):
 1. c ## x = w
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
c ## x = w

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
c ## x = w

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
have "... = pseudo_proj_True (Suc n) w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w = pseudo_proj_True (Suc n) w
[PROOF STEP]
using \<open>w\<in> range (pseudo_proj_True (Suc n))\<close>
[PROOF STATE]
proof (prove)
using this:
w \<in> range (pseudo_proj_True (Suc n))

goal (1 subgoal):
 1. w = pseudo_proj_True (Suc n) w
[PROOF STEP]
using pseudo_proj_True_proj
[PROOF STATE]
proof (prove)
using this:
w \<in> range (pseudo_proj_True (Suc n))
pseudo_proj_True ?n (pseudo_proj_True ?n ?w) = pseudo_proj_True ?n ?w

goal (1 subgoal):
 1. w = pseudo_proj_True (Suc n) w
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w = pseudo_proj_True (Suc n) w

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
w = pseudo_proj_True (Suc n) w

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
have "... = c ## pseudo_proj_True n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True (Suc n) w = c ## pseudo_proj_True n x
[PROOF STEP]
using \<open>x = stl w\<close> \<open>w!!0 = c\<close>
[PROOF STATE]
proof (prove)
using this:
x = stl w
w !! 0 = c

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) w = c ## pseudo_proj_True n x
[PROOF STEP]
by (simp add:pseudo_proj_True_Suc_prefix)
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) w = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
c ## x = c ## pseudo_proj_True n x
[PROOF STEP]
have "c##x = c## pseudo_proj_True n x"
[PROOF STATE]
proof (prove)
using this:
c ## x = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. c ## x = c ## pseudo_proj_True n x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
c ## x = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
hence "x = pseudo_proj_True n x"
[PROOF STATE]
proof (prove)
using this:
c ## x = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. x = pseudo_proj_True n x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x = pseudo_proj_True n x

goal (1 subgoal):
 1. \<And>x. x \<in> stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> x \<in> range (pseudo_proj_True n)
[PROOF STEP]
thus "x\<in> range (pseudo_proj_True n)"
[PROOF STATE]
proof (prove)
using this:
x = pseudo_proj_True n x

goal (1 subgoal):
 1. x \<in> range (pseudo_proj_True n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> range (pseudo_proj_True n)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<subseteq> range (pseudo_proj_True n)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
range (pseudo_proj_True n) = stl ` {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
show "\<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow>
         emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) =
         emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
fix w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
assume "w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}"
[PROOF STATE]
proof (state)
this:
w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
hence "w \<in> range (pseudo_proj_True (Suc n))" and "w !! 0 = c"
[PROOF STATE]
proof (prove)
using this:
w \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c}

goal (1 subgoal):
 1. w \<in> range (pseudo_proj_True (Suc n)) &&& w !! 0 = c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> range (pseudo_proj_True (Suc n))
w !! 0 = c

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
have "{z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} = (pseudo_proj_True (Suc n) -` {w} \<inter> space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} = pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<subseteq> pseudo_proj_True (Suc n) -` {w} \<inter> space M
 2. pseudo_proj_True (Suc n) -` {w} \<inter> space M \<subseteq> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
show "{z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<subseteq> pseudo_proj_True (Suc n) -` {w} \<inter> space M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<subseteq> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
assume "z \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}"
[PROOF STATE]
proof (state)
this:
z \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
hence "\<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x" and "z\<in> space M"
[PROOF STATE]
proof (prove)
using this:
z \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}

goal (1 subgoal):
 1. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x &&& z \<in> space M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x
z \<in> space M

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
from \<open>\<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x\<close>
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x
[PROOF STEP]
obtain x where "x\<in>pseudo_proj_True n -` {stl w}"
                and "z = c##x"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> pseudo_proj_True n -` {stl w}; z = c ## x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> pseudo_proj_True n -` {stl w}
z = c ## x

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
have "pseudo_proj_True (Suc n) z = c ## pseudo_proj_True n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True (Suc n) z = c ## pseudo_proj_True n x
[PROOF STEP]
using \<open>z = c##x\<close>
[PROOF STATE]
proof (prove)
using this:
z = c ## x

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) z = c ## pseudo_proj_True n x
[PROOF STEP]
by (simp add:pseudo_proj_True_Suc_prefix)
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) z = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) z = c ## pseudo_proj_True n x

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
have "... = c## stl w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ## pseudo_proj_True n x = c ## stl w
[PROOF STEP]
using \<open>x\<in>pseudo_proj_True n -` {stl w}\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> pseudo_proj_True n -` {stl w}

goal (1 subgoal):
 1. c ## pseudo_proj_True n x = c ## stl w
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c ## pseudo_proj_True n x = c ## stl w

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
c ## pseudo_proj_True n x = c ## stl w

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
have "... = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ## stl w = w
[PROOF STEP]
using \<open>w !! 0 = c\<close>
[PROOF STATE]
proof (prove)
using this:
w !! 0 = c

goal (1 subgoal):
 1. c ## stl w = w
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
c ## stl w = w

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
pseudo_proj_True (Suc n) z = w
[PROOF STEP]
have "pseudo_proj_True (Suc n) z = w"
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc n) z = w

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) z = w
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) z = w

goal (1 subgoal):
 1. \<And>x. x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<Longrightarrow> x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
thus "z\<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M"
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc n) z = w

goal (1 subgoal):
 1. z \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
using \<open>z\<in> space M\<close>
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc n) z = w
z \<in> space M

goal (1 subgoal):
 1. z \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} \<subseteq> pseudo_proj_True (Suc n) -` {w} \<inter> space M

goal (1 subgoal):
 1. pseudo_proj_True (Suc n) -` {w} \<inter> space M \<subseteq> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
show "pseudo_proj_True (Suc n) -` {w} \<inter> space M \<subseteq> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True (Suc n) -` {w} \<inter> space M \<subseteq> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
assume "z\<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M"
[PROOF STATE]
proof (state)
this:
z \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
hence "z\<in> space M" and "pseudo_proj_True (Suc n) z = w"
[PROOF STATE]
proof (prove)
using this:
z \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M

goal (1 subgoal):
 1. z \<in> space M &&& pseudo_proj_True (Suc n) z = w
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> space M
pseudo_proj_True (Suc n) z = w

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
hence "stl w = stl (pseudo_proj_True (Suc n) z)"
[PROOF STATE]
proof (prove)
using this:
z \<in> space M
pseudo_proj_True (Suc n) z = w

goal (1 subgoal):
 1. stl w = stl (pseudo_proj_True (Suc n) z)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
stl w = stl (pseudo_proj_True (Suc n) z)

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
stl w = stl (pseudo_proj_True (Suc n) z)

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
have "... = pseudo_proj_True n (stl z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stl (pseudo_proj_True (Suc n) z) = pseudo_proj_True n (stl z)
[PROOF STEP]
by (simp add: pseudo_proj_True_Suc_prefix)
[PROOF STATE]
proof (state)
this:
stl (pseudo_proj_True (Suc n) z) = pseudo_proj_True n (stl z)

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
stl w = pseudo_proj_True n (stl z)
[PROOF STEP]
have "stl w = pseudo_proj_True n (stl z)"
[PROOF STATE]
proof (prove)
using this:
stl w = pseudo_proj_True n (stl z)

goal (1 subgoal):
 1. stl w = pseudo_proj_True n (stl z)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
stl w = pseudo_proj_True n (stl z)

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
hence "stl z \<in> pseudo_proj_True n -` {stl w}"
[PROOF STATE]
proof (prove)
using this:
stl w = pseudo_proj_True n (stl z)

goal (1 subgoal):
 1. stl z \<in> pseudo_proj_True n -` {stl w}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
stl z \<in> pseudo_proj_True n -` {stl w}

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
have "z!!0 ## pseudo_proj_True n (stl z) = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z !! 0 ## pseudo_proj_True n (stl z) = w
[PROOF STEP]
using pseudo_proj_True_Suc_prefix
                \<open>pseudo_proj_True (Suc n) z = w\<close>
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True (Suc ?n) ?w = ?w !! 0 ## pseudo_proj_True ?n (stl ?w)
pseudo_proj_True (Suc n) z = w

goal (1 subgoal):
 1. z !! 0 ## pseudo_proj_True n (stl z) = w
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z !! 0 ## pseudo_proj_True n (stl z) = w

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
z !! 0 ## pseudo_proj_True n (stl z) = w

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
have "... = c## (stl w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w = c ## stl w
[PROOF STEP]
using \<open>w!!0 = c\<close>
[PROOF STATE]
proof (prove)
using this:
w !! 0 = c

goal (1 subgoal):
 1. w = c ## stl w
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
w = c ## stl w

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
z !! 0 ## pseudo_proj_True n (stl z) = c ## stl w
[PROOF STEP]
have "z!!0 ## pseudo_proj_True n (stl z) = c## (stl w)"
[PROOF STATE]
proof (prove)
using this:
z !! 0 ## pseudo_proj_True n (stl z) = c ## stl w

goal (1 subgoal):
 1. z !! 0 ## pseudo_proj_True n (stl z) = c ## stl w
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
z !! 0 ## pseudo_proj_True n (stl z) = c ## stl w

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
hence "z!!0 = c"
[PROOF STATE]
proof (prove)
using this:
z !! 0 ## pseudo_proj_True n (stl z) = c ## stl w

goal (1 subgoal):
 1. z !! 0 = c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z !! 0 = c

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
hence "z =c## (stl z)"
[PROOF STATE]
proof (prove)
using this:
z !! 0 = c

goal (1 subgoal):
 1. z = c ## stl z
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
z = c ## stl z

goal (1 subgoal):
 1. \<And>x. x \<in> pseudo_proj_True (Suc n) -` {w} \<inter> space M \<Longrightarrow> x \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
thus "z\<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}"
[PROOF STATE]
proof (prove)
using this:
z = c ## stl z

goal (1 subgoal):
 1. z \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
using \<open>z\<in> space M\<close>
                \<open>stl z \<in> pseudo_proj_True n -` {stl w}\<close>
[PROOF STATE]
proof (prove)
using this:
z = c ## stl z
z \<in> space M
stl z \<in> pseudo_proj_True n -` {stl w}

goal (1 subgoal):
 1. z \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
pseudo_proj_True (Suc n) -` {w} \<inter> space M \<subseteq> {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} = pseudo_proj_True (Suc n) -` {w} \<inter> space M

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
hence "emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) =
            emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w))"
[PROOF STATE]
proof (prove)
using this:
{z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} = pseudo_proj_True (Suc n) -` {w} \<inter> space M

goal (1 subgoal):
 1. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w))

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w))

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
have "... = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)
[PROOF STEP]
using \<open>w!!0 = c\<close>
[PROOF STATE]
proof (prove)
using this:
w !! 0 = c

goal (1 subgoal):
 1. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)

goal (1 subgoal):
 1. \<And>x. x \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl x}. z = c ## x} * ennreal (f (c ## stl x)) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)
[PROOF STEP]
show "emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) =
            emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)"
[PROOF STATE]
proof (prove)
using this:
emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)

goal (1 subgoal):
 1. emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl w}. z = c ## x} * ennreal (f (c ## stl w)) = emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x1 \<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = c} \<Longrightarrow> emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {stl ?x1}. z = c ## x} * ennreal (f (c ## stl ?x1)) = emeasure M (pseudo_proj_True (Suc n) -` {?x1} \<inter> space M) * ennreal (f ?x1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = c ## x} * ennreal (f (c ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = c. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = ?c1 ## x} * ennreal (f (?c1 ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = ?c1. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = ?c1 ## x} * ennreal (f (?c1 ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = ?c1. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = True ## x} * ennreal (f (True ## w))) + (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M {z \<in> space M. \<exists>x\<in>pseudo_proj_True n -` {w}. z = False ## x} * ennreal (f (False ## w))) = (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union>
    {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}.
    emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) = (\<Sum>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
proof (rule sum.union_disjoint[symmetric])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True}
 2. finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
 3. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<inter> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = {}
[PROOF STEP]
show "finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True}
[PROOF STEP]
by (simp add: pseudo_proj_True_finite_image)
[PROOF STATE]
proof (state)
this:
finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True}

goal (2 subgoals):
 1. finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
 2. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<inter> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = {}
[PROOF STEP]
show "finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
[PROOF STEP]
by (simp add: pseudo_proj_True_finite_image)
[PROOF STATE]
proof (state)
this:
finite {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}

goal (1 subgoal):
 1. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<inter> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = {}
[PROOF STEP]
show "{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<inter> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<inter> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<inter> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) = (\<Sum>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = True. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) + (\<Sum>w | w \<in> range (pseudo_proj_True (Suc n)) \<and> w !! 0 = False. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) = (\<Sum>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
have "... = (\<Sum>w\<in> range (pseudo_proj_True (Suc n)).emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
proof (rule sum.cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = range (pseudo_proj_True (Suc n))
 2. \<And>x. x \<in> range (pseudo_proj_True (Suc n)) \<Longrightarrow> emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
show "{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} =
    range (pseudo_proj_True (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = range (pseudo_proj_True (Suc n))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} \<subseteq> range (pseudo_proj_True (Suc n))
 2. range (pseudo_proj_True (Suc n)) \<subseteq> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
[PROOF STEP]
show "{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
        \<subseteq> range (pseudo_proj_True (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} \<subseteq> range (pseudo_proj_True (Suc n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} \<subseteq> range (pseudo_proj_True (Suc n))

goal (1 subgoal):
 1. range (pseudo_proj_True (Suc n)) \<subseteq> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
[PROOF STEP]
show "range (pseudo_proj_True (Suc n))
        \<subseteq> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union>
        {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (pseudo_proj_True (Suc n)) \<subseteq> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}
[PROOF STEP]
by (simp add: subsetI)
[PROOF STATE]
proof (state)
this:
range (pseudo_proj_True (Suc n)) \<subseteq> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False} = range (pseudo_proj_True (Suc n))

goal (1 subgoal):
 1. \<And>x. x \<in> range (pseudo_proj_True (Suc n)) \<Longrightarrow> emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x) = emeasure M (pseudo_proj_True (Suc n) -` {x} \<inter> space M) * ennreal (f x)
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
(\<Sum>w\<in>{w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = True} \<union> {w \<in> range (pseudo_proj_True (Suc n)). w !! 0 = False}. emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w)) = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<And>f. \<lbrakk>\<forall>x. 0 \<le> f x; f \<in> borel_measurable (F n)\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True n). emeasure M (pseudo_proj_True n -` {w} \<inter> space M) * ennreal (f w)); \<forall>x. 0 \<le> f x; f \<in> borel_measurable (F (Suc n))\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
show "integral\<^sup>N M f =
    (\<Sum>w\<in> range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))"
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = (\<Sum>w\<in>range (pseudo_proj_True (Suc n)). emeasure M (pseudo_proj_True (Suc n) -` {w} \<inter> space M) * ennreal (f w))

goal:
No subgoals!
[PROOF STEP]
qed