[STATEMENT]
lemma group_isomorphisms_homology_group_prod_retract:
  assumes "S = {} \<or> S retract_of_space X"
  obtains \<H> \<K> where
    "subgroup \<H> (homology_group p X)"
    "subgroup \<K> (homology_group p X)"
    "(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y)
    \<in> iso (DirProd (subgroup_generated (homology_group p X) \<H>) (subgroup_generated (homology_group p X) \<K>))
          (homology_group p X)"
    "(hom_induced p (subtopology X S) {} X {} id)
    \<in> iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)"
    "(hom_induced p X {} X S id)
    \<in> iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S = {} \<or> S retract_of_space X

goal (1 subgoal):
 1. (\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S = {}\<rbrakk> \<Longrightarrow> thesis
 2. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S retract_of_space X\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
assume "S = {}"
[PROOF STATE]
proof (state)
this:
S = {}

goal (2 subgoals):
 1. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S = {}\<rbrakk> \<Longrightarrow> thesis
 2. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S retract_of_space X\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof (rule splitting_lemma_left [OF homology_exactness_axiom_3 [of p]])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. ?f' \<in> hom (homology_group p ?X1) (homology_group p (subtopology ?X1 ?S1))
 2. \<And>x. x \<in> carrier (homology_group p (subtopology ?X1 ?S1)) \<Longrightarrow> ?f' (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id x) = x
 3. inj_on (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id) (carrier (homology_group p (subtopology ?X1 ?S1)))
 4. hom_induced p ?X1 {} ?X1 ?S1 id ` carrier (homology_group p ?X1) = carrier (relative_homology_group p ?X1 ?S1)
 5. \<And>H K. \<lbrakk>H \<lhd> homology_group p ?X1; K \<lhd> homology_group p ?X1; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p ?X1\<^esub>}; H <#>\<^bsub>homology_group p ?X1\<^esub> K = carrier (homology_group p ?X1); hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id \<in> Group.iso (homology_group p (subtopology ?X1 ?S1)) (subgroup_generated (homology_group p ?X1) H); hom_induced p ?X1 {} ?X1 ?S1 id \<in> Group.iso (subgroup_generated (homology_group p ?X1) K) (relative_homology_group p ?X1 ?S1)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
let ?f = "\<lambda>x. one(homology_group p (subtopology X {}))"
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. ?f' \<in> hom (homology_group p ?X1) (homology_group p (subtopology ?X1 ?S1))
 2. \<And>x. x \<in> carrier (homology_group p (subtopology ?X1 ?S1)) \<Longrightarrow> ?f' (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id x) = x
 3. inj_on (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id) (carrier (homology_group p (subtopology ?X1 ?S1)))
 4. hom_induced p ?X1 {} ?X1 ?S1 id ` carrier (homology_group p ?X1) = carrier (relative_homology_group p ?X1 ?S1)
 5. \<And>H K. \<lbrakk>H \<lhd> homology_group p ?X1; K \<lhd> homology_group p ?X1; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p ?X1\<^esub>}; H <#>\<^bsub>homology_group p ?X1\<^esub> K = carrier (homology_group p ?X1); hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id \<in> Group.iso (homology_group p (subtopology ?X1 ?S1)) (subgroup_generated (homology_group p ?X1) H); hom_induced p ?X1 {} ?X1 ?S1 id \<in> Group.iso (subgroup_generated (homology_group p ?X1) K) (relative_homology_group p ?X1 ?S1)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show "?f \<in> hom (homology_group p X) (homology_group p (subtopology X {}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<one>\<^bsub>homology_group p (subtopology X {})\<^esub>) \<in> hom (homology_group p X) (homology_group p (subtopology X {}))
[PROOF STEP]
by (simp add: trivial_hom)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<one>\<^bsub>homology_group p (subtopology X {})\<^esub>) \<in> hom (homology_group p X) (homology_group p (subtopology X {}))

goal (4 subgoals):
 1. \<And>x. x \<in> carrier (homology_group p (subtopology X {})) \<Longrightarrow> \<one>\<^bsub>homology_group p (subtopology X {})\<^esub> = x
 2. inj_on (hom_induced p (subtopology X {}) {} X {} id) (carrier (homology_group p (subtopology X {})))
 3. hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)
 4. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
have tg: "trivial_group (homology_group p (subtopology X {}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial_group (homology_group p (subtopology X {}))
[PROOF STEP]
by (auto simp: topspace_subtopology trivial_homology_group_empty)
[PROOF STATE]
proof (state)
this:
trivial_group (homology_group p (subtopology X {}))

goal (4 subgoals):
 1. \<And>x. x \<in> carrier (homology_group p (subtopology X {})) \<Longrightarrow> \<one>\<^bsub>homology_group p (subtopology X {})\<^esub> = x
 2. inj_on (hom_induced p (subtopology X {}) {} X {} id) (carrier (homology_group p (subtopology X {})))
 3. hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)
 4. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
trivial_group (homology_group p (subtopology X {}))
[PROOF STEP]
have [simp]: "carrier (homology_group p (subtopology X {})) = {one (homology_group p (subtopology X {}))}"
[PROOF STATE]
proof (prove)
using this:
trivial_group (homology_group p (subtopology X {}))

goal (1 subgoal):
 1. carrier (homology_group p (subtopology X {})) = {\<one>\<^bsub>homology_group p (subtopology X {})\<^esub>}
[PROOF STEP]
by (auto simp: trivial_group_def)
[PROOF STATE]
proof (state)
this:
carrier (homology_group p (subtopology X {})) = {\<one>\<^bsub>homology_group p (subtopology X {})\<^esub>}

goal (4 subgoals):
 1. \<And>x. x \<in> carrier (homology_group p (subtopology X {})) \<Longrightarrow> \<one>\<^bsub>homology_group p (subtopology X {})\<^esub> = x
 2. inj_on (hom_induced p (subtopology X {}) {} X {} id) (carrier (homology_group p (subtopology X {})))
 3. hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)
 4. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
carrier (homology_group p (subtopology X {})) = {\<one>\<^bsub>homology_group p (subtopology X {})\<^esub>}
[PROOF STEP]
show "?f (hom_induced p (subtopology X {}) {} X {} id x) = x"
      if "x \<in> carrier (homology_group p (subtopology X {}))" for x
[PROOF STATE]
proof (prove)
using this:
carrier (homology_group p (subtopology X {})) = {\<one>\<^bsub>homology_group p (subtopology X {})\<^esub>}

goal (1 subgoal):
 1. \<one>\<^bsub>homology_group p (subtopology X {})\<^esub> = x
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
carrier (homology_group p (subtopology X {})) = {\<one>\<^bsub>homology_group p (subtopology X {})\<^esub>}
x \<in> carrier (homology_group p (subtopology X {}))

goal (1 subgoal):
 1. \<one>\<^bsub>homology_group p (subtopology X {})\<^esub> = x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?x1 \<in> carrier (homology_group p (subtopology X {})) \<Longrightarrow> \<one>\<^bsub>homology_group p (subtopology X {})\<^esub> = ?x1

goal (3 subgoals):
 1. inj_on (hom_induced p (subtopology X {}) {} X {} id) (carrier (homology_group p (subtopology X {})))
 2. hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)
 3. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show "inj_on (hom_induced p (subtopology X {}) {} X {} id)
               (carrier (homology_group p (subtopology X {})))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (hom_induced p (subtopology X {}) {} X {} id) (carrier (homology_group p (subtopology X {})))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inj_on (hom_induced p (subtopology X {}) {} X {} id) (carrier (homology_group p (subtopology X {})))

goal (2 subgoals):
 1. hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)
 2. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show "hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)
