[STATEMENT]
theorem two_right_adjoints_naturally_isomorphic:
  assumes "adjoint_functors C D F G" and "adjoint_functors C D F G'"
  shows "naturally_isomorphic C D G G'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
text\<open>
      For any object @{term x} of @{term C}, we have that \<open>\<epsilon> x \<in> C.hom (F (G x)) x\<close>
      is a terminal arrow from @{term F} to @{term x}, and similarly for \<open>\<epsilon>' x\<close>.
      We may therefore obtain the unique coextension \<open>\<tau> x \<in> D.hom (G x) (G' x)\<close>
      of \<open>\<epsilon> x\<close> along \<open>\<epsilon>' x\<close>.
      An explicit formula for \<open>\<tau> x\<close> is \<open>D (G' (\<epsilon> x)) (\<eta>' (G x))\<close>.
      Similarly, we obtain \<open>\<tau>' x = D (G (\<epsilon>' x)) (\<eta> (G' x)) \<in> D.hom (G' x) (G x)\<close>.
      We show these are the components of inverse natural transformations between
      @{term G} and @{term G'}.
\<close>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
obtain \<phi> \<psi> where \<phi>\<psi>: "meta_adjunction C D F G \<phi> \<psi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<phi> \<psi>. meta_adjunction C D F G \<phi> \<psi> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms adjoint_functors_def
[PROOF STATE]
proof (prove)
using this:
adjoint_functors C D F G
adjoint_functors C D F G'
adjoint_functors ?C ?D ?F ?G = (\<exists>\<phi> \<psi>. meta_adjunction ?C ?D ?F ?G \<phi> \<psi>)

goal (1 subgoal):
 1. (\<And>\<phi> \<psi>. meta_adjunction C D F G \<phi> \<psi> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
meta_adjunction C D F G \<phi> \<psi>

goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
obtain \<phi>' \<psi>' where \<phi>'\<psi>': "meta_adjunction C D F G' \<phi>' \<psi>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<phi>' \<psi>'. meta_adjunction C D F G' \<phi>' \<psi>' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms adjoint_functors_def
[PROOF STATE]
proof (prove)
using this:
adjoint_functors C D F G
adjoint_functors C D F G'
adjoint_functors ?C ?D ?F ?G = (\<exists>\<phi> \<psi>. meta_adjunction ?C ?D ?F ?G \<phi> \<psi>)

goal (1 subgoal):
 1. (\<And>\<phi>' \<psi>'. meta_adjunction C D F G' \<phi>' \<psi>' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
meta_adjunction C D F G' \<phi>' \<psi>'

goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
interpret Adj: meta_adjunction C D F G \<phi> \<psi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. meta_adjunction C D F G \<phi> \<psi>
[PROOF STEP]
using \<phi>\<psi>
[PROOF STATE]
proof (prove)
using this:
meta_adjunction C D F G \<phi> \<psi>

goal (1 subgoal):
 1. meta_adjunction C D F G \<phi> \<psi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
interpret S: replete_setcat
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
interpret Adj: adjunction C D S.comp S.setp Adj.\<phi>C Adj.\<phi>D
                              F G \<phi> \<psi> Adj.\<eta> Adj.\<epsilon> Adj.\<Phi> Adj.\<Psi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjunction C D S.comp (\<lambda>A. A \<subseteq> S.Univ) Adj.\<phi>C Adj.\<phi>D F G \<phi> \<psi> Adj.\<eta> Adj.\<epsilon> Adj.\<Phi> Adj.\<Psi>
[PROOF STEP]
using Adj.induces_adjunction
[PROOF STATE]
proof (prove)
using this:
adjunction C D S.comp (\<lambda>A. A \<subseteq> S.Univ) Adj.\<phi>C Adj.\<phi>D F G \<phi> \<psi> Adj.\<eta> Adj.\<epsilon> Adj.\<Phi> Adj.\<Psi>

goal (1 subgoal):
 1. adjunction C D S.comp (\<lambda>A. A \<subseteq> S.Univ) Adj.\<phi>C Adj.\<phi>D F G \<phi> \<psi> Adj.\<eta> Adj.\<epsilon> Adj.\<Phi> Adj.\<Psi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
interpret Adj': meta_adjunction C D F G' \<phi>' \<psi>'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. meta_adjunction C D F G' \<phi>' \<psi>'
[PROOF STEP]
using \<phi>'\<psi>'
[PROOF STATE]
proof (prove)
using this:
meta_adjunction C D F G' \<phi>' \<psi>'

goal (1 subgoal):
 1. meta_adjunction C D F G' \<phi>' \<psi>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
interpret Adj': adjunction C D S.comp S.setp Adj'.\<phi>C Adj'.\<phi>D
                               F G' \<phi>' \<psi>' Adj'.\<eta> Adj'.\<epsilon> Adj'.\<Phi> Adj'.\<Psi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjunction C D S.comp (\<lambda>A. A \<subseteq> S.Univ) Adj'.\<phi>C Adj'.\<phi>D F G' \<phi>' \<psi>' Adj'.\<eta> Adj'.\<epsilon> Adj'.\<Phi> Adj'.\<Psi>
[PROOF STEP]
using Adj'.induces_adjunction
[PROOF STATE]
proof (prove)
using this:
adjunction C D S.comp (\<lambda>A. A \<subseteq> S.Univ) Adj'.\<phi>C Adj'.\<phi>D F G' \<phi>' \<psi>' Adj'.\<eta> Adj'.\<epsilon> Adj'.\<Phi> Adj'.\<Psi>

goal (1 subgoal):
 1. adjunction C D S.comp (\<lambda>A. A \<subseteq> S.Univ) Adj'.\<phi>C Adj'.\<phi>D F G' \<phi>' \<psi>' Adj'.\<eta> Adj'.\<epsilon> Adj'.\<Phi> Adj'.\<Psi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic C D G G'
[PROOF STEP]
write C (infixr "\<cdot>\<^sub>C" 55)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) D G G'
[PROOF STEP]
write D (infixr "\<cdot>\<^sub>D" 55)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
write Adj.C.in_hom ("\<guillemotleft>_ : _ \<rightarrow>\<^sub>C _\<guillemotright>")
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
write Adj.D.in_hom ("\<guillemotleft>_ : _ \<rightarrow>\<^sub>D _\<guillemotright>")
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
let ?\<tau>o = "\<lambda>a. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G a)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
interpret \<tau>: transformation_by_components C D G G' ?\<tau>o
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. transformation_by_components (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G' (\<lambda>a. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G a))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. Adj.C.ide a \<Longrightarrow> \<guillemotleft>G' (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G a) : G a \<rightarrow>\<^sub>D G' a\<guillemotright>
 2. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
show "\<And>a. Adj.C.ide a \<Longrightarrow> \<guillemotleft>G' (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G a) : G a \<rightarrow>\<^sub>D G' a\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. Adj.C.ide a \<Longrightarrow> \<guillemotleft>G' (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G a) : G a \<rightarrow>\<^sub>D G' a\<guillemotright>
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Adj.C.ide ?a1 \<Longrightarrow> \<guillemotleft>G' (Adj.\<epsilon> ?a1) \<cdot>\<^sub>D Adj'.\<eta> (G ?a1) : G ?a1 \<rightarrow>\<^sub>D G' ?a1\<guillemotright>

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
show "\<And>f. Adj.C.arr f \<Longrightarrow>
                   (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f =
                   G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
fix f
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
assume f: "Adj.C.arr f"
[PROOF STATE]
proof (state)
this:
Adj.C.arr f

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
let ?x = "Adj.C.dom f"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
let ?x' = "Adj.C.cod f"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
have "(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f =
              G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
using f Adj'.\<eta>.naturality [of "G f"] Adj.D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
Adj.C.arr f
Adj.D.arr (G f) \<Longrightarrow> Adj'.\<eta> (Adj.D.cod (G f)) \<cdot>\<^sub>D Adj.D.map (G f) = Adj'.GF.map (G f) \<cdot>\<^sub>D Adj'.\<eta> (Adj.D.dom (G f))
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
have "... = G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
using f Adj.\<epsilon>.naturality
[PROOF STATE]
proof (prove)
using this:
Adj.C.arr f
Adj.C.arr ?f \<Longrightarrow> Adj.\<epsilon> (Adj.C.cod ?f) \<cdot>\<^sub>C Adj.FG.map ?f = Adj.C.map ?f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom ?f)

goal (1 subgoal):
 1. G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> (Adj.C.cod f) \<cdot>\<^sub>C F (G f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
have "... = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
using f Adj.D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
Adj.C.arr f
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
G' (f \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f)) = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal (1 subgoal):
 1. \<And>f. Adj.C.arr f \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
show "(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f =
                      G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))"
[PROOF STATE]
proof (prove)
using this:
(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal (1 subgoal):
 1. (G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G' (Adj.\<epsilon> (Adj.C.cod f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod f))) \<cdot>\<^sub>D G f = G' f \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom f)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom f))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Adj.C.arr ?f1 \<Longrightarrow> (G' (Adj.\<epsilon> (Adj.C.cod ?f1)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.cod ?f1))) \<cdot>\<^sub>D G ?f1 = G' ?f1 \<cdot>\<^sub>D G' (Adj.\<epsilon> (Adj.C.dom ?f1)) \<cdot>\<^sub>D Adj'.\<eta> (G (Adj.C.dom ?f1))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
interpret natural_isomorphism C D G G' \<tau>.map
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. natural_isomorphism (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G' \<tau>.map
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. Adj.C.ide a \<Longrightarrow> Adj.D.iso (\<tau>.map a)
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. Adj.C.ide a \<Longrightarrow> Adj.D.iso (\<tau>.map a)
[PROOF STEP]
assume a: "Adj.C.ide a"
[PROOF STATE]
proof (state)
this:
Adj.C.ide a

goal (1 subgoal):
 1. \<And>a. Adj.C.ide a \<Longrightarrow> Adj.D.iso (\<tau>.map a)
[PROOF STEP]
show "Adj.D.iso (\<tau>.map a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Adj.D.iso (\<tau>.map a)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Adj.D.inverse_arrows (\<tau>.map a) ?g
[PROOF STEP]
show "Adj.D.inverse_arrows (\<tau>.map a) (\<phi> (G' a) (Adj'.\<epsilon> a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Adj.D.inverse_arrows (\<tau>.map a) (\<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
 2. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
text\<open>
            The proof that the two composites are identities is a modest diagram chase.
            This is a good example of the inference rules for the \<open>category\<close>,
            \<open>functor\<close>, and \<open>natural_transformation\<close> locales in action.
            Isabelle is able to use the single hypothesis that \<open>a\<close> is an identity to
            implicitly fill in all the details that the various quantities are in fact arrows
            and that the indicated composites are all well-defined, as well as to apply
            associativity of composition.  In most cases, this is done by auto or simp without
            even mentioning any of the rules that are used.
$$\xymatrix{
        {G' a} \ar[dd]_{\eta'(G'a)} \ar[rr]^{\tau' a} \ar[dr]_{\eta(G'a)}
           && {G a} \ar[rr]^{\tau a} \ar[dr]_{\eta'(Ga)} && {G' a}                     \\
        & {GFG'a} \rrtwocell\omit{\omit(2)} \ar[ur]_{G(\epsilon' a)} \ar[dr]_{\eta'(GFG'a)}
           && {G'FGa} \drtwocell\omit{\omit(3)} \ar[ur]_{G'(\epsilon a)} &            \\
        {G'FG'a} \urtwocell\omit{\omit(1)} \ar[rr]_{G'F\eta(G'a)} \ar@/_8ex/[rrrr]_{G'FG'a}
           && {G'FGFG'a} \dtwocell\omit{\omit(4)} \ar[ru]_{G'FG(\epsilon' a)} \ar[rr]_{G'(\epsilon(FG'a))}
           && {G'FG'a} \ar[uu]_{G'(\epsilon' a)}                                       \\
           &&&&
}$$
\<close>
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
 2. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
