[STATEMENT]
lemma unit_char':
    assumes "B.obj a"
    shows "unit a = G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit a = G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. unit a = G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)
[PROOF STEP]
have "G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) = unit a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) = unit a
[PROOF STEP]
proof (intro unit_eqI [of a "G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)"])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. B.obj a
 2. \<guillemotleft>G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) : map\<^sub>0 a \<Rightarrow>\<^sub>D local.map a\<guillemotright>
 3. D.iso (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
 4. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
show "B.obj a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B.obj a
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
B.obj a

goal (3 subgoals):
 1. \<guillemotleft>G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) : map\<^sub>0 a \<Rightarrow>\<^sub>D local.map a\<guillemotright>
 2. D.iso (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
 3. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
show "\<guillemotleft>G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) : map\<^sub>0 a \<Rightarrow>\<^sub>D map a\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) : map\<^sub>0 a \<Rightarrow>\<^sub>D local.map a\<guillemotright>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
B.obj a

goal (1 subgoal):
 1. \<guillemotleft>G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) : map\<^sub>0 a \<Rightarrow>\<^sub>D local.map a\<guillemotright>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<guillemotleft>G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) : map\<^sub>0 a \<Rightarrow>\<^sub>D local.map a\<guillemotright>

goal (2 subgoals):
 1. D.iso (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
 2. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
show "D.iso (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. D.iso (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by (simp add: D.isos_compose F.unit_char(2) G.unit_char(2) assms)
[PROOF STATE]
proof (state)
this:
D.iso (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
show "(G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] =
              (map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D
                (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have 1: "cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
have "cmp (a, a) = (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmp (a, a) = (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
using assms cmp_def B.VV.ide_char\<^sub>S\<^sub>b\<^sub>C B.VV.arr_char\<^sub>S\<^sub>b\<^sub>C B.VV.dom_char\<^sub>S\<^sub>b\<^sub>C B.VV.cod_char\<^sub>S\<^sub>b\<^sub>C
                    B.VxV.dom_char B.objE D.comp_assoc B.obj_simps
[PROOF STATE]
proof (prove)
using this:
B.obj a
cmp ?\<mu>\<nu> = (if B.VV.arr ?\<mu>\<nu> then G (F (fst ?\<mu>\<nu> \<star>\<^sub>B snd ?\<mu>\<nu>)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (B.VV.dom ?\<mu>\<nu>)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F (B.dom (fst ?\<mu>\<nu>)), F (B.dom (snd ?\<mu>\<nu>))) else D.null)
B.VV.ide ?a = (B.VV.arr ?a \<and> B.VxV.ide ?a)
B.VV.arr ?f = (B.arr (fst ?f) \<and> B.arr (snd ?f) \<and> src\<^sub>B (fst ?f) = trg\<^sub>B (snd ?f))
B.VV.dom ?f = (if B.VV.arr ?f then B.VxV.dom ?f else B.VxV.null)
B.VV.cod ?f = (if B.VV.arr ?f then B.VxV.cod ?f else B.VxV.null)
B.VxV.dom ?f = (if B.arr (fst ?f) \<and> B.arr (snd ?f) then (B.dom (fst ?f), B.dom (snd ?f)) else (B.null, B.null))
\<lbrakk>B.obj ?a; \<lbrakk>B.ide ?a; src\<^sub>B ?a = ?a; trg\<^sub>B ?a = ?a\<rbrakk> \<Longrightarrow> ?T\<rbrakk> \<Longrightarrow> ?T
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f
B.obj ?a \<Longrightarrow> B.arr ?a
B.obj ?a \<Longrightarrow> src\<^sub>B ?a = ?a
B.obj ?a \<Longrightarrow> trg\<^sub>B ?a = ?a
B.obj ?a \<Longrightarrow> B.dom ?a = ?a
B.obj ?a \<Longrightarrow> B.cod ?a = ?a

goal (1 subgoal):
 1. cmp (a, a) = (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cmp (a, a) = (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)

goal (1 subgoal):
 1. cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmp (a, a) = (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)

goal (1 subgoal):
 1. cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
have "... = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
using assms D.comp_cod_arr B.VV.arr_char\<^sub>S\<^sub>b\<^sub>C B.VV.ide_char\<^sub>S\<^sub>b\<^sub>C
[PROOF STATE]
proof (prove)
using this:
B.obj a
\<lbrakk>D.arr ?f; D.cod ?f = ?b\<rbrakk> \<Longrightarrow> ?b \<cdot>\<^sub>D ?f = ?f
B.VV.arr ?f = (B.arr (fst ?f) \<and> B.arr (snd ?f) \<and> src\<^sub>B (fst ?f) = trg\<^sub>B (snd ?f))
B.VV.ide ?a = (B.VV.arr ?a \<and> B.VxV.ide ?a)

goal (1 subgoal):
 1. (G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G (F (a \<star>\<^sub>B a)) \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a))) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)

goal (1 subgoal):
 1. cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)

goal (1 subgoal):
 1. cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "(map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D
                  (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) =
                map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D
                    (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D
                    (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) = local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
using assms 1 D.comp_assoc D.interchange
[PROOF STATE]
proof (prove)
using this:
B.obj a
cmp (a, a) = G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F a, F a)
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f
\<lbrakk>D.seq ?\<nu> ?\<mu>; D.seq ?\<tau> ?\<sigma>\<rbrakk> \<Longrightarrow> ?\<nu> \<cdot>\<^sub>D ?\<mu> \<star>\<^sub>D ?\<tau> \<cdot>\<^sub>D ?\<sigma> = (?\<nu> \<star>\<^sub>D ?\<tau>) \<cdot>\<^sub>D (?\<mu> \<star>\<^sub>D ?\<sigma>)

goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) = local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) = local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) = local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "... = (map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D
                             \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D
                             (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
using assms G.\<Phi>.naturality [of "(F.unit a, F.unit a)"]
                  C.VV.arr_char\<^sub>S\<^sub>b\<^sub>C C.VV.dom_char\<^sub>S\<^sub>b\<^sub>C C.VV.cod_char\<^sub>S\<^sub>b\<^sub>C G.FF_def D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
B.obj a
C.VV.arr (F.unit a, F.unit a) \<Longrightarrow> \<Phi>\<^sub>G (C.VV.cod (F.unit a, F.unit a)) \<cdot>\<^sub>D G.H\<^sub>DoFF.map (F.unit a, F.unit a) = G.FoH\<^sub>C.map (F.unit a, F.unit a) \<cdot>\<^sub>D \<Phi>\<^sub>G (C.VV.dom (F.unit a, F.unit a))
C.VV.arr ?f = (C.arr (fst ?f) \<and> C.arr (snd ?f) \<and> src\<^sub>C (fst ?f) = trg\<^sub>C (snd ?f))
C.VV.dom ?f = (if C.VV.arr ?f then C.VxV.dom ?f else C.VxV.null)
C.VV.cod ?f = (if C.VV.arr ?f then C.VxV.cod ?f else C.VxV.null)
G.FF \<equiv> \<lambda>\<mu>\<nu>. if C.VV.arr \<mu>\<nu> then (G (fst \<mu>\<nu>), G (snd \<mu>\<nu>)) else D.VV.null
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D (\<Phi>\<^sub>G (F a, F a) \<cdot>\<^sub>D (G (F.unit a) \<star>\<^sub>D G (F.unit a))) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "... = (G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))) \<cdot>\<^sub>D
                             \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D
                             (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "C.arr (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C.seq (F \<i>\<^sub>B[a]) (\<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))
[PROOF STEP]
using assms B.VV.ide_char\<^sub>S\<^sub>b\<^sub>C B.VV.arr_char\<^sub>S\<^sub>b\<^sub>C F.cmp_in_hom(2)
[PROOF STATE]
proof (prove)
using this:
B.obj a
B.VV.ide ?a = (B.VV.arr ?a \<and> B.VxV.ide ?a)
B.VV.arr ?f = (B.arr (fst ?f) \<and> B.arr (snd ?f) \<and> src\<^sub>B (fst ?f) = trg\<^sub>B (snd ?f))
\<lbrakk>B.ide ?a; B.ide ?b; src\<^sub>B ?a = trg\<^sub>B ?b\<rbrakk> \<Longrightarrow> \<guillemotleft>\<Phi>\<^sub>F (?a, ?b) : F ?a \<star>\<^sub>C F ?b \<Rightarrow>\<^sub>C F (?a \<star>\<^sub>B ?b)\<guillemotright>

goal (1 subgoal):
 1. C.seq (F \<i>\<^sub>B[a]) (\<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))
[PROOF STEP]
by (intro C.seqI' C.comp_in_homI) auto
[PROOF STATE]
proof (state)
this:
C.seq (F \<i>\<^sub>B[a]) (\<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))

goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
hence "map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a) =
                  G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))"