[PROOF STEP]
by (metis epi_hom_induced_relativization)
[PROOF STATE]
proof (state)
this:
hom_induced p X {} X {} id ` carrier (homology_group p X) = carrier (homology_group p X)

goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
fix \<H> \<K>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
assume *: "\<H> \<lhd> homology_group p X" "\<K> \<lhd> homology_group p X"
      "\<H> \<inter> \<K> \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}"
      "hom_induced p (subtopology X {}) {} X {} id
     \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) \<H>)"
      "hom_induced p X {} X {} id
     \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X {})"
      "\<H> <#>\<^bsub>homology_group p X\<^esub> \<K> = carrier (homology_group p X)"
[PROOF STATE]
proof (state)
this:
\<H> \<lhd> homology_group p X
\<K> \<lhd> homology_group p X
\<H> \<inter> \<K> \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}
hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) \<H>)
hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (homology_group p X)
\<H> <#>\<^bsub>homology_group p X\<^esub> \<K> = carrier (homology_group p X)

goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) H); hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) K) (homology_group p X)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof (rule that)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. subgroup ?\<H> (homology_group p X)
 2. subgroup ?\<K> (homology_group p X)
 3. (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) ?\<H> \<times>\<times> subgroup_generated (homology_group p X) ?\<K>) (homology_group p X)
 4. hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) ?\<H>)
 5. hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) ?\<K>) (relative_homology_group p X S)
[PROOF STEP]
show "(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y)
        \<in> iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>)
            (homology_group p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
\<H> \<lhd> homology_group p X
\<K> \<lhd> homology_group p X
\<H> \<inter> \<K> \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}
hom_induced p (subtopology X {}) {} X {} id \<in> Group.iso (homology_group p (subtopology X {})) (subgroup_generated (homology_group p X) \<H>)
hom_induced p X {} X {} id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (homology_group p X)
\<H> <#>\<^bsub>homology_group p X\<^esub> \<K> = carrier (homology_group p X)

goal (1 subgoal):
 1. (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)
[PROOF STEP]
by (simp add: group_disjoint_sum.iso_group_mul normal_def group_disjoint_sum_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)

goal (4 subgoals):
 1. subgroup \<H> (homology_group p X)
 2. subgroup \<K> (homology_group p X)
 3. hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)
 4. hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)
[PROOF STEP]
qed (use \<open>S = {}\<close> * in \<open>auto simp: normal_def\<close>)
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal (1 subgoal):
 1. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S retract_of_space X\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S retract_of_space X\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
assume "S retract_of_space X"
[PROOF STATE]
proof (state)
this:
S retract_of_space X

goal (1 subgoal):
 1. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S retract_of_space X\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S retract_of_space X
[PROOF STEP]
obtain r where "S \<subseteq> topspace X" and r: "continuous_map X (subtopology X S) r"
                   and req: "\<forall>x \<in> S. r x = x"
[PROOF STATE]
proof (prove)
using this:
S retract_of_space X

goal (1 subgoal):
 1. (\<And>r. \<lbrakk>S \<subseteq> topspace X; continuous_map X (subtopology X S) r; \<forall>x\<in>S. r x = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: retract_of_space_def)
[PROOF STATE]
proof (state)
this:
S \<subseteq> topspace X
continuous_map X (subtopology X S) r
\<forall>x\<in>S. r x = x

goal (1 subgoal):
 1. \<lbrakk>\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis; S retract_of_space X\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof (rule splitting_lemma_left [OF homology_exactness_axiom_3 [of p]])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. ?f' \<in> hom (homology_group p ?X1) (homology_group p (subtopology ?X1 ?S1))
 2. \<And>x. x \<in> carrier (homology_group p (subtopology ?X1 ?S1)) \<Longrightarrow> ?f' (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id x) = x
 3. inj_on (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id) (carrier (homology_group p (subtopology ?X1 ?S1)))
 4. hom_induced p ?X1 {} ?X1 ?S1 id ` carrier (homology_group p ?X1) = carrier (relative_homology_group p ?X1 ?S1)
 5. \<And>H K. \<lbrakk>H \<lhd> homology_group p ?X1; K \<lhd> homology_group p ?X1; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p ?X1\<^esub>}; H <#>\<^bsub>homology_group p ?X1\<^esub> K = carrier (homology_group p ?X1); hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id \<in> Group.iso (homology_group p (subtopology ?X1 ?S1)) (subgroup_generated (homology_group p ?X1) H); hom_induced p ?X1 {} ?X1 ?S1 id \<in> Group.iso (subgroup_generated (homology_group p ?X1) K) (relative_homology_group p ?X1 ?S1)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
let ?f = "hom_induced p X {} (subtopology X S) {} r"
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. ?f' \<in> hom (homology_group p ?X1) (homology_group p (subtopology ?X1 ?S1))
 2. \<And>x. x \<in> carrier (homology_group p (subtopology ?X1 ?S1)) \<Longrightarrow> ?f' (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id x) = x
 3. inj_on (hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id) (carrier (homology_group p (subtopology ?X1 ?S1)))
 4. hom_induced p ?X1 {} ?X1 ?S1 id ` carrier (homology_group p ?X1) = carrier (relative_homology_group p ?X1 ?S1)
 5. \<And>H K. \<lbrakk>H \<lhd> homology_group p ?X1; K \<lhd> homology_group p ?X1; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p ?X1\<^esub>}; H <#>\<^bsub>homology_group p ?X1\<^esub> K = carrier (homology_group p ?X1); hom_induced p (subtopology ?X1 ?S1) {} ?X1 {} id \<in> Group.iso (homology_group p (subtopology ?X1 ?S1)) (subgroup_generated (homology_group p ?X1) H); hom_induced p ?X1 {} ?X1 ?S1 id \<in> Group.iso (subgroup_generated (homology_group p ?X1) K) (relative_homology_group p ?X1 ?S1)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show "?f \<in> hom (homology_group p X) (homology_group p (subtopology X S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p X {} (subtopology X S) {} r \<in> hom (homology_group p X) (homology_group p (subtopology X S))
[PROOF STEP]
by (simp add: hom_induced_empty_hom)
[PROOF STATE]
proof (state)
this:
hom_induced p X {} (subtopology X S) {} r \<in> hom (homology_group p X) (homology_group p (subtopology X S))

goal (4 subgoals):
 1. \<And>x. x \<in> carrier (homology_group p (subtopology X S)) \<Longrightarrow> hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id x) = x
 2. inj_on (hom_induced p (subtopology X S) {} X {} id) (carrier (homology_group p (subtopology X S)))
 3. hom_induced p X {} X S id ` carrier (homology_group p X) = carrier (relative_homology_group p X S)
 4. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show eqx: "?f (hom_induced p (subtopology X S) {} X {} id x) = x"
      if "x \<in> carrier (homology_group p (subtopology X S))" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id x) = x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id x) = x
[PROOF STEP]
have "hom_induced p (subtopology X S) {} (subtopology X S) {} r x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p (subtopology X S) {} (subtopology X S) {} r x = x
[PROOF STEP]
by (metis \<open>S \<subseteq> topspace X\<close> continuous_map_from_subtopology hom_induced_id_gen inf.absorb_iff2 r req that topspace_subtopology)
[PROOF STATE]
proof (state)
this:
hom_induced p (subtopology X S) {} (subtopology X S) {} r x = x

goal (1 subgoal):
 1. hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id x) = x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hom_induced p (subtopology X S) {} (subtopology X S) {} r x = x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
hom_induced p (subtopology X S) {} (subtopology X S) {} r x = x

goal (1 subgoal):
 1. hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id x) = x
[PROOF STEP]
by (simp add: r hom_induced_compose [unfolded o_def fun_eq_iff, rule_format, symmetric])
[PROOF STATE]
proof (state)
this:
hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id x) = x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> carrier (homology_group p (subtopology X S)) \<Longrightarrow> hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id ?x) = ?x

goal (3 subgoals):
 1. inj_on (hom_induced p (subtopology X S) {} X {} id) (carrier (homology_group p (subtopology X S)))
 2. hom_induced p X {} X S id ` carrier (homology_group p X) = carrier (relative_homology_group p X S)
 3. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> carrier (homology_group p (subtopology X S)) \<Longrightarrow> hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id ?x) = ?x
[PROOF STEP]
show "inj_on (hom_induced p (subtopology X S) {} X {} id)
               (carrier (homology_group p (subtopology X S)))"
[PROOF STATE]
proof (prove)
using this:
?x \<in> carrier (homology_group p (subtopology X S)) \<Longrightarrow> hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id ?x) = ?x

goal (1 subgoal):
 1. inj_on (hom_induced p (subtopology X S) {} X {} id) (carrier (homology_group p (subtopology X S)))
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
using this:
?x \<in> carrier (homology_group p (subtopology X S)) \<Longrightarrow> hom_induced p X {} (subtopology X S) {} r (hom_induced p (subtopology X S) {} X {} id ?x) = ?x

goal (1 subgoal):
 1. \<forall>x\<in>carrier (homology_group p (subtopology X S)). \<forall>y\<in>carrier (homology_group p (subtopology X S)). hom_induced p (subtopology X S) {} X {} id x = hom_induced p (subtopology X S) {} X {} id y \<longrightarrow> x = y
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
inj_on (hom_induced p (subtopology X S) {} X {} id) (carrier (homology_group p (subtopology X S)))

goal (2 subgoals):
 1. hom_induced p X {} X S id ` carrier (homology_group p X) = carrier (relative_homology_group p X S)
 2. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show "hom_induced p X {} X S id ` carrier (homology_group p X) = carrier (relative_homology_group p X S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p X {} X S id ` carrier (homology_group p X) = carrier (relative_homology_group p X S)