show "Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
have "\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
have "\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) =
                    G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a)
[PROOF STEP]
using a \<tau>.map_simp_ide Adj.\<phi>_in_terms_of_\<eta> Adj'.\<phi>_in_terms_of_\<eta>
                      Adj'.\<epsilon>.preserves_hom [of a a a] Adj.C.ide_in_hom Adj.D.comp_assoc
                      Adj.\<epsilon>_def Adj.\<eta>_def
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.C.ide ?a \<Longrightarrow> \<tau>.map ?a = G' (Adj.\<epsilon> ?a) \<cdot>\<^sub>D Adj'.\<eta> (G ?a)
\<lbrakk>Adj.D.ide ?y; \<guillemotleft>?f : F ?y \<rightarrow>\<^sub>C ?x\<guillemotright>\<rbrakk> \<Longrightarrow> \<phi> ?y ?f = G ?f \<cdot>\<^sub>D Adj.\<eta> ?y
\<lbrakk>Adj.D.ide ?y; \<guillemotleft>?f : F ?y \<rightarrow>\<^sub>C ?x\<guillemotright>\<rbrakk> \<Longrightarrow> \<phi>' ?y ?f = G' ?f \<cdot>\<^sub>D Adj'.\<eta> ?y
\<guillemotleft>a : a \<rightarrow>\<^sub>C a\<guillemotright> \<Longrightarrow> \<guillemotleft>Adj'.\<epsilon> a : Adj'.FG.map a \<rightarrow>\<^sub>C Adj.C.map a\<guillemotright>
Adj.C.ide ?a = \<guillemotleft>?a : ?a \<rightarrow>\<^sub>C ?a\<guillemotright>
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f
Adj.\<epsilon> \<equiv> transformation_by_components.map (\<cdot>\<^sub>C) (\<cdot>\<^sub>C) Adj.FG.map Adj.\<epsilon>o
Adj.\<eta> \<equiv> transformation_by_components.map (\<cdot>\<^sub>D) (\<cdot>\<^sub>D) Adj.D.map Adj.\<eta>o

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
have "... = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D
                               Adj.\<eta> (G' a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a)
[PROOF STEP]
using a Adj'.\<eta>.naturality [of "G (Adj'.\<epsilon> a)"]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.D.arr (G (Adj'.\<epsilon> a)) \<Longrightarrow> Adj'.\<eta> (Adj.D.cod (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj.D.map (G (Adj'.\<epsilon> a)) = Adj'.GF.map (G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (Adj.D.dom (G (Adj'.\<epsilon> a)))

goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (Adj'.\<eta> (G a) \<cdot>\<^sub>D G (Adj'.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (G' a) = G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
have "... = (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D
                               Adj'.\<eta> (G' a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a) = (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
using a Adj'.\<eta>.naturality [of "Adj.\<eta> (G' a)"] Adj.D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.D.arr (Adj.\<eta> (G' a)) \<Longrightarrow> Adj'.\<eta> (Adj.D.cod (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj.D.map (Adj.\<eta> (G' a)) = Adj'.GF.map (Adj.\<eta> (G' a)) \<cdot>\<^sub>D Adj'.\<eta> (Adj.D.dom (Adj.\<eta> (G' a)))
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a) = (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a) = (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D (G' (F (G (Adj'.\<epsilon> a))) \<cdot>\<^sub>D Adj'.\<eta> (G (F (G' a)))) \<cdot>\<^sub>D Adj.\<eta> (G' a) = (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
have
                  "... = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D
                         Adj'.\<eta> (G' a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
have
                   "G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
have "G' (Adj.\<epsilon> a \<cdot>\<^sub>C F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a \<cdot>\<^sub>C Adj.\<epsilon> (F (G' a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> a \<cdot>\<^sub>C F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a \<cdot>\<^sub>C Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
using a Adj.\<epsilon>.naturality [of "Adj'.\<epsilon> a"]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.C.arr (Adj'.\<epsilon> a) \<Longrightarrow> Adj.\<epsilon> (Adj.C.cod (Adj'.\<epsilon> a)) \<cdot>\<^sub>C Adj.FG.map (Adj'.\<epsilon> a) = Adj.C.map (Adj'.\<epsilon> a) \<cdot>\<^sub>C Adj.\<epsilon> (Adj.C.dom (Adj'.\<epsilon> a))

goal (1 subgoal):
 1. G' (Adj.\<epsilon> a \<cdot>\<^sub>C F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a \<cdot>\<^sub>C Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a \<cdot>\<^sub>C F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a \<cdot>\<^sub>C Adj.\<epsilon> (F (G' a)))

goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> a \<cdot>\<^sub>C F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a \<cdot>\<^sub>C Adj.\<epsilon> (F (G' a)))

goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> a \<cdot>\<^sub>C F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a \<cdot>\<^sub>C Adj.\<epsilon> (F (G' a)))
Adj.C.ide a

goal (1 subgoal):
 1. G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))

goal (1 subgoal):
 1. (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))

goal (1 subgoal):
 1. (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
using Adj.D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a))) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D G' (Adj.\<epsilon> (F (G' a)))
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. (G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(G' (Adj.\<epsilon> a) \<cdot>\<^sub>D G' (F (G (Adj'.\<epsilon> a)))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
have "... = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
have "G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
[PROOF STEP]
have
                      "G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))
[PROOF STEP]
using a Adj.\<epsilon>FoF\<eta>.map_simp_1
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.D.arr ?f \<Longrightarrow> Adj.\<epsilon>FoF\<eta>.map ?f = (Adj.\<epsilon> \<circ> F) (Adj.D.cod ?f) \<cdot>\<^sub>C (F \<circ> Adj.\<eta>) ?f

goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))

goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))

goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
[PROOF STEP]
have "Adj.\<epsilon>FoF\<eta>.map (G' a) = F (G' a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Adj.\<epsilon>FoF\<eta>.map (G' a) = F (G' a)
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a

goal (1 subgoal):
 1. Adj.\<epsilon>FoF\<eta>.map (G' a) = F (G' a)
[PROOF STEP]
by (simp add: Adj.\<eta>\<epsilon>.triangle_F)
[PROOF STATE]
proof (state)
this:
Adj.\<epsilon>FoF\<eta>.map (G' a) = F (G' a)

goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))
Adj.\<epsilon>FoF\<eta>.map (G' a) = F (G' a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (Adj.\<epsilon>FoF\<eta>.map (G' a))
Adj.\<epsilon>FoF\<eta>.map (G' a) = F (G' a)

goal (1 subgoal):
 1. G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))

goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))

goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
using a Adj.D.comp_cod_arr [of "Adj'.\<eta> (G' a)"]
[PROOF STATE]
proof (prove)
using this:
G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a))) = G' (F (G' a))
Adj.C.ide a
\<lbrakk>Adj.D.arr (Adj'.\<eta> (G' a)); Adj.D.cod (Adj'.\<eta> (G' a)) = ?b\<rbrakk> \<Longrightarrow> ?b \<cdot>\<^sub>D Adj'.\<eta> (G' a) = Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G' (Adj.\<epsilon> (F (G' a))) \<cdot>\<^sub>D G' (F (Adj.\<eta> (G' a)))) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a)

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
have "... = G' a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' a
[PROOF STEP]
using a Adj'.\<eta>\<epsilon>.triangle_G Adj'.G\<epsilon>o\<eta>G.map_simp_1 [of a]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj'.G\<epsilon>o\<eta>G.map = G'
Adj.C.arr a \<Longrightarrow> Adj'.G\<epsilon>o\<eta>G.map a = (G' \<circ> Adj'.\<epsilon>) (Adj.C.cod a) \<cdot>\<^sub>D (Adj'.\<eta> \<circ> G') a

goal (1 subgoal):
 1. G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G' (Adj'.\<epsilon> a) \<cdot>\<^sub>D Adj'.\<eta> (G' a) = G' a

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a

goal (1 subgoal):
 1. \<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a

goal (1 subgoal):
 1. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a

goal (1 subgoal):
 1. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a) = G' a
Adj.C.ide a

goal (1 subgoal):
 1. Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Adj.D.ide (\<tau>.map a \<cdot>\<^sub>D \<phi> (G' a) (Adj'.\<epsilon> a))

goal (1 subgoal):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
[PROOF STEP]
show "Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
[PROOF STEP]
have "\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
have "\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a =
                    G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a)
[PROOF STEP]
using a \<tau>.map_simp_ide Adj.\<phi>_in_terms_of_\<eta> Adj'.\<epsilon>.preserves_hom [of a a a]
                      Adj.C.ide_in_hom Adj.D.comp_assoc Adj.\<eta>_def
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.C.ide ?a \<Longrightarrow> \<tau>.map ?a = G' (Adj.\<epsilon> ?a) \<cdot>\<^sub>D Adj'.\<eta> (G ?a)
\<lbrakk>Adj.D.ide ?y; \<guillemotleft>?f : F ?y \<rightarrow>\<^sub>C ?x\<guillemotright>\<rbrakk> \<Longrightarrow> \<phi> ?y ?f = G ?f \<cdot>\<^sub>D Adj.\<eta> ?y
\<guillemotleft>a : a \<rightarrow>\<^sub>C a\<guillemotright> \<Longrightarrow> \<guillemotleft>Adj'.\<epsilon> a : Adj'.FG.map a \<rightarrow>\<^sub>C Adj.C.map a\<guillemotright>
Adj.C.ide ?a = \<guillemotleft>?a : ?a \<rightarrow>\<^sub>C ?a\<guillemotright>
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f
Adj.\<eta> \<equiv> transformation_by_components.map (\<cdot>\<^sub>D) (\<cdot>\<^sub>D) Adj.D.map Adj.\<eta>o

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
have
                "... = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D
                       Adj'.\<eta> (G a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a) = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a)
[PROOF STEP]
using a Adj.\<eta>.naturality [of "G' (Adj.\<epsilon> a)"]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.D.arr (G' (Adj.\<epsilon> a)) \<Longrightarrow> Adj.\<eta> (Adj.D.cod (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.D.map (G' (Adj.\<epsilon> a)) = Adj.GF.map (G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj.\<eta> (Adj.D.dom (G' (Adj.\<epsilon> a)))

goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a) = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a) = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (Adj.\<eta> (G' a) \<cdot>\<^sub>D G' (Adj.\<epsilon> a)) \<cdot>\<^sub>D Adj'.\<eta> (G a) = G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
have
                "... = (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D
                       Adj.\<eta> (G a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a) = (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
using a Adj.\<eta>.naturality [of "Adj'.\<eta> (G a)"] Adj.D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.D.arr (Adj'.\<eta> (G a)) \<Longrightarrow> Adj.\<eta> (Adj.D.cod (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.D.map (Adj'.\<eta> (G a)) = Adj.GF.map (Adj'.\<eta> (G a)) \<cdot>\<^sub>D Adj.\<eta> (Adj.D.dom (Adj'.\<eta> (G a)))
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a) = (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a) = (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D (G (F (G' (Adj.\<epsilon> a))) \<cdot>\<^sub>D Adj.\<eta> (G' (F (G a)))) \<cdot>\<^sub>D Adj'.\<eta> (G a) = (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
have
                "... = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D
                       Adj.\<eta> (G a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
have "G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
have "G (Adj'.\<epsilon> a \<cdot>\<^sub>C F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a \<cdot>\<^sub>C Adj'.\<epsilon> (F (G a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> a \<cdot>\<^sub>C F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a \<cdot>\<^sub>C Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
using a Adj'.\<epsilon>.naturality [of "Adj.\<epsilon> a"]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.C.arr (Adj.\<epsilon> a) \<Longrightarrow> Adj'.\<epsilon> (Adj.C.cod (Adj.\<epsilon> a)) \<cdot>\<^sub>C Adj'.FG.map (Adj.\<epsilon> a) = Adj.C.map (Adj.\<epsilon> a) \<cdot>\<^sub>C Adj'.\<epsilon> (Adj.C.dom (Adj.\<epsilon> a))

goal (1 subgoal):
 1. G (Adj'.\<epsilon> a \<cdot>\<^sub>C F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a \<cdot>\<^sub>C Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a \<cdot>\<^sub>C F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a \<cdot>\<^sub>C Adj'.\<epsilon> (F (G a)))

goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> a \<cdot>\<^sub>C F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a \<cdot>\<^sub>C Adj'.\<epsilon> (F (G a)))

goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> a \<cdot>\<^sub>C F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a \<cdot>\<^sub>C Adj'.\<epsilon> (F (G a)))
Adj.C.ide a

goal (1 subgoal):
 1. G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))

goal (1 subgoal):
 1. (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))

goal (1 subgoal):
 1. (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
using Adj.D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a))) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D G (Adj'.\<epsilon> (F (G a)))
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. (G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(G (Adj'.\<epsilon> a) \<cdot>\<^sub>D G (F (G' (Adj.\<epsilon> a)))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
have "... = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
have "G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
[PROOF STEP]
have
                    "G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))
[PROOF STEP]
using a Adj'.\<epsilon>FoF\<eta>.map_simp_1 [of "G a"]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.D.arr (G a) \<Longrightarrow> Adj'.\<epsilon>FoF\<eta>.map (G a) = (Adj'.\<epsilon> \<circ> F) (Adj.D.cod (G a)) \<cdot>\<^sub>C (F \<circ> Adj'.\<eta>) (G a)

goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))

goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))

goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
[PROOF STEP]
have "Adj'.\<epsilon>FoF\<eta>.map (G a) = F (G a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Adj'.\<epsilon>FoF\<eta>.map (G a) = F (G a)
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a

goal (1 subgoal):
 1. Adj'.\<epsilon>FoF\<eta>.map (G a) = F (G a)
[PROOF STEP]
by (simp add: Adj'.\<eta>\<epsilon>.triangle_F)
[PROOF STATE]
proof (state)
this:
Adj'.\<epsilon>FoF\<eta>.map (G a) = F (G a)

goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))
Adj'.\<epsilon>FoF\<eta>.map (G a) = F (G a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (Adj'.\<epsilon>FoF\<eta>.map (G a))
Adj'.\<epsilon>FoF\<eta>.map (G a) = F (G a)

goal (1 subgoal):
 1. G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))

goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))

goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
using a Adj.D.comp_cod_arr
[PROOF STATE]
proof (prove)
using this:
G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a))) = G (F (G a))
Adj.C.ide a
\<lbrakk>Adj.D.arr ?f; Adj.D.cod ?f = ?b\<rbrakk> \<Longrightarrow> ?b \<cdot>\<^sub>D ?f = ?f

goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G (Adj.\<epsilon> a) \<cdot>\<^sub>D (G (Adj'.\<epsilon> (F (G a))) \<cdot>\<^sub>D G (F (Adj'.\<eta> (G a)))) \<cdot>\<^sub>D Adj.\<eta> (G a) = G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a)

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
have "... = G a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a) = G a
[PROOF STEP]
using a Adj.\<eta>\<epsilon>.triangle_G Adj.G\<epsilon>o\<eta>G.map_simp_1 [of a]
[PROOF STATE]
proof (prove)
using this:
Adj.C.ide a
Adj.G\<epsilon>o\<eta>G.map = G
Adj.C.arr a \<Longrightarrow> Adj.G\<epsilon>o\<eta>G.map a = (G \<circ> Adj.\<epsilon>) (Adj.C.cod a) \<cdot>\<^sub>D (Adj.\<eta> \<circ> G) a

goal (1 subgoal):
 1. G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a) = G a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G (Adj.\<epsilon> a) \<cdot>\<^sub>D Adj.\<eta> (G a) = G a

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a

goal (1 subgoal):
 1. \<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a

goal (1 subgoal):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a

goal (1 subgoal):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a = G a
Adj.C.ide a

goal (1 subgoal):
 1. Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Adj.D.ide (\<phi> (G' a) (Adj'.\<epsilon> a) \<cdot>\<^sub>D \<tau>.map a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Adj.D.inverse_arrows (\<tau>.map a) (\<phi> (G' a) (Adj'.\<epsilon> a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Adj.D.iso (\<tau>.map a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
have "natural_isomorphism C D G G' \<tau>.map"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. natural_isomorphism (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G' \<tau>.map
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
natural_isomorphism (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G' \<tau>.map

goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
thus "naturally_isomorphic C D G G'"
[PROOF STATE]
proof (prove)
using this:
natural_isomorphism (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G' \<tau>.map

goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
using naturally_isomorphic_def
[PROOF STATE]
proof (prove)
using this:
natural_isomorphism (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G' \<tau>.map
naturally_isomorphic ?A ?B ?F ?G = (\<exists>\<tau>. natural_isomorphism ?A ?B ?F ?G \<tau>)

goal (1 subgoal):
 1. naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
naturally_isomorphic (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) G G'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma wf_less_multiset: "wf {(M :: 'a multiset, N). M < N}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(M, N). M < N}
[PROOF STEP]
unfolding less_multiset_def multp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(M, N). (M, N) \<in> mult {(x, y). x < y}}
[PROOF STEP]
by (auto intro: wf_mult wf)


[STATEMENT]
lemma a_def_equiv: "d_aux a b c \<le> e_aux a b c \<Longrightarrow> a_aux a b c = (a \<squnion> d_aux a b c) \<sqinter> e_aux a b c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_aux a b c \<le> e_aux a b c \<Longrightarrow> a_aux a b c = (a \<squnion> d_aux a b c) \<sqinter> e_aux a b c
[PROOF STEP]
apply (simp add: a_aux_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_aux a b c \<le> e_aux a b c \<Longrightarrow> a \<sqinter> e_aux a b c \<squnion> d_aux a b c = (a \<squnion> d_aux a b c) \<sqinter> e_aux a b c
[PROOF STEP]
apply (subst inf_commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_aux a b c \<le> e_aux a b c \<Longrightarrow> e_aux a b c \<sqinter> a \<squnion> d_aux a b c = (a \<squnion> d_aux a b c) \<sqinter> e_aux a b c
[PROOF STEP]
apply (subst sup_commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_aux a b c \<le> e_aux a b c \<Longrightarrow> d_aux a b c \<squnion> e_aux a b c \<sqinter> a = (a \<squnion> d_aux a b c) \<sqinter> e_aux a b c
[PROOF STEP]
apply (simp add: modular)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_aux a b c \<le> e_aux a b c \<Longrightarrow> e_aux a b c \<sqinter> (d_aux a b c \<squnion> a) = (a \<squnion> d_aux a b c) \<sqinter> e_aux a b c
[PROOF STEP]
by (simp add: inf_commute sup_commute)


[STATEMENT]
lemma snd_snd_foldl_echelon_form_of_column_k_iarrays:
  "snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k]))
  = bezout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout
[PROOF STEP]
proof (induct k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<0])) = bezout
 2. \<And>k. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout \<Longrightarrow> snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<0])) = bezout
 2. \<And>k. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout \<Longrightarrow> snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<0])) = bezout
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<0])) = bezout

goal (1 subgoal):
 1. \<And>k. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout \<Longrightarrow> snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout \<Longrightarrow> snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout

goal (1 subgoal):
 1. \<And>k. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout \<Longrightarrow> snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
using Suc.hyps
[PROOF STATE]
proof (prove)
using this:
snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout

goal (1 subgoal):
 1. snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