[PROOF STATE]
proof (prove)
using this:
C.seq (F \<i>\<^sub>B[a]) (\<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))

goal (1 subgoal):
 1. local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))

goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a))

goal (1 subgoal):
 1. (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by argo
[PROOF STATE]
proof (state)
this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D G (\<Phi>\<^sub>F (a, a)) \<cdot>\<^sub>D G (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "... = G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D
                             \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D
                             (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
using assms F.unit_char C.comp_assoc
[PROOF STATE]
proof (prove)
using this:
B.obj a
B.obj ?a \<Longrightarrow> \<guillemotleft>F.unit ?a : F.map\<^sub>0 ?a \<Rightarrow>\<^sub>C F ?a\<guillemotright>
B.obj ?a \<Longrightarrow> C.iso (F.unit ?a)
B.obj ?a \<Longrightarrow> F.unit ?a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 ?a] = (F \<i>\<^sub>B[?a] \<cdot>\<^sub>C \<Phi>\<^sub>F (?a, ?a)) \<cdot>\<^sub>C (F.unit ?a \<star>\<^sub>C F.unit ?a)
B.obj ?a \<Longrightarrow> \<exists>!\<psi>. \<guillemotleft>\<psi> : F.map\<^sub>0 ?a \<Rightarrow>\<^sub>C F ?a\<guillemotright> \<and> C.iso \<psi> \<and> \<psi> \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 ?a] = (F \<i>\<^sub>B[?a] \<cdot>\<^sub>C \<Phi>\<^sub>F (?a, ?a)) \<cdot>\<^sub>C (\<psi> \<star>\<^sub>C \<psi>)
(?h \<cdot>\<^sub>C ?g) \<cdot>\<^sub>C ?f = ?h \<cdot>\<^sub>C ?g \<cdot>\<^sub>C ?f

goal (1 subgoal):
 1. G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G (F \<i>\<^sub>B[a] \<cdot>\<^sub>C \<Phi>\<^sub>F (a, a) \<cdot>\<^sub>C (F.unit a \<star>\<^sub>C F.unit a)) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "... = G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D
                             \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D
                             (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
using assms D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
B.obj a
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G (F.unit a \<cdot>\<^sub>C \<i>\<^sub>C[F.map\<^sub>0 a]) \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a))

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "... = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)]
[PROOF STEP]
using assms G.unit_char D.comp_assoc
[PROOF STATE]
proof (prove)
using this:
B.obj a
C.obj ?a \<Longrightarrow> \<guillemotleft>G.unit ?a : G.map\<^sub>0 ?a \<Rightarrow>\<^sub>D G ?a\<guillemotright>
C.obj ?a \<Longrightarrow> D.iso (G.unit ?a)
C.obj ?a \<Longrightarrow> G.unit ?a \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 ?a] = (G \<i>\<^sub>C[?a] \<cdot>\<^sub>D \<Phi>\<^sub>G (?a, ?a)) \<cdot>\<^sub>D (G.unit ?a \<star>\<^sub>D G.unit ?a)
C.obj ?a \<Longrightarrow> \<exists>!\<psi>. \<guillemotleft>\<psi> : G.map\<^sub>0 ?a \<Rightarrow>\<^sub>D G ?a\<guillemotright> \<and> D.iso \<psi> \<and> \<psi> \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 ?a] = (G \<i>\<^sub>C[?a] \<cdot>\<^sub>D \<Phi>\<^sub>G (?a, ?a)) \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D \<psi>)
(?h \<cdot>\<^sub>D ?g) \<cdot>\<^sub>D ?f = ?h \<cdot>\<^sub>D ?g \<cdot>\<^sub>D ?f

goal (1 subgoal):
 1. G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)]

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
G (F.unit a) \<cdot>\<^sub>D (G \<i>\<^sub>C[F.map\<^sub>0 a] \<cdot>\<^sub>D \<Phi>\<^sub>G (F.map\<^sub>0 a, F.map\<^sub>0 a)) \<cdot>\<^sub>D (G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G.unit (F.map\<^sub>0 a)) = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)]

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
have "... = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)] = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a]
[PROOF STEP]
using assms map\<^sub>0_def
[PROOF STATE]
proof (prove)
using this:
B.obj a
map\<^sub>0 ?a \<equiv> src\<^sub>D (local.map ?a)

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)] = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[G.map\<^sub>0 (F.map\<^sub>0 a)] = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a]

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) = (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a]

goal (1 subgoal):
 1. (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)) \<cdot>\<^sub>D \<i>\<^sub>D[map\<^sub>0 a] = (local.map \<i>\<^sub>B[a] \<cdot>\<^sub>D cmp (a, a)) \<cdot>\<^sub>D (G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a) \<star>\<^sub>D G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a))

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

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

goal (1 subgoal):
 1. unit a = G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
