[STATEMENT]
lemma (in psemicategory_base) smc_prod_Comp_vrange:
  "\<R>\<^sub>\<circ> ((\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Comp\<rparr>) \<subseteq>\<^sub>\<circ> (\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<subseteq>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
proof(intro vsubsetI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<Longrightarrow> x \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
fix h
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<Longrightarrow> x \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
assume prems: "h \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> ((\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Comp\<rparr>)"
[PROOF STATE]
proof (state)
this:
h \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>)

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<Longrightarrow> x \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>)
[PROOF STEP]
obtain gf
    where h_def: "h = (\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Comp\<rparr>\<lparr>gf\<rparr>"
      and "gf \<in>\<^sub>\<circ> composable_arrs (\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)"
[PROOF STATE]
proof (prove)
using this:
h \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>)

goal (1 subgoal):
 1. (\<And>gf. \<lbrakk>h = smc_prod I \<AA>\<lparr>Comp\<rparr>\<lparr>gf\<rparr>; gf \<in>\<^sub>\<circ> composable_arrs (smc_prod I \<AA>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: smc_prod_Comp intro: smc_cs_intros)
[PROOF STATE]
proof (state)
this:
h = smc_prod I \<AA>\<lparr>Comp\<rparr>\<lparr>gf\<rparr>
gf \<in>\<^sub>\<circ> composable_arrs (smc_prod I \<AA>)

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<Longrightarrow> x \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h = smc_prod I \<AA>\<lparr>Comp\<rparr>\<lparr>gf\<rparr>
gf \<in>\<^sub>\<circ> composable_arrs (smc_prod I \<AA>)
[PROOF STEP]
obtain g f a b c
    where gf_def: "gf = [g, f]\<^sub>\<circ>"
      and g: "g : b \<mapsto>\<^bsub>\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i\<^esub> c"
      and f: "f : a \<mapsto>\<^bsub>\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i\<^esub> b"
[PROOF STATE]
proof (prove)
using this:
h = smc_prod I \<AA>\<lparr>Comp\<rparr>\<lparr>gf\<rparr>
gf \<in>\<^sub>\<circ> composable_arrs (smc_prod I \<AA>)

goal (1 subgoal):
 1. (\<And>g f b c a. \<lbrakk>gf = [g, f]\<^sub>\<circ>; g : b \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> c; f : a \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by clarsimp
[PROOF STATE]
proof (state)
this:
gf = [g, f]\<^sub>\<circ>
g : b \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> c
f : a \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> b

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<Longrightarrow> x \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
from g f
[PROOF STATE]
proof (chain)
picking this:
g : b \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> c
f : a \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> b
[PROOF STEP]
have gf_comp: "g \<circ>\<^sub>A\<^bsub>(\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<^esub> f = (\<lambda>i\<in>\<^sub>\<circ>I. g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
g : b \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> c
f : a \<mapsto>\<^bsub>smc_prod I \<AA>\<^esub> b

goal (1 subgoal):
 1. g \<circ>\<^sub>A\<^bsub>smc_prod I \<AA>\<^esub> f = (\<lambda>i\<in>\<^sub>\<circ>I. g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr>)
[PROOF STEP]
by (rule smc_prod_Comp_app)
[PROOF STATE]
proof (state)
this:
g \<circ>\<^sub>A\<^bsub>smc_prod I \<AA>\<^esub> f = (\<lambda>i\<in>\<^sub>\<circ>I. g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr>)

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (smc_prod I \<AA>\<lparr>Comp\<rparr>) \<Longrightarrow> x \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
show "h \<in>\<^sub>\<circ> (\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
unfolding smc_prod_components
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h \<in>\<^sub>\<circ> (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>I. \<AA> i\<lparr>Arr\<rparr>)
[PROOF STEP]
unfolding h_def gf_def gf_comp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i\<in>\<^sub>\<circ>I. g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr>) \<in>\<^sub>\<circ> (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>I. \<AA> i\<lparr>Arr\<rparr>)
[PROOF STEP]
proof(rule VLambda_in_vproduct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>
[PROOF STEP]
assume prems: "i \<in>\<^sub>\<circ> I"
[PROOF STATE]
proof (state)
this:
i \<in>\<^sub>\<circ> I

goal (1 subgoal):
 1. \<And>i. i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>
[PROOF STEP]
interpret semicategory \<alpha> \<open>\<AA> i\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semicategory \<alpha> (\<AA> i)
[PROOF STEP]
using prems
[PROOF STATE]
proof (prove)
using this:
i \<in>\<^sub>\<circ> I

goal (1 subgoal):
 1. semicategory \<alpha> (\<AA> i)
[PROOF STEP]
by (simp add: smc_prod_cs_intros)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>
[PROOF STEP]
from prems smc_prod_is_arrD(7)[OF g] smc_prod_is_arrD(7)[OF f]
[PROOF STATE]
proof (chain)
picking this:
i \<in>\<^sub>\<circ> I
?i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>?i\<rparr> : b\<lparr>?i\<rparr> \<mapsto>\<^bsub>\<AA> ?i\<^esub> c\<lparr>?i\<rparr>
?i \<in>\<^sub>\<circ> I \<Longrightarrow> f\<lparr>?i\<rparr> : a\<lparr>?i\<rparr> \<mapsto>\<^bsub>\<AA> ?i\<^esub> b\<lparr>?i\<rparr>
[PROOF STEP]
have
      "g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> : a\<lparr>i\<rparr> \<mapsto>\<^bsub>\<AA> i\<^esub> c\<lparr>i\<rparr>"
[PROOF STATE]
proof (prove)
using this:
i \<in>\<^sub>\<circ> I
?i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>?i\<rparr> : b\<lparr>?i\<rparr> \<mapsto>\<^bsub>\<AA> ?i\<^esub> c\<lparr>?i\<rparr>
?i \<in>\<^sub>\<circ> I \<Longrightarrow> f\<lparr>?i\<rparr> : a\<lparr>?i\<rparr> \<mapsto>\<^bsub>\<AA> ?i\<^esub> b\<lparr>?i\<rparr>

goal (1 subgoal):
 1. g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> : a\<lparr>i\<rparr> \<mapsto>\<^bsub>\<AA> i\<^esub> c\<lparr>i\<rparr>
[PROOF STEP]
by (auto intro: smc_cs_intros)
[PROOF STATE]
proof (state)
this:
g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> : a\<lparr>i\<rparr> \<mapsto>\<^bsub>\<AA> i\<^esub> c\<lparr>i\<rparr>

goal (1 subgoal):
 1. \<And>i. i \<in>\<^sub>\<circ> I \<Longrightarrow> g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> : a\<lparr>i\<rparr> \<mapsto>\<^bsub>\<AA> i\<^esub> c\<lparr>i\<rparr>
[PROOF STEP]
show "g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
using this:
g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> : a\<lparr>i\<rparr> \<mapsto>\<^bsub>\<AA> i\<^esub> c\<lparr>i\<rparr>

goal (1 subgoal):
 1. g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>
[PROOF STEP]
by (simp add: smc_cs_intros)
[PROOF STATE]
proof (state)
this:
g\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> f\<lparr>i\<rparr> \<in>\<^sub>\<circ> \<AA> i\<lparr>Arr\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
h \<in>\<^sub>\<circ> smc_prod I \<AA>\<lparr>Arr\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_eq_hmset_zhmsetE:
  assumes m_le_n: "M \<le> N"
  obtains A B C where "M = zhmset_of A + C" and "N = zhmset_of B + C" and "A \<le> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A C B. \<lbrakk>M = zhmset_of A + C; N = zhmset_of B + C; A \<le> B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule less_eq_mset_zmsetE[OF m_le_n[folded zhmsetmset_le]])
    (metis hmsetmset_le hmultiset.sel ZHMSet_plus zhmsetmset_inverse)


[STATEMENT]
lemma (in infinite_coin_toss_space) nat_filtration_Suc_sets:
  shows "sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
assume "x\<in> {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets M}"
[PROOF STATE]
proof (state)
this:
x \<in> {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events}

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
hence "\<exists>B. B \<in> sets M \<and> x = pseudo_proj_True n -` B \<inter> space M"
[PROOF STATE]
proof (prove)
using this:
x \<in> {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events}

goal (1 subgoal):
 1. \<exists>B. B \<in> events \<and> x = pseudo_proj_True n -` B \<inter> space M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>B. B \<in> events \<and> x = pseudo_proj_True n -` B \<inter> space M

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>B. B \<in> events \<and> x = pseudo_proj_True n -` B \<inter> space M
[PROOF STEP]
obtain B where "B \<in> sets M" and "x = pseudo_proj_True n -` B \<inter> space M"
[PROOF STATE]
proof (prove)
using this:
\<exists>B. B \<in> events \<and> x = pseudo_proj_True n -` B \<inter> space M

goal (1 subgoal):
 1. (\<And>B. \<lbrakk>B \<in> events; x = pseudo_proj_True n -` B \<inter> space M\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B \<in> events
x = pseudo_proj_True n -` B \<inter> space M

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
note xhyps = this
[PROOF STATE]
proof (state)
this:
B \<in> events
x = pseudo_proj_True n -` B \<inter> space M

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
let ?Bim = "B\<inter> (range (pseudo_proj_True n))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
let ?preT = "(\<lambda>n w. (pseudo_proj_True n) -` {w})"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "finite ?Bim"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (B \<inter> range (pseudo_proj_True n))
[PROOF STEP]
using pseudo_proj_True_finite_image
[PROOF STATE]
proof (prove)
using this:
finite (range (pseudo_proj_True ?n))

goal (1 subgoal):
 1. finite (B \<inter> range (pseudo_proj_True n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (B \<inter> range (pseudo_proj_True n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "pseudo_proj_True n -`B \<inter> (space M) = pseudo_proj_True n -`B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True n -` B \<inter> space M = pseudo_proj_True n -` B
[PROOF STEP]
using bernoulli bernoulli_stream_preimage[of _ _ "pseudo_proj_True n"]
[PROOF STATE]
proof (prove)
using this:
M = bernoulli_stream p
?N = bernoulli_stream ?p \<Longrightarrow> pseudo_proj_True n -` ?A \<inter> space ?N = pseudo_proj_True n -` ?A

goal (1 subgoal):
 1. pseudo_proj_True n -` B \<inter> space M = pseudo_proj_True n -` B
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` B \<inter> space M = pseudo_proj_True n -` B

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` B \<inter> space M = pseudo_proj_True n -` B

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "... = pseudo_proj_True n -`?Bim"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True n -` B = pseudo_proj_True n -` (B \<inter> range (pseudo_proj_True n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` B = pseudo_proj_True n -` (B \<inter> range (pseudo_proj_True n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` B = pseudo_proj_True n -` (B \<inter> range (pseudo_proj_True n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "... = (\<Union> w \<in> ?Bim.?preT n w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pseudo_proj_True n -` (B \<inter> range (pseudo_proj_True n)) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True n -` {w})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` (B \<inter> range (pseudo_proj_True n)) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True n -` {w})

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` (B \<inter> range (pseudo_proj_True n)) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True n -` {w})

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "... = (\<Union> w \<in> ?Bim. (?preT (Suc n) w \<union> ?preT (Suc n) (pseudo_proj_False n w)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True n -` {w}) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w} \<union> pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})
[PROOF STEP]
by (simp add:pseudo_proj_True_inverse_induct)
[PROOF STATE]
proof (state)
this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True n -` {w}) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w} \<union> pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True n -` {w}) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w} \<union> pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "... = (\<Union> w \<in> ?Bim. ?preT (Suc n) w) \<union> (\<Union> w \<in> ?Bim. ?preT (Suc n) (pseudo_proj_False n w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w} \<union> pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w} \<union> pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
pseudo_proj_True n -` B \<inter> space M = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})
[PROOF STEP]
have tmpeq: "pseudo_proj_True n -`B \<inter> (space M) =
        (\<Union> w \<in> ?Bim. ?preT (Suc n) w) \<union> (\<Union> w \<in> ?Bim. ?preT (Suc n) (pseudo_proj_False n w))"
[PROOF STATE]
proof (prove)
using this:
pseudo_proj_True n -` B \<inter> space M = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})

goal (1 subgoal):
 1. pseudo_proj_True n -` B \<inter> space M = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
pseudo_proj_True n -` B \<inter> space M = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "(\<Union> w \<in> ?Bim. ?preT (Suc n) w) \<in> sets (nat_filtration (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
using \<open>finite ?Bim\<close> nat_filtration_singleton pseudo_proj_True_Suc_proj
[PROOF STATE]
proof (prove)
using this:
finite (B \<inter> range (pseudo_proj_True n))
pseudo_proj_True ?n ?w = ?w \<Longrightarrow> pseudo_proj_True ?n -` {?w} \<in> sets (nat_filtration ?n)
pseudo_proj_True (Suc ?n) (pseudo_proj_True ?n ?w) = pseudo_proj_True ?n ?w

goal (1 subgoal):
 1. (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "(\<Union> w \<in> ?Bim. ?preT (Suc n) (pseudo_proj_False n w)) \<in> sets (nat_filtration (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
using \<open>finite ?Bim\<close>
[PROOF STATE]
proof (prove)
using this:
finite (B \<inter> range (pseudo_proj_True n))

goal (1 subgoal):
 1. (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
by (simp add: nat_filtration_singleton pseudo_proj_True_Suc_False_proj sets.finite_UN)
[PROOF STATE]
proof (state)
this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
have "x \<in> sets (nat_filtration (Suc n))"
[PROOF STATE]
proof (prove)
using this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. x \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
using tmpeq xhyps
[PROOF STATE]
proof (prove)
using this:
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<in> sets (nat_filtration (Suc n))
(\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w}) \<in> sets (nat_filtration (Suc n))
pseudo_proj_True n -` B \<inter> space M = (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {w}) \<union> (\<Union>w\<in>B \<inter> range (pseudo_proj_True n). pseudo_proj_True (Suc n) -` {pseudo_proj_False n w})
B \<in> events
x = pseudo_proj_True n -` B \<inter> space M

goal (1 subgoal):
 1. x \<in> sets (nat_filtration (Suc n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x3 \<in> {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<Longrightarrow> ?x3 \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
note xmem = this
[PROOF STATE]
proof (state)
this:
?x3 \<in> {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<Longrightarrow> ?x3 \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "sets (nat_filtration n) = sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets M}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (nat_filtration n) = sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events}
[PROOF STEP]
using bernoulli nat_filtration_sets
[PROOF STATE]
proof (prove)
using this:
M = bernoulli_stream p
sets (nat_filtration ?n) = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True ?n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}

goal (1 subgoal):
 1. sets (nat_filtration n) = sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sets (nat_filtration n) = sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events}

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sets (nat_filtration n) = sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events}

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
have "... \<subseteq> (nat_filtration (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
proof (rule sigma_algebra.sigma_sets_subset)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. sigma_algebra (space M) (sets (nat_filtration (Suc n)))
 2. {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
show "{pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets M}
      \<subseteq> sets (nat_filtration (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
using xmem
[PROOF STATE]
proof (prove)
using this:
?x3 \<in> {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<Longrightarrow> ?x3 \<in> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<subseteq> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sigma_algebra (space M) (sets (nat_filtration (Suc n)))
[PROOF STEP]
show "sigma_algebra (space M) (sets (nat_filtration (Suc n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_algebra (space M) (sets (nat_filtration (Suc n)))
[PROOF STEP]
by (metis bernoulli bernoulli_stream_space nat_filtration_space sets.sigma_algebra_axioms streams_UNIV)
[PROOF STATE]
proof (state)
this:
sigma_algebra (space M) (sets (nat_filtration (Suc n)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sigma_sets (space M) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> events} \<subseteq> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))

goal (1 subgoal):
 1. sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sets (nat_filtration n) \<subseteq> sets (nat_filtration (Suc n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma triangle_vertices_distinct2:
  assumes "uwellformed G" "triangle_in_graph x y z G"
  shows "y \<noteq> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<noteq> z
[PROOF STEP]
by (metis assms triangle_vertices_distinct1 triangle_in_graph_def)


[STATEMENT]
lemma par_strict_comm:
  assumes "A B ParStrict C D"
  shows "B A ParStrict D C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B A ParStrict D C
[PROOF STEP]
by (simp add: assms par_strict_left_comm par_strict_right_comm)


[STATEMENT]
lemma mem_affine:
  assumes "affine S" "x \<in> S" "y \<in> S" "u + v = 1"
  shows "u *\<^sub>R x + v *\<^sub>R y \<in> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u *\<^sub>R x + v *\<^sub>R y \<in> S
[PROOF STEP]
using assms affine_def[of S]
[PROOF STATE]
proof (prove)
using this:
affine S
x \<in> S
y \<in> S
u + v = 1
affine S = (\<forall>x\<in>S. \<forall>y\<in>S. \<forall>u v. u + v = 1 \<longrightarrow> u *\<^sub>R x + v *\<^sub>R y \<in> S)

goal (1 subgoal):
 1. u *\<^sub>R x + v *\<^sub>R y \<in> S
[PROOF STEP]
by auto


[STATEMENT]
lemma bool_to_ternary_pullup2:
    "eval_ternary_And (bool_to_ternary X1) (bool_to_ternary X2) = bool_to_ternary (X1 \<and> X2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_ternary_And (bool_to_ternary X1) (bool_to_ternary X2) = bool_to_ternary (X1 \<and> X2)
[PROOF STEP]
by (metis bool_to_ternary_simps(1) bool_to_ternary_simps(2) eval_ternary_simps_simple(2) eval_ternary_simps_simple(4))


[STATEMENT]
lemma iT_Minus_Plus_cut_assoc: "(k \<ominus> I) \<oplus> n = (k + n) \<ominus> (I \<down>\<le> k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<ominus> I \<oplus> n = k + n \<ominus> I \<down>\<le> k
[PROOF STEP]
apply (rule set_eqI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (x \<in> k \<ominus> I \<oplus> n) = (x \<in> k + n \<ominus> I \<down>\<le> k)
[PROOF STEP]
apply (simp add: iT_Plus_mem_iff iT_Minus_mem_iff cut_le_mem_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (n \<le> x \<and> x - n \<le> k \<and> k - (x - n) \<in> I) = (x \<le> k + n \<and> k + n - x \<in> I \<and> k + n - x \<le> k)
[PROOF STEP]
apply fastforce
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma multiplicity_prime [simp]: "prime_elem p \<Longrightarrow> multiplicity p p = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_elem p \<Longrightarrow> multiplicity p p = 1
[PROOF STEP]
by (rule multiplicity_self) auto


[STATEMENT]
lemma member_postIDAsStr_iff[simp]: "str \<in> postIDAsStr ` (set postIDs) \<longleftrightarrow> Nid str \<in>\<in> postIDs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (str \<in> postIDAsStr ` set postIDs) = (Nid str \<in>\<in> postIDs)
[PROOF STEP]
by (metis PostID_postIDAsStr image_iff postIDAsStr.simps)


[STATEMENT]
lemma adds_term_canc: "t \<oplus> u adds\<^sub>t t \<oplus> v \<longleftrightarrow> u adds\<^sub>t v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t \<oplus> u adds\<^sub>t t \<oplus> v) = (u adds\<^sub>t v)
[PROOF STEP]
by (simp add: adds_term_def adds_canc_2 term_simps)


[STATEMENT]
lemma fml_equiv_valid: "fml_equiv \<phi> \<psi> \<Longrightarrow> valid \<phi> = valid \<psi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fml_equiv \<phi> \<psi> \<Longrightarrow> valid \<phi> = valid \<psi>
[PROOF STEP]
unfolding valid_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fml_equiv \<phi> \<psi> \<Longrightarrow> (\<forall>I \<omega>. \<omega> \<in> fml_sem I \<phi>) = (\<forall>I \<omega>. \<omega> \<in> fml_sem I \<psi>)
[PROOF STEP]
using fml_equiv_subst
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>fml_equiv ?\<phi> ?\<psi>; ?P (fml_sem ?I ?\<phi>)\<rbrakk> \<Longrightarrow> ?P (fml_sem ?I ?\<psi>)

goal (1 subgoal):
 1. fml_equiv \<phi> \<psi> \<Longrightarrow> (\<forall>I \<omega>. \<omega> \<in> fml_sem I \<phi>) = (\<forall>I \<omega>. \<omega> \<in> fml_sem I \<psi>)
[PROOF STEP]
by blast


[STATEMENT]
lemma soundness_mat_x_eq_vec:
  assumes "dim_row A\<^sup>T = dim_vec c"
  assumes "simplex (x_mat_eq_vec c A\<^sup>T) = Sat X"
  shows  "\<exists>x. [x \<^sub>v* A]=c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. [x\<^sub>v*A]=c
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [?x\<^sub>v*A]=c
[PROOF STEP]
define x where x: "x = fst (split_n_m_x (dim_col A\<^sup>T) (dim_row A\<^sup>T) X)"
[PROOF STATE]
proof (state)
this:
x = fst (split_n_m_x (dim_col A\<^sup>T) (dim_row A\<^sup>T) X)

goal (1 subgoal):
 1. [?x\<^sub>v*A]=c
[PROOF STEP]
have "dim_vec x = dim_col A\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec x = dim_col A\<^sup>T
[PROOF STEP]
unfolding split_i_j_x_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec x = dim_col A\<^sup>T
[PROOF STEP]
using split_vec_dims(1)[of "(dim_col A\<^sup>T)" _ X x] fst_conv[of x]
[PROOF STATE]
proof (prove)
using this:
split_i_j_x (dim_col A\<^sup>T) ?j X = (x, ?b) \<Longrightarrow> dim_vec x = dim_col A\<^sup>T
fst (x, ?x2.0) = x

goal (1 subgoal):
 1. dim_vec x = dim_col A\<^sup>T
[PROOF STEP]
by (simp add: split_i_j_x_def x)
[PROOF STATE]
proof (state)
this:
dim_vec x = dim_col A\<^sup>T

goal (1 subgoal):
 1. [?x\<^sub>v*A]=c
[PROOF STEP]
have "\<forall>i < dim_vec c. (A\<^sup>T *\<^sub>v x)$i = c$i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<dim_vec c. (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
proof (standard, standard)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
assume a: "i < dim_vec c"
[PROOF STATE]
proof (state)
this:
i < dim_vec c

goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
have *: "\<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)
[PROOF STEP]
using assms(2) simplex(3)
[PROOF STATE]
proof (prove)
using this:
simplex (x_mat_eq_vec c A\<^sup>T) = Inr X
simplex ?cs = Inr ?v \<Longrightarrow> \<langle>?v\<rangle> \<Turnstile>\<^sub>c\<^sub>s set ?cs

goal (1 subgoal):
 1. \<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)

goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)
[PROOF STEP]
have "row A\<^sup>T i \<bullet> x = c$i"
[PROOF STATE]
proof (prove)
using this:
\<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)

goal (1 subgoal):
 1. row A\<^sup>T i \<bullet> x = c $ i
[PROOF STEP]
using x_mat_eq_vec_sol[of c "A\<^sup>T" "\<langle>X\<rangle>" i, OF * a] eval_lpoly_eq_dot_prod_split1 fstI
[PROOF STATE]
proof (prove)
using this:
\<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (x_mat_eq_vec c A\<^sup>T)
matrix_to_lpolies A\<^sup>T ! i \<lbrace> \<langle>X\<rangle> \<rbrace> = c $ i
(?x, ?y) = split_n_m_x (dim_vec ?c) (dim_vec ?b) ?X \<Longrightarrow> vec_to_lpoly ?c \<lbrace> \<langle>?X\<rangle> \<rbrace> = ?c \<bullet> ?x
?x = (?y, ?z) \<Longrightarrow> fst ?x = ?y

goal (1 subgoal):
 1. row A\<^sup>T i \<bullet> x = c $ i
[PROOF STEP]
by (metis a assms(1) index_row(2) matrix_to_lpolies_vec_of_row split_i_j_x_def x)
[PROOF STATE]
proof (state)
this:
row A\<^sup>T i \<bullet> x = c $ i

goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
row A\<^sup>T i \<bullet> x = c $ i
[PROOF STEP]
show "(A\<^sup>T *\<^sub>v x) $ i = c $ i"
[PROOF STATE]
proof (prove)
using this:
row A\<^sup>T i \<bullet> x = c $ i

goal (1 subgoal):
 1. (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
unfolding mult_mat_vec_def
[PROOF STATE]
proof (prove)
using this:
row A\<^sup>T i \<bullet> x = c $ i

goal (1 subgoal):
 1. vec (dim_row A\<^sup>T) (\<lambda>i. row A\<^sup>T i \<bullet> x) $ i = c $ i
[PROOF STEP]
using a assms(1)
[PROOF STATE]
proof (prove)
using this:
row A\<^sup>T i \<bullet> x = c $ i
i < dim_vec c
dim_row A\<^sup>T = dim_vec c

goal (1 subgoal):
 1. vec (dim_row A\<^sup>T) (\<lambda>i. row A\<^sup>T i \<bullet> x) $ i = c $ i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(A\<^sup>T *\<^sub>v x) $ i = c $ i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>i<dim_vec c. (A\<^sup>T *\<^sub>v x) $ i = c $ i

goal (1 subgoal):
 1. [?x\<^sub>v*A]=c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<dim_vec c. (A\<^sup>T *\<^sub>v x) $ i = c $ i
[PROOF STEP]
show "[x \<^sub>v* A]=c"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<dim_vec c. (A\<^sup>T *\<^sub>v x) $ i = c $ i

goal (1 subgoal):
 1. [x\<^sub>v*A]=c
[PROOF STEP]
using mat_times_vec_eqI[of A x c, OF \<open>dim_vec x = dim_col A\<^sup>T\<close>[symmetric] assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<forall>i<dim_vec c. (A\<^sup>T *\<^sub>v x) $ i = c $ i
(\<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v x) $ i = c $ i) \<Longrightarrow> [x\<^sub>v*A]=c

goal (1 subgoal):
 1. [x\<^sub>v*A]=c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[x\<^sub>v*A]=c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in ceuclidean_space) cinner_same_CBasis[simp]: "u \<in> CBasis \<Longrightarrow> cinner u u = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<in> CBasis \<Longrightarrow> u \<bullet>\<^sub>C u = 1
[PROOF STEP]
by (simp add: cinner_CBasis)


[STATEMENT]
lemma S_VALID_AS_VALID_IMP_MIN_IN_PLS:
  fixes PROB s as
  assumes "(s \<in> valid_states PROB)" "(as \<in> valid_plans PROB)"
  shows "(Inf (PLS s as) \<in> (MPLS PROB))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf (PLS s as) \<in> MPLS PROB
[PROOF STEP]
unfolding MPLS_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf (PLS s as) \<in> (\<lambda>(s, as). Inf (PLS s as)) ` {(s, as). s \<in> valid_states PROB \<and> as \<in> valid_plans PROB}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
s \<in> valid_states PROB
as \<in> valid_plans PROB

goal (1 subgoal):
 1. Inf (PLS s as) \<in> (\<lambda>(s, as). Inf (PLS s as)) ` {(s, as). s \<in> valid_states PROB \<and> as \<in> valid_plans PROB}
[PROOF STEP]
by fast

\<comment> \<open>NOTE type of `s` had to be fixed (type mismatch in goal).\<close>
\<comment> \<open>NOTE premises rewritten to implications for proof set up.\<close>


[STATEMENT]
lemma sqrt_int_pos: assumes res: "sqrt_int x = Cons s ms"
  shows "s \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
note res = res[unfolded sqrt_int_code Let_def, simplified]
[PROOF STATE]
proof (state)
this:
(if x < 0 then [] else case sqrt_int_main x of (y, True) \<Rightarrow> if y = 0 then [0] else [y, - y] | (y, False) \<Rightarrow> []) = s # ms

goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
from res
[PROOF STATE]
proof (chain)
picking this:
(if x < 0 then [] else case sqrt_int_main x of (y, True) \<Rightarrow> if y = 0 then [0] else [y, - y] | (y, False) \<Rightarrow> []) = s # ms
[PROOF STEP]
have x0: "x \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
(if x < 0 then [] else case sqrt_int_main x of (y, True) \<Rightarrow> if y = 0 then [0] else [y, - y] | (y, False) \<Rightarrow> []) = s # ms

goal (1 subgoal):
 1. 0 \<le> x
[PROOF STEP]
by (cases ?thesis, auto)
[PROOF STATE]
proof (state)
this:
0 \<le> x

goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
obtain ss b where call: "sqrt_int_main x = (ss,b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>ss b. sqrt_int_main x = (ss, b) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
sqrt_int_main x = (ss, b)

goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
from res[unfolded call] x0
[PROOF STATE]
proof (chain)
picking this:
(if x < 0 then [] else case (ss, b) of (y, True) \<Rightarrow> if y = 0 then [0] else [y, - y] | (y, False) \<Rightarrow> []) = s # ms
0 \<le> x
[PROOF STEP]
have "ss = s"
[PROOF STATE]
proof (prove)
using this:
(if x < 0 then [] else case (ss, b) of (y, True) \<Rightarrow> if y = 0 then [0] else [y, - y] | (y, False) \<Rightarrow> []) = s # ms
0 \<le> x

goal (1 subgoal):
 1. ss = s
[PROOF STEP]
by (cases b, cases "ss = 0", auto)
[PROOF STATE]
proof (state)
this:
ss = s

goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
from root_int_main(1)[OF x0 call[unfolded this sqrt_int_main_def]]
[PROOF STATE]
proof (chain)
picking this:
0 \<le> s
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> s

goal (1 subgoal):
 1. 0 \<le> s
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
0 \<le> s

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma point_in_group: "G \<in> \<G> \<Longrightarrow> x \<in> G \<Longrightarrow> x \<in> \<V>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<in> \<G>; x \<in> G\<rbrakk> \<Longrightarrow> x \<in> \<V>
[PROOF STEP]
using group_partitions partition_onD1
[PROOF STATE]
proof (prove)
using this:
partition_on \<V> \<G>
partition_on ?A ?P \<Longrightarrow> ?A = \<Union> ?P

goal (1 subgoal):
 1. \<lbrakk>G \<in> \<G>; x \<in> G\<rbrakk> \<Longrightarrow> x \<in> \<V>
[PROOF STEP]
by auto


[STATEMENT]
lemma disjE3:
  "\<lbrakk> A \<or> B \<or> C ; A \<Longrightarrow> P ; B \<Longrightarrow> P ; C \<Longrightarrow> P \<rbrakk> \<Longrightarrow> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<or> B \<or> C; A \<Longrightarrow> P; B \<Longrightarrow> P; C \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
by auto


[STATEMENT]
lemma mapAssoc:
shows "map (extend S) (map (extend R) c) = map (extend (extend S R)) c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (extend S) (map (extend R) c) = map (extend (extend S R)) c
[PROOF STEP]
by (induct_tac c) (auto simp add:extendAssoc)


[STATEMENT]
lemma toSet_intersect[simp]:
  "toSet (intersect xs ys) = toSet xs \<inter> toSet ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. toSet (intersect xs ys) = toSet xs \<inter> toSet ys
[PROOF STEP]
unfolding intersect_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. toSet (ODList (intersection (toList xs) (toList ys))) = toSet xs \<inter> toSet ys
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (toList xs) \<inter> set (toList ys) = toSet xs \<inter> toSet ys
[PROOF STEP]
apply (simp add: toSet_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in Module) mr_cos_sprod_mem:"\<lbrakk>submodule R M H; a \<in> carrier R;
       X \<in> set_mr_cos M H\<rbrakk> \<Longrightarrow> mr_cos_sprod M H a X \<in> set_mr_cos M H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>submodule R M H; a \<in> carrier R; X \<in> set_mr_cos M H\<rbrakk> \<Longrightarrow> mr_cos_sprod M H a X \<in> set_mr_cos M H
[PROOF STEP]
apply (simp add:set_mr_cos_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>submodule R M H; a \<in> carrier R; \<exists>a\<in>carrier M. X = a \<uplus>\<^bsub>M\<^esub> H\<rbrakk> \<Longrightarrow> \<exists>aa\<in>carrier M. mr_cos_sprod M H a X = aa \<uplus>\<^bsub>M\<^esub> H
[PROOF STEP]
apply (erule bexE, rename_tac m, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m. \<lbrakk>submodule R M H; a \<in> carrier R; m \<in> carrier M; X = m \<uplus>\<^bsub>M\<^esub> H\<rbrakk> \<Longrightarrow> \<exists>aa\<in>carrier M. mr_cos_sprod M H a (m \<uplus>\<^bsub>M\<^esub> H) = aa \<uplus>\<^bsub>M\<^esub> H
[PROOF STEP]
apply (subst mr_cos_sprodTr, assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m. \<lbrakk>submodule R M H; a \<in> carrier R; m \<in> carrier M; X = m \<uplus>\<^bsub>M\<^esub> H\<rbrakk> \<Longrightarrow> \<exists>aa\<in>carrier M. a \<cdot>\<^sub>s m \<uplus>\<^bsub>M\<^esub> H = aa \<uplus>\<^bsub>M\<^esub> H
[PROOF STEP]
apply (frule_tac m = m in sc_mem [of a], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m. \<lbrakk>submodule R M H; a \<in> carrier R; m \<in> carrier M; X = m \<uplus>\<^bsub>M\<^esub> H; a \<cdot>\<^sub>s m \<in> carrier M\<rbrakk> \<Longrightarrow> \<exists>aa\<in>carrier M. a \<cdot>\<^sub>s m \<uplus>\<^bsub>M\<^esub> H = aa \<uplus>\<^bsub>M\<^esub> H
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma map_poly_hom_mult_monom [hom_distribs]:
  "map_poly hom (p * monom a n) = map_poly hom p * monom (hom a) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly hom (p * monom a n) = map_poly hom p * monom (hom a) n
[PROOF STEP]
by (auto intro!: poly_eqI simp:coeff_mult_monom hom_mult)


[STATEMENT]
lemma comp_additive:
  "additive (\<lambda>y . x * y) \<and> additive (\<lambda>y . x\<^sup>T * y) \<and> additive (\<lambda>y . y * x) \<and> additive (\<lambda>y . y * x\<^sup>T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive ((*) x) \<and> additive ((*) (x\<^sup>T)) \<and> additive (\<lambda>y. y * x) \<and> additive (\<lambda>y. y * x\<^sup>T)
[PROOF STEP]
by (simp add: comp_left_dist_sup additive_def comp_right_dist_sup)


[STATEMENT]
lemma set_zip_replicate_right[simp]:
  "set (zip xs (replicate (length xs) y)) = (\<lambda>x. (x, y)) ` set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (zip xs (replicate (length xs) y)) = (\<lambda>x. (x, y)) ` set xs
[PROOF STEP]
by (induct xs) auto


[STATEMENT]
lemma lappend_stream_of_llist:
    assumes "lfinite u"
    shows "stream_of_llist (u $ v) = list_of u @- stream_of_llist v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stream_of_llist (u $ v) = list_of u @- stream_of_llist v
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
lfinite u

goal (1 subgoal):
 1. stream_of_llist (u $ v) = list_of u @- stream_of_llist v
[PROOF STEP]
unfolding stream_of_llist_def
[PROOF STATE]
proof (prove)
using this:
lfinite u

goal (1 subgoal):
 1. unfold_stream lhd ltl (u $ v) = list_of u @- unfold_stream lhd ltl v
[PROOF STEP]
by induct auto


[STATEMENT]
lemma lit_minus [lit_simps]: "\<guillemotleft>x - y\<guillemotright> = \<guillemotleft>x\<guillemotright> - \<guillemotleft>y\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>x - y\<guillemotright> = \<guillemotleft>x\<guillemotright> - \<guillemotleft>y\<guillemotright>
[PROOF STEP]
by (simp add: uexpr_defs, transfer, simp)


[STATEMENT]
lemma dist_fls_ge0: "dist (a :: 'a fls) b \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> dist a b
[PROOF STEP]
by (simp add: dist_fls_def)


[STATEMENT]
lemma fls_base_factor_power:
  fixes f :: "'a::{semiring_1, semiring_no_zero_divisors} fls"
  shows "fls_base_factor (f ^ n) = fls_base_factor f ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
proof (cases "f = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f = 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
 2. f \<noteq> 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
f \<noteq> 0

goal (2 subgoals):
 1. f = 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
 2. f \<noteq> 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
have [simp]: "f ^ n \<noteq> 0" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ^ n \<noteq> 0
[PROOF STEP]
by (induction n) (use False in auto)
[PROOF STATE]
proof (state)
this:
f ^ ?n \<noteq> 0

goal (2 subgoals):
 1. f = 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
 2. f \<noteq> 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
f \<noteq> 0

goal (1 subgoal):
 1. fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
by (induction n) (auto simp: fls_base_factor_mult simp flip: fls_times_both_shifted_simp)
[PROOF STATE]
proof (state)
this:
fls_base_factor (f ^ n) = fls_base_factor f ^ n

goal (1 subgoal):
 1. f = 0 \<Longrightarrow> fls_base_factor (f ^ n) = fls_base_factor f ^ n
[PROOF STEP]
qed (cases n; simp)


[STATEMENT]
lemma eq_integralD: "integral k f = y \<Longrightarrow> (f has_integral y) k \<or> \<not> f integrable_on k \<and> y=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral k f = y \<Longrightarrow> (f has_integral y) k \<or> \<not> f integrable_on k \<and> y = (0::'a)
[PROOF STEP]
unfolding integral_def integrable_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SOME y. (f has_integral y) k \<or> (\<nexists>y. (f has_integral y) k) \<and> y = (0::'a)) = y \<Longrightarrow> (f has_integral y) k \<or> (\<nexists>y. (f has_integral y) k) \<and> y = (0::'a)
[PROOF STEP]
apply (erule subst)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral (SOME y. (f has_integral y) k \<or> (\<nexists>y. (f has_integral y) k) \<and> y = (0::'a))) k \<or> (\<nexists>y. (f has_integral y) k) \<and> (SOME y. (f has_integral y) k \<or> (\<nexists>y. (f has_integral y) k) \<and> y = (0::'a)) = (0::'a)
[PROOF STEP]
apply (rule someI_ex)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. (f has_integral x) k \<or> (\<nexists>y. (f has_integral y) k) \<and> x = (0::'a)
[PROOF STEP]
by blast


[STATEMENT]
lemma pdevs_val_trunc_pdevs:
  fixes x y::"'a::euclidean_space"
  shows "pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)
[PROOF STEP]
have "pdevs_val e X + pdevs_val e (trunc_err_pdevs p X) =
      pdevs_val e (add_pdevs X (trunc_err_pdevs p X))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pdevs_val e X + pdevs_val e (trunc_err_pdevs p X) = pdevs_val e (add_pdevs X (trunc_err_pdevs p X))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pdevs_val e X + pdevs_val e (trunc_err_pdevs p X) = pdevs_val e (add_pdevs X (trunc_err_pdevs p X))

goal (1 subgoal):
 1. pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pdevs_val e X + pdevs_val e (trunc_err_pdevs p X) = pdevs_val e (add_pdevs X (trunc_err_pdevs p X))

goal (1 subgoal):
 1. pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)
[PROOF STEP]
have "\<dots> = pdevs_val e (trunc_pdevs p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pdevs_val e (add_pdevs X (trunc_err_pdevs p X)) = pdevs_val e (trunc_pdevs p X)
[PROOF STEP]
by (auto simp: pdevs_val_def trunc_pdevs_raw_def trunc_err_pdevs_raw_def)
[PROOF STATE]
proof (state)
this:
pdevs_val e (add_pdevs X (trunc_err_pdevs p X)) = pdevs_val e (trunc_pdevs p X)

goal (1 subgoal):
 1. pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
pdevs_val e X + pdevs_val e (trunc_err_pdevs p X) = pdevs_val e (trunc_pdevs p X)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
pdevs_val e X + pdevs_val e (trunc_err_pdevs p X) = pdevs_val e (trunc_pdevs p X)

goal (1 subgoal):
 1. pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pdevs_val e (trunc_pdevs p X) = pdevs_val e X + pdevs_val e (trunc_err_pdevs p X)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_MGF: "0 < l \<Longrightarrow> l \<le>  2^32 * length (sha1 x) \<Longrightarrow> length (MGF x l) = l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < l; l \<le> 2 ^ 32 * length (sha1 x)\<rbrakk> \<Longrightarrow> length (MGF x l) = l
[PROOF STEP]
apply (simp add: MGF_def sha1len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < l; l \<le> 687194767360\<rbrakk> \<Longrightarrow> length (MGF1 x (roundup l 160 - Suc 0) l) = l
[PROOF STEP]
apply (insert roundup_help1_new [of l])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < l; l \<le> 687194767360; 0 < l \<Longrightarrow> roundup l 160 - 1 + 1 = roundup l 160\<rbrakk> \<Longrightarrow> length (MGF1 x (roundup l 160 - Suc 0) l) = l
[PROOF STEP]
apply (rule length_MGF1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < l; l \<le> 687194767360; 0 < l \<Longrightarrow> roundup l 160 - 1 + 1 = roundup l 160\<rbrakk> \<Longrightarrow> l \<le> Suc (roundup l 160 - Suc 0) * 160
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < l; l \<le> 687194767360; Suc (roundup l 160 - Suc 0) = roundup l 160\<rbrakk> \<Longrightarrow> l \<le> roundup l 160 * 160
[PROOF STEP]
apply (insert roundup_ge_emBits [of l 160])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < l; l \<le> 687194767360; Suc (roundup l 160 - Suc 0) = roundup l 160; \<lbrakk>0 < l; 0 < 160\<rbrakk> \<Longrightarrow> l \<le> roundup l 160 * 160\<rbrakk> \<Longrightarrow> l \<le> roundup l 160 * 160
[PROOF STEP]
apply (arith)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma positive_proj_k:
  "positive (proj_k k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. positive (proj_k k)
[PROOF STEP]
using positive_same_outer_prod
[PROOF STATE]
proof (prove)
using this:
?v \<in> carrier_vec ?n \<Longrightarrow> positive (outer_prod ?v ?v)

goal (1 subgoal):
 1. positive (proj_k k)
[PROOF STEP]
unfolding proj_k_def ket_k_def
[PROOF STATE]
proof (prove)
using this:
?v \<in> carrier_vec ?n \<Longrightarrow> positive (outer_prod ?v ?v)

goal (1 subgoal):
 1. positive (outer_prod (Matrix.vec K (\<lambda>ka. if ka = k then 1 else 0)) (Matrix.vec K (\<lambda>ka. if ka = k then 1 else 0)))
[PROOF STEP]
by auto


[STATEMENT]
lemma rev_append_eq: "rev_append l ac = rev l @ ac"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rev_append l ac = rev l @ ac
[PROOF STEP]
by (induct l arbitrary: ac) auto


[STATEMENT]
lemma op_ntsmcf_ntsmcf_0: "op_ntsmcf (ntsmcf_0 \<CC>) = ntsmcf_0 (op_smc \<CC>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_ntsmcf (ntsmcf_0 \<CC>) = ntsmcf_0 (op_smc \<CC>)
[PROOF STEP]
by
    (
      simp_all add:
        op_ntsmcf_def ntsmcf_0_def op_smc_def op_smcf_smcf_0 smc_0_def
        nt_field_simps dg_field_simps nat_omega_simps
    )


[STATEMENT]
theorem IF1map_id: "IF1map id = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IF1map id = id
[PROOF STEP]
apply (rule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. id = IF1map id
[PROOF STEP]
apply (rule conjunct1[OF IFmap_unique])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. id \<circ> ctor1 = ctor1 \<circ> F1map id id ?v3
 2. ?v3 \<circ> ctor2 = ctor2 \<circ> F2map id id ?v3
[PROOF STEP]
apply (rule trans[OF id_o])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ctor1 = ctor1 \<circ> F1map id id ?v3
 2. ?v3 \<circ> ctor2 = ctor2 \<circ> F2map id id ?v3
[PROOF STEP]
apply (rule trans[OF sym[OF o_id]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ctor1 \<circ> id = ctor1 \<circ> F1map id id ?v3
 2. ?v3 \<circ> ctor2 = ctor2 \<circ> F2map id id ?v3
[PROOF STEP]
apply (rule arg_cong[OF sym[OF F1.map_id0]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. id \<circ> ctor2 = ctor2 \<circ> F2map id id id
[PROOF STEP]
apply (rule trans[OF id_o])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ctor2 = ctor2 \<circ> F2map id id id
[PROOF STEP]
apply (rule trans[OF sym[OF o_id]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ctor2 \<circ> id = ctor2 \<circ> F2map id id id
[PROOF STEP]
apply (rule arg_cong[OF sym[OF F2.map_id0]])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma minus_1_inverse_pow[simp]: "x / (-1)^n = (x :: 'a :: field) * (-1)^n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x / (- (1::'a)) ^ n = x * (- (1::'a)) ^ n
[PROOF STEP]
by (simp add: minus_1_power_even)


[STATEMENT]
lemma (in Group) eq_lcs2:"\<lbrakk>G \<guillemotright> H; a \<in> carrier G; b \<in> carrier G;
                            a \<diamondsuit> H = b \<diamondsuit> H\<rbrakk> \<Longrightarrow> a \<in> b \<diamondsuit> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; a \<diamondsuit> H = b \<diamondsuit> H\<rbrakk> \<Longrightarrow> a \<in> b \<diamondsuit> H
[PROOF STEP]
by (frule a_in_lcs[of "H" "a"], assumption+, simp)


[STATEMENT]
lemma unstream_takeWhile_trans [stream_fusion]:
  "unstream (takeWhile_trans P g) s = takeWhile P (unstream g s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unstream (takeWhile_trans P g) s = takeWhile P (unstream g s)
[PROOF STEP]
proof (induction s taking: g rule: unstream.induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>\<And>x2. generator g s = Skip x2 \<Longrightarrow> unstream (takeWhile_trans P g) x2 = takeWhile P (unstream g x2); \<And>x31 x32. generator g s = Yield x31 x32 \<Longrightarrow> unstream (takeWhile_trans P g) x32 = takeWhile P (unstream g x32)\<rbrakk> \<Longrightarrow> unstream (takeWhile_trans P g) s = takeWhile P (unstream g s)
[PROOF STEP]
case (1 s)
[PROOF STATE]
proof (state)
this:
generator g s = Skip ?x2.0 \<Longrightarrow> unstream (takeWhile_trans P g) ?x2.0 = takeWhile P (unstream g ?x2.0)
generator g s = Yield ?x31.0 ?x32.0 \<Longrightarrow> unstream (takeWhile_trans P g) ?x32.0 = takeWhile P (unstream g ?x32.0)

goal (1 subgoal):
 1. \<And>s. \<lbrakk>\<And>x2. generator g s = Skip x2 \<Longrightarrow> unstream (takeWhile_trans P g) x2 = takeWhile P (unstream g x2); \<And>x31 x32. generator g s = Yield x31 x32 \<Longrightarrow> unstream (takeWhile_trans P g) x32 = takeWhile P (unstream g x32)\<rbrakk> \<Longrightarrow> unstream (takeWhile_trans P g) s = takeWhile P (unstream g s)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
generator g s = Skip ?x2.0 \<Longrightarrow> unstream (takeWhile_trans P g) ?x2.0 = takeWhile P (unstream g ?x2.0)
generator g s = Yield ?x31.0 ?x32.0 \<Longrightarrow> unstream (takeWhile_trans P g) ?x32.0 = takeWhile P (unstream g ?x32.0)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
generator g s = Skip ?x2.0 \<Longrightarrow> unstream (takeWhile_trans P g) ?x2.0 = takeWhile P (unstream g ?x2.0)
generator g s = Yield ?x31.0 ?x32.0 \<Longrightarrow> unstream (takeWhile_trans P g) ?x32.0 = takeWhile P (unstream g ?x32.0)

goal (1 subgoal):
 1. unstream (takeWhile_trans P g) s = takeWhile P (unstream g s)
[PROOF STEP]
by(cases "generator g s")(simp_all add: takeWhile_trans.rep_eq takeWhile_raw_def)
[PROOF STATE]
proof (state)
this:
unstream (takeWhile_trans P g) s = takeWhile P (unstream g s)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nn_integral_return_pmf[simp]: "0 \<le> f x \<Longrightarrow> (\<integral>\<^sup>+x. f x \<partial>return_pmf x) = f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> f x \<Longrightarrow> integral\<^sup>N (measure_pmf (return_pmf x)) f = f x
[PROOF STEP]
unfolding return_pmf.rep_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> f x \<Longrightarrow> integral\<^sup>N (return (count_space UNIV) x) f = f x
[PROOF STEP]
by (intro nn_integral_return) auto


[STATEMENT]
lemma minus_splus_sminus_cancel:
  assumes "s adds t" and "t adds\<^sub>p v"
  shows "(t - s) \<oplus> (v \<ominus> t) = v \<ominus> s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t - s) \<oplus> (v \<ominus> t) = v \<ominus> s
[PROOF STEP]
by (simp add: adds_pp_sminus assms minus_splus)


[STATEMENT]
lemma coarser_partitions_with_list_equivalence:
  assumes "distinct P"
  shows "set (map set (coarser_partitions_with_list new_el P)) =
         coarser_partitions_with new_el (set P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
have "set (map set (coarser_partitions_with_list new_el P)) = set (map set (({new_el} # P) # (map ((insert_into_member_list new_el P)) P)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P))
[PROOF STEP]
unfolding coarser_partitions_with_list_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P)) = set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
set (map set (coarser_partitions_with_list new_el P)) = set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P))

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set (map set (coarser_partitions_with_list new_el P)) = set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P))

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
have "\<dots> = insert (insert {new_el} (set P)) ((set \<circ> (insert_into_member_list new_el P)) ` set P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P)) = insert (insert {new_el} (set P)) ((set \<circ> insert_into_member_list new_el P) ` set P)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P)) = insert (insert {new_el} (set P)) ((set \<circ> insert_into_member_list new_el P) ` set P)

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set (map set (({new_el} # P) # map (insert_into_member_list new_el P) P)) = insert (insert {new_el} (set P)) ((set \<circ> insert_into_member_list new_el P) ` set P)

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
have "\<dots> = insert (insert {new_el} (set P)) ((insert_into_member new_el (set P)) ` set P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert (insert {new_el} (set P)) ((set \<circ> insert_into_member_list new_el P) ` set P) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)
[PROOF STEP]
using assms insert_into_member_list_equivalence
[PROOF STATE]
proof (prove)
using this:
distinct P
distinct ?Sets \<Longrightarrow> set (insert_into_member_list ?new_el ?Sets ?S) = insert_into_member ?new_el (set ?Sets) ?S

goal (1 subgoal):
 1. insert (insert {new_el} (set P)) ((set \<circ> insert_into_member_list new_el P) ` set P) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)
[PROOF STEP]
by (metis comp_apply)
[PROOF STATE]
proof (state)
this:
insert (insert {new_el} (set P)) ((set \<circ> insert_into_member_list new_el P) ` set P) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
set (map set (coarser_partitions_with_list new_el P)) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
set (map set (coarser_partitions_with_list new_el P)) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)
[PROOF STEP]
unfolding coarser_partitions_with_def
[PROOF STATE]
proof (prove)
using this:
set (map set (coarser_partitions_with_list new_el P)) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)

goal (1 subgoal):
 1. set (map set (coarser_partitions_with_list new_el P)) = insert (insert {new_el} (set P)) (insert_into_member new_el (set P) ` set P)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
set (map set (coarser_partitions_with_list new_el P)) = coarser_partitions_with new_el (set P)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma div_sound:
  assumes sP: "sound P" and cpos: "0 < c"
  shows "sound (\<lambda>s. P s / c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (\<lambda>s. P s / c)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bounded_by ?b (\<lambda>s. P s / c)
 2. nneg (\<lambda>s. P s / c)
[PROOF STEP]
from sP and cpos
[PROOF STATE]
proof (chain)
picking this:
sound P
0 < c
[PROOF STEP]
have "\<And>s. P s / c \<le> bound_of P / c"
[PROOF STATE]
proof (prove)
using this:
sound P
0 < c

goal (1 subgoal):
 1. \<And>s. P s / c \<le> bound_of P / c
[PROOF STEP]
by(blast intro:divide_right_mono less_imp_le)
[PROOF STATE]
proof (state)
this:
P ?s / c \<le> bound_of P / c

goal (2 subgoals):
 1. bounded_by ?b (\<lambda>s. P s / c)
 2. nneg (\<lambda>s. P s / c)
[PROOF STEP]
thus "bounded_by (bound_of P / c) (\<lambda>s. P s / c)"
[PROOF STATE]
proof (prove)
using this:
P ?s / c \<le> bound_of P / c

goal (1 subgoal):
 1. bounded_by (bound_of P / c) (\<lambda>s. P s / c)
[PROOF STEP]
by(blast)
[PROOF STATE]
proof (state)
this:
bounded_by (bound_of P / c) (\<lambda>s. P s / c)

goal (1 subgoal):
 1. nneg (\<lambda>s. P s / c)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
sound P
0 < c
[PROOF STEP]
show "nneg (\<lambda>s. P s / c)"
[PROOF STATE]
proof (prove)
using this:
sound P
0 < c

goal (1 subgoal):
 1. nneg (\<lambda>s. P s / c)
[PROOF STEP]
by(blast intro:divide_nonneg_pos)
[PROOF STATE]
proof (state)
this:
nneg (\<lambda>s. P s / c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_filter_op_list_mem_vs[simp]:
  "set (filter (\<lambda>op. ListMem v vs) ops) = { op. op \<in> set ops \<and> v \<in> set vs }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (filter (\<lambda>op. ListMem v vs) ops) = {op \<in> set ops. v \<in> set vs}
[PROOF STEP]
using set_filter[of "\<lambda>op. ListMem v vs" ops] ListMem_iff
[PROOF STATE]
proof (prove)
using this:
set (filter (\<lambda>op. ListMem v vs) ops) = {x \<in> set ops. ListMem v vs}
ListMem ?x ?xs = (?x \<in> set ?xs)

goal (1 subgoal):
 1. set (filter (\<lambda>op. ListMem v vs) ops) = {op \<in> set ops. v \<in> set vs}
[PROOF STEP]
by force


[STATEMENT]
lemma construct_cong: "(\<And>b. b \<in> B \<Longrightarrow> f b = g b) \<Longrightarrow> construct B f = construct B g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>b. b \<in> B \<Longrightarrow> f b = g b) \<Longrightarrow> construct B f = construct B g
[PROOF STEP]
unfolding construct_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>b. b \<in> B \<Longrightarrow> f b = g b) \<Longrightarrow> (\<lambda>v. \<Sum>b | vs1.representation (vs1.extend_basis B) v b \<noteq> (0::'a). vs1.representation (vs1.extend_basis B) v b *b (if b \<in> B then f b else (0::'c))) = (\<lambda>v. \<Sum>b | vs1.representation (vs1.extend_basis B) v b \<noteq> (0::'a). vs1.representation (vs1.extend_basis B) v b *b (if b \<in> B then g b else (0::'c)))
[PROOF STEP]
by (rule ext, auto intro!: sum.cong)


[STATEMENT]
lemma enat_the_enat_\<delta>_times_arity_sym[simp]: "enat (the_enat (\<delta> * arity_sym f)) = \<delta> * arity_sym f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enat (the_enat (enat \<delta> * arity_sym f)) = enat \<delta> * arity_sym f
[PROOF STEP]
using arity_sym_ne_infinity_if_\<delta>_gt_0 imult_is_infinity zero_enat_def
[PROOF STATE]
proof (prove)
using this:
0 < \<delta> \<Longrightarrow> arity_sym ?f \<noteq> \<infinity>
(?a * ?b = \<infinity>) = (?a = \<infinity> \<and> ?b \<noteq> 0 \<or> ?b = \<infinity> \<and> ?a \<noteq> 0)
0 = enat 0

goal (1 subgoal):
 1. enat (the_enat (enat \<delta> * arity_sym f)) = enat \<delta> * arity_sym f
[PROOF STEP]
by fastforce


[STATEMENT]
lemma "(\<exists>x. \<forall>y. P(x) = P(y)) \<longrightarrow> ((\<exists>x. P(x)) = (\<forall>y. P(y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. \<forall>y. P x = P y) \<longrightarrow> (\<exists>x. P x) = (\<forall>y. P y)
[PROOF STEP]
by blast


[STATEMENT]
lemma Gromov_completion_inside_limit:
  assumes "x \<notin> Gromov_boundary"
  shows "(u \<longlongrightarrow> x) F \<longleftrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F = ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
 2. ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F \<Longrightarrow> (u \<longlongrightarrow> x) F
[PROOF STEP]
assume *: "((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (state)
this:
((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F

goal (2 subgoals):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
 2. ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F \<Longrightarrow> (u \<longlongrightarrow> x) F
[PROOF STEP]
have "((\<lambda>n. ereal(dist (u n) x)) \<longlongrightarrow> ereal 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. ereal (dist (u n) x)) \<longlongrightarrow> ereal 0) F
[PROOF STEP]
proof (rule tendsto_sandwich[of "\<lambda>_. 0" _ _ "\<lambda>n. esqrt (extended_Gromov_distance (u n) x)"])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> ereal (dist (u n) x)
 2. \<forall>\<^sub>F n in F. ereal (dist (u n) x) \<le> esqrt (extended_Gromov_distance (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> ereal 0) F
 4. ((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> ereal 0) F
[PROOF STEP]
have "((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> esqrt 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> esqrt 0) F
[PROOF STEP]
by (intro tendsto_intros *)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> esqrt 0) F

goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> ereal (dist (u n) x)
 2. \<forall>\<^sub>F n in F. ereal (dist (u n) x) \<le> esqrt (extended_Gromov_distance (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> ereal 0) F
 4. ((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> ereal 0) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> esqrt 0) F
[PROOF STEP]
show "((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> ereal 0) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> esqrt 0) F

goal (1 subgoal):
 1. ((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> ereal 0) F
[PROOF STEP]
by (simp add: zero_ereal_def)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> ereal 0) F

goal (3 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> ereal (dist (u n) x)
 2. \<forall>\<^sub>F n in F. ereal (dist (u n) x) \<le> esqrt (extended_Gromov_distance (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> ereal 0) F
[PROOF STEP]
qed (auto simp add: Gromov_completion_dist_comparison zero_ereal_def)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. ereal (dist (u n) x)) \<longlongrightarrow> ereal 0) F

goal (2 subgoals):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
 2. ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F \<Longrightarrow> (u \<longlongrightarrow> x) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. ereal (dist (u n) x)) \<longlongrightarrow> ereal 0) F
[PROOF STEP]
have "((\<lambda>n. real_of_ereal(ereal(dist (u n) x))) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. ereal (dist (u n) x)) \<longlongrightarrow> ereal 0) F

goal (1 subgoal):
 1. ((\<lambda>n. real_of_ereal (ereal (dist (u n) x))) \<longlongrightarrow> 0) F
[PROOF STEP]
by (intro lim_real_of_ereal)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. real_of_ereal (ereal (dist (u n) x))) \<longlongrightarrow> 0) F

goal (2 subgoals):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
 2. ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F \<Longrightarrow> (u \<longlongrightarrow> x) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. real_of_ereal (ereal (dist (u n) x))) \<longlongrightarrow> 0) F
[PROOF STEP]
show "(u \<longlongrightarrow> x) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. real_of_ereal (ereal (dist (u n) x))) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F
[PROOF STEP]
by (subst tendsto_dist_iff, auto)
[PROOF STATE]
proof (state)
this:
(u \<longlongrightarrow> x) F

goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
assume *: "(u \<longlongrightarrow> x) F"
[PROOF STATE]
proof (state)
this:
(u \<longlongrightarrow> x) F

goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
have "x \<in> range to_Gromov_completion"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> range to_Gromov_completion
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<notin> Gromov_boundary

goal (1 subgoal):
 1. x \<in> range to_Gromov_completion
[PROOF STEP]
unfolding Gromov_boundary_def
[PROOF STATE]
proof (prove)
using this:
x \<notin> UNIV - range to_Gromov_completion

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

goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
have "((\<lambda>n. esqrt(extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
proof (rule tendsto_sandwich[of "\<lambda>_. 0" _ _ "\<lambda>n. 2 * ereal(dist (u n) x)"])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 4. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
have A: "extended_Gromov_distance (to_Gromov_completion basepoint) x < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_distance (to_Gromov_completion basepoint) x < \<infinity>
[PROOF STEP]
by (simp add: assms extended_Gromov_distance_def)
[PROOF STATE]
proof (state)
this:
extended_Gromov_distance (to_Gromov_completion basepoint) x < \<infinity>

goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 4. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
obtain e where e: "e > 0" "\<And>y. dist x y \<le> e \<Longrightarrow> esqrt(extended_Gromov_distance x y) \<le> 2 * ereal (dist x y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>e. \<lbrakk>0 < e; \<And>y. dist x y \<le> e \<Longrightarrow> esqrt (extended_Gromov_distance x y) \<le> 2 * ereal (dist x y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using inside_Gromov_distance_approx[OF A]
[PROOF STATE]
proof (prove)
using this:
\<exists>e>0. \<forall>xa y. extended_Gromov_distance (to_Gromov_completion basepoint) xa \<le> extended_Gromov_distance (to_Gromov_completion basepoint) x \<longrightarrow> dist xa y \<le> e \<longrightarrow> esqrt (extended_Gromov_distance xa y) \<le> 2 * ereal (dist xa y)

goal (1 subgoal):
 1. (\<And>e. \<lbrakk>0 < e; \<And>y. dist x y \<le> e \<Longrightarrow> esqrt (extended_Gromov_distance x y) \<le> 2 * ereal (dist x y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < e
dist x ?y \<le> e \<Longrightarrow> esqrt (extended_Gromov_distance x ?y) \<le> 2 * ereal (dist x ?y)

goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 4. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
have B: "eventually (\<lambda>n. dist x (u n) < e) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. dist x (u n) < e
[PROOF STEP]
using order_tendstoD(2)[OF iffD1[OF tendsto_dist_iff *] \<open>e > 0\<close>]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F xa in F. dist (u xa) x < e

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. dist x (u n) < e
[PROOF STEP]
by (simp add: dist_commute)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. dist x (u n) < e

goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 4. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. dist x (u n) < e
[PROOF STEP]
have "eventually (\<lambda>n. esqrt(extended_Gromov_distance x (u n)) \<le> 2 * ereal (dist x (u n))) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. dist x (u n) < e

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance x (u n)) \<le> 2 * ereal (dist x (u n))
[PROOF STEP]
using eventually_mono[OF _ e(2)] less_imp_le
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. dist x (u n) < e
\<lbrakk>eventually ?P ?F; \<And>xa. ?P xa \<Longrightarrow> dist x (?y1 xa) \<le> e\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F xa in ?F. esqrt (extended_Gromov_distance x (?y1 xa)) \<le> 2 * ereal (dist x (?y1 xa))
?x < ?y \<Longrightarrow> ?x \<le> ?y

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance x (u n)) \<le> 2 * ereal (dist x (u n))
[PROOF STEP]
by (metis (mono_tags, lifting))
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance x (u n)) \<le> 2 * ereal (dist x (u n))

goal (4 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)
 3. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 4. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance x (u n)) \<le> 2 * ereal (dist x (u n))
[PROOF STEP]
show "eventually (\<lambda>n. esqrt(extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance x (u n)) \<le> 2 * ereal (dist x (u n))

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)
[PROOF STEP]
by (simp add: dist_commute extended_Gromov_distance_commute)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. esqrt (extended_Gromov_distance (u n) x) \<le> 2 * ereal (dist (u n) x)

goal (3 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 3. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
have "((\<lambda>n. 2 * ereal(dist (u n) x)) \<longlongrightarrow> 2 * ereal 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 2 * ereal 0) F
[PROOF STEP]
apply (intro tendsto_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<bar>2\<bar> \<noteq> \<infinity>
 2. ((\<lambda>xa. dist (u xa) x) \<longlongrightarrow> 0) F
[PROOF STEP]
using tendsto_dist_iff *
[PROOF STATE]
proof (prove)
using this:
(?f \<longlongrightarrow> ?l) ?F = ((\<lambda>x. dist (?f x) ?l) \<longlongrightarrow> 0) ?F
(u \<longlongrightarrow> x) F

goal (2 subgoals):
 1. \<bar>2\<bar> \<noteq> \<infinity>
 2. ((\<lambda>xa. dist (u xa) x) \<longlongrightarrow> 0) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 2 * ereal 0) F

goal (3 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
 3. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 2 * ereal 0) F
[PROOF STEP]
show "((\<lambda>n. 2 * ereal(dist (u n) x)) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 2 * ereal 0) F

goal (1 subgoal):
 1. ((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
by (simp add: zero_ereal_def)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. 2 * ereal (dist (u n) x)) \<longlongrightarrow> 0) F

goal (2 subgoals):
 1. \<forall>\<^sub>F n in F. 0 \<le> esqrt (extended_Gromov_distance (u n) x)
 2. ((\<lambda>_. 0) \<longlongrightarrow> 0) F
[PROOF STEP]
qed (auto)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0) F
[PROOF STEP]
have "((\<lambda>n. esqrt(extended_Gromov_distance (u n) x) * esqrt(extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0 * 0) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. ((\<lambda>n. esqrt (extended_Gromov_distance (u n) x) * esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0 * 0) F
[PROOF STEP]
by (intro tendsto_intros, auto)
[PROOF STATE]
proof (state)
this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x) * esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0 * 0) F

goal (1 subgoal):
 1. (u \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x) * esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0 * 0) F
[PROOF STEP]
show "((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. esqrt (extended_Gromov_distance (u n) x) * esqrt (extended_Gromov_distance (u n) x)) \<longlongrightarrow> 0 * 0) F

goal (1 subgoal):
 1. ((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. extended_Gromov_distance (u n) x) \<longlongrightarrow> 0) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in \<Z>) dg_Set_incl_Set_is_arr'[dg_cs_intros, dg_Set_cs_intros]:
  assumes "A \<in>\<^sub>\<circ> dg_Set \<alpha>\<lparr>Obj\<rparr>"
    and "B \<in>\<^sub>\<circ> dg_Set \<alpha>\<lparr>Obj\<rparr>"
    and "A \<subseteq>\<^sub>\<circ> B"
    and "A' = A"
    and "B' = B"
    and "\<CC>' = dg_Set \<alpha>"
  shows "incl_Set A B : A' \<mapsto>\<^bsub>\<CC>'\<^esub> B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. incl_Rel A B : A' \<mapsto>\<^bsub>\<CC>'\<^esub> B'
[PROOF STEP]
using assms(1-3)
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> dg_Set \<alpha>\<lparr>Obj\<rparr>
B \<in>\<^sub>\<circ> dg_Set \<alpha>\<lparr>Obj\<rparr>
A \<subseteq>\<^sub>\<circ> B

goal (1 subgoal):
 1. incl_Rel A B : A' \<mapsto>\<^bsub>\<CC>'\<^esub> B'
[PROOF STEP]
unfolding assms(4-6)
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> dg_Set \<alpha>\<lparr>Obj\<rparr>
B \<in>\<^sub>\<circ> dg_Set \<alpha>\<lparr>Obj\<rparr>
A \<subseteq>\<^sub>\<circ> B

goal (1 subgoal):
 1. incl_Rel A B : A \<mapsto>\<^bsub>dg_Set \<alpha>\<^esub> B
[PROOF STEP]
by (rule dg_Set_incl_Set_is_arr)


[STATEMENT]
lemma finite_Max_sum':
  "finite (range
     (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) +
      abs_infty_q (poly.coeff (of_qr y) xa)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
have finite_range_x:
    "finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
using finite_Max[of x]
[PROOF STATE]
proof (prove)
using this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
have finite_range_y:
    "finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr y) xa)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
using finite_Max[of y]
[PROOF STATE]
proof (prove)
using this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr y) xa)))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr y) xa)))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
using finite_range_plus[OF finite_range_x finite_range_y]
[PROOF STATE]
proof (prove)
using this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa) + abs_infty_q (poly.coeff (of_qr y) xa)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma star_rectangle_decompose:
  assumes "rectangle a"
  shows "(a \<squnion> x)\<^sup>\<star> = x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<squnion> x)\<^sup>\<star> = x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
proof (rule order.antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
have 1: "1 \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. reflexive (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>)
[PROOF STEP]
by (simp add: star.circ_reflexive sup.coboundedI1)
[PROOF STATE]
proof (state)
this:
reflexive (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>)

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
have "(a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) = a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) = a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>
[PROOF STEP]
by (metis comp_associative semiring.combine_common_factor semiring.distrib_left sup_commute)
[PROOF STATE]
proof (state)
this:
(a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) = a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) = a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
have "... = a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>
[PROOF STEP]
using assms rectangle_star_rectangle
[PROOF STATE]
proof (prove)
using this:
rectangle a
rectangle ?a \<Longrightarrow> ?a * ?x\<^sup>\<star> * ?a \<le> ?a

goal (1 subgoal):
 1. a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>
[PROOF STEP]
by (simp add: mult_left_isotone sup_absorb1)
[PROOF STATE]
proof (state)
this:
a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a * x\<^sup>\<star> \<squnion> a * x\<^sup>\<star> * a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
have "... = x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
by (metis comp_associative star.circ_loop_fixpoint sup_assoc sup_commute)
[PROOF STATE]
proof (state)
this:
a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a * x\<^sup>\<star> \<squnion> x\<^sup>+ \<squnion> x\<^sup>+ * a * x\<^sup>\<star> = x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
have "... \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
using star.left_plus_below_circ sup_left_isotone
[PROOF STATE]
proof (prove)
using this:
?x\<^sup>+ \<le> ?x\<^sup>\<star>
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?z \<le> ?y \<squnion> ?z

goal (1 subgoal):
 1. x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x\<^sup>+ \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>

goal (2 subgoals):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
 2. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
show "(a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
(a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>

goal (1 subgoal):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
(a \<squnion> x) * (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>) \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
reflexive (x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>)

goal (1 subgoal):
 1. (a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>
[PROOF STEP]
by (metis comp_right_one le_supI star_left_induct)
[PROOF STATE]
proof (state)
this:
(a \<squnion> x)\<^sup>\<star> \<le> x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star>

goal (1 subgoal):
 1. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
show "x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>
[PROOF STEP]
by (metis comp_isotone le_supE le_supI star.circ_increasing star.circ_transitive_equal star_isotone sup_ge2)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<star> \<squnion> x\<^sup>\<star> * a * x\<^sup>\<star> \<le> (a \<squnion> x)\<^sup>\<star>

goal:
No subgoals!
[PROOF STEP]
qed