[PROOF STEP]
by (simp add: \<open>S retract_of_space X\<close> epi_hom_induced_relativization)
[PROOF STATE]
proof (state)
this:
hom_induced p X {} X S id ` carrier (homology_group p X) = carrier (relative_homology_group p X S)

goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
fix \<H> \<K>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
assume *: "\<H> \<lhd> homology_group p X" "\<K> \<lhd> homology_group p X"
      "\<H> \<inter> \<K> \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}"
      "\<H> <#>\<^bsub>homology_group p X\<^esub> \<K> = carrier (homology_group p X)"
      "hom_induced p (subtopology X S) {} X {} id
     \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)"
      "hom_induced p X {} X S id
     \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)"
[PROOF STATE]
proof (state)
this:
\<H> \<lhd> homology_group p X
\<K> \<lhd> homology_group p X
\<H> \<inter> \<K> \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}
\<H> <#>\<^bsub>homology_group p X\<^esub> \<K> = carrier (homology_group p X)
hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)
hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)

goal (1 subgoal):
 1. \<And>H K. \<lbrakk>H \<lhd> homology_group p X; K \<lhd> homology_group p X; H \<inter> K \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}; H <#>\<^bsub>homology_group p X\<^esub> K = carrier (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) H); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) K) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
show "thesis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof (rule that)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. subgroup ?\<H> (homology_group p X)
 2. subgroup ?\<K> (homology_group p X)
 3. (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) ?\<H> \<times>\<times> subgroup_generated (homology_group p X) ?\<K>) (homology_group p X)
 4. hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) ?\<H>)
 5. hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) ?\<K>) (relative_homology_group p X S)
[PROOF STEP]
show "(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y)
          \<in> iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>)
                (homology_group p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
\<H> \<lhd> homology_group p X
\<K> \<lhd> homology_group p X
\<H> \<inter> \<K> \<subseteq> {\<one>\<^bsub>homology_group p X\<^esub>}
\<H> <#>\<^bsub>homology_group p X\<^esub> \<K> = carrier (homology_group p X)
hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)
hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)

goal (1 subgoal):
 1. (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)
[PROOF STEP]
by (simp add: group_disjoint_sum.iso_group_mul normal_def group_disjoint_sum_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)

goal (4 subgoals):
 1. subgroup \<H> (homology_group p X)
 2. subgroup \<K> (homology_group p X)
 3. hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)
 4. hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)
[PROOF STEP]
qed (use * in \<open>auto simp: normal_def\<close>)
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma strict_preference_iff_strict_utility:
 assumes "p \<in> lotteries_on outcomes"
 assumes "q \<in> lotteries_on outcomes"
 shows "p \<succ>[relation] q \<longleftrightarrow> measure_pmf.expectation p u > measure_pmf.expectation q u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<succeq> q \<and> (q, p) \<notin> relation) = (measure_pmf.expectation q u < measure_pmf.expectation p u)
[PROOF STEP]
by (meson assms(1) assms(2) less_eq_real_def not_le util_def)


[STATEMENT]
lemma Tn_integral_preserving:
  fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  assumes "integrable M f"
  shows "integrable M (\<lambda>x. f((T^^n) x))" "(\<integral>x. f((T^^n) x) \<partial>M) = (\<integral>x. f x \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable M (\<lambda>x. f ((T ^^ n) x)) &&& LINT x|M. f ((T ^^ n) x) = integral\<^sup>L M f
[PROOF STEP]
using measure_preserving_preserves_integral[OF Tn_measure_preserving assms]
[PROOF STATE]
proof (prove)
using this:
integrable M (\<lambda>x. f ((T ^^ ?n1) x))
integral\<^sup>L M f = LINT x|M. f ((T ^^ ?n1) x)

goal (1 subgoal):
 1. integrable M (\<lambda>x. f ((T ^^ n) x)) &&& LINT x|M. f ((T ^^ n) x) = integral\<^sup>L M f
[PROOF STEP]
by auto


[STATEMENT]
lemma PR_TAG_intro_prio2:
  "PR_TAG (\<lambda>x. 1 / b) = (\<lambda>x. inverse b)"
  "PR_TAG (\<lambda>x. a / b) = (\<lambda>x. a / b)"
  "PR_TAG (\<lambda>x. a / b * x^n :: real) = (\<lambda>x. poly (monom (a/b) n) x)"
  "PR_TAG (\<lambda>x. x^n * a / b :: real) = (\<lambda>x. poly (monom (a/b) n) x)"
  "PR_TAG (\<lambda>x. a * x^n :: real) = (\<lambda>x. poly (monom a n) x)"
  "PR_TAG (\<lambda>x. x^n * a :: real) = (\<lambda>x. poly (monom a n) x)"
  "PR_TAG (\<lambda>x. x^n / a :: real) = (\<lambda>x. poly (monom (inverse a) n) x)"
(* TODO: can this be done more efficiently? I should think so. *)
  "PR_TAG (\<lambda>x. f x^(Suc (Suc 0)) :: real) = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. f x * f x :: real) = (\<lambda>x. poly p x)"
  "PR_TAG (\<lambda>x. (f x)^Suc n :: real) = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. (f x)^n * f x :: real) = (\<lambda>x. poly p x)"
  "PR_TAG (\<lambda>x. (f x)^Suc n :: real) = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. f x * (f x)^n :: real) = (\<lambda>x. poly p x)"
  "PR_TAG (\<lambda>x. (f x)^(m+n) :: real) = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. (f x)^m * (f x)^n :: real) = (\<lambda>x. poly p x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((PR_TAG (\<lambda>x. 1 / b) = (\<lambda>x. inverse b) &&& PR_TAG (\<lambda>x. a / b) = (\<lambda>x. a / b)) &&& PR_TAG (\<lambda>x. a / b * x ^ n) = poly (monom (a / b) n) &&& PR_TAG (\<lambda>x. x ^ n * a / b) = poly (monom (a / b) n) &&& PR_TAG (\<lambda>x. a * x ^ n) = poly (monom a n)) &&& (PR_TAG (\<lambda>x. x ^ n * a) = poly (monom a n) &&& PR_TAG (\<lambda>x. x ^ n / a) = poly (monom (inverse a) n) &&& (PR_TAG (\<lambda>x. f x ^ Suc (Suc 0)) = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x * f x) = poly p)) &&& (PR_TAG (\<lambda>x. f x ^ Suc n) = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x ^ n * f x) = poly p) &&& (PR_TAG (\<lambda>x. f x ^ Suc n) = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x * f x ^ n) = poly p) &&& (PR_TAG (\<lambda>x. f x ^ (m + n)) = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x ^ m * f x ^ n) = poly p)
[PROOF STEP]
by (simp_all add: PR_TAG_def field_simps poly_monom power_add)


[STATEMENT]
lemma (in Ring) exact4_bijec:"\<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M;
       f \<in> mHom R M N; z1 \<in> mHom R N (Zm R e);
       exact4 R (Zm R e) z M f N z1 (Zm R e)\<rbrakk> \<Longrightarrow> bijec\<^bsub>M,N\<^esub> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; z1 \<in> mHom R N (Zm R e); exact4 R (Zm R e) z M f N z1 (Zm R e)\<rbrakk> \<Longrightarrow> bijec\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (frule exact4_exact3 [of M N z e f z1], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; z1 \<in> mHom R N (Zm R e); exact4 R (Zm R e) z M f N z1 (Zm R e); exact3 R (Zm R e) z M f N \<and> exact3 R M f N z1 (Zm R e)\<rbrakk> \<Longrightarrow> bijec\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; z1 \<in> mHom R N (Zm R e); exact4 R (Zm R e) z M f N z1 (Zm R e); exact3 R (Zm R e) z M f N; exact3 R M f N z1 (Zm R e)\<rbrakk> \<Longrightarrow> bijec\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:bijec_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; z1 \<in> mHom R N (Zm R e); exact4 R (Zm R e) z M f N z1 (Zm R e); exact3 R (Zm R e) z M f N; exact3 R M f N z1 (Zm R e)\<rbrakk> \<Longrightarrow> injec\<^bsub>M,N\<^esub> f \<and> surjec\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:left_exact_injec)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; z1 \<in> mHom R N (Zm R e); exact4 R (Zm R e) z M f N z1 (Zm R e); exact3 R (Zm R e) z M f N; exact3 R M f N z1 (Zm R e)\<rbrakk> \<Longrightarrow> surjec\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:right_exact_surjec)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ex_gt_imp_less_multiset: "(\<exists>y. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y)) \<Longrightarrow> M < N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y) \<Longrightarrow> M < N
[PROOF STEP]
unfolding less_multiset\<^sub>H\<^sub>O
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y) \<Longrightarrow> M \<noteq> N \<and> (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x>y. count M x < count N x))
[PROOF STEP]
by (metis count_eq_zero_iff count_greater_zero_iff less_le_not_le)


[STATEMENT]
lemma deg_uminus [simp]:
  assumes R: "p \<in> carrier P" shows "deg R (\<ominus>\<^bsub>P\<^esub> p) = deg R p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deg R (\<ominus>\<^bsub>P\<^esub> p) = deg R p
[PROOF STEP]
proof (rule le_antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. deg R (\<ominus>\<^bsub>P\<^esub> p) \<le> deg R p
 2. deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)
[PROOF STEP]
show "deg R (\<ominus>\<^bsub>P\<^esub> p) \<le> deg R p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deg R (\<ominus>\<^bsub>P\<^esub> p) \<le> deg R p
[PROOF STEP]
by (simp add: deg_aboveI deg_aboveD R)
[PROOF STATE]
proof (state)
this:
deg R (\<ominus>\<^bsub>P\<^esub> p) \<le> deg R p

goal (1 subgoal):
 1. deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)
[PROOF STEP]
show "deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)
[PROOF STEP]
by (simp add: deg_belowI lcoeff_nonzero_deg
      inj_on_eq_iff [OF R.a_inv_inj, of _ "\<zero>", simplified] R)
[PROOF STATE]
proof (state)
this:
deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_sgn_eventually_at_bot:
  fixes p::"real poly"
  shows "eventually (\<lambda>x. sgn (poly p x) = sgn_neg_inf p) at_bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_bot. sgn (poly p x) = sgn_neg_inf p
[PROOF STEP]
using
  poly_sgn_eventually_at_top[of "pcompose p [:0,-1:]",unfolded poly_pcompose sgn_inf_sym,simplified]
  eventually_filtermap[of _ uminus "at_bot::real filter",folded at_top_mirror]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. sgn (poly p (- x)) = sgn_neg_inf p
eventually ?P at_top = (\<forall>\<^sub>F x in at_bot. ?P (- x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_bot. sgn (poly p x) = sgn_neg_inf p
[PROOF STEP]
by auto


[STATEMENT]
lemma to_list_tree_disjoint_verts:
  "\<lbrakk>u \<in> verts to_list_tree; v \<in> verts to_list_tree; u\<noteq>v\<rbrakk> \<Longrightarrow> set u \<inter> set v = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> verts to_list_tree; v \<in> verts to_list_tree; u \<noteq> v\<rbrakk> \<Longrightarrow> set u \<inter> set v = {}
[PROOF STEP]
unfolding to_list_tree_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> verts \<lparr>verts = (\<lambda>x. [x]) ` verts T, arcs = arcs T, tail = \<lambda>x. [tail T x], head = \<lambda>x. [head T x]\<rparr>; v \<in> verts \<lparr>verts = (\<lambda>x. [x]) ` verts T, arcs = arcs T, tail = \<lambda>x. [tail T x], head = \<lambda>x. [head T x]\<rparr>; u \<noteq> v\<rbrakk> \<Longrightarrow> set u \<inter> set v = {}
[PROOF STEP]
by auto


[STATEMENT]
lemma squarefreeI: "(\<And>x. x ^ 2 dvd n \<Longrightarrow> x dvd 1) \<Longrightarrow> squarefree n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x\<^sup>2 dvd n \<Longrightarrow> x dvd (1::'a)) \<Longrightarrow> squarefree n
[PROOF STEP]
by (auto simp: squarefree_def)


[STATEMENT]
lemma m_ivl_nice: "m_ivl[l,h] = (if [l,h] = \<bottom> then 3 else
   (if l = Minf then 0 else 1) + (if h = Pinf then 0 else 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m_ivl [l, h] = (if [l, h] = \<bottom> then 3 else (if l = -\<infinity> then 0 else 1) + (if h = \<infinity> then 0 else 1))
[PROOF STEP]
unfolding bot_ivl_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m_ivl [l, h] = (if [l, h] = empty_ivl then 3 else (if l = -\<infinity> then 0 else 1) + (if h = \<infinity> then 0 else 1))
[PROOF STEP]
by transfer (auto simp: m_rep_def eq_ivl_empty split: extended.split)


[STATEMENT]
lemma exp_ln_iff [simp]: "exp (ln x) = x \<longleftrightarrow> 0 < x"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (exp (ln x) = x) = (0 < x)
[PROOF STEP]
by (metis exp_gt_zero exp_ln)


[STATEMENT]
lemma "implc_offending_flows (new_configured_list_SecurityInvariant SINVAR_LIB_ACLcommunicateWith \<lparr>
          node_properties = [
                  1::nat \<mapsto> [1,2,3],
                  2 \<mapsto> [1,2,3,4],
                  3 \<mapsto> [1,2,3,4],
                  4 \<mapsto> [1,2,3,4]]
          \<rparr> ''usefull description here'') \<lparr>nodesL = [1::nat,2,3,4], edgesL = [(1,2), (1,3), (2,3), (3, 4)] \<rparr> =
        [[(1, 2), (1, 3)], [(1, 3), (2, 3)], [(3, 4)]]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. implc_offending_flows (new_configured_list_SecurityInvariant SINVAR_LIB_ACLcommunicateWith \<lparr>node_properties = [1 \<mapsto> [1, 2, 3], 2 \<mapsto> [1, 2, 3, 4], 3 \<mapsto> [1, 2, 3, 4], 4 \<mapsto> [1, 2, 3, 4]]\<rparr> ''usefull description here'') \<lparr>nodesL = [1, 2, 3, 4], edgesL = [(1, 2), (1, 3), (2, 3), (3, 4)]\<rparr> = [[(1, 2), (1, 3)], [(1, 3), (2, 3)], [(3, 4)]]
[PROOF STEP]
by eval


[STATEMENT]
lemma ln_primorial'_asymp_equiv [asymp_equiv_intros]:
        "(\<lambda>k. ln (primorial' k)) \<sim>[at_top] (\<lambda>k. k * ln k)"
  and ln_ln_primorial'_asymp_equiv [asymp_equiv_intros]:
        "(\<lambda>k. ln (ln (primorial' k))) \<sim>[at_top] (\<lambda>k. ln k)"
  and ln_over_ln_ln_primorial'_asymp_equiv:
        "(\<lambda>k. ln (primorial' k) / ln (ln (primorial' k))) \<sim>[at_top] (\<lambda>k. k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x)) &&& (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x)) &&& (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have lim1: "filterlim (\<lambda>k. real (nth_prime (k - 1))) at_top at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM k sequentially. real (nth_prime (k - 1)) :> at_top
[PROOF STEP]
by (rule filterlim_compose[OF filterlim_real_sequentially]
             filterlim_compose[OF nth_prime_at_top])+ real_asymp
[PROOF STATE]
proof (state)
this:
LIM k sequentially. real (nth_prime (k - 1)) :> at_top

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have lim2: "filterlim (\<lambda>k::nat. k - 1) at_top at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM k sequentially. k - 1 :> sequentially
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
LIM k sequentially. k - 1 :> sequentially

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "(\<lambda>k. ln (primorial' k)) \<sim>[at_top] (\<lambda>n. ln (primorial (nth_prime (n - 1))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>n. ln (real (primorial (real (nth_prime (n - 1))))))
[PROOF STEP]
by (intro asymp_equiv_refl_ev eventually_mono[OF eventually_gt_at_top[of 0]])
       (auto simp: primorial'_conv_primorial)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>n. ln (real (primorial (real (nth_prime (n - 1))))))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>n. ln (real (primorial (real (nth_prime (n - 1))))))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>n. nth_prime (n - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ln (real (primorial (real (nth_prime (n - 1)))))) \<sim>[sequentially] (\<lambda>x. real (nth_prime (x - 1)))
[PROOF STEP]
by (intro asymp_equiv_compose'[OF _ lim1] asymp_equiv_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (real (primorial (real (nth_prime (n - 1)))))) \<sim>[sequentially] (\<lambda>x. real (nth_prime (x - 1)))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (real (primorial (real (nth_prime (n - 1)))))) \<sim>[sequentially] (\<lambda>x. real (nth_prime (x - 1)))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>n. real (n - 1) * ln (real (n - 1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real (nth_prime (x - 1))) \<sim>[sequentially] (\<lambda>n. real (n - 1) * ln (real (n - 1)))
[PROOF STEP]
by (intro asymp_equiv_compose'[OF _ lim2] asymp_equiv_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (nth_prime (x - 1))) \<sim>[sequentially] (\<lambda>n. real (n - 1) * ln (real (n - 1)))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (nth_prime (x - 1))) \<sim>[sequentially] (\<lambda>n. real (n - 1) * ln (real (n - 1)))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>n. n * ln n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. real (n - 1) * ln (real (n - 1))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. real (n - 1) * ln (real (n - 1))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))

goal (3 subgoals):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
 2. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 3. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d\<rbrakk> \<Longrightarrow> (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>a. real a * ln (real a))
[PROOF STEP]
show 1: "(\<lambda>k. ln (primorial' k)) \<sim>[at_top] (\<lambda>k. k * ln k)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d\<rbrakk> \<Longrightarrow> (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>a. real a * ln (real a))

goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (real (primorial' k))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "(\<lambda>k. ln (ln (primorial' k))) \<sim>[at_top] (\<lambda>n. ln (ln (primorial (nth_prime (n - 1)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>n. ln (ln (real (primorial (real (nth_prime (n - 1)))))))
[PROOF STEP]
by (intro asymp_equiv_refl_ev eventually_mono[OF eventually_gt_at_top[of 0]])
       (auto simp: primorial'_conv_primorial)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>n. ln (ln (real (primorial (real (nth_prime (n - 1)))))))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>n. ln (ln (real (primorial (real (nth_prime (n - 1)))))))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>n. ln (nth_prime (n - 1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ln (ln (real (primorial (real (nth_prime (n - 1))))))) \<sim>[sequentially] (\<lambda>n. ln (real (nth_prime (n - 1))))
[PROOF STEP]
by (intro asymp_equiv_compose'[OF _ lim1] asymp_equiv_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (ln (real (primorial (real (nth_prime (n - 1))))))) \<sim>[sequentially] (\<lambda>n. ln (real (nth_prime (n - 1))))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (ln (real (primorial (real (nth_prime (n - 1))))))) \<sim>[sequentially] (\<lambda>n. ln (real (nth_prime (n - 1))))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>n. ln (real (n - 1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ln (real (nth_prime (n - 1)))) \<sim>[sequentially] (\<lambda>n. ln (real (n - 1)))
[PROOF STEP]
by (intro asymp_equiv_compose'[OF _ lim2] asymp_equiv_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (real (nth_prime (n - 1)))) \<sim>[sequentially] (\<lambda>n. ln (real (n - 1)))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (real (nth_prime (n - 1)))) \<sim>[sequentially] (\<lambda>n. ln (real (n - 1)))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>n. ln n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ln (real (n - 1))) \<sim>[sequentially] (\<lambda>x. ln (real x))
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ln (real (n - 1))) \<sim>[sequentially] (\<lambda>x. ln (real x))

goal (2 subgoals):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
 2. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d\<rbrakk> \<Longrightarrow> (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>a. ln (real a))
[PROOF STEP]
show 2: "(\<lambda>k. ln (ln (primorial' k))) \<sim>[at_top] (\<lambda>k. ln k)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d; \<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d\<rbrakk> \<Longrightarrow> (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>a. ln (real a))

goal (1 subgoal):
 1. (\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. ln (real x))

goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "(\<lambda>k. ln (primorial' k) / ln (ln (primorial' k))) \<sim>[at_top] (\<lambda>k. (k * ln k) / ln k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x) / ln (real x))
[PROOF STEP]
by (intro asymp_equiv_intros 1 2)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x) / ln (real x))

goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] (\<lambda>x. real x * ln (real x) / ln (real x))

goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>k. k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real x * ln (real x) / ln (real x)) \<sim>[sequentially] real
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real x * ln (real x) / ln (real x)) \<sim>[sequentially] real

goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d) \<Longrightarrow> (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
show "(\<lambda>k. ln (primorial' k) / ln (ln (primorial' k))) \<sim>[at_top] (\<lambda>k. k)"
[PROOF STATE]
proof (prove)
using this:
(\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> c \<sim>[sequentially] d) \<Longrightarrow> (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real

goal (1 subgoal):
 1. (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k)))) \<sim>[sequentially] real

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma unitaryD2:
  assumes "A \<in> carrier_mat n n"
  shows "unitary A \<Longrightarrow> inverts_mat (adjoint A) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitary A \<Longrightarrow> inverts_mat (adjoint A) A
[PROOF STEP]
using assms adjoint_dim inverts_mat_symm unitary_def
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
?A \<in> carrier_mat ?n ?n \<Longrightarrow> adjoint ?A \<in> carrier_mat ?n ?n
\<lbrakk>?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n; inverts_mat ?A ?B\<rbrakk> \<Longrightarrow> inverts_mat ?B ?A
unitary ?A = (?A \<in> carrier_mat (dim_row ?A) (dim_row ?A) \<and> inverts_mat ?A (adjoint ?A))

goal (1 subgoal):
 1. unitary A \<Longrightarrow> inverts_mat (adjoint A) A
[PROOF STEP]
by blast


[STATEMENT]
theorem is_in_correct: "is_ord t \<Longrightarrow> is_in\<^sub>0 k t = (k : set_of t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_ord t \<Longrightarrow> is_in\<^sub>0 k t = (k \<in> set_of t)
[PROOF STEP]
by (induct t) (auto simp add: less_le_not_le)


[STATEMENT]
lemma prod_pOp_commute:"\<lbrakk>\<forall>k\<in>I. aGroup (A k); a \<in> carr_prodag I A;
                           b \<in> carr_prodag I A\<rbrakk> \<Longrightarrow>
                           prod_pOp I A a b = prod_pOp I A b a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>k\<in>I. aGroup (A k); a \<in> carr_prodag I A; b \<in> carr_prodag I A\<rbrakk> \<Longrightarrow> prod_pOp I A a b = prod_pOp I A b a
[PROOF STEP]
apply (frule_tac X = a and Y = b in prod_pOp_mem[of "I" "A"], assumption+,
         frule_tac X = b and Y = a in prod_pOp_mem[of "I" "A"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>k\<in>I. aGroup (A k); a \<in> carr_prodag I A; b \<in> carr_prodag I A; prod_pOp I A a b \<in> carr_prodag I A; prod_pOp I A b a \<in> carr_prodag I A\<rbrakk> \<Longrightarrow> prod_pOp I A a b = prod_pOp I A b a
[PROOF STEP]
apply (rule carr_prodag_mem_eq[of "I" "A"], assumption+,
        rule ballI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l. \<lbrakk>\<forall>k\<in>I. aGroup (A k); a \<in> carr_prodag I A; b \<in> carr_prodag I A; prod_pOp I A a b \<in> carr_prodag I A; prod_pOp I A b a \<in> carr_prodag I A; l \<in> I\<rbrakk> \<Longrightarrow> prod_pOp I A a b l = prod_pOp I A b a l
[PROOF STEP]
apply (simp add:prod_pOp_mem_i)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l. \<lbrakk>\<forall>k\<in>I. aGroup (A k); a \<in> carr_prodag I A; b \<in> carr_prodag I A; prod_pOp I A a b \<in> carr_prodag I A; prod_pOp I A b a \<in> carr_prodag I A; l \<in> I\<rbrakk> \<Longrightarrow> a l \<plusminus>\<^bsub>A l\<^esub> b l = b l \<plusminus>\<^bsub>A l\<^esub> a l
[PROOF STEP]
apply (frule_tac x = l in bspec, assumption,
        thin_tac "\<forall>k\<in>I. aGroup (A k)",
        rule aGroup.ag_pOp_commute, assumption)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l. \<lbrakk>a \<in> carr_prodag I A; b \<in> carr_prodag I A; prod_pOp I A a b \<in> carr_prodag I A; prod_pOp I A b a \<in> carr_prodag I A; l \<in> I; aGroup (A l)\<rbrakk> \<Longrightarrow> a l \<in> carrier (A l)
 2. \<And>l. \<lbrakk>a \<in> carr_prodag I A; b \<in> carr_prodag I A; prod_pOp I A a b \<in> carr_prodag I A; prod_pOp I A b a \<in> carr_prodag I A; l \<in> I; aGroup (A l)\<rbrakk> \<Longrightarrow> b l \<in> carrier (A l)
[PROOF STEP]
apply (simp add:prodag_comp_i)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in encoding) full_abstraction_impl_SRel_iff_TRel_is_trans:
  fixes SRel :: "('procS \<times> 'procS) set"
    and TRel :: "('procT \<times> 'procT) set"
  assumes fullAbs: "fully_abstract SRel TRel"
  shows "trans SRel \<longleftrightarrow> trans {(T1, T2). \<exists>S1 S2. T1 = \<lbrakk>S1\<rbrakk> \<and> T2 = \<lbrakk>S2\<rbrakk> \<and> (T1, T2) \<in> TRel}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trans SRel = trans (_Collect (T1, T2) (\<exists>S1 S2. T1 = \<lbrakk>S1\<rbrakk> \<and> T2 = \<lbrakk>S2\<rbrakk> \<and> (T1, T2) \<in> TRel))
[PROOF STEP]
unfolding trans_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x y z. (x, y) \<in> SRel \<longrightarrow> (y, z) \<in> SRel \<longrightarrow> (x, z) \<in> SRel) = (\<forall>x y z. (x, y) \<in> _Collect (T1, T2) (\<exists>S1 S2. T1 = \<lbrakk>S1\<rbrakk> \<and> T2 = \<lbrakk>S2\<rbrakk> \<and> (T1, T2) \<in> TRel) \<longrightarrow> (y, z) \<in> _Collect (T1, T2) (\<exists>S1 S2. T1 = \<lbrakk>S1\<rbrakk> \<and> T2 = \<lbrakk>S2\<rbrakk> \<and> (T1, T2) \<in> TRel) \<longrightarrow> (x, z) \<in> _Collect (T1, T2) (\<exists>S1 S2. T1 = \<lbrakk>S1\<rbrakk> \<and> T2 = \<lbrakk>S2\<rbrakk> \<and> (T1, T2) \<in> TRel))
[PROOF STEP]
by (simp add: fullAbs, blast)


[STATEMENT]
lemma gHom_comp_ginjec:"\<lbrakk>Group F; Group G; Group H; ginj\<^bsub>F,G\<^esub> f; ginj\<^bsub>G,H\<^esub> g\<rbrakk> \<Longrightarrow>
                          ginj\<^bsub>F,H\<^esub> (g \<circ>\<^bsub>F\<^esub> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; Group H; ginj\<^bsub>F,G\<^esub> f; ginj\<^bsub>G,H\<^esub> g\<rbrakk> \<Longrightarrow> ginj\<^bsub>F,H\<^esub> (g \<circ>\<^bsub>F\<^esub> f)
[PROOF STEP]
apply (simp add:ginjec_def,
       simp add:gHomcomp,
       simp add:gHom_def,
       (erule conjE)+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; Group H; f \<in> extensional (carrier F); g \<in> extensional (carrier G); f \<in> carrier F \<rightarrow> carrier G; g \<in> carrier G \<rightarrow> carrier H; \<forall>x\<in>carrier F. \<forall>y\<in>carrier F. f (x \<cdot>\<^bsub>F\<^esub> y) = f x \<cdot>\<^bsub>G\<^esub> f y; inj_on f (carrier F); \<forall>x\<in>carrier G. \<forall>y\<in>carrier G. g (x \<cdot>\<^bsub>G\<^esub> y) = g x \<cdot>\<^bsub>H\<^esub> g y; inj_on g (carrier G)\<rbrakk> \<Longrightarrow> inj_on (g \<circ>\<^bsub>F\<^esub> f) (carrier F)
[PROOF STEP]
apply (simp add:cmpghom_def,
       simp add:comp_inj)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma pderiv_1 [simp]: "pderiv 1 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pderiv 1 = 0
[PROOF STEP]
by (simp add: one_pCons pderiv_pCons)


[STATEMENT]
lemma kparts_insert2 [iff]: "kparts (insert X (insert Y H))
= kparts {X} \<union> kparts {Y} \<union> kparts H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. kparts (insert X (insert Y H)) = kparts {X} \<union> kparts {Y} \<union> kparts H
[PROOF STEP]
by (rule eq, (erule kparts.induct, auto)+)


[STATEMENT]
lemma (in linorder) iterate_to_list_map_linord_correct :
assumes it_OK: "map_iterator_linord it m"
shows "map_of (iterate_to_list it) = m \<and> distinct (map fst (iterate_to_list it)) \<and>
       sorted (map fst (rev (iterate_to_list it)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_of (iterate_to_list it) = m \<and> distinct (map fst (iterate_to_list it)) \<and> sorted (map fst (rev (iterate_to_list it)))
[PROOF STEP]
using it_OK
[PROOF STATE]
proof (prove)
using this:
map_iterator_linord it m

goal (1 subgoal):
 1. map_of (iterate_to_list it) = m \<and> distinct (map fst (iterate_to_list it)) \<and> sorted (map fst (rev (iterate_to_list it)))
[PROOF STEP]
unfolding map_iterator_linord_foldli_conv
[PROOF STATE]
proof (prove)
using this:
\<exists>l0. distinct (map fst l0) \<and> m = map_of l0 \<and> sorted (map fst l0) \<and> it = foldli l0

goal (1 subgoal):
 1. map_of (iterate_to_list it) = m \<and> distinct (map fst (iterate_to_list it)) \<and> sorted (map fst (rev (iterate_to_list it)))
[PROOF STEP]
by clarify (simp add: rev_map[symmetric])


[STATEMENT]
theorem Stewart:
  fixes A B C D :: "'a::euclidean_space"
  assumes "between (B, C) D"
  assumes "a = dist B C"
  assumes "b = dist A C"
  assumes "c = dist B A"
  assumes "d = dist A D"
  assumes "m = dist B D"
  assumes "n = dist C D"
  shows "b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
assume "B \<noteq> D \<and> C \<noteq> D"
[PROOF STATE]
proof (state)
this:
B \<noteq> D \<and> C \<noteq> D

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
let ?\<theta> = "angle B D A"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
let ?\<theta>' = "angle A D C"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
from \<open>B \<noteq> D \<and> C \<noteq> D\<close> \<open>between _ _\<close>
[PROOF STATE]
proof (chain)
picking this:
B \<noteq> D \<and> C \<noteq> D
between (B, C) D
[PROOF STEP]
have cos: "cos ?\<theta>' = - cos ?\<theta>"
[PROOF STATE]
proof (prove)
using this:
B \<noteq> D \<and> C \<noteq> D
between (B, C) D

goal (1 subgoal):
 1. cos (angle A D C) = - cos (angle B D A)
[PROOF STEP]
by (auto simp add: angle_inverse[of B C D] angle_commute[of A D C])
[PROOF STATE]
proof (state)
this:
cos (angle A D C) = - cos (angle B D A)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
from \<open>between _ _\<close>
[PROOF STATE]
proof (chain)
picking this:
between (B, C) D
[PROOF STEP]
have "m + n = a"
[PROOF STATE]
proof (prove)
using this:
between (B, C) D

goal (1 subgoal):
 1. m + n = a
[PROOF STEP]
unfolding \<open>a = _\<close> \<open>m = _\<close> \<open>n = _\<close>
[PROOF STATE]
proof (prove)
using this:
between (B, C) D

goal (1 subgoal):
 1. dist B D + dist C D = dist B C
[PROOF STEP]
by (metis (no_types) between dist_commute)
[PROOF STATE]
proof (state)
this:
m + n = a

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
have "c\<^sup>2 = m\<^sup>2 + d\<^sup>2 - 2 * d * m * cos ?\<theta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c\<^sup>2 = m\<^sup>2 + d\<^sup>2 - 2 * d * m * cos (angle B D A)
[PROOF STEP]
unfolding \<open>c = _\<close> \<open>m = _\<close> \<open>d = _\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dist B A)\<^sup>2 = (dist B D)\<^sup>2 + (dist A D)\<^sup>2 - 2 * dist A D * dist B D * cos (angle B D A)
[PROOF STEP]
by (simp add: cosine_law_triangle[of B A D] dist_commute[of D A] dist_commute[of D B])
[PROOF STATE]
proof (state)
this:
c\<^sup>2 = m\<^sup>2 + d\<^sup>2 - 2 * d * m * cos (angle B D A)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
c\<^sup>2 = m\<^sup>2 + d\<^sup>2 - 2 * d * m * cos (angle B D A)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
have "b\<^sup>2 = n\<^sup>2 + d\<^sup>2 + 2 * d * n * cos ?\<theta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b\<^sup>2 = n\<^sup>2 + d\<^sup>2 + 2 * d * n * cos (angle B D A)
[PROOF STEP]
unfolding \<open>b = _\<close> \<open>n = _\<close> \<open>d = _\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dist A C)\<^sup>2 = (dist C D)\<^sup>2 + (dist A D)\<^sup>2 + 2 * dist A D * dist C D * cos (angle B D A)
[PROOF STEP]
by (simp add: cosine_law_triangle[of A C D] cos dist_commute[of D A] dist_commute[of D C])
[PROOF STATE]
proof (state)
this:
b\<^sup>2 = n\<^sup>2 + d\<^sup>2 + 2 * d * n * cos (angle B D A)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
c\<^sup>2 = m\<^sup>2 + d\<^sup>2 - 2 * d * m * cos (angle B D A)
b\<^sup>2 = n\<^sup>2 + d\<^sup>2 + 2 * d * n * cos (angle B D A)
[PROOF STEP]
have "b\<^sup>2 * m + c\<^sup>2 * n = n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2"
[PROOF STATE]
proof (prove)
using this:
c\<^sup>2 = m\<^sup>2 + d\<^sup>2 - 2 * d * m * cos (angle B D A)
b\<^sup>2 = n\<^sup>2 + d\<^sup>2 + 2 * d * n * cos (angle B D A)

goal (1 subgoal):
 1. b\<^sup>2 * m + c\<^sup>2 * n = n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
b\<^sup>2 * m + c\<^sup>2 * n = n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
b\<^sup>2 * m + c\<^sup>2 * n = n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
have "\<dots> = (m + n) * (m * n + d\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2 = (m + n) * (m * n + d\<^sup>2)
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2 = (m + n) * (m * n + d\<^sup>2)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
n * m\<^sup>2 + n\<^sup>2 * m + (m + n) * d\<^sup>2 = (m + n) * (m * n + d\<^sup>2)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
from \<open>m + n = a\<close>
[PROOF STATE]
proof (chain)
picking this:
m + n = a
[PROOF STEP]
have "\<dots> = a * (d\<^sup>2 + m * n)"
[PROOF STATE]
proof (prove)
using this:
m + n = a

goal (1 subgoal):
 1. (m + n) * (m * n + d\<^sup>2) = a * (d\<^sup>2 + m * n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(m + n) * (m * n + d\<^sup>2) = a * (d\<^sup>2 + m * n)

goal (2 subgoals):
 1. ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
 2. \<not> ?P \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)

goal (1 subgoal):
 1. b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)

goal (1 subgoal):
 1. \<not> (B \<noteq> D \<and> C \<noteq> D) \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (B \<noteq> D \<and> C \<noteq> D) \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
assume "\<not> (B \<noteq> D \<and> C \<noteq> D)"
[PROOF STATE]
proof (state)
this:
\<not> (B \<noteq> D \<and> C \<noteq> D)

goal (1 subgoal):
 1. \<not> (B \<noteq> D \<and> C \<noteq> D) \<Longrightarrow> b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
from this assms
[PROOF STATE]
proof (chain)
picking this:
\<not> (B \<noteq> D \<and> C \<noteq> D)
between (B, C) D
a = dist B C
b = dist A C
c = dist B A
d = dist A D
m = dist B D
n = dist C D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (B \<noteq> D \<and> C \<noteq> D)
between (B, C) D
a = dist B C
b = dist A C
c = dist B A
d = dist A D
m = dist B D
n = dist C D

goal (1 subgoal):
 1. b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)
[PROOF STEP]
by (auto simp add: dist_commute)
[PROOF STATE]
proof (state)
this:
b\<^sup>2 * m + c\<^sup>2 * n = a * (d\<^sup>2 + m * n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prime_factors_power:
  assumes "n > 0"
  shows   "prime_factors (x ^ n) = prime_factors x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_factors (x ^ n) = prime_factors x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. prime_factors (x ^ n) = prime_factors x
[PROOF STEP]
by (cases "x = 0") (auto simp: prime_factors_dvd zero_power prime_dvd_power_iff)


[STATEMENT]
lemma lessThan_bounded_induct:
     "!!l::nat. [| \<forall>m \<in> greaterThan l.
            F \<in> (A \<inter> f-`{m}) leadsTo ((A \<inter> f-`(lessThan m)) \<union> B) |]
      ==> F \<in> A leadsTo ((A \<inter> (f-`(atMost l))) \<union> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l. \<forall>m\<in>{l<..}. F \<in> A \<inter> f -` {m} \<longmapsto> A \<inter> f -` {..<m} \<union> B \<Longrightarrow> F \<in> A \<longmapsto> A \<inter> f -` {..l} \<union> B
[PROOF STEP]
apply (simp only: Diff_eq [symmetric] vimage_Compl Compl_greaterThan [symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l. \<forall>m\<in>{l<..}. F \<in> A \<inter> f -` {m} \<longmapsto> A \<inter> f -` {..<m} \<union> B \<Longrightarrow> F \<in> A \<longmapsto> A - f -` {l<..} \<union> B
[PROOF STEP]
apply (rule wf_less_than [THEN bounded_induct])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l. \<forall>m\<in>{l<..}. F \<in> A \<inter> f -` {m} \<longmapsto> A \<inter> f -` {..<m} \<union> B \<Longrightarrow> \<forall>m\<in>{l<..}. F \<in> A \<inter> f -` {m} \<longmapsto> A \<inter> f -` less_than\<inverse> `` {m} \<union> B
[PROOF STEP]
apply (simp (no_asm_simp))
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cos_vangle: "cos (vangle u v) = u \<bullet> v / (norm u * norm v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos (vangle u v) = u \<bullet> v / (norm u * norm v)
[PROOF STEP]
unfolding vangle_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos (if u = (0::'a) \<or> v = (0::'a) then pi / 2 else arccos (u \<bullet> v / (norm u * norm v))) = u \<bullet> v / (norm u * norm v)
[PROOF STEP]
using Cauchy_Schwarz_ineq2[of u v]
[PROOF STATE]
proof (prove)
using this:
\<bar>u \<bullet> v\<bar> \<le> norm u * norm v