unfolding echelon_form_of_column_k_iarrays_def
[PROOF STATE]
proof (prove)
using this:
snd (snd (foldl (\<lambda>a b. let (A, i, bezout) = a; nrows_A = nrows_iarray A; column_Ak = column_iarray b A; all_zero_below_i = vector_all_zero_from_index (i + 1, column_Ak) in if i = nrows_A \<or> A !! i !! b = (0::'a) \<and> all_zero_below_i then (A, i, bezout) else if all_zero_below_i then (A, i + 1, bezout) else let n = least_non_zero_position_of_vector_from_index column_Ak i; interchange_A = interchange_rows_iarray A i n in (bezout_iterate_iarrays interchange_A (nrows_A - 1) i b bezout, i + 1, bezout)) (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout

goal (1 subgoal):
 1. snd (snd (foldl (\<lambda>a b. let (A, i, bezout) = a; nrows_A = nrows_iarray A; column_Ak = column_iarray b A; all_zero_below_i = vector_all_zero_from_index (i + 1, column_Ak) in if i = nrows_A \<or> A !! i !! b = (0::'a) \<and> all_zero_below_i then (A, i, bezout) else if all_zero_below_i then (A, i + 1, bezout) else let n = least_non_zero_position_of_vector_from_index column_Ak i; interchange_A = interchange_rows_iarray A i n in (bezout_iterate_iarrays interchange_A (nrows_A - 1) i b bezout, i + 1, bezout)) (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
unfolding Let_def
[PROOF STATE]
proof (prove)
using this:
snd (snd (foldl (\<lambda>a aa. case a of (A, i, bezout) \<Rightarrow> if i = nrows_iarray A \<or> A !! i !! aa = (0::'a) \<and> vector_all_zero_from_index (i + 1, column_iarray aa A) then (A, i, bezout) else if vector_all_zero_from_index (i + 1, column_iarray aa A) then (A, i + 1, bezout) else (bezout_iterate_iarrays (interchange_rows_iarray A i (least_non_zero_position_of_vector_from_index (column_iarray aa A) i)) (nrows_iarray A - 1) i aa bezout, i + 1, bezout)) (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout

goal (1 subgoal):
 1. snd (snd (foldl (\<lambda>a aa. case a of (A, i, bezout) \<Rightarrow> if i = nrows_iarray A \<or> A !! i !! aa = (0::'a) \<and> vector_all_zero_from_index (i + 1, column_iarray aa A) then (A, i, bezout) else if vector_all_zero_from_index (i + 1, column_iarray aa A) then (A, i + 1, bezout) else (bezout_iterate_iarrays (interchange_rows_iarray A i (least_non_zero_position_of_vector_from_index (column_iarray aa A) i)) (nrows_iarray A - 1) i aa bezout, i + 1, bezout)) (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
unfolding split_beta
[PROOF STATE]
proof (prove)
using this:
snd (snd (foldl (\<lambda>a b. if fst (snd a) = nrows_iarray (fst a) \<or> fst a !! fst (snd a) !! b = (0::'a) \<and> vector_all_zero_from_index (fst (snd a) + 1, column_iarray b (fst a)) then (fst a, fst (snd a), snd (snd a)) else if vector_all_zero_from_index (fst (snd a) + 1, column_iarray b (fst a)) then (fst a, fst (snd a) + 1, snd (snd a)) else (bezout_iterate_iarrays (interchange_rows_iarray (fst a) (fst (snd a)) (least_non_zero_position_of_vector_from_index (column_iarray b (fst a)) (fst (snd a)))) (nrows_iarray (fst a) - 1) (fst (snd a)) b (snd (snd a)), fst (snd a) + 1, snd (snd a))) (matrix_to_iarray A, 0, bezout) [0..<k])) = bezout

goal (1 subgoal):
 1. snd (snd (foldl (\<lambda>a b. if fst (snd a) = nrows_iarray (fst a) \<or> fst a !! fst (snd a) !! b = (0::'a) \<and> vector_all_zero_from_index (fst (snd a) + 1, column_iarray b (fst a)) then (fst a, fst (snd a), snd (snd a)) else if vector_all_zero_from_index (fst (snd a) + 1, column_iarray b (fst a)) then (fst a, fst (snd a) + 1, snd (snd a)) else (bezout_iterate_iarrays (interchange_rows_iarray (fst a) (fst (snd a)) (least_non_zero_position_of_vector_from_index (column_iarray b (fst a)) (fst (snd a)))) (nrows_iarray (fst a) - 1) (fst (snd a)) b (snd (snd a)), fst (snd a) + 1, snd (snd a))) (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
snd (snd (foldl echelon_form_of_column_k_iarrays (matrix_to_iarray A, 0, bezout) [0..<Suc k])) = bezout

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nodeToDigit_inv:
  "is_leveln_node (Suc n) nd \<Longrightarrow> is_leveln_digit n (nodeToDigit nd) "
  "is_measured_node nd \<Longrightarrow> is_measured_digit (nodeToDigit nd)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (is_leveln_node (Suc n) nd \<Longrightarrow> is_leveln_digit n (nodeToDigit nd)) &&& (is_measured_node nd \<Longrightarrow> is_measured_digit (nodeToDigit nd))
[PROOF STEP]
by (cases nd, auto) (cases nd, auto)


[STATEMENT]
lemma l8_16_1:
  assumes "Col A B X" and
    "Col A B U" and
    "A B Perp C X"
  shows "\<not> Col A B C \<and> Per C X U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col A B C \<and> Per C X U
[PROOF STEP]
by (metis assms(1) assms(2) assms(3) l8_5 perp_col0 perp_left_comm perp_not_col2 perp_per_2)


[STATEMENT]
lemma linfinite_lmerge [simp]: "\<lbrakk> \<not> lfinite xs; \<not> lfinite ys \<rbrakk> \<Longrightarrow> \<not> lfinite (lmerge xs ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> lfinite xs; \<not> lfinite ys\<rbrakk> \<Longrightarrow> \<not> lfinite (lmerge xs ys)
[PROOF STEP]
by(auto dest: lfinite_lmergeD)


[STATEMENT]
lemma sign_changes_Cons_Cons_same:
  fixes x y :: "'a :: linordered_idom"
  shows "x * y > 0 \<Longrightarrow> sign_changes (x # y # xs) = sign_changes (y # xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < x * y \<Longrightarrow> sign_changes (x # y # xs) = sign_changes (y # xs)
[PROOF STEP]
by (subst (asm) zero_less_mult_iff) (fastforce simp: sign_changes_def)


[STATEMENT]
lemma lspace_const:
  fixes p::real
  assumes "p > 0""S \<in> lmeasurable"
  shows "(\<lambda>x. c) \<in> lspace (lebesgue_on S) p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. c) \<in> lspace (lebesgue_on S) (ennreal p)
[PROOF STEP]
by (simp add: Lp_space assms finite_measure.integrable_const finite_measure_lebesgue_on)


[STATEMENT]
lemma closure_Int_open_eq_empty: "open S \<Longrightarrow> (closure T \<inter> S) = {} \<longleftrightarrow> T \<inter> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open S \<Longrightarrow> (closure T \<inter> S = {}) = (T \<inter> S = {})
[PROOF STEP]
by (auto simp: open_Int_closure_eq_empty ac_simps)


[STATEMENT]
theorem merge_list_dtree: "list_dtree (merge t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_dtree (merge t)
[PROOF STEP]
using merge_wf_dlverts merge_wf_darcs list_dtree_def
[PROOF STATE]
proof (prove)
using this:
wf_dlverts (merge t)
wf_darcs (merge t)
list_dtree ?t \<equiv> wf_darcs ?t \<and> wf_dlverts ?t

goal (1 subgoal):
 1. list_dtree (merge t)
[PROOF STEP]
by blast


[STATEMENT]
lemma Borsukian_translation:
  fixes S :: "'a::real_normed_vector set"
  shows "Borsukian (image (\<lambda>x. a + x) S) \<longleftrightarrow> Borsukian S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Borsukian ((+) a ` S) = Borsukian S
[PROOF STEP]
using homeomorphic_Borsukian_eq homeomorphic_translation
[PROOF STATE]
proof (prove)
using this:
?S homeomorphic ?T \<Longrightarrow> Borsukian ?S = Borsukian ?T
?S homeomorphic (+) ?a ` ?S

goal (1 subgoal):
 1. Borsukian ((+) a ` S) = Borsukian S
[PROOF STEP]
by blast


[STATEMENT]
lemma inter_num_of_eq_blocks: "b1 = b2 \<Longrightarrow> b1 |\<inter>| b2 = card b1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b1 = b2 \<Longrightarrow> b1 |\<inter>| b2 = card b1
[PROOF STEP]
by (simp add: intersection_number_def)


[STATEMENT]
lemma (in Semilat) list_update_le_listI [rule_format]:
  "set xs \<subseteq> A \<longrightarrow> set ys \<subseteq> A \<longrightarrow> xs [\<sqsubseteq>\<^bsub>r\<^esub>] ys \<longrightarrow> p < size xs \<longrightarrow>
   x \<sqsubseteq>\<^bsub>r\<^esub> ys!p \<longrightarrow> x\<in>A \<longrightarrow> xs[p := x \<squnion>\<^bsub>f\<^esub> xs!p] [\<sqsubseteq>\<^bsub>r\<^esub>] ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set xs \<subseteq> A \<longrightarrow> set ys \<subseteq> A \<longrightarrow> xs [\<sqsubseteq>\<^bsub>r\<^esub>] ys \<longrightarrow> p < length xs \<longrightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> ys ! p \<longrightarrow> x \<in> A \<longrightarrow> xs[p := x \<squnion>\<^bsub>f\<^esub> xs ! p] [\<sqsubseteq>\<^bsub>r\<^esub>] ys
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set xs \<subseteq> A \<longrightarrow> set ys \<subseteq> A \<longrightarrow> xs [\<sqsubseteq>\<^bsub>r\<^esub>] ys \<longrightarrow> p < length xs \<longrightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> ys ! p \<longrightarrow> x \<in> A \<longrightarrow> xs[p := x \<squnion>\<^bsub>f\<^esub> xs ! p] [\<sqsubseteq>\<^bsub>r\<^esub>] ys
[PROOF STEP]
apply (insert semilat)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semilat (A, r, f) \<Longrightarrow> set xs \<subseteq> A \<longrightarrow> set ys \<subseteq> A \<longrightarrow> xs [\<sqsubseteq>\<^bsub>r\<^esub>] ys \<longrightarrow> p < length xs \<longrightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> ys ! p \<longrightarrow> x \<in> A \<longrightarrow> xs[p := x \<squnion>\<^bsub>f\<^esub> xs ! p] [\<sqsubseteq>\<^bsub>r\<^esub>] ys
[PROOF STEP]
apply (simp only: Listn.le_def lesub_def semilat_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. case (A, r, f) of (A, r, f) \<Rightarrow> order r A \<and> closed A f \<and> (\<forall>x\<in>A. \<forall>y\<in>A. r x (x \<squnion>\<^bsub>f\<^esub> y)) \<and> (\<forall>x\<in>A. \<forall>y\<in>A. r y (x \<squnion>\<^bsub>f\<^esub> y)) \<and> (\<forall>x\<in>A. \<forall>y\<in>A. \<forall>z\<in>A. r x z \<and> r y z \<longrightarrow> r (x \<squnion>\<^bsub>f\<^esub> y) z) \<Longrightarrow> set xs \<subseteq> A \<longrightarrow> set ys \<subseteq> A \<longrightarrow> list_all2 r xs ys \<longrightarrow> p < length xs \<longrightarrow> r x (ys ! p) \<longrightarrow> x \<in> A \<longrightarrow> list_all2 r (xs[p := x \<squnion>\<^bsub>f\<^esub> xs ! p]) ys
[PROOF STEP]
apply (simp add: list_all2_conv_all_nth nth_list_update)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma magQ_plus [si_eq]: "\<lbrakk>x + y\<rbrakk>\<^sub>Q = \<lbrakk>x\<rbrakk>\<^sub>Q + \<lbrakk>y\<rbrakk>\<^sub>Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x + y\<rbrakk>\<^sub>Q = \<lbrakk>x\<rbrakk>\<^sub>Q + \<lbrakk>y\<rbrakk>\<^sub>Q
[PROOF STEP]
by (simp add: magQ_def, transfer, simp)


[STATEMENT]
lemma UNIV_4: "(UNIV::(4 set)) = {1, 2, 3, 4}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV = {1, 2, 3, 4}
[PROOF STEP]
using exhaust_4
[PROOF STATE]
proof (prove)
using this:
?x = 1 \<or> ?x = 2 \<or> ?x = 3 \<or> ?x = 4

goal (1 subgoal):
 1. UNIV = {1, 2, 3, 4}
[PROOF STEP]
by auto


[STATEMENT]
lemma less_multiset\<^sub>D\<^sub>M:
  "M < N \<longleftrightarrow> (\<exists>X Y. X \<noteq> {#} \<and> X \<subseteq># N \<and> M = N - X + Y \<and> (\<forall>k. k \<in># Y \<longrightarrow> (\<exists>a. a \<in># X \<and> k < a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (M < N) = (\<exists>X Y. X \<noteq> {#} \<and> X \<subseteq># N \<and> M = N - X + Y \<and> (\<forall>k. k \<in># Y \<longrightarrow> (\<exists>a. a \<in># X \<and> k < a)))
[PROOF STEP]
by (rule mult\<^sub>D\<^sub>M[folded multp_def less_multiset_def])


[STATEMENT]
lemma openin_topology\<^sub>N_D:
  assumes "openin (topology\<^sub>N N) U"
          "x \<in> U"
  shows "\<exists>e>0. \<forall>y. eNorm N (y-x) < e \<longrightarrow> y \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>e>0. \<forall>y. eNorm N (y - x) < e \<longrightarrow> y \<in> U
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
openin (topology\<^sub>N N) U
x \<in> U

goal (1 subgoal):
 1. \<exists>e>0. \<forall>y. eNorm N (y - x) < e \<longrightarrow> y \<in> U
[PROOF STEP]
unfolding openin_topology\<^sub>N
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>U. \<exists>e>0. \<forall>y. eNorm N (y - x) < e \<longrightarrow> y \<in> U
x \<in> U

goal (1 subgoal):
 1. \<exists>e>0. \<forall>y. eNorm N (y - x) < e \<longrightarrow> y \<in> U
[PROOF STEP]
by auto


[STATEMENT]
lemma proots_within_gcd:
  fixes s::"'a::{factorial_ring_gcd,semiring_gcd_mult_normalize} set"
  shows "proots_within (gcd p q) s= proots_within p s \<inter> proots_within q s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proots_within (gcd p q) s = proots_within p s \<inter> proots_within q s
[PROOF STEP]
unfolding proots_within_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> s. poly (gcd p q) x = (0::'a)} = {x \<in> s. poly p x = (0::'a)} \<inter> {x \<in> s. poly q x = (0::'a)}
[PROOF STEP]
by (auto simp add: poly_eq_0_iff_dvd)


[STATEMENT]
lemma lm034:
  assumes "a \<in> allAllocations N G"
  shows "(a^-1 \<in> injections (Range a) N &
         Range a \<in> all_partitions G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a\<inverse> \<in> injections (Range a) N \<and> Range a \<in> all_partitions G
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<in> allAllocations N G

goal (1 subgoal):
 1. a\<inverse> \<in> injections (Range a) N \<and> Range a \<in> all_partitions G
[PROOF STEP]
by (metis (mono_tags, opaque_lifting) posssibleAllocationsRelCharacterization
                                   allocationInverseRangeDomainProperty)


[STATEMENT]
lemma matrix_mul_mat:
  fixes A :: "'a::comm_semiring_1 ^ 'm ^ 'n"
  shows "A ** mat x = x *k A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A ** mat x = x *k A
[PROOF STEP]
by (simp add: matrix_matrix_mult_def mat_def if_distrib sum.If_cases matrix_scalar_mult_def vec_eq_iff ac_simps)


[STATEMENT]
lemma in_sets_SUP: "i \<in> I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> space (M i) = Y) \<Longrightarrow> X \<in> sets (M i) \<Longrightarrow> X \<in> sets (SUP i\<in>I. M i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<in> I; \<And>i. i \<in> I \<Longrightarrow> space (M i) = Y; X \<in> sets (M i)\<rbrakk> \<Longrightarrow> X \<in> sets (Sup (M ` I))
[PROOF STEP]
by (intro in_sets_Sup[where X=Y]) auto


[STATEMENT]
lemma continuous_ordinal_rec:
assumes s: "\<forall>p x. x \<le> s p x"
shows "continuous (ordinal_rec z s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous (ordinal_rec z s)
[PROOF STEP]
apply (rule continuousI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>f. OrdinalInduct.strict_mono f \<Longrightarrow> ordinal_rec z s (oLimit f) = oLimit (\<lambda>n. ordinal_rec z s (f n))
 2. \<And>x. ordinal_rec z s x \<le> ordinal_rec z s (oSuc x)
[PROOF STEP]
apply (rule ordinal_rec_oLimit[OF s])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. ordinal_rec z s x \<le> ordinal_rec z s (oSuc x)
[PROOF STEP]
apply (simp add: s)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem wls_freshAbs_vsubstAbs_E2:
assumes "wlsAbs (us,s) A"
and "freshAbs zs z (A $[y1 // y]_ys)"
shows "freshAbs ys y A \<or> zs \<noteq> ys \<or> z \<noteq> y1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. freshAbs ys y A \<or> zs \<noteq> ys \<or> z \<noteq> y1
[PROOF STEP]
using assms freshAbs_vsubstAbs_E2[of A zs z ys y1 y]
[PROOF STATE]
proof (prove)
using this:
wlsAbs (us, s) A
freshAbs zs z (A $[y1 // y]_ys)
\<lbrakk>goodAbs A; freshAbs zs z (A $[y1 // y]_ys)\<rbrakk> \<Longrightarrow> freshAbs ys y A \<or> zs \<noteq> ys \<or> z \<noteq> y1

goal (1 subgoal):
 1. freshAbs ys y A \<or> zs \<noteq> ys \<or> z \<noteq> y1
[PROOF STEP]
by simp


[STATEMENT]
lemma LIM_fun_not_zero: "f \<midarrow>c\<rightarrow> l \<Longrightarrow> l \<noteq> 0 \<Longrightarrow> \<exists>r. 0 < r \<and> (\<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x \<noteq> 0)"
  for f :: "real \<Rightarrow> real"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<midarrow>c\<rightarrow> l; l \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x \<noteq> 0
[PROOF STEP]
using LIM_fun_gt_zero[of f l c] LIM_fun_less_zero[of f l c]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f \<midarrow>c\<rightarrow> l; 0 < l\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> 0 < f x
\<lbrakk>f \<midarrow>c\<rightarrow> l; l < 0\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x < 0

goal (1 subgoal):
 1. \<lbrakk>f \<midarrow>c\<rightarrow> l; l \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x \<noteq> 0
[PROOF STEP]
by (auto simp: neq_iff)


[STATEMENT]
lemma graph_formula:
  assumes "g \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p"
  shows "graph n g = {as \<in> carrier (Q\<^sub>p\<^bsup>Suc n\<^esup>). g (take n as) = as!n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. graph n g = {as \<in> carrier (Q\<^sub>p\<^bsup>Suc n\<^esup>). g (take n as) = as ! n}
[PROOF STEP]
using assms graph_memI fun_graph_def[of Q\<^sub>p n g]
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p
\<lbrakk>?f \<in> carrier (Q\<^sub>p\<^bsup>?m\<^esup>) \<rightarrow> carrier Q\<^sub>p; ?f (take ?m ?x) = ?x ! ?m; ?x \<in> carrier (Q\<^sub>p\<^bsup>?m + 1\<^esup>)\<rbrakk> \<Longrightarrow> ?x \<in> graph ?m ?f
graph n g = {as. \<exists>x\<in>carrier (Q\<^sub>p\<^bsup>n\<^esup>). as = x @ [g x]}

goal (1 subgoal):
 1. graph n g = {as \<in> carrier (Q\<^sub>p\<^bsup>Suc n\<^esup>). g (take n as) = as ! n}
[PROOF STEP]
by (smt Collect_cong Suc_eq_plus1 graph_memE(1) graph_mem_closed mem_Collect_eq)


[STATEMENT]
lemma hoare_patial_seq_assoc_sem:
  shows "\<Turnstile>\<^sub>p {A} (S1 ;; S2) ;; S3 {B} \<longleftrightarrow> \<Turnstile>\<^sub>p {A} S1 ;; (S2 ;; S3) {B}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Turnstile>\<^sub>p {A} S1;; S2;; S3 {B}) = (\<Turnstile>\<^sub>p {A} S1;; (S2;; S3) {B})
[PROOF STEP]
unfolding hoare_partial_correct_def denote.simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>\<rho>\<in>density_states. trace (A * \<rho>) \<le> trace (B * denote S3 (denote S2 (denote S1 \<rho>))) + (trace \<rho> - trace (denote S3 (denote S2 (denote S1 \<rho>))))) = (\<forall>\<rho>\<in>density_states. trace (A * \<rho>) \<le> trace (B * denote S3 (denote S2 (denote S1 \<rho>))) + (trace \<rho> - trace (denote S3 (denote S2 (denote S1 \<rho>)))))
[PROOF STEP]
by auto


[STATEMENT]
lemma (in aGroup) set_sum:"\<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A\<rbrakk> \<Longrightarrow>
                    H \<minusplus> K = {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A\<rbrakk> \<Longrightarrow> H \<minusplus> K = {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k}
[PROOF STEP]
apply (cut_tac b_ag_group)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A)\<rbrakk> \<Longrightarrow> H \<minusplus> K = {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k}
[PROOF STEP]
apply (rule equalityI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A)\<rbrakk> \<Longrightarrow> H \<minusplus> K \<subseteq> {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k}
 2. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A)\<rbrakk> \<Longrightarrow> {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k} \<subseteq> H \<minusplus> K
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A); x \<in> H \<minusplus> K\<rbrakk> \<Longrightarrow> x \<in> {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k}
 2. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A)\<rbrakk> \<Longrightarrow> {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k} \<subseteq> H \<minusplus> K
[PROOF STEP]
apply (simp add:aset_sum_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A); x \<in> H \<diamondop>\<^bsub>b_ag A\<^esub> K\<rbrakk> \<Longrightarrow> \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k
 2. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A)\<rbrakk> \<Longrightarrow> {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k} \<subseteq> H \<minusplus> K
[PROOF STEP]
apply (simp add:agop_gop[THEN sym] s_top_def, (erule bexE)+,
        frule sym, thin_tac "xa \<cdot>\<^bsub>b_ag A\<^esub> y = x", simp, blast)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A)\<rbrakk> \<Longrightarrow> {x. \<exists>h\<in>H. \<exists>k\<in>K. x = h \<plusminus> k} \<subseteq> H \<minusplus> K
[PROOF STEP]
apply (rule subsetI, simp add:aset_sum_def, (erule bexE)+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x h k. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A); h \<in> H; k \<in> K; x = h \<plusminus> k\<rbrakk> \<Longrightarrow> x \<in> H \<diamondop>\<^bsub>b_ag A\<^esub> K
[PROOF STEP]
apply (frule_tac c = h in subsetD[of H "carrier A"], assumption+,
        frule_tac c = k in subsetD[of K "carrier A"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x h k. \<lbrakk>H \<subseteq> carrier A; K \<subseteq> carrier A; Group (b_ag A); h \<in> H; k \<in> K; x = h \<plusminus> k; h \<in> carrier A; k \<in> carrier A\<rbrakk> \<Longrightarrow> x \<in> H \<diamondop>\<^bsub>b_ag A\<^esub> K
[PROOF STEP]
apply (simp add:agop_gop[THEN sym], simp add:s_top_def, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma poly_tuple_eval_Cons:
  assumes "is_poly_tuple n fs"
  assumes "length fs = m"
  assumes "as \<in> carrier (R\<^bsup>n\<^esup>)"
  assumes "f \<in> carrier (R[\<X>\<^bsub>n\<^esub>])"
  shows "(poly_tuple_eval (f#fs) as) = (eval_at_point R as f)#(poly_tuple_eval fs as)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_tuple_eval (f # fs) as = eval_at_point R as f # poly_tuple_eval fs as
[PROOF STEP]
using assms poly_tuple_eval_def
[PROOF STATE]
proof (prove)
using this:
is_poly_tuple n fs
length fs = m
as \<in> carrier (R\<^bsup>n\<^esup>)
f \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
poly_tuple_eval ?fs ?as = map (eval_at_point R ?as) ?fs

goal (1 subgoal):
 1. poly_tuple_eval (f # fs) as = eval_at_point R as f # poly_tuple_eval fs as
[PROOF STEP]
by (metis list.simps(9))


[STATEMENT]
lemma eqpoll_finite_iff: "A \<approx> B \<Longrightarrow> finite A \<longleftrightarrow> finite B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<approx> B \<Longrightarrow> finite A = finite B
[PROOF STEP]
by (meson bij_betw_finite eqpoll_def)


[STATEMENT]
lemma integral_null [simp]: "content (cbox a b) = 0 \<Longrightarrow> integral (cbox a b) f = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (cbox a b) = 0 \<Longrightarrow> integral (cbox a b) f = (0::'b)
[PROOF STEP]
by (metis has_integral_null integral_unique)


[STATEMENT]
lemma zero_lt_add_disj: "0 < (a::int) + b \<Longrightarrow> 0 \<le> a \<Longrightarrow> 0 \<le> b \<Longrightarrow> 0 < a \<or> 0 < b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a + b; 0 \<le> a; 0 \<le> b\<rbrakk> \<Longrightarrow> 0 < a \<or> 0 < b
[PROOF STEP]
by auto


[STATEMENT]
lemma subset_eq_diff_conv:
  "A - C \<subseteq># B \<longleftrightarrow> A \<subseteq># B + C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A - C \<subseteq># B) = (A \<subseteq># B + C)
[PROOF STEP]
by (simp add: subseteq_mset_def le_diff_conv)


[STATEMENT]
lemma fmap_states_funs_ta_commute:
  "fmap_states_ta f (fmap_funs_ta g A) = fmap_funs_ta g (fmap_states_ta f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmap_states_ta f (fmap_funs_ta g A) = fmap_funs_ta g (fmap_states_ta f A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fmap_states_ta f (fmap_funs_ta g A) = fmap_funs_ta g (fmap_states_ta f A)
[PROOF STEP]
have [simp]: "map_ta_rule f id (map_ta_rule id g r) = map_ta_rule id g (map_ta_rule f id r)" for r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_ta_rule f id (map_ta_rule id g r) = map_ta_rule id g (map_ta_rule f id r)
[PROOF STEP]
by (cases r) auto
[PROOF STATE]
proof (state)
this:
map_ta_rule f id (map_ta_rule id g ?r) = map_ta_rule id g (map_ta_rule f id ?r)

goal (1 subgoal):
 1. fmap_states_ta f (fmap_funs_ta g A) = fmap_funs_ta g (fmap_states_ta f A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmap_states_ta f (fmap_funs_ta g A) = fmap_funs_ta g (fmap_states_ta f A)
[PROOF STEP]
by (auto simp: ta_rule.case_distrib fmap_states_ta_def fmap_funs_ta_def fimage_iff fBex_def split: ta_rule.splits)
[PROOF STATE]
proof (state)
this:
fmap_states_ta f (fmap_funs_ta g A) = fmap_funs_ta g (fmap_states_ta f A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma len_in_state_set_le_max_len:
  fixes as x PROB
  assumes "(s \<in> valid_states PROB)" "(as \<in> valid_plans PROB)" "\<not>(as = [])"
    "(x \<in> state_set (state_list s as))"
  shows "(length x \<le> (Suc (length as)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length x \<le> Suc (length as)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
s \<in> valid_states PROB
as \<in> valid_plans PROB
as \<noteq> []
x \<in> state_set (state_list s as)

goal (1 subgoal):
 1. length x \<le> Suc (length as)
[PROOF STEP]
by (metis LENGTH_state_set Suc_eq_plus1_left add.commute state_list_length_lemma_2)


[STATEMENT]
lemma rbt_map_rel_finite[relator_props]:
  assumes ELO: "GEN_ALGO_tag (eq_linorder cmpk)"
  shows "finite_map_rel (\<langle>Rk,Rv\<rangle>rbt_map_rel (comp2lt cmpk))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
interpret linorder "comp2le cmpk" "comp2lt cmpk"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.linorder (comp2le cmpk) (comp2lt cmpk)
[PROOF STEP]
using ELO
[PROOF STATE]
proof (prove)
using this:
GEN_ALGO_tag (eq_linorder cmpk)

goal (1 subgoal):
 1. class.linorder (comp2le cmpk) (comp2lt cmpk)
[PROOF STEP]
by (simp add: eq_linorder_class_conv)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
using rbt_map_rel_finite_aux
[PROOF STATE]
proof (prove)
using this:
finite_map_rel (\<langle>?Rk, ?Rv\<rangle>rbt_map_rel (comp2lt cmpk))

goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma OFCLASS_bezout_ring_imp_class_bezout_ring:
  assumes "OFCLASS('a::comm_ring_1,bezout_ring_class)"
  shows "class.bezout_ring ((*)::'a\<Rightarrow>'a\<Rightarrow>'a) 1 (+) 0 (-) uminus"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.bezout_ring (*) (1::'a) (+) (0::'a) (-) uminus
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
OFCLASS('a, bezout_ring_class)

goal (1 subgoal):
 1. class.bezout_ring (*) (1::'a) (+) (0::'a) (-) uminus
[PROOF STEP]
unfolding bezout_ring_class_def class.bezout_ring_def
[PROOF STATE]
proof (prove)
using this:
OFCLASS('a, comm_ring_1_class) &&& class.bezout_ring_axioms (*) (+)

goal (1 subgoal):
 1. class.comm_ring_1 (*) (1::'a) (+) (0::'a) (-) uminus \<and> class.bezout_ring_axioms (*) (+)
[PROOF STEP]
using conjunctionD2[of "OFCLASS('a, comm_ring_1_class)"
                         "class.bezout_ring_axioms ((*)::'a\<Rightarrow>'a\<Rightarrow>'a) (+)"]
[PROOF STATE]
proof (prove)
using this:
OFCLASS('a, comm_ring_1_class) &&& class.bezout_ring_axioms (*) (+)
OFCLASS('a, comm_ring_1_class) &&& class.bezout_ring_axioms (*) (+) \<Longrightarrow> class.bezout_ring_axioms (*) (+)

goal (1 subgoal):
 1. class.comm_ring_1 (*) (1::'a) (+) (0::'a) (-) uminus \<and> class.bezout_ring_axioms (*) (+)
[PROOF STEP]
by (auto, intro_locales)


[STATEMENT]
lemma tllist_all2_tnthD:
  "\<lbrakk> tllist_all2 P Q xs ys; enat n < tlength xs \<rbrakk>
  \<Longrightarrow> P (tnth xs n) (tnth ys n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>tllist_all2 P Q xs ys; enat n < tlength xs\<rbrakk> \<Longrightarrow> P (tnth xs n) (tnth ys n)
[PROOF STEP]
by(simp add: tllist_all2_conv_all_tnth)