unit a = G (F.unit a) \<cdot>\<^sub>D G.unit (F.map\<^sub>0 a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma condition_4_part_2:
  fixes A::"'a::{field}^'columns::{mod_type}^'rows::{mod_type}" and k::nat
  defines ia:"ia\<equiv>(if \<forall>m. is_zero_row_upt_k m k A then 0 else to_nat (GREATEST n. \<not> is_zero_row_upt_k n k A) + 1)"
  defines B:"B\<equiv>(snd (Gauss_Jordan_column_k (ia,A) k))"
  assumes not_zero_i_suc_k: "\<not> is_zero_row_upt_k i (Suc k) B"
  and i_not_j: "i \<noteq> j"
  and all_zero: "\<forall>m. is_zero_row_upt_k m k A"
  and Amk_not_zero: "A $ m $ from_nat k \<noteq> 0"
  shows "Gauss_Jordan_in_ij A 0 (from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A 0 (from_nat k) $ i $ n \<noteq> 0) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = (0::'a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = (0::'a)
[PROOF STEP]
have i_eq_0: "i=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i = (0::'rows)
[PROOF STEP]
using all_zero_imp_Gauss_Jordan_column_not_zero_in_row_0[OF all_zero _ Amk_not_zero] not_zero_i_suc_k
[PROOF STATE]
proof (prove)
using this:
\<not> is_zero_row_upt_k ?i (Suc k) (snd (Gauss_Jordan_column_k (if \<forall>m. is_zero_row_upt_k m k A then 0 else mod_type_class.to_nat (GREATEST n. \<not> is_zero_row_upt_k n k A) + 1, A) k)) \<Longrightarrow> ?i = (0::'rows)
\<not> is_zero_row_upt_k i (Suc k) B

goal (1 subgoal):
 1. i = (0::'rows)
[PROOF STEP]
unfolding B ia
[PROOF STATE]
proof (prove)
using this:
\<not> is_zero_row_upt_k ?i (Suc k) (snd (Gauss_Jordan_column_k (if \<forall>m. is_zero_row_upt_k m k A then 0 else mod_type_class.to_nat (GREATEST n. \<not> is_zero_row_upt_k n k A) + 1, A) k)) \<Longrightarrow> ?i = (0::'rows)
\<not> is_zero_row_upt_k i (Suc k) (snd (Gauss_Jordan_column_k (if \<forall>m. is_zero_row_upt_k m k A then 0 else mod_type_class.to_nat (GREATEST n. \<not> is_zero_row_upt_k n k A) + 1, A) k))

goal (1 subgoal):
 1. i = (0::'rows)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
i = (0::'rows)

goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = (0::'a)
[PROOF STEP]
have least_eq_k: "(LEAST n. Gauss_Jordan_in_ij A 0 (from_nat k) $ i $ n \<noteq> 0) = from_nat k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = mod_type_class.from_nat k
[PROOF STEP]
proof (rule Least_equality)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ mod_type_class.from_nat k \<noteq> (0::'a)
 2. \<And>y. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y \<noteq> (0::'a) \<Longrightarrow> mod_type_class.from_nat k \<le> y
[PROOF STEP]
show "Gauss_Jordan_in_ij A 0 (from_nat k) $ i $ from_nat k \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ mod_type_class.from_nat k \<noteq> (0::'a)
[PROOF STEP]
unfolding i_eq_0
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ (0::'rows) $ mod_type_class.from_nat k \<noteq> (0::'a)
[PROOF STEP]
using Amk_not_zero Gauss_Jordan_in_ij_1 least_mod_type zero_neq_one
[PROOF STATE]
proof (prove)
using this:
A $ m $ mod_type_class.from_nat k \<noteq> (0::'a)
\<exists>n. ?A $ n $ ?j \<noteq> (0::?'a) \<and> ?i \<le> n \<Longrightarrow> Gauss_Jordan_in_ij ?A ?i ?j $ ?i $ ?j = (1::?'a)
(0::?'a) \<le> ?n
(0::?'a) \<noteq> (1::?'a)

goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ (0::'rows) $ mod_type_class.from_nat k \<noteq> (0::'a)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ mod_type_class.from_nat k \<noteq> (0::'a)

goal (1 subgoal):
 1. \<And>y. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y \<noteq> (0::'a) \<Longrightarrow> mod_type_class.from_nat k \<le> y
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y \<noteq> (0::'a) \<Longrightarrow> mod_type_class.from_nat k \<le> y
[PROOF STEP]
assume Gauss_Jordan_y_not_0: "Gauss_Jordan_in_ij A 0 (from_nat k) $ i $ y \<noteq> 0"
[PROOF STATE]
proof (state)
this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y \<noteq> (0::'a)

goal (1 subgoal):
 1. \<And>y. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y \<noteq> (0::'a) \<Longrightarrow> mod_type_class.from_nat k \<le> y
[PROOF STEP]
show "from_nat k \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.from_nat k \<le> y
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> mod_type_class.from_nat k \<le> y \<Longrightarrow> False
[PROOF STEP]
assume "\<not> from_nat k \<le> y"
[PROOF STATE]
proof (state)
this:
\<not> mod_type_class.from_nat k \<le> y

goal (1 subgoal):
 1. \<not> mod_type_class.from_nat k \<le> y \<Longrightarrow> False
[PROOF STEP]
hence "y < (from_nat k)"
[PROOF STATE]
proof (prove)
using this:
\<not> mod_type_class.from_nat k \<le> y

goal (1 subgoal):
 1. y < mod_type_class.from_nat k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y < mod_type_class.from_nat k

goal (1 subgoal):
 1. \<not> mod_type_class.from_nat k \<le> y \<Longrightarrow> False
[PROOF STEP]
hence to_nat_y_less_k: "to_nat y < k"
[PROOF STATE]
proof (prove)
using this:
y < mod_type_class.from_nat k

goal (1 subgoal):
 1. mod_type_class.to_nat y < k
[PROOF STEP]
using to_nat_le
[PROOF STATE]
proof (prove)
using this:
y < mod_type_class.from_nat k
?y < mod_type_class.from_nat ?k \<Longrightarrow> mod_type_class.to_nat ?y < ?k

goal (1 subgoal):
 1. mod_type_class.to_nat y < k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat y < k

goal (1 subgoal):
 1. \<not> mod_type_class.from_nat k \<le> y \<Longrightarrow> False
[PROOF STEP]
have "Gauss_Jordan_in_ij A 0 (from_nat k) $ i $ y = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y = (0::'a)
[PROOF STEP]
using Gauss_Jordan_in_ij_preserves_previous_elements'[OF all_zero to_nat_y_less_k Amk_not_zero] all_zero to_nat_y_less_k
[PROOF STATE]
proof (prove)
using this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ ?i $ y = A $ ?i $ y
\<forall>m. is_zero_row_upt_k m k A
mod_type_class.to_nat y < k

goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y = (0::'a)
[PROOF STEP]
unfolding is_zero_row_upt_k_def
[PROOF STATE]
proof (prove)
using this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ ?i $ y = A $ ?i $ y
\<forall>m j. mod_type_class.to_nat j < k \<longrightarrow> A $ m $ j = (0::'a)
mod_type_class.to_nat y < k

goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y = (0::'a)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y = (0::'a)

goal (1 subgoal):
 1. \<not> mod_type_class.from_nat k \<le> y \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y = (0::'a)

goal (1 subgoal):
 1. False
[PROOF STEP]
using Gauss_Jordan_y_not_0
[PROOF STATE]
proof (prove)
using this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y = (0::'a)
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ y \<noteq> (0::'a)

goal (1 subgoal):
 1. False
[PROOF STEP]
by contradiction
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
mod_type_class.from_nat k \<le> y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = mod_type_class.from_nat k

goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = (0::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = (0::'a)
[PROOF STEP]
unfolding least_eq_k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ mod_type_class.from_nat k = (0::'a)
[PROOF STEP]
apply (rule Gauss_Jordan_in_ij_0)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>n. A $ n $ mod_type_class.from_nat k \<noteq> (0::'a) \<and> (0::'rows) \<le> n
 2. j \<noteq> (0::'rows)
[PROOF STEP]
using i_eq_0 i_not_j Amk_not_zero least_mod_type
[PROOF STATE]
proof (prove)
using this:
i = (0::'rows)
i \<noteq> j
A $ m $ mod_type_class.from_nat k \<noteq> (0::'a)
(0::?'a) \<le> ?n

goal (2 subgoals):
 1. \<exists>n. A $ n $ mod_type_class.from_nat k \<noteq> (0::'a) \<and> (0::'rows) \<le> n
 2. j \<noteq> (0::'rows)
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ j $ (LEAST n. Gauss_Jordan_in_ij A (0::'rows) (mod_type_class.from_nat k) $ i $ n \<noteq> (0::'a)) = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in \<Z>) vfst_arrow_is_cat_Set_iso_arr:
  assumes "A \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>" and "b \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>"
  shows "vfst_arrow A (set {b}) : A \<times>\<^sub>\<circ> set {b} \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>cat_Set \<alpha>\<^esub> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfst_arrow A (ZFC_in_HOL.set {b}) : A \<times>\<^sub>\<circ> ZFC_in_HOL.set {b} \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>cat_Set \<alpha>\<^esub> A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. vfst_arrow A (ZFC_in_HOL.set {b}) : A \<times>\<^sub>\<circ> ZFC_in_HOL.set {b} \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>cat_Set \<alpha>\<^esub> A
[PROOF STEP]
unfolding cat_Set_components
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> Vset \<alpha>
b \<in>\<^sub>\<circ> Vset \<alpha>

goal (1 subgoal):
 1. vfst_arrow A (ZFC_in_HOL.set {b}) : A \<times>\<^sub>\<circ> ZFC_in_HOL.set {b} \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>cat_Set \<alpha>\<^esub> A
[PROOF STEP]
by (rule vfst_arrow_is_cat_Set_iso_arr_Vset)


[STATEMENT]
lemma neqs2:
  shows "(\<lambda>x. (diamond_x x, diamond_y (diamond_x x))) \<noteq> (\<lambda>x. ((2 * x - 1) * diamond_y (diamond_x 1), diamond_x 1))"
  and "(\<lambda>x. (diamond_x x, - diamond_y (diamond_x x))) \<noteq> (\<lambda>x. ((2 * x - 1) * diamond_y (diamond_x 0), diamond_x 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (diamond_x x, diamond_y (diamond_x x))) \<noteq> (\<lambda>x. ((2 * x - 1) * diamond_y (diamond_x 1), diamond_x 1)) &&& (\<lambda>x. (diamond_x x, - diamond_y (diamond_x x))) \<noteq> (\<lambda>x. ((2 * x - 1) * diamond_y (diamond_x 0), diamond_x 0))
[PROOF STEP]
using d_gt_0
[PROOF STATE]
proof (prove)
using this:
0 < d

goal (1 subgoal):
 1. (\<lambda>x. (diamond_x x, diamond_y (diamond_x x))) \<noteq> (\<lambda>x. ((2 * x - 1) * diamond_y (diamond_x 1), diamond_x 1)) &&& (\<lambda>x. (diamond_x x, - diamond_y (diamond_x x))) \<noteq> (\<lambda>x. ((2 * x - 1) * diamond_y (diamond_x 0), diamond_x 0))
[PROOF STEP]
by (auto simp: diamond_x_def diamond_y_def dest: fun_cong [where x = "1"])


[STATEMENT]
lemma R10_ad [simp]: "pmf (sds R10) a = 1/2" "pmf (sds R10) d = 1/2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf (sds R10) a = 1 / 2 &&& pmf (sds R10) d = 1 / 2
[PROOF STEP]
using lottery_conditions[OF R10.wf] R10_bc R10.orbits
[PROOF STATE]
proof (prove)
using this:
0 \<le> pmf (sds R10) a
0 \<le> pmf (sds R10) b
0 \<le> pmf (sds R10) c
0 \<le> pmf (sds R10) d
pmf (sds R10) a + pmf (sds R10) b + pmf (sds R10) c + pmf (sds R10) d = 1
pmf (sds R10) b = 0
pmf (sds R10) c = 0
pmf (sds R10) d = pmf (sds R10) a
pmf (sds R10) c = pmf (sds R10) b

goal (1 subgoal):
 1. pmf (sds R10) a = 1 / 2 &&& pmf (sds R10) d = 1 / 2
[PROOF STEP]
by simp_all


[STATEMENT]
lemma integrable_I0i_exp_mscale: "0 < (u::real) \<Longrightarrow> set_integrable lborel {0 <..} (\<lambda>x. exp (-(x * u)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < u \<Longrightarrow> set_integrable lborel {0<..} (\<lambda>x. exp (- (x * u)))
[PROOF STEP]
using lborel_integrable_real_affine_iff[of u "\<lambda>x. indicator {0 <..} x *\<^sub>R exp (- x)" 0]
        has_bochner_integral_I0i_power_exp_m[of 0]
[PROOF STATE]
proof (prove)
using this:
u \<noteq> 0 \<Longrightarrow> integrable lborel (\<lambda>x. indicat_real {0<..} (0 + u * x) *\<^sub>R exp (- (0 + u * x))) = integrable lborel (\<lambda>x. indicat_real {0<..} x *\<^sub>R exp (- x))
has_bochner_integral lborel (\<lambda>x. x ^ 0 * exp (- x) * indicat_real {0<..} x) (fact 0)

goal (1 subgoal):
 1. 0 < u \<Longrightarrow> set_integrable lborel {0<..} (\<lambda>x. exp (- (x * u)))
[PROOF STEP]
by (simp add: indicator_def zero_less_mult_iff mult_ac integrable.intros set_integrable_def)


[STATEMENT]
lemma sum_right: "prod x (sum g S) = sum ((\<lambda>i. (prod x (g i)))) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x ** sum g S = (\<Sum>i\<in>S. x ** g i)
[PROOF STEP]
by (rule additive.sum [OF additive_right])


[STATEMENT]
lemma [code]: "m \<le> n \<longleftrightarrow> integer_of_natural m \<le> integer_of_natural n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (m \<le> n) = (integer_of_natural m \<le> integer_of_natural n)
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma mem_vertices: "v |\<in>| vertices \<longleftrightarrow>  (fst v \<in> set conclusions \<and> (snd v = [] \<or> snd v \<in> ((#) 0) ` it_paths (it' (fst v))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (v |\<in>| vertices) = (fst v \<in> set conclusions \<and> (snd v = [] \<or> snd v \<in> (#) 0 ` it_paths (it' (fst v))))
[PROOF STEP]
unfolding vertices_def fmember.rep_eq ffUnion.rep_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (v \<in> fset (Abs_fset (\<Union> (set (map (\<lambda>c. insert (c, []) ((\<lambda>p. (c, 0 # p)) ` it_paths (it' c))) conclusions))))) = (fst v \<in> set conclusions \<and> (snd v = [] \<or> snd v \<in> (#) 0 ` it_paths (it' (fst v))))
[PROOF STEP]
by (cases v)(auto simp add: Abs_fset_inverse Bex_def )


[STATEMENT]
lemma SR_U7_imp:
     "\<lbrakk> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key K,
                      Crypt (pairK(A,B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace>,
                      Cert2\<rbrace> \<in> set evs;
         B \<noteq> Spy; evs \<in> srb \<rbrakk>
     \<Longrightarrow> Gets B \<lbrace>Agent A, Nonce Na\<rbrace> \<in> set evs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key K, Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace>, Cert2\<rbrace> \<in> set evs; B \<noteq> Spy; evs \<in> srb\<rbrakk> \<Longrightarrow> Gets B \<lbrace>Agent A, Nonce Na\<rbrace> \<in> set evs
[PROOF STEP]
apply (blast dest: Outpts_B_Card_7 Inputs_B_Card_6)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma one_over_fun_pow_eval:
  assumes "f \<in> carrier (SA n)"
  assumes "x \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>)"
  assumes "f x \<noteq> \<zero>"
  shows "one_over_fun n (f[^]\<^bsub>SA n\<^esub>(k::nat)) x = inv ((f x) [^] k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. one_over_fun n (f [^]\<^bsub>SA n\<^esub> k) x = inv (f x [^] k)
[PROOF STEP]
using one_over_fun_eq[of  "f[^]\<^bsub>SA n\<^esub>k" n x] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f [^]\<^bsub>SA n\<^esub> k \<in> carrier (SA n); x \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>); (f [^]\<^bsub>SA n\<^esub> k) x \<noteq> \<zero>\<rbrakk> \<Longrightarrow> one_over_fun n (f [^]\<^bsub>SA n\<^esub> k) x = inv (f [^]\<^bsub>SA n\<^esub> k) x
f \<in> carrier (SA n)
x \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>)
f x \<noteq> \<zero>

goal (1 subgoal):
 1. one_over_fun n (f [^]\<^bsub>SA n\<^esub> k) x = inv (f x [^] k)
[PROOF STEP]
by (metis Qp.function_ring_car_memE Qp.nonzero_pow_nonzero SA_car_memE(2) SA_nat_pow SA_nat_pow_closed padic_fields.SA_car_memE(1) padic_fields_axioms)


[STATEMENT]
lemma [code abstract]: "vec_nth (a - b) =  (%i. a$i - b$i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (a - b) = (\<lambda>i. a $ i - b $ i)
[PROOF STEP]
by (metis vector_minus_component)


[STATEMENT]
lemma dirichlet_prod'_inversion':
  assumes "a 1 * y = 1"
  defines "ainv \<equiv> dirichlet_inverse a y"
  shows   "(\<forall>x\<ge>1. g x = dirichlet_prod' a f x) \<longleftrightarrow> (\<forall>x\<ge>1. f x = dirichlet_prod' ainv g x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<ge>1. g x = dirichlet_prod' a f x) = (\<forall>x\<ge>1. f x = dirichlet_prod' ainv g x)
[PROOF STEP]
unfolding ainv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<ge>1. g x = dirichlet_prod' a f x) = (\<forall>x\<ge>1. f x = dirichlet_prod' (dirichlet_inverse a y) g x)
[PROOF STEP]
by (intro dirichlet_prod'_inversion dirichlet_prod_inverse assms)


[STATEMENT]
lemma T_size_tree: "T_size_tree t = 2 * size t + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T_size_tree t = 2 * size t + 1
[PROOF STEP]
by(induction t)(auto simp: T_size_tree_Leaf T_size_tree_Node)


[STATEMENT]
lemma smap_siterate: "smap f (siterate f x) = siterate f (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smap f (siterate f x) = siterate f (f x)
[PROOF STEP]
by (coinduction arbitrary: x) auto


[STATEMENT]
lemma decomposition_theorem_polyhedra:
  "(\<exists> A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b) \<longleftrightarrow>
   (\<exists> Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X)" (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b) = (\<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b \<Longrightarrow> \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X
 2. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
assume ?l
[PROOF STATE]
proof (state)
this:
\<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b

goal (2 subgoals):
 1. \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b \<Longrightarrow> \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X
 2. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
obtain A b nr where A: "A \<in> carrier_mat nr n"
    and b: "b \<in> carrier_vec nr" and P: "P = polyhedron A b"
[PROOF STATE]
proof (prove)
using this:
\<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b

goal (1 subgoal):
 1. (\<And>A nr b. \<lbrakk>A \<in> carrier_mat nr n; b \<in> carrier_vec nr; P = polyhedron A b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<in> carrier_mat nr n
b \<in> carrier_vec nr
P = polyhedron A b

goal (2 subgoals):
 1. \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b \<Longrightarrow> \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X
 2. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
from decomposition_theorem_polyhedra_1[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>Q X. X \<subseteq> carrier_vec n \<and> finite X \<and> Q \<subseteq> carrier_vec n \<and> finite Q \<and> P = convex_hull Q + cone X \<and> (is_det_bound ?db \<longrightarrow> A \<in> \<int>\<^sub>m \<inter> Bounded_mat (of_int ?Bnd) \<longrightarrow> b \<in> \<int>\<^sub>v \<inter> Bounded_vec (of_int ?Bnd) \<longrightarrow> X \<subseteq> \<int>\<^sub>v \<inter> Bounded_vec (of_int (?db n (max 1 ?Bnd))) \<and> Q \<subseteq> Bounded_vec (of_int (?db n (max 1 ?Bnd))))
[PROOF STEP]
obtain Q X
    where *: "X \<subseteq> carrier_vec n" "finite X" "Q \<subseteq> carrier_vec n" "finite Q" "P = convex_hull Q + cone X"
[PROOF STATE]
proof (prove)
using this:
\<exists>Q X. X \<subseteq> carrier_vec n \<and> finite X \<and> Q \<subseteq> carrier_vec n \<and> finite Q \<and> P = convex_hull Q + cone X \<and> (is_det_bound ?db \<longrightarrow> A \<in> \<int>\<^sub>m \<inter> Bounded_mat (of_int ?Bnd) \<longrightarrow> b \<in> \<int>\<^sub>v \<inter> Bounded_vec (of_int ?Bnd) \<longrightarrow> X \<subseteq> \<int>\<^sub>v \<inter> Bounded_vec (of_int (?db n (max 1 ?Bnd))) \<and> Q \<subseteq> Bounded_vec (of_int (?db n (max 1 ?Bnd))))

goal (1 subgoal):
 1. (\<And>X Q. \<lbrakk>X \<subseteq> carrier_vec n; finite X; Q \<subseteq> carrier_vec n; finite Q; P = convex_hull Q + cone X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by meson
[PROOF STATE]
proof (state)
this:
X \<subseteq> carrier_vec n
finite X
Q \<subseteq> carrier_vec n
finite Q
P = convex_hull Q + cone X

goal (2 subgoals):
 1. \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b \<Longrightarrow> \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X
 2. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
show ?r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X
[PROOF STEP]
by (rule exI[of _ Q], rule exI[of _ X], insert *, auto simp: polytope_def)
[PROOF STATE]
proof (state)
this:
\<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X

goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
assume ?r
[PROOF STATE]
proof (state)
this:
\<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X

goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X
[PROOF STEP]
obtain Q X where QX_carrier: "Q \<union> X \<subseteq> carrier_vec n"
    and QX_fin: "finite (Q \<union> X)"
    and P: "P = convex_hull Q + cone X"
[PROOF STATE]
proof (prove)
using this:
\<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X

goal (1 subgoal):
 1. (\<And>Q X. \<lbrakk>Q \<union> X \<subseteq> carrier_vec n; finite (Q \<union> X); P = convex_hull Q + cone X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Q \<union> X \<subseteq> carrier_vec n
finite (Q \<union> X)
P = convex_hull Q + cone X

goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
from QX_carrier
[PROOF STATE]
proof (chain)
picking this:
Q \<union> X \<subseteq> carrier_vec n
[PROOF STEP]
have Q: "Q \<subseteq> carrier_vec n" and X: "X \<subseteq> carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
Q \<union> X \<subseteq> carrier_vec n

goal (1 subgoal):
 1. Q \<subseteq> carrier_vec n &&& X \<subseteq> carrier_vec n
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
Q \<subseteq> carrier_vec n
X \<subseteq> carrier_vec n

goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
from QX_fin
[PROOF STATE]
proof (chain)
picking this:
finite (Q \<union> X)
[PROOF STEP]
have fin_Q: "finite Q" and fin_X: "finite X"
[PROOF STATE]
proof (prove)
using this:
finite (Q \<union> X)

goal (1 subgoal):
 1. finite Q &&& finite X
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
finite Q
finite X

goal (1 subgoal):
 1. \<exists>Q X. Q \<union> X \<subseteq> carrier_vec n \<and> finite (Q \<union> X) \<and> P = convex_hull Q + cone X \<Longrightarrow> \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
show ?l
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
using decomposition_theorem_polyhedra_2[OF Q fin_Q X fin_X P]
[PROOF STATE]
proof (prove)
using this:
\<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b

goal (1 subgoal):
 1. \<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>A b nr. A \<in> carrier_mat nr n \<and> b \<in> carrier_vec nr \<and> P = polyhedron A b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma desargues_config_not_col_10:
  assumes "desargues_config A B C A' B' C' M N P R"
  shows "\<not> col B C C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> col B C C'
[PROOF STEP]
using assms desargues_config_not_col_7 desargues_config_rot_CCW
[PROOF STATE]
proof (prove)
using this:
desargues_config A B C A' B' C' M N P R
desargues_config ?A ?B ?C ?A' ?B' ?C' ?M ?N ?P ?R \<Longrightarrow> \<not> col ?A ?B ?B'
desargues_config ?A ?B ?C ?A' ?B' ?C' ?M ?N ?P ?R \<Longrightarrow> desargues_config ?B ?C ?A ?B' ?C' ?A' ?N ?P ?M ?R

goal (1 subgoal):
 1. \<not> col B C C'
[PROOF STEP]
by blast


[STATEMENT]
lemma integer_of_nat_numeral:
  "integer_of_nat (numeral n) = numeral n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integer_of_nat (numeral n) = numeral n
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma arcosh_double:
  fixes x :: real
  assumes "x \<ge> 1"
  shows "2 * arcosh x = arcosh (2*x\<^sup>2 - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * arcosh x = arcosh (2 * x\<^sup>2 - 1)
[PROOF STEP]
by (smt arcosh_add arcosh_mono assms one_power2 power2_eq_square real_sqrt_abs)


[STATEMENT]
lemma of_nat_gauss:
  \<open>of_nat n = Gauss (int n) 0\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat n = Gauss (int n) 0
[PROOF STEP]
by (induction n) (simp_all add: gauss_eq_iff)


[STATEMENT]
lemma interval_ge_le:
  "(on UNIV with (\<lambda>x y. le\<^sub>a y x) (\<lambda>x y. le\<^sub>b y x) : {l\<sqsubset>..\<sqsubset>h}) =
    (on UNIV with le\<^sub>b le\<^sub>a : {h\<sqsubset>..\<sqsubset>l})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (on UNIV with (\<lambda>x y. le\<^sub>a y x) (\<lambda>x y. le\<^sub>b y x) : {l\<sqsubset>..\<sqsubset>h}) = (on UNIV with le\<^sub>b le\<^sub>a : {h\<sqsubset>..\<sqsubset>l})
[PROOF STEP]
unfolding interval_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (on UNIV with le\<^sub>a : {..\<sqsubset>l}) \<inter> (on UNIV with (\<lambda>x y. le\<^sub>b y x) : {..\<sqsubset>h}) = (on UNIV with (\<lambda>x y. le\<^sub>b y x) : {..\<sqsubset>h}) \<inter> (on UNIV with le\<^sub>a : {..\<sqsubset>l})
[PROOF STEP]
by auto


[STATEMENT]
lemma ENF_offending_not_empty_imp_ENF_offending_subseteq_rhs:
    assumes "sinvar_all_edges_normal_form P" "set_offending_flows G nP \<noteq> {}"
    shows "{ {(e1,e2) \<in> edges G. \<not> P (nP e1) (nP e2)} } \<subseteq> set_offending_flows G nP"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {{(e1, e2). (e1, e2) \<in> edges G \<and> \<not> P (nP e1) (nP e2)}} \<subseteq> set_offending_flows G nP
[PROOF STEP]
using assms ENF_offending_set_P_representation
[PROOF STATE]
proof (prove)
using this:
sinvar_all_edges_normal_form P
set_offending_flows G nP \<noteq> {}
\<lbrakk>sinvar_all_edges_normal_form ?P; ?F \<in> set_offending_flows ?G ?nP\<rbrakk> \<Longrightarrow> ?F = {(e1, e2). (e1, e2) \<in> edges ?G \<and> \<not> ?P (?nP e1) (?nP e2)}

goal (1 subgoal):
 1. {{(e1, e2). (e1, e2) \<in> edges G \<and> \<not> P (nP e1) (nP e2)}} \<subseteq> set_offending_flows G nP
[PROOF STEP]
by blast


[STATEMENT]
lemma no_cross_apath:
  "\<lbrakk>matching_rels t; no_cross_products t; x \<in> relations t; y \<in> relations t\<rbrakk>
    \<Longrightarrow> \<exists>p. apath x p y \<and> set (awalk_verts x p) \<subseteq> relations t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>matching_rels t; no_cross_products t; x \<in> relations t; y \<in> relations t\<rbrakk> \<Longrightarrow> \<exists>p. apath x p y \<and> set (awalk_verts x p) \<subseteq> relations t
[PROOF STEP]
using no_cross_awalk apath_awalk_to_apath awalk_to_apath_verts_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>matching_rels ?t; no_cross_products ?t; ?x \<in> relations ?t; ?y \<in> relations ?t\<rbrakk> \<Longrightarrow> \<exists>p. awalk ?x p ?y \<and> set (awalk_verts ?x p) \<subseteq> relations ?t
awalk ?u ?p ?v \<Longrightarrow> apath ?u (awalk_to_apath ?p) ?v
awalk ?u ?p ?v \<Longrightarrow> set (awalk_verts ?u (awalk_to_apath ?p)) \<subseteq> set (awalk_verts ?u ?p)

goal (1 subgoal):
 1. \<lbrakk>matching_rels t; no_cross_products t; x \<in> relations t; y \<in> relations t\<rbrakk> \<Longrightarrow> \<exists>p. apath x p y \<and> set (awalk_verts x p) \<subseteq> relations t
[PROOF STEP]
by blast


[STATEMENT]
lemma extended_Gromov_product_at_diff3 [mono_intros]:
  "extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
proof (cases "(extended_Gromov_distance y z = \<infinity>) \<or> (extended_Gromov_product_at e x z = \<infinity>)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
 2. \<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>) \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)

goal (2 subgoals):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
 2. \<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>) \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)
[PROOF STEP]
have "y \<notin> Gromov_boundary" "z \<notin> Gromov_boundary"
[PROOF STATE]
proof (prove)
using this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)

goal (1 subgoal):
 1. y \<notin> Gromov_boundary &&& z \<notin> Gromov_boundary
[PROOF STEP]
using extended_Gromov_distance_PInf_boundary
[PROOF STATE]
proof (prove)
using this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)
?x \<in> Gromov_boundary \<Longrightarrow> extended_Gromov_distance ?x ?y = \<infinity>
?x \<in> Gromov_boundary \<Longrightarrow> extended_Gromov_distance ?y ?x = \<infinity>

goal (1 subgoal):
 1. y \<notin> Gromov_boundary &&& z \<notin> Gromov_boundary
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y \<notin> Gromov_boundary
z \<notin> Gromov_boundary

goal (2 subgoals):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
 2. \<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>) \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<notin> Gromov_boundary
z \<notin> Gromov_boundary
[PROOF STEP]
obtain b c where b: "y = to_Gromov_completion b" and c: "z = to_Gromov_completion c"
[PROOF STATE]
proof (prove)
using this:
y \<notin> Gromov_boundary
z \<notin> Gromov_boundary

goal (1 subgoal):
 1. (\<And>b c. \<lbrakk>y = to_Gromov_completion b; z = to_Gromov_completion c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding Gromov_boundary_def
[PROOF STATE]
proof (prove)
using this:
y \<notin> UNIV - range to_Gromov_completion
z \<notin> UNIV - range to_Gromov_completion

goal (1 subgoal):
 1. (\<And>b c. \<lbrakk>y = to_Gromov_completion b; z = to_Gromov_completion c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y = to_Gromov_completion b
z = to_Gromov_completion c

goal (2 subgoals):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
 2. \<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>) \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
have "extended_Gromov_distance y z = ereal(dist b c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_distance y z = ereal (dist b c)
[PROOF STEP]
unfolding b c
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_distance (to_Gromov_completion b) (to_Gromov_completion c) = ereal (dist b c)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
extended_Gromov_distance y z = ereal (dist b c)

goal (2 subgoals):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
 2. \<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>) \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
have "extended_Gromov_product_at e x y \<le> (extended_Gromov_product_at e x z + extended_Gromov_distance y z) + h" if "h>0" for h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "\<exists>t\<in>{liminf (\<lambda>n. ereal(Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x
                  \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w}.
          t < extended_Gromov_product_at e x z + h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>t\<in>{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w}. t < extended_Gromov_product_at e x z + h
[PROOF STEP]
apply (subst Inf_less_iff[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w} < extended_Gromov_product_at e x z + h
[PROOF STEP]
using False \<open>h > 0\<close> extended_Gromov_product_nonneg[of e x z]
[PROOF STATE]
proof (prove)
using this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)
0 < h
0 \<le> extended_Gromov_product_at e x z

goal (1 subgoal):
 1. Inf {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w} < extended_Gromov_product_at e x z + h
[PROOF STEP]
unfolding extended_Gromov_product_at_def[symmetric]
[PROOF STATE]
proof (prove)
using this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)
0 < h
0 \<le> extended_Gromov_product_at e x z

goal (1 subgoal):
 1. extended_Gromov_product_at e x z < extended_Gromov_product_at e x z + h
[PROOF STEP]
by (metis add.right_neutral ereal_add_left_cancel_less order_refl)
[PROOF STATE]
proof (state)
this:
\<exists>t\<in>{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w}. t < extended_Gromov_product_at e x z + h

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>t\<in>{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w}. t < extended_Gromov_product_at e x z + h
[PROOF STEP]
obtain u w where H: "abs_Gromov_completion u = x" "abs_Gromov_completion w = z"
                          "Gromov_completion_rel u u" "Gromov_completion_rel w w"
                          "liminf (\<lambda>n. ereal(Gromov_product_at e (u n) (w n))) < extended_Gromov_product_at e x z + h"
[PROOF STATE]
proof (prove)
using this:
\<exists>t\<in>{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) |u w. abs_Gromov_completion u = x \<and> abs_Gromov_completion w = z \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel w w}. t < extended_Gromov_product_at e x z + h

goal (1 subgoal):
 1. (\<And>u w. \<lbrakk>abs_Gromov_completion u = x; abs_Gromov_completion w = z; Gromov_completion_rel u u; Gromov_completion_rel w w; liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) < extended_Gromov_product_at e x z + h\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
abs_Gromov_completion u = x
abs_Gromov_completion w = z
Gromov_completion_rel u u
Gromov_completion_rel w w
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) < extended_Gromov_product_at e x z + h

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
abs_Gromov_completion u = x
abs_Gromov_completion w = z
Gromov_completion_rel u u
Gromov_completion_rel w w
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) < extended_Gromov_product_at e x z + h
[PROOF STEP]
have w: "w n = c" for n
[PROOF STATE]
proof (prove)
using this:
abs_Gromov_completion u = x
abs_Gromov_completion w = z
Gromov_completion_rel u u
Gromov_completion_rel w w
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) < extended_Gromov_product_at e x z + h

goal (1 subgoal):
 1. w n = c
[PROOF STEP]
using c Gromov_completion_rel_to_const Quotient3_Gromov_completion Quotient3_rel to_Gromov_completion_def
[PROOF STATE]
proof (prove)
using this:
abs_Gromov_completion u = x
abs_Gromov_completion w = z
Gromov_completion_rel u u
Gromov_completion_rel w w
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) < extended_Gromov_product_at e x z + h
z = to_Gromov_completion c
Gromov_completion_rel ?u (\<lambda>n. ?x) \<Longrightarrow> ?u ?n = ?x
Quotient3 Gromov_completion_rel abs_Gromov_completion rep_Gromov_completion
Quotient3 ?R ?Abs ?Rep \<Longrightarrow> (?R ?r ?r \<and> ?R ?s ?s \<and> ?Abs ?r = ?Abs ?s) = ?R ?r ?s
to_Gromov_completion ?x = abs_Gromov_completion (\<lambda>n. ?x)

goal (1 subgoal):
 1. w n = c
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
w ?n = c

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
define v where v: "v = (\<lambda>n::nat. b)"
[PROOF STATE]
proof (state)
this:
v = (\<lambda>n. b)

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "abs_Gromov_completion v = y" "Gromov_completion_rel v v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_Gromov_completion v = y &&& Gromov_completion_rel v v
[PROOF STEP]
unfolding v
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_Gromov_completion (\<lambda>n. b) = y &&& Gromov_completion_rel (\<lambda>n. b) (\<lambda>n. b)
[PROOF STEP]
by (auto simp add: b to_Gromov_completion_def)
[PROOF STATE]
proof (state)
this:
abs_Gromov_completion v = y
Gromov_completion_rel v v

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "Gromov_product_at e (u n) (v n) \<le> Gromov_product_at e (u n) (w n) + dist b c" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at e (u n) (v n) \<le> Gromov_product_at e (u n) (w n) + dist b c
[PROOF STEP]
unfolding v w
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at e (u n) b \<le> Gromov_product_at e (u n) c + dist b c
[PROOF STEP]
using Gromov_product_at_diff3[of e "u n" b c]
[PROOF STATE]
proof (prove)
using this:
\<bar>Gromov_product_at e (u n) b - Gromov_product_at e (u n) c\<bar> \<le> dist b c

goal (1 subgoal):
 1. Gromov_product_at e (u n) b \<le> Gromov_product_at e (u n) c + dist b c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gromov_product_at e (u ?n) (v ?n) \<le> Gromov_product_at e (u ?n) (w ?n) + dist b c

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Gromov_product_at e (u ?n) (v ?n) \<le> Gromov_product_at e (u ?n) (w ?n) + dist b c
[PROOF STEP]
have *: "ereal(Gromov_product_at e (u n) (v n)) \<le> ereal(Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z" for n
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at e (u ?n) (v ?n) \<le> Gromov_product_at e (u ?n) (w ?n) + dist b c

goal (1 subgoal):
 1. ereal (Gromov_product_at e (u n) (v n)) \<le> ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z
[PROOF STEP]
unfolding \<open>extended_Gromov_distance y z = ereal(dist b c)\<close>
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at e (u ?n) (v ?n) \<le> Gromov_product_at e (u ?n) (w ?n) + dist b c

goal (1 subgoal):
 1. ereal (Gromov_product_at e (u n) (v n)) \<le> ereal (Gromov_product_at e (u n) (w n)) + ereal (dist b c)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
ereal (Gromov_product_at e (u ?n) (v ?n)) \<le> ereal (Gromov_product_at e (u ?n) (w ?n)) + extended_Gromov_distance y z

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "extended_Gromov_product_at e x y \<le> liminf(\<lambda>n. ereal(Gromov_product_at e (u n) (v n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n)))
[PROOF STEP]
unfolding extended_Gromov_product_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n)))
[PROOF STEP]
by (rule Inf_lower, auto, rule exI[of _ u], rule exI[of _ v], auto, fact+)
[PROOF STATE]
proof (state)
this:
extended_Gromov_product_at e x y \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n)))

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
extended_Gromov_product_at e x y \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n)))

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "... \<le> liminf(\<lambda>n. ereal(Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z)
[PROOF STEP]
apply (rule Liminf_mono)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially. ereal (Gromov_product_at e (u x) (v x)) \<le> ereal (Gromov_product_at e (u x) (w x)) + extended_Gromov_distance y z
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
ereal (Gromov_product_at e (u ?n) (v ?n)) \<le> ereal (Gromov_product_at e (u ?n) (w ?n)) + extended_Gromov_distance y z

goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially. ereal (Gromov_product_at e (u x) (v x)) \<le> ereal (Gromov_product_at e (u x) (w x)) + extended_Gromov_distance y z
[PROOF STEP]
unfolding eventually_sequentially
[PROOF STATE]
proof (prove)
using this:
ereal (Gromov_product_at e (u ?n) (v ?n)) \<le> ereal (Gromov_product_at e (u ?n) (w ?n)) + extended_Gromov_distance y z

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. ereal (Gromov_product_at e (u n) (v n)) \<le> ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z)

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) \<le> liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z)

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "... = liminf(\<lambda>n. ereal(Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z) = liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z
[PROOF STEP]
apply (rule Liminf_add_ereal_right)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. sequentially \<noteq> bot
 2. \<bar>extended_Gromov_distance y z\<bar> \<noteq> \<infinity>
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
\<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>)

goal (2 subgoals):
 1. sequentially \<noteq> bot
 2. \<bar>extended_Gromov_distance y z\<bar> \<noteq> \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z) = liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n)) + extended_Gromov_distance y z) = liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
have "... \<le> extended_Gromov_product_at e x z + h + extended_Gromov_distance y z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z \<le> extended_Gromov_product_at e x z + h + extended_Gromov_distance y z
[PROOF STEP]
using less_imp_le[OF H(5)]
[PROOF STATE]
proof (prove)
using this:
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) \<le> extended_Gromov_product_at e x z + h

goal (1 subgoal):
 1. liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z \<le> extended_Gromov_product_at e x z + h + extended_Gromov_distance y z
[PROOF STEP]
by (auto intro: mono_intros)
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (w n))) + extended_Gromov_distance y z \<le> extended_Gromov_product_at e x z + h + extended_Gromov_distance y z

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + h + extended_Gromov_distance y z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + h + extended_Gromov_distance y z

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + h

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < ?h \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + ?h

goal (2 subgoals):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
 2. \<not> (extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>) \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < ?h \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + ?h
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < ?h \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + ?h

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
using ereal_le_epsilon
[PROOF STATE]
proof (prove)
using this:
0 < ?h \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z + ?h
(\<And>e. 0 < e \<Longrightarrow> ?x \<le> ?y + e) \<Longrightarrow> ?x \<le> ?y

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z

goal (1 subgoal):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>

goal (1 subgoal):
 1. extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity> \<Longrightarrow> extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
extended_Gromov_distance y z = \<infinity> \<or> extended_Gromov_product_at e x z = \<infinity>

goal (1 subgoal):
 1. extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
extended_Gromov_product_at e x y \<le> extended_Gromov_product_at e x z + extended_Gromov_distance y z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma SA_zeroE:
  assumes "a \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>)"
  shows "\<zero> \<^bsub>SA n\<^esub> a = \<zero>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<zero>\<^bsub>SA n\<^esub> a = \<zero>
[PROOF STEP]
using function_zero_eval SA_zero assms
[PROOF STATE]
proof (prove)
using this:
?a \<in> carrier (Q\<^sub>p\<^bsup>?n\<^esup>) \<Longrightarrow> \<zero>\<^bsub>function_ring (carrier (Q\<^sub>p\<^bsup>?n\<^esup>)) Q\<^sub>p\<^esub> ?a = \<zero>
\<zero>\<^bsub>SA ?n\<^esub> = \<zero>\<^bsub>function_ring (carrier (Q\<^sub>p\<^bsup>?n\<^esup>)) Q\<^sub>p\<^esub>
a \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>)

goal (1 subgoal):
 1. \<zero>\<^bsub>SA n\<^esub> a = \<zero>
[PROOF STEP]
by presburger


[STATEMENT]
lemma closed_interval_Int_compl:
  fixes x :: real
  assumes "x < y"
  assumes "y < z"
  shows "- {x..y} \<inter> - {y..z} = - {x..z}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - {x..y} \<inter> - {y..z} = - {x..z}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x < y
y < z

goal (1 subgoal):
 1. - {x..y} \<inter> - {y..z} = - {x..z}
[PROOF STEP]
by auto


[STATEMENT]
theorem Wait_skip: "Wait(0) = II"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Wait 0 = II
[PROOF STEP]
by (rel_auto)


[STATEMENT]
lemma compatibleI:
  assumes "compatible_heaps (get_h a) (get_h b)"
      and "valid_mask (add_masks (get_m a) (get_m b))"
    shows "a |#| b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a |#| b
[PROOF STEP]
using PartialSA.defined_def assms(1) assms(2) plus_ab_defined
[PROOF STATE]
proof (prove)
using this:
?a |#| ?b = (?a \<oplus> ?b \<noteq> None)
compatible_heaps (get_h a) (get_h b)
valid_mask (add_masks (get_m a) (get_m b))
(?\<phi> \<oplus> ?\<phi>' \<noteq> None) = (compatible_heaps (get_h ?\<phi>) (get_h ?\<phi>') \<and> valid_mask (add_masks (get_m ?\<phi>) (get_m ?\<phi>')))

goal (1 subgoal):
 1. a |#| b
[PROOF STEP]
by presburger


[STATEMENT]
lemma ccSUP_insert [simp]: "countable A \<Longrightarrow> (SUP x\<in>insert a A. f x) = sup (f a) (Sup (f ` A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable A \<Longrightarrow> Sup (f ` insert a A) = sup (f a) (Sup (f ` A))
[PROOF STEP]
unfolding image_insert
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable A \<Longrightarrow> Sup (insert (f a) (f ` A)) = sup (f a) (Sup (f ` A))
[PROOF STEP]
by simp