goal (1 subgoal):
 1. cos (if u = (0::'a) \<or> v = (0::'a) then pi / 2 else arccos (u \<bullet> v / (norm u * norm v))) = u \<bullet> v / (norm u * norm v)
[PROOF STEP]
by (auto simp: field_simps)


[STATEMENT]
lemma (in module) summands_valid:
  fixes A a
  assumes h2: "A\<subseteq> carrier M" and h3: "a\<in>(A\<rightarrow>carrier R)"
  shows "\<forall> v\<in> A. (((a v) \<odot>\<^bsub>M\<^esub> v)\<in> carrier M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>v\<in>A. a v \<odot>\<^bsub>M\<^esub> v \<in> carrier M
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>v\<in>A. a v \<odot>\<^bsub>M\<^esub> v \<in> carrier M
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> carrier M
a \<in> A \<rightarrow> carrier R
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> carrier M
a \<in> A \<rightarrow> carrier R

goal (1 subgoal):
 1. \<forall>v\<in>A. a v \<odot>\<^bsub>M\<^esub> v \<in> carrier M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>v\<in>A. a v \<odot>\<^bsub>M\<^esub> v \<in> carrier M

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ex_gt_imp_less_multiset: "(\<exists>y. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y)) \<Longrightarrow> M < N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y) \<Longrightarrow> M < N
[PROOF STEP]
unfolding less_multiset\<^sub>H\<^sub>O
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y) \<Longrightarrow> M \<noteq> N \<and> (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x>y. count M x < count N x))
[PROOF STEP]
by (metis count_eq_zero_iff count_greater_zero_iff less_le_not_le)


[STATEMENT]
lemma evalHeap_cong':
  "\<lbrakk> (\<And> x. x \<in> domA heap \<Longrightarrow> eval1 (the (map_of heap x)) = eval2 (the (map_of heap x))) \<rbrakk>
    \<Longrightarrow>  evalHeap heap eval1 = evalHeap heap eval2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> domA heap \<Longrightarrow> eval1 (the (map_of heap x)) = eval2 (the (map_of heap x))) \<Longrightarrow> evalHeap heap eval1 = evalHeap heap eval2
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (\<And>x. x \<in> domA heap \<Longrightarrow> eval1 (the (map_of heap x)) = eval2 (the (map_of heap x))) \<Longrightarrow> evalHeap heap eval1 x = evalHeap heap eval2 x
[PROOF STEP]
apply (case_tac "x \<in> domA heap")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>\<And>x. x \<in> domA heap \<Longrightarrow> eval1 (the (map_of heap x)) = eval2 (the (map_of heap x)); x \<in> domA heap\<rbrakk> \<Longrightarrow> evalHeap heap eval1 x = evalHeap heap eval2 x
 2. \<And>x. \<lbrakk>\<And>x. x \<in> domA heap \<Longrightarrow> eval1 (the (map_of heap x)) = eval2 (the (map_of heap x)); x \<notin> domA heap\<rbrakk> \<Longrightarrow> evalHeap heap eval1 x = evalHeap heap eval2 x
[PROOF STEP]
apply (auto simp add: lookupEvalHeap)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma arc_subpath_arc:
    "\<lbrakk>arc g; u \<in> {0..1}; v \<in> {0..1}; u \<noteq> v\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>arc g; u \<in> {0..1}; v \<in> {0..1}; u \<noteq> v\<rbrakk> \<Longrightarrow> arc (subpath u v g)
[PROOF STEP]
by (meson arc_def arc_imp_simple_path arc_simple_path_subpath inj_onD)


[STATEMENT]
lemma adjust_in_span:
  assumes w[simp]: "(w :: 'a vec) : carrier_vec n"
    and us: "set (us :: 'a vec list) \<subseteq> carrier_vec n"
    and dist: "distinct us"
  shows "adjuster n w us + w : span (insert w (set us))" (is "?v + _ : span ?U")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
let ?a = "\<lambda>u. -(w \<bullet>c u)/(u \<bullet>c u)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
have "?v = lincomb ?a (set us)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjuster n w us = lincomb (\<lambda>u. - (w \<bullet>c u) / (u \<bullet>c u)) (set us)
[PROOF STEP]
using adjuster_lincomb[OF assms]
[PROOF STATE]
proof (prove)
using this:
adjuster n w us = lincomb (\<lambda>u. - (w \<bullet>c u) / (u \<bullet>c u)) (set us)

goal (1 subgoal):
 1. adjuster n w us = lincomb (\<lambda>u. - (w \<bullet>c u) / (u \<bullet>c u)) (set us)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
adjuster n w us = lincomb (\<lambda>u. - (w \<bullet>c u) / (u \<bullet>c u)) (set us)

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
hence vU: "?v : span (set us)"
[PROOF STATE]
proof (prove)
using this:
adjuster n w us = lincomb (\<lambda>u. - (w \<bullet>c u) / (u \<bullet>c u)) (set us)

goal (1 subgoal):
 1. adjuster n w us \<in> local.span (set us)
[PROOF STEP]
unfolding finite_span[OF finite_set us]
[PROOF STATE]
proof (prove)
using this:
adjuster n w us = lincomb (\<lambda>u. - (w \<bullet>c u) / (u \<bullet>c u)) (set us)

goal (1 subgoal):
 1. adjuster n w us \<in> {uu_. \<exists>a. uu_ = lincomb a (set us)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjuster n w us \<in> local.span (set us)

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
hence v[simp]: "?v : carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
adjuster n w us \<in> local.span (set us)

goal (1 subgoal):
 1. adjuster n w us \<in> carrier_vec n
[PROOF STEP]
using span_closed[OF us]
[PROOF STATE]
proof (prove)
using this:
adjuster n w us \<in> local.span (set us)
?v \<in> local.span (set us) \<Longrightarrow> ?v \<in> carrier_vec n

goal (1 subgoal):
 1. adjuster n w us \<in> carrier_vec n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjuster n w us \<in> carrier_vec n

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
have vU': "?v : span ?U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjuster n w us \<in> local.span (insert w (set us))
[PROOF STEP]
using vU span_is_monotone[OF subset_insertI]
[PROOF STATE]
proof (prove)
using this:
adjuster n w us \<in> local.span (set us)
local.span ?S \<subseteq> local.span (insert ?a1 ?S)

goal (1 subgoal):
 1. adjuster n w us \<in> local.span (insert w (set us))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjuster n w us \<in> local.span (insert w (set us))

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
have "{w} \<subseteq> ?U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w} \<subseteq> insert w (set us)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
{w} \<subseteq> insert w (set us)

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
from span_is_monotone[OF this]
[PROOF STATE]
proof (chain)
picking this:
local.span {w} \<subseteq> local.span (insert w (set us))
[PROOF STEP]
have wU': "w : span ?U"
[PROOF STATE]
proof (prove)
using this:
local.span {w} \<subseteq> local.span (insert w (set us))

goal (1 subgoal):
 1. w \<in> local.span (insert w (set us))
[PROOF STEP]
using span_self[OF w]
[PROOF STATE]
proof (prove)
using this:
local.span {w} \<subseteq> local.span (insert w (set us))
w \<in> local.span {w}

goal (1 subgoal):
 1. w \<in> local.span (insert w (set us))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> local.span (insert w (set us))

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
have "?U \<subseteq> carrier_vec n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert w (set us) \<subseteq> carrier_vec n
[PROOF STEP]
using us w
[PROOF STATE]
proof (prove)
using this:
set us \<subseteq> carrier_vec n
w \<in> carrier_vec n

goal (1 subgoal):
 1. insert w (set us) \<subseteq> carrier_vec n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
insert w (set us) \<subseteq> carrier_vec n

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
from span_add[OF this wU' v] vU' comm_add_vec[OF w]
[PROOF STATE]
proof (chain)
picking this:
(adjuster n w us \<in> local.span (insert w (set us))) = (w + adjuster n w us \<in> local.span (insert w (set us)))
adjuster n w us \<in> local.span (insert w (set us))
?v\<^sub>2 \<in> carrier_vec n \<Longrightarrow> w + ?v\<^sub>2 = ?v\<^sub>2 + w
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(adjuster n w us \<in> local.span (insert w (set us))) = (w + adjuster n w us \<in> local.span (insert w (set us)))
adjuster n w us \<in> local.span (insert w (set us))
?v\<^sub>2 \<in> carrier_vec n \<Longrightarrow> w + ?v\<^sub>2 = ?v\<^sub>2 + w

goal (1 subgoal):
 1. adjuster n w us + w \<in> local.span (insert w (set us))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
adjuster n w us + w \<in> local.span (insert w (set us))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma oexp_1 [simp]: "Ord \<alpha> \<Longrightarrow> 1\<up>\<alpha> = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ord \<alpha> \<Longrightarrow> 1 \<up> \<alpha> = 1
[PROOF STEP]
by (induction rule: Ord_induct3) (use Limit_def oexp_Limit in auto)