|
|
|
|
Quellcode-Bibliothek Tabulation.thy
Interaktion und PortierbarkeitIsabelle
|
|
(* Title: Tabulation
Author: Eugene W. Stark <stark@cs.stonybrook.edu>, 2019
Maintainer: Eugene W. Stark <stark@cs.stonybrook.edu>
*)
section "Tabulations"
theory Tabulation
imports CanonicalIsos InternalAdjunction
begin
text ‹
A ``tabulation'' is a kind of bicategorical limit that associates with a 1-cell ‹r›
a triple ‹(f, ρ, g)›, where ‹f› and ‹g› are 1-cells having a common source,
and ‹ρ› is a $2$-cell from ‹g› to ‹r ⋅ f›, such that a certain biuniversal property
is satisfied.
The notion was introduced in a study of bicategories of spans and relations by
Carboni, Kasangian, and Street cite‹"carboni-et-al"› (hereinafter, ``CKS''),
who named it after a related,
but different notion previously used by Freyd in his study of the algebra of relations.
One can find motivation for the concept of tabulation by considering the problem of
trying to find some kind of universal way of factoring a 1-cell ‹r›, up to isomorphism,
as the composition ‹g ⋅ f*› of a map ‹g› and the right adjoint ‹f*› of a map ‹f›.
In order to be able to express this as a bicategorical limit, CKS consider,
instead of an isomorphism ‹«φ : g ⋆ f* → r¬›, its transpose
‹ρ : g → r ⋆ f› under the adjunction ‹f ⊣ f*›.
›
subsection "Definition of Tabulation"
text ‹
The following locale sets forth the ``signature'' of the data involved in a tabulation,
and establishes some basic facts.
$\xymatrix{
& \scriptstyle{{\rm src}~g \;=\;{\rm src}~f} \xtwocell[ddd]{}\omit{^\rho}
\ar[ddl] _{g}
\ar[ddr] ^{f}
\\
\\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll] ^{r}
\\
&
$$
›
locale tabulation_data =
bicategory +
fixes r :: 'a
and ρ :: 'a
and f :: 'a
and g :: 'a
assumes ide_base: "ide r"
and ide_leg0: "ide f"
and tab_in_vhom': "«ρ : g → r ⋆ f¬"
begin
lemma base_in_hom [intro]:
shows "«r : src r → trg r¬" and "«r : r → r¬"
using ide_base by auto
lemma base_simps [simp]:
shows "ide r" and "arr r"
and "dom r = r" and "cod r = r"
using ide_base by auto
lemma tab_in_hom [intro]:
shows "«ρ : src f → trg r¬" and "«ρ : g → r ⋆ f¬"
using tab_in_vhom' src_dom [of ρ] trg_dom [of ρ] base_in_hom apply auto
by (metis arrI hcomp_simps(1) hcomp_simps(2) in_hhomI not_arr_null
src.extensionality src.preserves_hom vconn_implies_hpar(1)
vconn_implies_hpar(2) vconn_implies_hpar(3) vconn_implies_hpar(4))
lemma ide_leg1:
shows "ide g"
using tab_in_hom by auto
lemma leg1_in_hom [intro]:
shows "«g : src f → trg r¬" and "«g : g → g¬"
using ide_leg1 apply auto
using tab_in_hom ide_dom [of ρ]
apply (elim conjE in_homE) by auto
lemma leg1_simps [simp]:
shows "ide g" and "arr g"
and "src g = src f" and "trg g = trg r"
and "dom g = g"and "cod g = g"
using ide_leg1 leg1_in_hom by auto
lemma tab_simps [simp]:
shows "arr ρ" and "src ρ = src f" and "trg ρ = trg r"
and "dom ρ = g" and "cod ρ = r ⋆ f"
using tab_in_hom by auto
lemma leg0_in_hom [intro]:
shows "«f : src f → src r¬" and "«f : f → f¬"
using ide_leg0 apply auto
using tab_in_hom ide_cod [of ρ] hseq_char [of r f]
apply (elim conjE in_homE) by auto
lemma leg0_simps [simp]:
shows "ide f" and "arr f"
and "trg f = src r"
and "dom f = f" and "cod f = f"
using ide_leg0 leg0_in_hom by auto
text ‹
The following function, which composes ‹ρ› with a 2-cell ‹«θ : f ⋆ w → u¬› to obtain
a 2-cell ‹«(r ⋆ θ) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) : g ⋆ w → r ⋆ u¬"›,
occurs frequently in the sequel.
›
abbreviation (input) composite_cell
where "composite_cell w θ ≡ (r ⋆ θ) ⋅ a[r, f, w] ⋅ (ρ ⋆ w)"
lemma composite_cell_in_hom:
assumes "ide w" and "«w : src u → src f¬" and "«θ : f ⋆ w → u¬"
shows "«composite_cell w θ : g ⋆ w → r ⋆ u¬"
proof (intro comp_in_homI)
show "«ρ ⋆ w : g ⋆ w → (r ⋆ f) ⋆ w¬"
using assms tab_in_hom
apply (elim conjE in_hhomE in_homE)
by (intro hcomp_in_vhom, auto)
show "«a[r, f, w] : (r ⋆ f) ⋆ w → r ⋆ f ⋆ w¬"
using assms ide_base ide_leg0 tab_in_hom by fastforce
show "«r ⋆ θ : r ⋆ f ⋆ w → r ⋆ u¬"
using assms ide_base ide_leg0 tab_in_hom by fastforce
qed
text ‹
We define some abbreviations for various combinations of conditions that occur in the
hypotheses and conclusions of the tabulation axioms.
›
abbreviation (input) uwθψ
where "uwθψ u w θ ψ ≡ ide w ∧ «θ : f ⋆ w → u¬ ∧ «ψ : dom ψ → r ⋆ u¬"
abbreviation (input) uwθψν
where "uwθψν u w θ ψ ν ≡
ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν : dom ψ → g ⋆ w¬ ∧ iso ν ∧
(r ⋆ θ) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν = ψ"
abbreviation (input) uwθw'θ'β
where "uwθw'θ'β u w θ w' θ' β ≡
ide u ∧ ide w ∧ ide w' ∧
«θ : f ⋆ w → u¬ ∧ «θ' : f ⋆ w' → u¬ ∧ «β : g ⋆ w → g ⋆ w'¬ ∧
(r ⋆ θ) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) = (r ⋆ θ') ⋅ a[r, f, w'] ⋅ (ρ ⋆ w') ⋅ β"
end
text ‹
CKS define two notions of tabulation.
The first, which they call simply ``tabulation'', is restricted to triples ‹(f, ρ, g)›
where the ``input leg'' ‹f› is a map, and assumes only a weak form of the biuniversal
property that only applies to ‹(u, ψ, v)› for which u is a map.
The second notion, which they call ``wide tabulation'', concerns arbitrary ‹(f, ρ, g)›,
and assumes a strong form of the biuniversal property that applies to all ‹(u, ψ, v)›.
On its face, neither notion implies the other: ``tabulation'' has the stronger assumption
that ‹f› is a map, but requires a weaker biuniversal property, and ``wide tabulation''
omits the assumption on ‹f›, but requires a stronger biuniversal property.
CKS Proposition 1(c) states that if ‹(f, ρ, g)› is a wide tabulation,
then ‹f› is automatically a map. This is in fact true, but it took me a long time to
reconstruct the details of the proof.
CKS' definition of ``bicategory of spans'' uses their notion ``tabulation'',
presumably because it is only applied in situations where maps are involved and it is more
desirable to have axioms that involve a weaker biuniversal property rather than a stronger one.
However I am more interested in ``wide tabulation'', as it is in some sense the nicer notion,
and since I have had to establish various kinds of preservation results that I don't want
to repeat for both tabulation and wide tabulation, I am using wide tabulation everywhere,
calling it simply ``tabulation''. The fact that the ``input leg'' of a tabulation must
be a map is an essential ingredient throughout.
I have attempted to follow CKS variable naming conventions as much as possible in this
development to avoid confusion when comparing with their paper, even though these are
sometimes at odds with what I have been using elsewhere in this document.
›
locale tabulation =
tabulation_data +
assumes T1: "∧u ψ.
[ ide u; «ψ : dom ψ → r ⋆ u¬ ] ==>
∃w θ ν. ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν : dom ψ → g ⋆ w¬ ∧ iso ν ∧
composite_cell w θ ⋅ ν = ψ"
and T2: "∧u w w' θ θ' β.
[ ide w; ide w'; «θ : f ⋆ w → u¬; «θ' : f ⋆ w' → u¬; «β : g ⋆ w → g ⋆ w'¬;
composite_cell w θ = composite_cell w' θ' ⋅ β ] ==>
∃!γ. «γ : w → w'¬ ∧ β = g ⋆ γ ∧ θ = θ' ⋅ (f ⋆ γ)"
text ‹
$
textbf{T1:}\qquad\qquad
xy/u67pt/
xymatrix{
& {\scriptstyle{{\rm src}~\omega}}
\xlowertwocell[ddddl]{}_{{\rm dom}~\omega\hspace{20pt}}{^\nu}
\xuppertwocell[ddddr]{}^{u}{^\theta}
\ar@ {.>}[dd]^{w}
\\
\\
& \scriptstyle{{\rm src}~g \;=\;{\rm src}~f} \xtwocell[ddd]{}\omit{^\rho}
\ar[ddl] _{g}
\ar[ddr] ^{f}
\\
\\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll] ^{r}
\\
&
endxy
;\;=\;\;
xy/u33pt/
xymatrix{
& \scriptstyle{{\rm src}~\omega} \xtwocell[ddd]{}\omit{^\omega}
\ar[ddl] _{{\rm dom}~\omega}
\ar[ddr] ^{u}
\\
\\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll] ^{r}
\\
&
endxy
$
›
text ‹
The following definition includes the additional axiom ‹T0›, which states that
the ``input leg'' ‹f› is a map.
›
locale tabulation_data_with_T0 =
tabulation_data +
T0: map_in_bicategory V H a i src trg f
begin
abbreviation η where "η ≡ T0.η"
abbreviation ε where "ε ≡ T0.ε"
text ‹
If ‹«ρ : g → r ⋆ f¬› is a 2-cell and ‹f› is a map, then ‹«T0.trnr\ε r ρ : g ⋆ f* → r¬›,
where ‹T0.trnr\ε r ρ› is the adjoint transpose of ‹ρ›.
We will show (CKS Proposition 1(d)) that if ‹ρ› is a tabulation,
then ‹ψ = T0.trnr\ε r ρ› is an isomorphism. However, regardless of whether ‹ρ› is a
tabulation, the mapping ‹ρ ↦ ψ› is injective, and we can recover ‹ρ› by the formula:
\<open>\<rho> = (\<psi> \<star> f) \<cdot> T0.trnr\<^sub>\<eta> g (g \<star> f\<^sup>*)›. The proof requires only ‹T0› and the ``syntactic''
properties of the tabulation data, and in particular does not require the tabulation
conditions \<open>T1\<close> and \<open>T2\<close>. In case \<open>\<rho>\<close> is in fact a tabulation, then this formula can
be interpreted as expressing that \<open>\<rho>\<close> is obtained by transposing the identity
\<open>\<guillemotleft>g \<star> f\<^sup>* : g \<star> f\<^sup>* \<Rightarrow> g \<star> f\<^sup>*\<guillemotright>\<close> to obtain a 2-cell \<open>\<guillemotleft>T0.trnr\<^sub>\<eta> g (g \<star> f\<^sup>*) : g → (g ⋆ f*) ⋆ f¬›
(which may be regarded as the canonical tabulation of ‹g ⋆ f*›), and then composing
with the isomorphism \<open>\<guillemotleft>\<psi> \<star> f : (g \<star> f\<^sup>*) ⋆ f → r ⋆ f¬› to obtain a tabulation of ‹r›.
This fact will end up being very important in establishing the characterization of
bicategories of spans. Strangely, CKS doesn't make any explicit mention of it.
\<close>
lemma rep_in_hom [intro]:
shows "\<guillemotleft>T0.trnr\<^sub>\<epsilon> r \<rho> : g \<star> f\<^sup>* \<Rightarrow> r\<guillemotright>"
proof (unfold T0.trnr\<^sub>\<epsilon>_def, intro comp_in_homI)
show "\<guillemotleft>\<rho> \<star> f\<^sup>* : g \<star> f\<^sup>* \<Rightarrow> (r \<star> f) \<star> f\<^sup>*\<guillemotright>"
using tab_in_hom T0.antipar(1) by auto
show "\<guillemotleft>\<a>[r, f, f\<^sup>*] : (r \<star> f) \<star> f\<^sup>* \<Rightarrow> r \<star> f \<star> f\<^sup>*\<guillemotright>"
using T0.antipar(1-2) by auto
show "\<guillemotleft>r \<star> \<epsilon> : r \<star> f \<star> f\<^sup>* \<Rightarrow> r \<star> src r\<guillemotright>"
using T0.antipar by auto
show "\<guillemotleft>\<r>[r] : r \<star> src r \<Rightarrow> r\<guillemotright>"
by auto
qed
lemma \<rho>_in_terms_of_rep:
shows "\<rho> = (T0.trnr\<^sub>\<epsilon> r \<rho> \<star> f) \<cdot> T0.trnr\<^sub>\<eta> g (g \<star> f\<^sup>*)"
proof -
have "(T0.trnr\ε r ρ ⋆ f) ⋅ T0.trnr\η g (g ⋆ f*) =
(r[r] ⋅ composite_cell f* ε ⋆ f) ⋅ ((g ⋆ f*) ⋆ f) ⋅ a-1[g, f*, f] ⋅ (g ⋆ η) ⋅ r-1[g]"
unfolding T0.trnr\<epsilon>_def T0.trnr\<eta>_def by simp
text ‹
$$
\xy/u67pt/
\xymatrix{
& \scriptstyle{{\rm src}~g \;=\;{\rm src}~f}
\ar[ddl]_{g} \ar[ddr]^{f} \xtwocell[ddd]{}\omit{^\rho}
&
\\
\\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll]^{r}
\\
& &
}
\endxy
\;\;=\;\;
\xy/u133pt/
\xymatrix{
& & \scriptstyle{{\rm src}~g \;=\;{\rm src}~f} \ar[dd]
\xtwocell[dddddddl]{}\omit{^\rho}
\xlowertwocell[ddddll]{}_{g}{^{\hspace{20pt}{\rm r}^{-1}[g]}}
\xuppertwocell[ddddrr]{}^{f}{\omit} & &
\xtwocell[dddddddlll]{}\omit{^\epsilon}
\xtwocell[ddddll]{}\omit{^\eta}
\\
& \\
& & \scriptstyle{{\rm src}~g \;=\;{\rm src}~f} \ar[dd]^{f} \ar[ddll]_{g}
& \\
& & & \\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll]^{r}
& &
\scriptstyle{{\rm src}~r} \ar[ll] \ar[uull]_{f^\ast}
\xuppertwocell[llll]{}^{r}<20>{^{\hspace{20pt}{\rm r}[r]}}
\\
& & \\
& & \\
& & & & \\
}
\endxy
$$
›
also have "... = (r[r] ⋅ composite_cell f* ε ⋆ f) ⋅ a-1[g, f*, f] ⋅ (g ⋆ η) ⋅ r-1[g]"
proof -
have "((g ⋆ f*) ⋆ f) ⋅ a-1[g, f*, f] = a-1[g, f*, f]"
using comp_cod_arr T0.antipar by simp
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ (composite_cell f* ε ⋆ f) ⋅ a-1[g, f*, f] ⋅ (g ⋆ η) ⋅ r-1[g]"
using comp_assoc T0.antipar whisker_right [of "f" "r[r]" "composite_cell f* ε"]
by fastforce
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋅ a[r, f, f*] ⋆ f) ⋅ ((ρ ⋆ f*) ⋆ f) ⋅ a-1[g, f*, f] ⋅
(g ⋆ η) ⋅ r-1[g]"
using T0.antipar whisker_right [of "f" "(r ⋆ ε) ⋅ a[r, f, f*]" "ρ ⋆ f*"] comp_assoc
by fastforce
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ (a[r, f, f*] ⋆ f) ⋅
((ρ ⋆ f*) ⋆ f) ⋅ a-1[g, f*, f] ⋅ (g ⋆ η) ⋅ r-1[g]"
using T0.antipar whisker_right [of "f" "r ⋆ ε" "a[r, f, f*]"] comp_assoc by fastforce
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ (a[r, f, f*] ⋆ f) ⋅
a-1[r ⋆ f, f*, f] ⋅ (ρ ⋆ f* ⋆ f) ⋅ (g ⋆ η) ⋅ r-1[g]"
proof -
have "((ρ ⋆ f*) ⋆ f) ⋅ a-1[g, f*, f] = a-1[r ⋆ f, f*, f] ⋅ (ρ ⋆ f* ⋆ f)"
using assoc'_naturality [of ρ "f*" "f"] T0.antipar by simp
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅
(a[r, f, f*] ⋆ f) ⋅ a-1[r ⋆ f, f*, f] ⋅
((r ⋆ f) ⋆ η) ⋅ (ρ ⋆ src (f)) ⋅ r-1[g]"
proof -
have "(ρ ⋆ f* ⋆ f) ⋅ (g ⋆ η) = ((r ⋆ f) ⋆ η) ⋅ (ρ ⋆ src (f))"
using comp_arr_dom comp_cod_arr T0.antipar interchange [of ρ "g" "f* ⋆ f" η]
interchange [of "r ⋆ f" ρ η "src (f)"]
by auto
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ (a[r, f, f*] ⋆ f) ⋅ a-1[r ⋆ f, f*, f] ⋅
((r ⋆ f) ⋆ η) ⋅ r-1[r ⋆ f] ⋅ ρ"
using runit'_naturality [of ρ] by simp
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅
a-1[r, f ⋆ f*, f] ⋅ (r ⋆ a-1[f, f*, f]) ⋅ a[r, f, f* ⋆ f] ⋅
((r ⋆ f) ⋆ η) ⋅ r-1[r ⋆ f] ⋅ ρ"
proof -
have "(a[r, f, f*] ⋆ f) ⋅ a-1[r ⋆ f, f*, f] =
a-1[r, f ⋆ f*, f] ⋅ (r ⋆ a-1[f, f*, f]) ⋅ a[r, f, f* ⋆ f]"
proof -
have "a-1[r ⋆ f, f*, f] =
(a-1[r, f, f*] ⋆ f) ⋅ a-1[r, f ⋆ f*, f] ⋅ (r ⋆ a-1[f, f*, f]) ⋅ a[r, f, f* ⋆ f]"
using pentagon' [of r "f" "f*" "f"] T0.antipar iso_assoc comp_assoc
invert_side_of_triangle(2)
[of "((a-1[r, f, f*] ⋆ f) ⋅ a-1[r, f ⋆ f*, f]) ⋅ (r ⋆ a-1[f, f*, f])"
"a-1[r ⋆ f, f*, f]" "a-1[r, f, f* ⋆ f]"]
by fastforce
hence "(a[r, f, f*] ⋆ f) ⋅ a-1[r ⋆ f, f*, f] =
((a[r, f, f*] ⋆ f) ⋅ (a-1[r, f, f*] ⋆ f)) ⋅
a-1[r, f ⋆ f*, f] ⋅ (r ⋆ a-1[f, f*, f]) ⋅ a[r, f, f* ⋆ f]"
using comp_assoc by simp
also have "... = a-1[r, f ⋆ f*, f] ⋅ (r ⋆ a-1[f, f*, f]) ⋅ a[r, f, f* ⋆ f]"
proof -
have "(a[r, f, f*] ⋆ f) ⋅ (a-1[r, f, f*] ⋆ f) ⋅ a-1[r, f ⋆ f*, f] =
((r ⋆ f ⋆ f*) ⋆ f) ⋅ a-1[r, f ⋆ f*, f]"
using comp_cod_arr comp_assoc iso_assoc comp_arr_inv T0.antipar
whisker_right [of "f" "a[r, f, f*]" "a-1[r, f, f*]"] comp_assoc_assoc'
by simp
also have "... = a-1[r, f ⋆ f*, f]"
using comp_cod_arr T0.antipar by auto
finally show ?thesis
using comp_assoc by metis
qed
finally show ?thesis by blast
qed
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ a-1[r, src r, f] ⋅ (r ⋆ ε ⋆ f) ⋅
(r ⋆ a-1[f, f*, f]) ⋅ (r ⋆ f ⋆ η) ⋅ a[r, f, src (f)] ⋅ r-1[r ⋆ f] ⋅ ρ"
proof -
have "((r ⋆ ε) ⋆ f) ⋅ a-1[r, f ⋆ f*, f] = a-1[r, src r, f] ⋅ (r ⋆ ε ⋆ f)"
using assoc'_naturality [of r ε "f"] by auto
moreover have "a[r, f, f* ⋆ f] ⋅ ((r ⋆ f) ⋆ η) = (r ⋆ f ⋆ η) ⋅ a[r, f, src (f)]"
using assoc_naturality [of r "f" η] T0.antipar by auto
ultimately show ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ a-1[r, src r, f] ⋅ (r ⋆ (ε ⋆ f) ⋅
a-1[f, f*, f] ⋅ (f ⋆ η)) ⋅ a[r, f, src (f)] ⋅ r-1[r ⋆ f] ⋅ ρ"
proof -
have "seq a-1[f, f*, f] (f ⋆ η)"
using T0.antipar by force
moreover have "seq (ε ⋆ f) (a-1[f, f*, f] ⋅ (f ⋆ η))"
using T0.antipar by fastforce
ultimately have "(r ⋆ ε ⋆ f) ⋅ (r ⋆ a-1[f, f*, f]) ⋅ (r ⋆ f ⋆ η) =
r ⋆ (ε ⋆ f) ⋅ a-1[f, f*, f] ⋅ (f ⋆ η)"
using T0.antipar whisker_left [of r "a-1[f, f*, f]" "f ⋆ η"]
whisker_left [of r "ε ⋆ f" "a-1[f, f*, f] ⋅ (f ⋆ η)"]
by auto
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ a-1[r, src r, f] ⋅ (r ⋆ l-1[f] ⋅ r[f]) ⋅
a[r, f, src (f)] ⋅ r-1[r ⋆ f] ⋅ ρ"
using T0.triangle_left by simp
also have "... = ((r[r] ⋆ f) ⋅ a-1[r, src r, f] ⋅ (r ⋆ l-1[f])) ⋅
((r ⋆ r[f]) ⋅ a[r, f, src (f)] ⋅ r-1[r ⋆ f]) ⋅ ρ"
using whisker_left [of r "l-1[f]" "r[f]"] comp_assoc by simp
also have "... = ((r ⋆ l[f]) ⋅ (r ⋆ l-1[f])) ⋅ (r[r ⋆ f] ⋅ r-1[r ⋆ f]) ⋅ ρ"
using triangle' [of r "f"] runit_hcomp [of r "f"] comp_assoc by simp
also have "... = ρ"
proof -
have "(r ⋆ l[f]) ⋅ (r ⋆ l-1[f]) = r ⋆ f"
using iso_lunit comp_arr_inv' whisker_left [of r "l[f]" "l-1[f]"] by simp
moreover have "(r[r ⋆ f] ⋅ r-1[r ⋆ f]) = r ⋆ f"
using iso_runit inv_is_inverse comp_arr_inv' by auto
ultimately show ?thesis
using comp_cod_arr by simp
qed
finally show ?thesis by simp
qed
end
text ‹
The following corresponds to what CKS call ``tabulation''; it supposes axiom ‹T0›,
but involves weaker versions of ‹T1› and ‹T2›. I am calling it ``narrow tabulation''.
›
locale narrow_tabulation =
tabulation_data_with_T0 +
assumes T1: "∧u ψ.
[ is_left_adjoint u; «ψ : dom ψ → r ⋆ u¬ ] ==>
∃w θ ν. ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν : dom ψ → g ⋆ w¬ ∧ iso ν ∧
composite_cell w θ ⋅ ν = ψ"
and T2: "∧u w w' θ θ' β.
[ is_left_adjoint u; ide w; ide w';
«θ : f ⋆ w → u¬; «θ' : f ⋆ w' → u¬; «β : g ⋆ w → g ⋆ w'¬;
composite_cell w θ = composite_cell w' θ' ⋅ β ] ==>
∃!γ. «γ : w → w'¬ ∧ β = g ⋆ γ ∧ θ = θ' ⋅ (f ⋆ γ)"
text ‹
The next few locales are used to bundle up some routine consequences of
the situations described by the hypotheses and conclusions of the tabulation axioms,
so we don't have to keep deriving them over and over again in each context,
and also so as to keep the simplification rules oriented consistently with each other.
›
locale uwθ =
tabulation_data +
fixes u :: 'a
and w :: 'a
and θ :: 'a
assumes uwθ: "ide w ∧ «θ : f ⋆ w → u¬"
begin
lemma ide_u:
shows "ide u"
using uwθ by force
lemma u_in_hom [intro]:
shows "«u : src u → src r¬"
using uwθ ide_u ide_cod [of θ] hseq_char [of f w]
apply (intro in_hhomI, simp_all)
by (metis arr_dom in_homE leg0_simps(3) trg_hcomp vconn_implies_hpar(4))
lemma u_simps [simp]:
shows "ide u" and "arr u"
and "trg u = src r"
and "dom u = u" and "cod u = u"
using ide_u u_in_hom by auto
lemma ide_w:
shows "ide w"
using uwθ by auto
lemma w_in_hom [intro]:
shows "«w : src u → src f¬" and "«w : w → w¬"
proof -
show "«w : w → w¬"
using ide_w by auto
show "«w : src u → src f¬"
proof
show "arr w" using ide_w by simp
show "src w = src u"
using uwθ ide_dom [of θ] hseq_char [of f w]
by (metis arr_dom in_homE src_cod src_dom hcomp_simps(1))
show "trg w = src f"
using uwθ ide_dom [of θ] hseq_char [of f w]
by (metis arr_dom in_homE)
qed
qed
lemma w_simps [simp]:
shows "ide w" and "arr w"
and "src w = src u" and "trg w = src f"
and "dom w = w" and "cod w = w"
using ide_w w_in_hom by auto
lemma θ_in_hom [intro]:
shows "«θ : src u → src r¬" and "«θ : f ⋆ w → u¬"
proof -
show "«θ : f ⋆ w → u¬"
using uwθ by simp
show "«θ : src u → src r¬"
using uwθ hcomp_simps(1-2)
by (metis arrI in_hhomI u_simps(3) vconn_implies_hpar(1-4))
qed
lemma θ_simps [simp]:
shows "arr θ" and "src θ = src u" and "trg θ = src r"
and "dom θ = f ⋆ w" and "cod θ = u"
using θ_in_hom by auto
end
locale uwθψ =
uwθ +
fixes ψ :: 'a
assumes uwθψ: "uwθψ u w θ ψ"
begin
lemma ψ_in_hom [intro]:
shows "«ψ : src w → trg r¬" and "«ψ : dom ψ → r ⋆ u¬"
proof -
show "«ψ : src w → trg r¬"
using uwθψ src_cod [of ψ] trg_cod [of ψ]
apply (elim conjE in_homE)
by simp
show "«ψ : dom ψ → r ⋆ u¬"
using uwθψ by auto
qed
lemma ψ_simps [simp]:
shows "arr ψ" and "src ψ = src w" and "trg ψ = trg r"
and "cod ψ = r ⋆ u"
using ψ_in_hom by auto
end
locale uwθψν =
uwθ +
fixes ψ :: 'a
and ν :: 'a
assumes uwθψν: "uwθψν u w θ ψ ν"
begin
lemma ν_in_hom [intro]:
shows "«ν : src u → trg r¬" and "«ν : dom ψ → g ⋆ w¬"
proof -
show "«ν : dom ψ → g ⋆ w¬"
using uwθψν by auto
show "«ν : src u → trg r¬"
proof
show 1: "arr ν"
using uwθψν by auto
show "src ν = src u"
proof -
have "src (cod ν) = src u"
using uwθψν
by (metis arr_cod hcomp_simps(1) in_homE w_simps(3))
thus ?thesis by simp
qed
show "trg ν = trg r"
proof -
have "trg (cod ν) = trg r"
using uwθψν
by (metis arr_cod hcomp_simps(2) in_homE leg1_simps(4))
thus ?thesis by simp
qed
qed
qed
lemma ν_simps [simp]:
shows "iso ν" and "arr ν" and "src ν = src u" and "trg ν = trg r"
and "cod ν = g ⋆ w"
using uwθψν ν_in_hom by auto
sublocale uwθψ
proof (unfold_locales, intro conjI)
show "ide w"
using uwθψν by simp
show "«θ : f ⋆ w → u¬"
using uwθψν by simp
have "«(r ⋆ θ) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν : dom ν → r ⋆ u¬"
using ide_base ide_leg0 ide_w by fastforce
thus "«ψ : dom ψ → r ⋆ u¬"
using uwθψν by auto
qed
end
locale uwθw'θ' =
tabulation_data V H a ι src trg r ρ f g +
uwθ: uwθ V H a ι src trg r ρ f g u w θ +
uw'θ': uwθ V H a ι src trg r ρ f g u w' θ'
for V :: "'a comp" (infixr ‹⋅› 55)
and H :: "'a → 'a → 'a" (infixr ‹⋆› 53)
and a :: "'a → 'a → 'a → 'a" (‹a[_, _, _]›)
and ι :: "'a → 'a" (‹i[_]›)
and src :: "'a → 'a"
and trg :: "'a → 'a"
and r :: 'a
and ρ :: 'a
and f :: 'a
and g :: 'a
and u :: 'a
and w :: 'a
and θ :: 'a
and w' :: 'a
and θ' :: 'a
locale uwθw'θ'γ =
uwθw'θ' +
fixes γ :: 'a
assumes γ_in_vhom: "«γ : w → w'¬"
and "θ = θ' ⋅ (f ⋆ γ)"
begin
lemma γ_in_hom [intro]:
shows "«γ : src u → src f¬" and "«γ : w → w'¬"
proof -
show "«γ : w → w'¬"
using γ_in_vhom by simp
show "«γ : src u → src f¬"
proof
show "arr γ"
using γ_in_vhom by auto
show "src γ = src u"
using γ_in_vhom src_dom [of γ]
apply (elim in_homE) by simp
show "trg γ = src f"
using γ_in_vhom trg_dom [of γ]
apply (elim in_homE) by simp
qed
qed
lemma γ_simps [simp]:
shows "arr γ"
and "src γ = src u" and "trg γ = src f"
and "dom γ = w" and "cod γ = w'"
using γ_in_hom by auto
end
locale uwθw'θ'β =
uwθw'θ' +
fixes β :: 'a
assumes uwθw'θ'β: "uwθw'θ'β u w θ w' θ' β"
begin
lemma β_in_hom [intro]:
shows "«β : src u → trg r¬" and "«β : g ⋆ w → g ⋆ w'¬"
proof -
show "«β : g ⋆ w → g ⋆ w'¬"
using uwθw'θ'β by auto
show "«β : src u → trg r¬"
using uwθw'θ'β src_dom [of β] trg_dom [of β] hseq_char [of g w]
apply (elim conjE in_homE) by auto
qed
lemma β_simps [simp]:
shows "arr β" and "src β = src u" and "trg β = trg r"
and "dom β = g ⋆ w" and "cod β = g ⋆ w'"
using β_in_hom by auto
end
subsection "Tabulations yield Factorizations"
text ‹
If ‹(f, ρ, g)› is a (wide) tabulation, then ‹f› is automatically a map;
this is CKS Proposition 1(c).
The proof sketch provided by CKS is only three lines long, and for a long time I
was only able to prove one of the two triangle identities.
Finally, after gaining a lot of experience with the definitions I saw how to prove
the other.
CKS say nothing about the extra step that seems to be required.
›
context tabulation
begin
text ‹
The following is used in order to allow us to apply the coherence theorem
to shortcut proofs of equations between canonical arrows.
›
interpretation E: self_evaluation_map V H a i src trg ..
notation E.eval (‹{_}›)
lemma satisfies_T0:
shows "is_left_adjoint f"
proof -
text ‹
The difficulty is filling in details left out by CKS, and accounting for the
fact that they have suppressed unitors and associators everywhere.
In addition, their typography generally uses only parentheses, with no explicit
operation symbols to distinguish between horizontal and vertical composition.
In some cases, for example the statement of T2 in the definition of tabulation,
this makes it difficult for someone not very experienced with the definitions to
reconstruct the correct formulas.
›
text ‹
CKS say to first apply ‹T1› with ‹u = src r›, ‹v = r›, and ‹ρ' = r›.
However, ‹«r : r → r¬›, not ‹«r : r → r ⋆ src r¬›, so we have to take ‹ρ' = r-1[r]›.
›
obtain fa ε ν
where fa: "ide fa ∧ «ε : f ⋆ fa → src r¬ ∧ «ν : r → g ⋆ fa¬ ∧ iso ν ∧
composite_cell fa ε ⋅ ν = r-1[r]"
using T1 [of "src r" "r-1[r]"] runit'_in_hom [of r] ide_base comp_assoc by auto
have fa': "composite_cell fa ε ⋅ ν = r-1[r]"
using fa by simp
have fa: "ide fa ∧ «ε : f ⋆ fa → src r¬ ∧ «ν : r → g ⋆ fa¬ ∧ iso ν"
using fa by simp
have 1: "src fa = trg f"
using fa fa' comp_assoc
by (metis ide_base leg0_simps(3) runit'_simps(1) seqE src_hcomp vconn_implies_hpar(1)
vseq_implies_hpar(1))
have 2: "trg fa = src g"
using fa by force
have ε: "«ε : f ⋆ fa → trg f¬ ∧ «ε : trg f → trg f¬ ∧
arr ε ∧ src ε = trg f ∧ trg ε = trg f ∧ dom ε = f ⋆ fa ∧ cod ε = trg f"
using fa 1 2
by (metis in_hhomI in_homE leg0_simps(3) src_src trg_src vconn_implies_hpar(1-4))
have ν: "«ν : r → g ⋆ fa¬ ∧ «ν : trg f → trg g¬ ∧
arr ν ∧ src ν = trg f ∧ trg ν = trg g ∧ dom ν = r ∧ cod ν = g ⋆ fa"
using fa by force
text ‹
Next, CKS say to apply ‹T2› with ‹w = trg fa = src f›, ‹w' = fa ⋆ f›, ‹u = f›,
to obtain the unit and the adjunction conditions, but they don't say explicitly
what to use for ‹θ›, ‹θ'›, and ‹β›.
We need ‹«θ : f ⋆ w → u¬› and ‹«θ' : f ⋆ w' → u¬›;
\emph{i.e.}~‹«θ : f ⋆ trg fa → f¬› and ‹«θ' : f ⋆ fa ⋆ f → f¬›.
Evidently, we may take ‹θ = ρ[f]› and ‹θ' = l[f] ⋅ (ε ⋆ f) ⋅ a-1[f, fa, f]›.
What should be taken for ‹β›? Reconstructing this is a little bit more difficult.
‹T2› requires ‹«β : g ⋆ w → g ⋆ w'¬›, hence ‹«β : g ⋆ trg fa → g ⋆ fa ⋆ f¬›.
We have the isomorphism ‹«ν : r → g ⋆ fa¬› from ‹T1›. Also ‹«ρ : g → r ⋆ f¬›.
So ‹«a[g, fa, f] ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g] : g ⋆ trg fa → g ⋆ fa ⋆ f¬›,
suggesting that we take ‹β = a[g, fa, f] ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g]›.
Now, to apply ‹T2› we need to satisfy the equation:
\[
‹(r ⋆ θ) ⋅ a[r, f, trg fa] ⋅ (ρ ⋆ trg fa ) =
(r ⋆ θ') ⋅ a[r, f, fa ⋆ f] ⋅ (ρ ⋆ fa ⋆ f) ⋅ β›;
\]
that is, with our choice of ‹θ›, ‹θ'›, and ‹β›:
‹(r ⋆ r[f]) ⋅ a[r, f, trg fa] ⋅ (ρ ⋆ trg fa ) =
(r ⋆ l[f] ⋅ (ε ⋆ f) ⋅ a-1[f, fa, f]) ⋅ a[r, f, fa ⋆ f] ⋅ (ρ ⋅ (fa ⋆ f)) ⋅
a[g, fa, f] ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g]›.
It is not too difficult to get the idea of showing that the left-hand side
is equal to ‹ρ ⋅ r[g]› (note that ‹trg fa = src f = src g]› and ‹trg f = src r›),
so we should also try to prove that the right-hand side is equal to this as well.
What we have to work with is the equation:
\[
‹r-1[r] = (r ⋆ ε) ⋅ a[r, f, fa] ⋅ (ρ ⋆ fa ) ⋅ ν›.
\]
After some pondering, I realized that to apply this to the right-hand side of the
equation to be shown requires that we re-associate everything to the left,
so that f stands alone on the right.
›
let ?β = "a[g, fa, f] ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g]"
let ?θ = "r[f]"
let ?θ' = "l[f] ⋅ (ε ⋆ f) ⋅ a-1[f, fa, f]"
have β: "«?β : g ⋆ src g → g ⋆ fa ⋆ f¬ ∧ «?β : src f → trg g¬ ∧
src ?β = src g ∧ trg ?β = trg g ∧ dom ?β = g ⋆ src g ∧ cod ?β = g ⋆ fa ⋆ f"
proof -
have 3: "«?β : g ⋆ src g → g ⋆ fa ⋆ f¬"
using fa 1 2 by fastforce
moreover have "«?β : src f → trg g¬"
using 1 2 3 fa by auto
ultimately show ?thesis
by (auto simp add: in_hhom_def)
qed
have θ': "«?θ' : f ⋆ fa ⋆ f → f¬"
using fa 1 2 ε by fastforce
have A: "composite_cell (trg fa) r[f] = composite_cell (fa ⋆ f) ?θ' ⋅ ?β"
proof -
have "composite_cell (trg fa) r[f] = ρ ⋅ r[g]"
using 2 runit_hcomp runit_naturality [of ρ] comp_assoc by simp
also have "... = composite_cell (fa ⋆ f) ?θ' ⋅ ?β"
proof -
have "composite_cell (fa ⋆ f) ?θ' ⋅ ?β =
(composite_cell (fa ⋆ f) ?θ' ⋅ a[g, fa, f]) ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g]"
using comp_assoc by simp
also have "... = ρ ⋅ r[g]"
proof -
have "(composite_cell (fa ⋆ f) ?θ' ⋅ a[g, fa, f]) ⋅ (ν ⋆ f) = r ⋆ f"
proof -
have "(composite_cell (fa ⋆ f) ?θ' ⋅ a[g, fa, f]) ⋅ (ν ⋆ f) =
r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, fa] ⋅ (ρ ⋆ fa) ⋅ ν ⋆ f"
proof -
have "(composite_cell (fa ⋆ f) ?θ' ⋅ a[g, fa, f]) ⋅ (ν ⋆ f) =
(r ⋆ l[f]) ⋅ (r ⋆ ε ⋆ f) ⋅
composite_cell (fa ⋆ f) a-1[f, fa, f] ⋅ (a[g, fa, f] ⋅ (ν ⋆ f))"
using fa 1 2 ε whisker_left comp_assoc by auto
also have "... = (r[r] ⋆ f) ⋅ a-1[r, src r, f] ⋅ (r ⋆ ε ⋆ f) ⋅
composite_cell (fa ⋆ f) a-1[f, fa, f] ⋅ (a[g, fa, f] ⋅ (ν ⋆ f))"
using fa 1 2 comp_assoc by (simp add: triangle')
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ a-1[r, f ⋆ fa, f] ⋅
composite_cell (fa ⋆ f) a-1[f, fa, f] ⋅ (a[g, fa, f] ⋅ (ν ⋆ f))"
proof -
have "a-1[r, src r, f] ⋅ (r ⋆ ε ⋆ f) = ((r ⋆ ε) ⋆ f) ⋅ a-1[r, f ⋆ fa, f]"
using fa ε assoc'_naturality [of r ε f] by auto
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅
(a[r, f, fa] ⋆ f) ⋅ a-1[r ⋆ f, fa, f] ⋅ (ρ ⋆ fa ⋆ f) ⋅
a[g, fa, f] ⋅ (ν ⋆ f)"
proof -
have "(r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ a-1[r, f ⋆ fa, f] ⋅
composite_cell (fa ⋆ f) a-1[f, fa, f] ⋅ (a[g, fa, f] ⋅ (ν ⋆ f)) =
(r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅
(a-1[r, f ⋆ fa, f] ⋅ (r ⋆ a-1[f, fa, f]) ⋅ a[r, f, fa ⋆ f]) ⋅
(ρ ⋆ fa ⋆ f) ⋅ a[g, fa, f] ⋅ (ν ⋆ f)"
by (simp add: comp_assoc)
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅
((a[r, f, fa] ⋆ f) ⋅ a-1[r ⋆ f, fa, f]) ⋅
(ρ ⋆ fa ⋆ f) ⋅ a[g, fa, f] ⋅ (ν ⋆ f)"
proof -
have "a-1[r, f ⋆ fa, f] ⋅ (r ⋆ a-1[f, fa, f]) ⋅ a[r, f, fa ⋆ f] =
(a[r, f, fa] ⋆ f) ⋅ a-1[r ⋆ f, fa, f]"
proof -
(* No need to calculate manually, apply the coherence theorem. *)
have "a-1[r, f ⋆ fa, f] ⋅ (r ⋆ a-1[f, fa, f]) ⋅ a[r, f, fa ⋆ f] =
{\a-1[\⟨r\⟩, \⟨f\⟩ \⋆ \⟨fa\⟩, \⟨f\⟩] \⋅ (\⟨r\⟩ \⋆ \a-1[\⟨f\⟩, \⟨fa\⟩, \⟨f\⟩]) \⋅
\a[\⟨r\⟩, \⟨f\⟩, \⟨fa\⟩ \⋆ \⟨f\⟩]}"
using fa 1 2 a'_def α_def assoc'_eq_inv_assoc by auto
also have "... = {(\a[\⟨r\⟩, \⟨f\⟩, \⟨fa\⟩] \⋆ \⟨f\⟩) \⋅ \a-1[\⟨r\⟩ \⋆ \⟨f\⟩, \⟨fa\⟩, \⟨f\⟩]}"
using fa 1 2 by (intro E.eval_eqI, auto)
also have "... = (a[r, f, fa] ⋆ f) ⋅ a-1[r ⋆ f, fa, f]"
using fa 1 2 a'_def α_def assoc'_eq_inv_assoc by auto
finally show ?thesis by blast
qed
thus ?thesis by simp
qed
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ (a[r, f, fa] ⋆ f) ⋅
a-1[r ⋆ f, fa, f] ⋅ (ρ ⋆ fa ⋆ f) ⋅ a[g, fa, f] ⋅ (ν ⋆ f)"
by (simp add: comp_assoc)
finally show ?thesis by blast
qed
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅
(a[r, f, fa] ⋆ f) ⋅ ((ρ ⋆ fa) ⋆ f) ⋅ a-1[g, fa, f] ⋅
a[g, fa, f] ⋅ (ν ⋆ f)"
proof -
have "a-1[r ⋆ f, fa, f] ⋅ (ρ ⋆ fa ⋆ f) = ((ρ ⋆ fa) ⋆ f) ⋅ a-1[g, fa, f]"
using fa 1 2 assoc'_naturality [of ρ fa f] by auto
thus ?thesis
by (metis comp_assoc)
qed
also have "... = (r[r] ⋆ f) ⋅ ((r ⋆ ε) ⋆ f) ⋅ (a[r, f, fa] ⋆ f) ⋅
((ρ ⋆ fa) ⋆ f) ⋅ (ν ⋆ f)"
proof -
have "a-1[g, fa, f] ⋅ a[g, fa, f] = (g ⋆ fa) ⋆ f"
using fa 1 2 comp_assoc_assoc' by auto
moreover have "((g ⋆ fa) ⋆ f) ⋅ (ν ⋆ f) = ν ⋆ f"
by (simp add: ν comp_cod_arr)
ultimately show ?thesis
using comp_assoc by metis
qed
also have "... = (r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, fa] ⋅ (ρ ⋆ fa) ⋅ ν) ⋆ f"
proof -
have "arr (r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, fa] ⋅ (ρ ⋆ fa) ⋅ ν)"
using fa' comp_assoc by auto
thus ?thesis
using whisker_right by fastforce
qed
finally show ?thesis by blast
qed
also have "... = (r[r] ⋅ r-1[r]) ⋆ f"
using fa' comp_assoc by simp
also have "... = r ⋆ f"
using ide_base by (simp add: comp_arr_inv')
finally show ?thesis by blast
qed
thus ?thesis
using ide_leg0 ide_leg1 tab_in_hom comp_cod_arr comp_assoc tab_simps(5) arrI
by metis
qed
finally show ?thesis by argo
qed
finally show ?thesis by argo
qed
obtain η where η: "«η : trg fa → fa ⋆ f¬ ∧ ?β = g ⋆ η ∧
(l[f] ⋅ (ε ⋆ f) ⋅ a-1[f, fa, f]) ⋅ (f ⋆ η) = r[f]"
using β θ' A 1 2 fa runit_in_hom ide_leg0 ide_hcomp src.preserves_ide
T2 [of "trg fa" "fa ⋆ f" "r[f]" f "l[f] ⋅ (ε ⋆ f) ⋅ a-1[f, fa, f]" ?β] comp_assoc
leg1_simps(3)
by metis
have η': "?β = g ⋆ η ∧ (l[f] ⋅ (ε ⋆ f) ⋅ a-1[f, fa, f]) ⋅ (f ⋆ η) = r[f]"
using η by simp
have η: "«η : trg fa → fa ⋆ f¬ ∧ «η : src f → src f¬ ∧
arr η ∧ src η = src f ∧ trg η = src f ∧ dom η = trg fa ∧ cod η = fa ⋆ f"
using η β 2 by force
have "adjunction_in_bicategory V H a i src trg f fa η ε"
proof
show "ide f" using ide_leg0 by simp
show "ide fa" using fa by blast
show η_in_hom: "«η : src f → fa ⋆ f¬"
using η 2 by simp
show ε_in_hom: "«ε : f ⋆ fa → src fa¬"
using fa 1 by simp
show *: "(ε ⋆ f) ⋅ a-1[f, fa, f] ⋅ (f ⋆ η) = l-1[f] ⋅ r[f]"
using ide_leg0 iso_lunit invert_side_of_triangle(1) η' comp_assoc by auto
text ‹
We have proved one of the triangle identities; now we have to show the other.
This part, not mentioned by CKS, took me a while to discover.
Apply ‹T2› again, this time with the following:
\[\begin{array}{l}
‹w = src f ⋆ fa›,\\
‹θ = (ε ⋆ ε) ⋅ a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa]) ⋅ (f ⋆ η ⋆ fa)›,\\
‹w' = fa ⋆ trg›,\\
‹θ' = ε ⋆ trg f›,\\
‹β = g ⋆ r-1[fa] ⋅ l[fa]›
\end{array}\]
Then the conditions for ‹γ› are satisfied by both
‹r-1[fa] ⋅ l[fa]› and ‹(fa ⋆ ε) ⋅ a[fa, f, fa] ⋅ (η ⋆ fa)› so they are equal,
as required.
›
show "(fa ⋆ ε) ⋅ a[fa, f, fa] ⋅ (η ⋆ fa) = r-1[fa] ⋅ l[fa]"
proof -
let ?u = "trg f ⋆ trg f"
let ?w = "src f ⋆ fa"
let ?w' = "fa ⋆ trg f"
let ?θ = "(ε ⋆ ε) ⋅ a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa]) ⋅ (f ⋆ η ⋆ fa)"
let ?θ' = "(ε ⋆ trg f) ⋅ a-1[f, fa, trg f]"
let ?β = "g ⋆ r-1[fa] ⋅ l[fa]"
let ?γ = "r-1[fa] ⋅ l[fa]"
let ?γ' = "(fa ⋆ ε) ⋅ a[fa, f, fa] ⋅ (η ⋆ fa)"
have θ_eq': "?θ = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅ (l-1[f] ⋅ r[f] ⋆ fa) ⋅ a-1[f, src f, fa]"
proof -
have "?θ = (trg f ⋆ ε) ⋅ (ε ⋆ f ⋆ fa) ⋅
(a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa])) ⋅ (f ⋆ η ⋆ fa)"
using interchange [of "trg f" ε ε "f ⋆ fa"] comp_arr_dom comp_cod_arr comp_assoc
by (simp add: ε)
also have "... = (trg f ⋆ ε) ⋅ (ε ⋆ f ⋆ fa) ⋅
(a[f ⋆ fa, f, fa] ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa]) ⋅
(f ⋆ η ⋆ fa)"
proof -
have "a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa]) =
a[f ⋆ fa, f, fa] ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa]"
proof -
have "(a[f ⋆ fa, f, fa] ⋅ ((a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa])) ⋅
(f ⋆ a-1[fa, f, fa]) =
a-1[f, fa, f ⋆ fa]"
using 1 2 ‹ide fa› ide_leg0 iso_assoc
invert_side_of_triangle(1)
[of "((a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa]) ⋅ (f ⋆ a-1[fa, f, fa])"
"a-1[f ⋆ fa, f, fa]" "a-1[f, fa, f ⋆ fa]"]
pentagon' comp_assoc by auto
hence "(a[f ⋆ fa, f, fa] ⋅ ((a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa])) =
a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa])"
using 1 2 ‹ide fa›
invert_side_of_triangle(2)
[of "a-1[f, fa, f ⋆ fa]" "a[f ⋆ fa, f, fa] ⋅ ((a-1[f, fa, f] ⋆ fa) ⋅
a-1[f, fa ⋆ f, fa])"
"f ⋆ a-1[fa, f, fa]"]
by auto
thus ?thesis
using comp_assoc by simp
qed
thus ?thesis by simp
qed
also have "... = (trg f ⋆ ε) ⋅ ((ε ⋆ f ⋆ fa) ⋅ a[f ⋆ fa, f, fa]) ⋅ (a-1[f, fa, f] ⋆ fa) ⋅
a-1[f, fa ⋆ f, fa] ⋅ (f ⋆ η ⋆ fa)"
using comp_assoc by simp
also have "... = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅
((ε ⋆ f) ⋅ a-1[f, fa, f] ⋅ (f ⋆ η) ⋆ fa) ⋅
a-1[f, src f, fa]"
proof -
have "((ε ⋆ f ⋆ fa) ⋅ a[f ⋆ fa, f, fa] ⋅ (a-1[f, fa, f] ⋆ fa) ⋅
a-1[f, fa ⋆ f, fa]) ⋅ (f ⋆ η ⋆ fa) =
(a[trg f, f, fa] ⋅ ((ε ⋆ f) ⋆ fa)) ⋅ (a-1[f, fa, f] ⋆ fa) ⋅
((f ⋆ η) ⋆ fa) ⋅ a-1[f, src f, fa]"
using assoc_naturality [of ε f fa] assoc'_naturality [of f η fa]
by (simp add: 2 ε η ‹ide fa› comp_assoc)
also have "... = a[trg f, f, fa] ⋅
(((ε ⋆ f) ⋆ fa) ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ ((f ⋆ η) ⋆ fa)) ⋅
a-1[f, src f, fa]"
using comp_assoc by simp
also have "... = a[trg f, f, fa] ⋅
((ε ⋆ f) ⋅ a-1[f, fa, f] ⋅ (f ⋆ η) ⋆ fa) ⋅
a-1[f, src f, fa]"
using η' comp_assoc whisker_right ‹ide fa› null_is_zero(2) ide_leg0 ext
runit_simps(1)
by metis
finally show ?thesis
using comp_assoc by simp
qed
also have "... = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅ (l-1[f] ⋅ r[f] ⋆ fa) ⋅ a-1[f, src f, fa]"
using * by simp
finally show ?thesis by simp
qed
have θ_eq: "?θ = (ε ⋆ trg f) ⋅ a-1[f, fa, src fa] ⋅ (f ⋆ ?γ)"
proof -
have "?θ = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅ (l-1[f] ⋅ r[f] ⋆ fa) ⋅ a-1[f, src f, fa]"
using θ_eq' by simp
also have "... =
(trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅ (l-1[f] ⋆ fa) ⋅ (r[f] ⋆ fa) ⋅ a-1[f, src f, fa]"
using ‹ide fa› whisker_right comp_assoc by auto
also have "... = (trg f ⋆ ε) ⋅ ((a[trg f, f, fa] ⋅ (a-1[trg f, f, fa]) ⋅ l-1[f ⋆ fa])) ⋅
(f ⋆ l[fa])"
using 2 ‹ide fa› lunit_hcomp [of f fa] invert_side_of_triangle(2) triangle'
comp_assoc
by auto
also have "... = (trg f ⋆ ε) ⋅ l-1[f ⋆ fa] ⋅ (f ⋆ l[fa])"
using fa 2 comp_cod_arr iso_assoc comp_arr_inv lunit_hcomp(2) lunit_hcomp(4)
ide_leg0 leg1_simps(3)
by metis
also have "... = l-1[trg f] ⋅ ε ⋅ (f ⋆ l[fa])"
using ε lunit'_naturality comp_assoc by metis
also have "... = r-1[trg f] ⋅ ε ⋅ (f ⋆ l[fa])"
using unitor_coincidence by simp
also have "... = (ε ⋆ trg f) ⋅ r-1[f ⋆ fa] ⋅ (f ⋆ l[fa])"
using ε runit'_naturality comp_assoc by metis
also have "... = (ε ⋆ trg f) ⋅ a-1[f, fa, src fa] ⋅ (f ⋆ r-1[fa]) ⋅ (f ⋆ l[fa])"
using 2 ‹ide fa› runit_hcomp(2) comp_assoc by auto
also have "... = (ε ⋆ trg f) ⋅ a-1[f, fa, src fa] ⋅ (f ⋆ ?γ)"
using 2 ‹ide fa› whisker_left by simp
finally show ?thesis by simp
qed
have θ: "«?θ : f ⋆ ?w → ?u¬"
using 1 2 ‹ide fa› η_in_hom ε by fastforce
have θ': "«?θ' : f ⋆ ?w' → ?u¬"
using fa 1 2 ε by auto
have ww': "ide ?w ∧ ide ?w'"
by (simp add: 1 2 ‹ide fa›)
have "∃!γ. «γ : ?w → ?w'¬ ∧ ?β = g ⋆ γ ∧ ?θ = ?θ' ⋅ (f ⋆ γ)"
proof -
have "«?β : g ⋆ ?w → g ⋆ ?w'¬"
using ‹ide fa› 1 2 by auto
moreover have "composite_cell ?w ?θ = composite_cell ?w' ?θ' ⋅ ?β"
proof -
have "composite_cell ?w' ?θ' ⋅ ?β =
composite_cell ?w ((ε ⋆ trg f) ⋅ a-1[f, fa, src fa] ⋅ (f ⋆ r-1[fa] ⋅ l[fa]))"
proof -
have "a[r, f, fa ⋆ trg f] ⋅ (ρ ⋆ fa ⋆ trg f) ⋅ (g ⋆ r-1[fa] ⋅ l[fa]) =
composite_cell ?w (f ⋆ r-1[fa] ⋅ l[fa])"
proof -
have "a[r, f, fa ⋆ trg f] ⋅ (ρ ⋆ fa ⋆ trg f) ⋅ (g ⋆ r-1[fa] ⋅ l[fa]) =
(a[r, f, fa ⋆ trg f] ⋅ ((r ⋆ f) ⋆ r-1[fa] ⋅ l[fa])) ⋅ (ρ ⋆ src f ⋆ fa)"
proof -
have "(ρ ⋆ fa ⋆ trg f) ⋅ (g ⋆ r-1[fa] ⋅ l[fa]) = ρ ⋆ r-1[fa] ⋅ l[fa]"
using interchange [of ρ g "fa ⋆ trg f" "r-1[fa] ⋅ l[fa]"]
comp_arr_dom comp_cod_arr 1 2 ‹ide fa›
by simp
also have "... = ((r ⋆ f) ⋆ r-1[fa] ⋅ l[fa]) ⋅ (ρ ⋆ src f ⋆ fa)"
proof -
have "seq (fa ⋆ trg f) (r-1[fa] ⋅ l[fa])"
using fa 1 2 ww' by auto
thus ?thesis
using interchange comp_arr_dom comp_cod_arr 1 2 ‹ide fa›
by (metis ww' comp_ide_arr dom_comp leg1_simps(3)
lunit_simps(4) tab_simps(1) tab_simps(5))
qed
finally show ?thesis
using comp_assoc by simp
qed
also have "... = composite_cell ?w (f ⋆ r-1[fa] ⋅ l[fa])"
using assoc_naturality [of r f "r-1[fa] ⋅ l[fa]"] 1 2 ‹ide fa› comp_assoc by simp
finally show ?thesis by simp
qed
hence "composite_cell ?w' ?θ' ⋅ ?β =
((r ⋆ (ε ⋆ trg f) ⋅ a-1[f, fa, trg f]) ⋅ (r ⋆ f ⋆ r-1[fa] ⋅ l[fa])) ⋅
a[r, f, src f ⋆ fa] ⋅ (ρ ⋆ src f ⋆ fa)"
using comp_assoc by simp
also have
"... = composite_cell ?w (((ε ⋆ trg f) ⋅ a-1[f, fa, trg f]) ⋅ (f ⋆ r-1[fa] ⋅ l[fa]))"
using whisker_left 1 2 ‹ide fa› ide_base
by (metis ‹«(ε ⋆ ε) ⋅ a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa]) ⋅ (f ⋆ η ⋆ fa) :
f ⋆ src f ⋆ fa → trg f ⋆ trg f¬›
θ_eq arrI comp_assoc)
finally show ?thesis
using comp_assoc by (simp add: "1")
qed
also have "... = composite_cell ?w ?θ"
using θ_eq by simp
finally show ?thesis by simp
qed
ultimately show ?thesis
using ww' θ θ' T2 [of ?w ?w' ?θ ?u ?θ' ?β] comp_assoc by metis
qed
moreover have "«?γ : ?w → ?w'¬ ∧ ?β = g ⋆ ?γ ∧ ?θ = ?θ' ⋅ (f ⋆ ?γ)"
using 1 2 ‹ide fa› θ_eq comp_assoc by auto
moreover have "«?γ' : ?w → ?w'¬ ∧ ?β = g ⋆ ?γ' ∧ ?θ = ?θ' ⋅ (f ⋆ ?γ')"
proof (intro conjI)
show "«?γ' : ?w → ?w'¬"
using 1 2 fa η_in_hom ε_in_hom by fastforce
show "?β = g ⋆ ?γ'"
text ‹
This equation is not immediate.
To show it, we have to recall the properties from the construction of ‹ε› and ‹η›.
Use the property of ‹η› to replace ‹g ⋆ η ⋆ fa› by a 2-cell involving
‹ε›, ‹ρ›, and ‹ν›.
Use the property ‹(r ⋆ ε) ⋅ (ρ ⋆ fa) ⋅ ν = r[r]› from the construction of ‹ε› to
eliminate ‹ε› and ‹ρ› in favor of inv ‹ν› and canonical isomorphisms.
Cancelling ‹ν› and inv ‹ν› leaves the canonical 2-cell ‹g ⋆ r-1[fa] ⋅ l[fa]›.
›
proof -
have "g ⋆ ?γ' = (g ⋆ fa ⋆ ε) ⋅ (g ⋆ a[fa, f, fa]) ⋅ (g ⋆ η ⋆ fa)"
using 1 2 ‹ide fa› ε η whisker_left
by (metis ‹«?γ' : ?w → ?w'¬› arrI ide_leg1 seqE)
also have "... = (g ⋆ fa ⋆ ε) ⋅ (g ⋆ a[fa, f, fa]) ⋅ (g ⋆ η ⋆ fa) ⋅
a[g, src f, fa] ⋅ a-1[g, src f, fa]"
using 1 2 ‹ide fa› η comp_arr_dom hseq_char comp_assoc_assoc'
by simp
also have "... = (g ⋆ fa ⋆ ε) ⋅ (g ⋆ a[fa, f, fa]) ⋅ ((g ⋆ η ⋆ fa) ⋅
a[g, src f, fa]) ⋅ a-1[g, src f, fa]"
using comp_assoc by simp
also have "... = (g ⋆ fa ⋆ ε) ⋅ (g ⋆ a[fa, f, fa]) ⋅
(a[g, fa ⋆ f, fa] ⋅ ((g ⋆ η) ⋆ fa)) ⋅ a-1[g, src f, fa]"
using 1 2 ‹ide fa› ε η assoc_naturality [of g η fa] by simp
also have "... = (g ⋆ fa ⋆ ε) ⋅ (g ⋆ a[fa, f, fa]) ⋅ a[g, fa ⋆ f, fa] ⋅
(a[g, fa, f] ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
using η' comp_assoc by simp
also have "... = (g ⋆ fa ⋆ ε) ⋅
((g ⋆ a[fa, f, fa]) ⋅ a[g, fa ⋆ f, fa] ⋅ (a[g, fa, f] ⋆ fa)) ⋅
((ν ⋆ f) ⋆ fa) ⋅ (ρ ⋆ fa) ⋅ (r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
proof -
have "a[g, fa, f] ⋅ (ν ⋆ f) ⋅ ρ ⋅ r[g] ⋆ fa =
(a[g, fa, f] ⋆ fa) ⋅ ((ν ⋆ f) ⋆ fa) ⋅ (ρ ⋆ fa) ⋅ (r[g] ⋆ fa)"
using 1 2 ‹ide fa› β ε η whisker_right by (metis arrI seqE)
thus ?thesis
using comp_assoc by simp
qed
also have "... = ((g ⋆ fa ⋆ ε) ⋅
a[g, fa, f ⋆ fa]) ⋅ (a[g ⋆ fa, f, fa] ⋅
((ν ⋆ f) ⋆ fa)) ⋅ (ρ ⋆ fa) ⋅ (r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
using 1 2 ‹ide fa› pentagon comp_assoc by simp
also have "... = (a[g, fa, trg f] ⋅ ((g ⋆ fa) ⋆ ε)) ⋅
((ν ⋆ f ⋆ fa) ⋅ a[r, f, fa]) ⋅
(ρ ⋆ fa) ⋅ (r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
using 1 2 ‹ide fa› assoc_naturality [of g fa ε] assoc_naturality [of ν f fa]
by (simp add: ε ν)
also have "... = a[g, fa, trg f] ⋅ (((g ⋆ fa) ⋆ ε) ⋅ (ν ⋆ f ⋆ fa)) ⋅ a[r, f, fa] ⋅
(ρ ⋆ fa) ⋅ (r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
using 1 2 ‹ide fa› assoc_naturality [of g fa ε] assoc_naturality [of ν f fa]
comp_assoc
by simp
also have "... = a[g, fa, trg f] ⋅ (ν ⋆ trg f) ⋅
composite_cell fa ε ⋅
(r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
proof -
have "((g ⋆ fa) ⋆ ε) ⋅ (ν ⋆ f ⋆ fa) = ν ⋆ ε"
using 1 2 ‹ide fa› ν ε interchange [of "g ⋆ fa" ν ε "f ⋆ fa"]
comp_arr_dom comp_cod_arr
by simp
also have "... = (ν ⋆ trg f) ⋅ (r ⋆ ε)"
using ‹ide fa› ν ε interchange [of ν r "trg f" ε] comp_arr_dom comp_cod_arr
by simp
finally show ?thesis
using comp_assoc by simp
qed
also have "... = a[g, fa, trg f] ⋅ ((((ν ⋆ trg f) ⋅ r-1[r]) ⋅ inv ν) ⋅ (r[g] ⋆ fa)) ⋅
a-1[g, src f, fa]"
using ide_base fa' comp_assoc fa runit'_simps(1) invert_side_of_triangle(2)
comp_assoc
by presburger
also have "... = a[g, fa, trg f] ⋅ r-1[g ⋆ fa] ⋅ (r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
proof -
have "((ν ⋆ trg f) ⋅ r-1[r]) ⋅ inv ν = r-1[g ⋆ fa]"
using 1 2 ‹ide fa› ν ide_base runit'_naturality [of ν] comp_arr_dom
by (metis fa ide_compE inv_is_inverse inverse_arrowsE comp_assoc
runit'_simps(1) runit'_simps(4))
thus ?thesis
using comp_assoc by simp
qed
also have "... = ((a[g, fa, trg f] ⋅ a-1[g, fa, src fa]) ⋅
(g ⋆ r-1[fa])) ⋅ (r[g] ⋆ fa) ⋅ a-1[g, src f, fa]"
using fa "2" runit_hcomp ‹ide fa› comp_assoc by simp
also have "... = (g ⋆ r-1[fa]) ⋅ (g ⋆ l[fa])"
using 1 2 comp_cod_arr ‹ide fa› comp_assoc_assoc' triangle' by simp
also have "... = ?β"
using 2 ‹ide fa› whisker_left by simp
finally show ?thesis by simp
qed
show "?θ = ?θ' ⋅ (f ⋆ ?γ')"
proof -
have "((ε ⋆ trg f) ⋅ a-1[f, fa, trg f]) ⋅ (f ⋆ (fa ⋆ ε) ⋅ a[fa, f, fa] ⋅ (η ⋆ fa)) =
((ε ⋆ trg f) ⋅ a-1[f, fa, trg f]) ⋅ (f ⋆ fa ⋆ ε) ⋅ (f ⋆ a[fa, f, fa]) ⋅ (f ⋆ η ⋆ fa)"
using 1 2 ‹ide fa› ε η whisker_left
by (metis ‹«(fa ⋆ ε) ⋅ a[fa, f, fa] ⋅ (η ⋆ fa) : src f ⋆ fa → fa ⋆ trg f¬›
arrI ide_leg0 seqE)
also have
"... = (ε ⋆ trg f) ⋅ (a-1[f, fa, trg f] ⋅ (f ⋆ fa ⋆ ε)) ⋅ (f ⋆ a[fa, f, fa]) ⋅ (f ⋆ η ⋆ fa)"
using comp_assoc by simp
also have "... = ((ε ⋆ trg f) ⋅ ((f ⋆ fa) ⋆ ε)) ⋅
a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa]) ⋅
(f ⋆ η ⋆ fa)"
using 1 2 ‹ide fa› ε assoc'_naturality [of f fa ε] comp_assoc by simp
also have "... = (trg f ⋆ ε) ⋅ (ε ⋆ f ⋆ fa) ⋅
(a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa])) ⋅
(f ⋆ η ⋆ fa)"
using 1 2 ‹ide fa› ε interchange [of ε "f ⋆ fa" "trg f" ε]
interchange [of "trg f" ε ε "f ⋆ fa"] comp_arr_dom comp_cod_arr comp_assoc
by simp
also have "... = (trg f ⋆ ε) ⋅ ((ε ⋆ f ⋆ fa) ⋅
(a[f ⋆ fa, f, fa]) ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ (a-1[f, fa ⋆ f, fa]) ⋅
(f ⋆ η ⋆ fa))"
proof -
have "a-1[f, fa, f ⋆ fa] ⋅ (f ⋆ a[fa, f, fa]) =
a[f ⋆ fa, f, fa] ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa]"
proof -
have A: "(a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa] ⋅ (f ⋆ a-1[fa, f, fa]) =
a-1[f ⋆ fa, f, fa] ⋅ a-1[f, fa, f ⋆ fa]"
using 1 2 ‹ide fa› pentagon' comp_assoc by fastforce
hence B: "a[f ⋆ fa, f, fa] ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa] ⋅
(f ⋆ a-1[fa, f, fa]) =
a-1[f, fa, f ⋆ fa]"
using A 1 2 ‹ide fa›
invert_side_of_triangle(1)
[of "(a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa] ⋅ (f ⋆ a-1[fa, f, fa])"
"a-1[f ⋆ fa, f, fa]" "a-1[f, fa, f ⋆ fa]"]
by auto
show ?thesis
proof -
have C: "iso (f ⋆ a-1[fa, f, fa])"
using 1 2 ‹ide fa› by simp
moreover have "inv (f ⋆ a-1[fa, f, fa]) = f ⋆ a[fa, f, fa]"
using C 1 2 ‹ide fa› by fastforce
ultimately show ?thesis
using B 1 2 ‹ide fa› comp_assoc
invert_side_of_triangle(2)
[of "a-1[f, fa, f ⋆ fa]"
"a[f ⋆ fa, f, fa] ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ a-1[f, fa ⋆ f, fa]"
"f ⋆ a-1[fa, f, fa]"]
by simp
qed
qed
thus ?thesis
using comp_assoc by simp
qed
also have "... = (trg f ⋆ ε) ⋅ (a[trg f, f, fa] ⋅
((ε ⋆ f) ⋆ fa)) ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ ((f ⋆ η) ⋆ fa) ⋅
a-1[f, src f, fa]"
using 1 2 ‹ide fa› ‹ide f› η ε assoc_naturality [of ε f fa]
assoc'_naturality [of f η fa] comp_assoc
by simp
also have "... = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅
(((ε ⋆ f) ⋆ fa) ⋅ (a-1[f, fa, f] ⋆ fa) ⋅ ((f ⋆ η) ⋆ fa)) ⋅
a-1[f, src f, fa]"
using comp_assoc by simp
also have "... = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅
((ε ⋆ f) ⋅ a-1[f, fa, f] ⋅ (f ⋆ η) ⋆ fa) ⋅
a-1[f, src f, fa]"
using 1 2 ‹ide fa› ‹ide f› η ε whisker_right
by (metis (full_types) * θ θ_eq' arrI hseqE seqE)
also have "... = (trg f ⋆ ε) ⋅ a[trg f, f, fa] ⋅ (l-1[f] ⋅ r[f] ⋆ fa) ⋅ a-1[f, src f, fa]"
using * by simp
also have "... = ?θ"
using θ_eq' by simp
finally show ?thesis by simp
qed
qed
ultimately show "?γ' = ?γ" by blast
qed
qed
thus ?thesis
using adjoint_pair_def by auto
qed
sublocale tabulation_data_with_T0
using satisfies_T0 by (unfold_locales, simp)
sublocale narrow_tabulation
using adjoint_pair_antipar(1) T1 T2
by (unfold_locales, auto)
end
text ‹
A tabulation ‹(f, ρ, g)› of ‹r› yields an isomorphism ‹«ψ : g ⋆ f* → r¬›
via adjoint transpose.
The proof requires ‹T0›, in order to obtain ‹ψ› as the transpose of ‹«ρ : g → r ⋆ f¬›.
However, it uses only the weaker versions of ‹T1› and ‹T2›.
›
context narrow_tabulation
begin
interpretation E: self_evaluation_map V H a i src trg ..
notation E.eval (‹{_}›)
text ‹
The following is CKS Proposition 1(d), with the statement refined to incorporate
the canonical isomorphisms that they omit.
Note that we can easily show using ‹T1› that there is some 1-cell ‹fa› and isomorphism ‹ψ›
such that ‹«ψ : f ⋆ fa → r¬› (this was already part of the proof that a tabulation
satisfies ‹T0›). The more difficult content in the present result is that we may
actually take ‹fa› to be the left adjoint ‹f*› of ‹f›.
›
lemma yields_isomorphic_representation:
shows "«T0.trnr\ε r ρ : g ⋆ f* → r¬" and "iso (T0.trnr\ε r ρ)"
proof -
text ‹
As stated in CKS, the first step of the proof is:
\begin{quotation}
``Apply ‹T1› with ‹X = A›, ‹u = 1A›, ‹v = r›, ‹ψ = 1R›, to obtain ‹f'›, ‹θ': ff' → 1A›,
‹ν : r ≃ g f'› with ‹1R = (rθ')(ρf')ν›.''
\end{quotation}
In our nomenclature: ‹X = trg f›, ‹u = trg f›, ‹v = r›, but ‹ψ = src f›
does not make any sense, since we need ‹«ψ : v → r ⋆ u¬›. We have to take ‹ψ = r-1[r]›.
It is not clear whether this is a typo, or whether it is a consequence of CKS having
suppressed all canonical isomorphisms (unitors, in this case). The resulting equation
obtained via T1 is:
\[
‹r-1[r] = (r ⋆ θ') ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν›,
\]
which has ‹r-1[r]› on the left-hand side, rather than ‹1R›, as in CKS.
Also, we have inserted the omitted associativity.
›
obtain w θ' ν where wθ'ν: "ide w ∧ «θ' : f ⋆ w → src r¬ ∧ «ν : r → g ⋆ w¬ ∧ iso ν ∧
composite_cell w θ' ⋅ ν = r-1[r]"
using ide_base obj_is_self_adjoint T1 [of "src r" "r-1[r]"] comp_assoc by auto
interpret uwθψν V H a i src trg r ρ f g ‹src r› w θ' ‹r-1[r]› ν
using ide_base tab_in_hom wθ'ν comp_assoc by (unfold_locales, auto)
text ‹
CKS now say:
\begin{quotation}
``Apply ‹T2› with ‹u = 1A›, ‹w = f*›, ‹w' = f'›, ‹θ = ε: ff* → 1›, ‹θ': ff' → 1›,
‹β = ν(rε)(ρf*)› to obtain ‹γ : f* → f'› with ‹gγ = ν(rε)(ρf*)ε = θ'(fγ).›''
\end{quotation}
The last equation is mysterious, but upon consideration one eventually realizes
that it is definitely a typo, and what is meant is ``‹gγ = ν(rε)(ρf*)›, ‹ε = θ'(fγ)›''.
So, we take ‹u = trg f›, ‹w = f*›, ‹w' = w›, ‹θ'› as obtained from ‹T1›, ‹θ = ε›,
and ‹β = ν ⋅ r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, f*] ⋅ (ρ ⋆ f*)›.
(CKS mention neither the unitor term ‹r[r]› nor the associativity ‹a[r, f, f*]›
which are required for the expression for ‹β› to make sense.)
›
let ?ψ = "r[r] ⋅ composite_cell f* ε"
show ψ_in_hom: "«T0.trnr\ε r ρ : g ⋆ f* → r¬"
using ide_base T0.trnr\<epsilon>_def rep_in_hom by simp
have A: "«ν ⋅ ?ψ : g ⋆ f* → g ⋆ w¬"
using ide_base T0.antipar hseq_char T0.trnr\<epsilon>_def rep_in_hom wθ'ν
apply (intro comp_in_homI') by auto
have B: "composite_cell f* ε = composite_cell w θ' ⋅ ν ⋅ ?ψ"
using ide_base T0.antipar wθ'ν comp_assoc
by (metis A arrI invert_side_of_triangle(1) iso_runit)
obtain γ where γ: "«γ : f* → w¬ ∧ ν ⋅ ?ψ = g ⋆ γ ∧ ε = θ' ⋅ (f ⋆ γ)"
using A B T0.counit_in_hom obj_is_self_adjoint T0.antipar comp_assoc
T2 [of "trg f" "f*" w ε θ' "ν ⋅ r[r] ⋅ composite_cell f* ε"]
by auto
have trg_γ_eq: "trg γ = trg w"
using γ by fastforce
text ‹
CKS say:
\begin{quotation}
``The last equation implies ‹γ: f* → f'› is a split monic (coretraction), while
the calculation:
\begin{eqnarray*}
‹(gγ)(gf*θ')(gηf')› &‹=›& ‹ν(rε)(ρf*)(gf*θ')(gηf')›\\
&‹=›& ‹ν(rε)(rff*θ')(ρf*ff')(gηf')›\\
&‹=›& ‹ν(rθ')(rεff')(rfηf')(ρf')›\\
&‹=›& ‹ν(rθ')(ρf') = 1gf'›,
\end{eqnarray*}
shows that ‹gγ› is a split epic. So ‹gγ = ν(rε)(ρf*): gf* → gf'› is invertible.
So ‹(rε)(ρf*) = ν-1(gγ)› is invertible.''
\end{quotation}
We carry out the indicated calculations, inserting where required the canonical
isomorphisms omitted by CKS. It is perhaps amusing to compare the four-line sketch
given by CKS with the formalization below, but note that we have carried out the
proof in full, with no hand waving about units or associativities.
›
have "section (g ⋆ γ)"
proof
have "(g ⋆ r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w] ⋅ (η ⋆ w) ⋅ l-1[w]) ⋅ (g ⋆ γ) = g ⋆ f*"
proof -
have "(r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w] ⋅ (η ⋆ w) ⋅ l-1[w]) ⋅ γ = f*"
proof -
have "(r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w] ⋅ (η ⋆ w) ⋅ l-1[w]) ⋅ γ =
(r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w] ⋅ (η ⋆ w)) ⋅ l-1[w] ⋅ γ"
using comp_assoc by auto
also have "... = (r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w]) ⋅ ((η ⋆ w) ⋅ (trg w ⋆ γ)) ⋅ l-1[f*]"
using γ trg_γ_eq lunit'_naturality [of γ] comp_assoc by auto
also have "... = r[f*] ⋅ (f* ⋆ θ') ⋅ (a[f*, f, w] ⋅ ((f* ⋆ f) ⋆ γ)) ⋅ (η ⋆ f*) ⋅ l-1[f*]"
proof -
have "(η ⋆ w) ⋅ (trg w ⋆ γ) = η ⋆ γ"
using A γ interchange comp_arr_dom comp_cod_arr
by (metis T0.unit_simps(1-2) comp_ide_arr seqI' uwθ w_in_hom(2) w_simps(4))
also have "... = ((f* ⋆ f) ⋆ γ) ⋅ (η ⋆ f*)"
using γ interchange comp_arr_dom comp_cod_arr T0.antipar T0.unit_simps(1,3)
in_homE
by metis
finally show ?thesis
using comp_assoc by simp
qed
also have "... = r[f*] ⋅ (f* ⋆ θ') ⋅ ((f* ⋆ f ⋆ γ) ⋅ a[f*, f, f*]) ⋅ (η ⋆ f*) ⋅ l-1[f*]"
using γ assoc_naturality [of "f*" f γ] trg_γ_eq T0.antipar by auto
also have "... = r[f*] ⋅ ((f* ⋆ ε) ⋅ a[f*, f, f*] ⋅ (η ⋆ f*)) ⋅ l-1[f*]"
using γ whisker_left trg_γ_eq T0.antipar comp_assoc by auto
also have "... = r[f*] ⋅ (r-1[f*] ⋅ l[f*]) ⋅ l-1[f*]"
using T0.triangle_right by simp
also have "... = f*"
using comp_assoc by (simp add: comp_arr_dom comp_arr_inv')
finally show ?thesis by blast
qed
thus ?thesis
using γ whisker_left [of g "r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w] ⋅ (η ⋆ w) ⋅ l-1[w]" γ]
T0.antipar
by simp
qed
thus "ide ((g ⋆ r[f*] ⋅ (f* ⋆ θ') ⋅ a[f*, f, w] ⋅ (η ⋆ w) ⋅ l-1[w]) ⋅ (g ⋆ γ))"
using T0.antipar by simp
qed
moreover have "retraction (g ⋆ γ)"
proof
have "«(g ⋆ γ) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅ (g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w]) :
g ⋆ w → g ⋆ w¬"
using γ T0.antipar hseq_char by force
hence **: "arr ((g ⋆ γ) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅
(g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w]))"
by auto
show "ide ((g ⋆ γ) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅
(g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w]))"
proof -
have "((g ⋆ γ) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅
(g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w])) =
g ⋆ w"
proof -
have "((g ⋆ γ) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅
(g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w])) =
ν ⋅ r[r] ⋅ ((r ⋆ r[src f*]) ⋅ (r ⋆ src f* ⋆ θ') ⋅ (r ⋆ a[src f*, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
(ρ ⋆ trg w ⋆ w)) ⋅ (g ⋆ l-1[w])"
proof -
have "(g ⋆ γ) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅
(g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w]) =
(ν ⋅ r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, f*] ⋅ (ρ ⋆ f*)) ⋅
(g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') ⋅ (g ⋆ a[f*, f, w]) ⋅
(g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w])"
using γ by auto
also have "... =
ν ⋅ r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, f*] ⋅
((ρ ⋆ f*) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ')) ⋅
(g ⋆ a[f*, f, w]) ⋅ (g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w])"
using comp_assoc by simp
also have "... = ν ⋅ r[r] ⋅ (r ⋆ ε) ⋅ a[r, f, f*] ⋅
(((r ⋆ f) ⋆ r[f*]) ⋅ ((r ⋆ f) ⋆ f* ⋆ θ') ⋅ (ρ ⋆ f* ⋆ f ⋆ w)) ⋅
(g ⋆ a[f*, f, w]) ⋅ (g ⋆ η ⋆ w) ⋅ (g ⋆ l-1[w])"
proof -
have "(ρ ⋆ f*) ⋅ (g ⋆ r[f*]) ⋅ (g ⋆ f* ⋆ θ') =
((r ⋆ f) ⋆ r[f*]) ⋅ (ρ ⋆ f* ⋆ src f*) ⋅ (g ⋆ f* ⋆ θ')"
proof -
have "(ρ ⋆ f*) ⋅ (g ⋆ r[f*]) = ((r ⋆ f) ⋆ r[f*]) ⋅ (ρ ⋆ f* ⋆ src f*)"
using tab_in_hom comp_arr_dom comp_cod_arr T0.antipar(1) interchange
by (metis T0.ide_right in_homE runit_simps(1,4-5))
thus ?thesis
by (metis comp_assoc)
qed
also have "... = ((r ⋆ f) ⋆ r[f*]) ⋅ (ρ ⋆ f* ⋆ θ')"
using comp_arr_dom comp_cod_arr T0.antipar
interchange [of ρ g "f* ⋆ src f*" "f* ⋆ θ'"]
by simp
also have "... = ((r ⋆ f) ⋆ r[f*]) ⋅ ((r ⋆ f) ⋆ f* ⋆ θ') ⋅ (ρ ⋆ f* ⋆ f ⋆ w)"
using comp_arr_dom comp_cod_arr T0.antipar
interchange [of "r ⋆ f" ρ "f* ⋆ θ'" "f* ⋆ f ⋆ w"]
by simp
finally show ?thesis by simp
qed
also have "... =
ν ⋅ r[r] ⋅
((r ⋆ ε) ⋅ a[r, f, f*] ⋅ ((r ⋆ f) ⋆ r[f*]) ⋅ ((r ⋆ f) ⋆ f* ⋆ θ')) ⋅
((ρ ⋆ f* ⋆ f ⋆ w) ⋅ (g ⋆ a[f*, f, w]) ⋅ (g ⋆ η ⋆ w)) ⋅
(g ⋆ l-1[w])"
using comp_assoc by simp
also have "... = ν ⋅ r[r] ⋅
((r ⋆ r[src f*]) ⋅ (r ⋆ src f* ⋆ θ') ⋅ (r ⋆ ε ⋆ f ⋆ w) ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]) ⋅
(((r ⋆ f) ⋆ a[f*, f, w]) ⋅ ((r ⋆ f) ⋆ η ⋆ w) ⋅ (ρ ⋆ trg w ⋆ w)) ⋅
(g ⋆ l-1[w])"
proof -
have 1: "(r ⋆ ε) ⋅ a[r, f, f*] ⋅ ((r ⋆ f) ⋆ r[f*]) ⋅ ((r ⋆ f) ⋆ f* ⋆ θ') =
(r ⋆ r[src f*]) ⋅ (r ⋆ src f* ⋆ θ') ⋅ (r ⋆ ε ⋆ f ⋆ w) ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]"
proof -
have "(r ⋆ ε) ⋅ a[r, f, f*] ⋅ ((r ⋆ f) ⋆ r[f*]) ⋅ ((r ⋆ f) ⋆ f* ⋆ θ') =
(r ⋆ ε) ⋅ (r ⋆ f ⋆ r[f*]) ⋅ a[r, f, f* ⋆ src f*] ⋅ ((r ⋆ f) ⋆ f* ⋆ θ')"
proof -
have "a[r, f, f*] ⋅ ((r ⋆ f) ⋆ r[f*]) = (r ⋆ f ⋆ r[f*]) ⋅ a[r, f, f* ⋆ src f*]"
using assoc_naturality [of r f "r[f*]"] T0.antipar by auto
thus ?thesis
using comp_assoc by metis
qed
also have "... = (r ⋆ ε) ⋅ (r ⋆ f ⋆ r[f*]) ⋅ (r ⋆ f ⋆ f* ⋆ θ') ⋅
a[r, f, f* ⋆ f ⋆ w]"
using assoc_naturality [of r f "f* ⋆ θ'"] T0.antipar by fastforce
also have "... = (r ⋆ r[src f*]) ⋅ (r ⋆ ε ⋆ src f*) ⋅ (r ⋆ a-1[f, f*, src f*]) ⋅
(r ⋆ f ⋆ f* ⋆ θ') ⋅ a[r, f, f* ⋆ f ⋆ w]"
proof -
have "(r ⋆ ε) ⋅ (r ⋆ f ⋆ r[f*]) =
(r ⋆ r[src f*]) ⋅ (r ⋆ ε ⋆ src f*) ⋅ (r ⋆ a-1[f, f*, src f*])"
proof -
have "(r ⋆ ε) ⋅ (r ⋆ f ⋆ r[f*]) = r ⋆ (ε ⋅ (f ⋆ r[f*]))"
using whisker_left T0.antipar by simp
also have "... =
(r ⋆ r[src f*]) ⋅ (r ⋆ ε ⋆ src f*) ⋅ (r ⋆ a-1[f, f*, src f*])"
proof -
have "ε ⋅ (f ⋆ r[f*]) = r[src f*] ⋅ (ε ⋆ src f*) ⋅ a-1[f, f*, src f*]"
using ide_leg0 T0.antipar runit_hcomp invert_side_of_triangle(2)
runit_naturality comp_assoc
by (metis (no_types, lifting) T0.counit_simps(1-4) T0.ide_right)
thus ?thesis
using whisker_left T0.antipar by simp
qed
finally show ?thesis by simp
qed
thus ?thesis using comp_assoc by metis
qed
also have "... =
(r ⋆ r[src f*]) ⋅ (r ⋆ ε ⋆ src f*) ⋅
((r ⋆ a-1[f, f*, src f*]) ⋅ (r ⋆ f ⋆ f* ⋆ θ')) ⋅
a[r, f, f* ⋆ f ⋆ w]"
using comp_assoc by simp
also have "... = (r ⋆ r[src f*]) ⋅ (r ⋆ ε ⋆ src f*) ⋅
((r ⋆ (f ⋆ f*) ⋆ θ') ⋅ (r ⋆ a-1[f, f*, f ⋆ w])) ⋅
a[r, f, f* ⋆ f ⋆ w]"
proof -
have "(r ⋆ a-1[f, f*, src f*]) ⋅ (r ⋆ f ⋆ f* ⋆ θ') =
(r ⋆ (f ⋆ f*) ⋆ θ') ⋅ (r ⋆ a-1[f, f*, f ⋆ w])"
proof -
have "(r ⋆ a-1[f, f*, src f*]) ⋅ (r ⋆ f ⋆ f* ⋆ θ') =
r ⋆ a-1[f, f*, src f*] ⋅ (f ⋆ f* ⋆ θ')"
using whisker_left T0.antipar by simp
also have "... = r ⋆ ((f ⋆ f*) ⋆ θ') ⋅ a-1[f, f*, f ⋆ w]"
using assoc'_naturality [of f "f*" θ'] T0.antipar by auto
also have "... = (r ⋆ (f ⋆ f*) ⋆ θ') ⋅ (r ⋆ a-1[f, f*, f ⋆ w])"
using whisker_left T0.antipar by auto
finally show ?thesis by simp
qed
thus ?thesis by simp
qed
also have "... = (r ⋆ r[src f*]) ⋅ (r ⋆ ε ⋆ src f*) ⋅ (r ⋆ (f ⋆ f*) ⋆ θ') ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]"
using comp_assoc by simp
also have "... =
(r ⋆ r[src f*]) ⋅ ((r ⋆ ε ⋆ src f*) ⋅ (r ⋆ (f ⋆ f*) ⋆ θ')) ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]"
using comp_assoc by simp
also have "... = (r ⋆ r[src f*]) ⋅ ((r ⋆ src f* ⋆ θ') ⋅ (r ⋆ ε ⋆ f ⋆ w)) ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]"
proof -
have "(r ⋆ ε ⋆ src f*) ⋅ (r ⋆ (f ⋆ f*) ⋆ θ') =
(r ⋆ src f* ⋆ θ') ⋅ (r ⋆ ε ⋆ f ⋆ w)"
proof -
have "(r ⋆ ε ⋆ src f*) ⋅ (r ⋆ (f ⋆ f*) ⋆ θ') =
r ⋆ (ε ⋆ src f*) ⋅ ((f ⋆ f*) ⋆ θ')"
using whisker_left T0.antipar by simp
also have "... = r ⋆ ε ⋆ θ'"
using interchange [of ε "f ⋆ f*" "src f*" θ']
T0.antipar comp_arr_dom comp_cod_arr
by auto
also have "... = r ⋆ (src f* ⋆ θ') ⋅ (ε ⋆ f ⋆ w)"
using interchange [of "src f*" ε θ' "f ⋆ w"]
T0.antipar comp_arr_dom comp_cod_arr
by auto
also have "... = (r ⋆ src f* ⋆ θ') ⋅ (r ⋆ ε ⋆ f ⋆ w)"
using whisker_left T0.antipar by simp
finally show ?thesis by blast
qed
thus ?thesis by simp
qed
also have "... = (r ⋆ r[src f*]) ⋅ (r ⋆ src f* ⋆ θ') ⋅ (r ⋆ ε ⋆ f ⋆ w) ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]"
using comp_assoc by simp
finally show ?thesis by simp
qed
have 2: "(ρ ⋆ f* ⋆ f ⋆ w) ⋅ (g ⋆ a[f*, f, w]) ⋅ (g ⋆ η ⋆ w) =
((r ⋆ f) ⋆ a[f*, f, w]) ⋅ ((r ⋆ f) ⋆ η ⋆ w) ⋅ (ρ ⋆ trg w ⋆ w)"
proof -
have "(ρ ⋆ f* ⋆ f ⋆ w) ⋅ (g ⋆ a[f*, f, w]) ⋅ (g ⋆ η ⋆ w) =
((ρ ⋆ f* ⋆ f ⋆ w) ⋅ (g ⋆ a[f*, f, w])) ⋅ (g ⋆ η ⋆ w)"
using comp_assoc by simp
also have "... = (((r ⋆ f) ⋆ a[f*, f, w]) ⋅ (ρ ⋆ (f* ⋆ f) ⋆ w)) ⋅ (g ⋆ η ⋆ w)"
proof -
have "(ρ ⋆ f* ⋆ f ⋆ w) ⋅ (g ⋆ a[f*, f, w]) =
((r ⋆ f) ⋆ a[f*, f, w]) ⋅ (ρ ⋆ (f* ⋆ f) ⋆ w)"
proof -
have "(ρ ⋆ f* ⋆ f ⋆ w) ⋅ (g ⋆ a[f*, f, w]) =
ρ ⋅ g ⋆ (f* ⋆ f ⋆ w) ⋅ a[f*, f, w]"
using interchange T0.antipar by auto
also have "... = ρ ⋆ a[f*, f, w]"
using comp_arr_dom comp_cod_arr T0.antipar by auto
also have "... = (r ⋆ f) ⋅ ρ ⋆ a[f*, f, w] ⋅ ((f* ⋆ f) ⋆ w)"
using comp_arr_dom comp_cod_arr T0.antipar by auto
also have "... = ((r ⋆ f) ⋆ a[f*, f, w]) ⋅ (ρ ⋆ (f* ⋆ f) ⋆ w)"
using interchange T0.antipar by auto
finally show ?thesis by blast
qed
thus ?thesis by simp
qed
also have "... = ((r ⋆ f) ⋆ a[f*, f, w]) ⋅ (ρ ⋆ (f* ⋆ f) ⋆ w) ⋅ (g ⋆ η ⋆ w)"
using comp_assoc by simp
also have "... = ((r ⋆ f) ⋆ a[f*, f, w]) ⋅ ((r ⋆ f) ⋆ η ⋆ w) ⋅ (ρ ⋆ trg w ⋆ w)"
proof -
have "(ρ ⋆ (f* ⋆ f) ⋆ w) ⋅ (g ⋆ η ⋆ w) = ((r ⋆ f) ⋆ η ⋆ w) ⋅ (ρ ⋆ trg w ⋆ w)"
proof -
have "(ρ ⋆ (f* ⋆ f) ⋆ w) ⋅ (g ⋆ η ⋆ w) = ρ ⋅ g ⋆ (f* ⋆ f) ⋅ η ⋆ w ⋅ w"
proof -
have "«g ⋆ η ⋆ w : g ⋆ trg w ⋆ w → g ⋆ (f* ⋆ f) ⋆ w¬"
by (intro hcomp_in_vhom, auto)
thus ?thesis
using interchange whisker_right T0.antipar by auto
qed
also have "... = (r ⋆ f) ⋅ ρ ⋆ η ⋅ trg w ⋆ w ⋅ w"
using comp_arr_dom comp_cod_arr by auto
also have "... = ((r ⋆ f) ⋆ η ⋆ w) ⋅ (ρ ⋆ trg w ⋆ w)"
using interchange [of "r ⋆ f" ρ "η ⋆ w" "trg w ⋆ w"]
interchange [of η "trg w" w w]
comp_arr_dom comp_cod_arr T0.unit_in_hom
by auto
finally show ?thesis by simp
qed
thus ?thesis by simp
qed
finally show ?thesis by simp
qed
show ?thesis
using 1 2 by simp
qed
also have "... =
ν ⋅ r[r] ⋅
((r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ') ⋅
((r ⋆ a[src r, f, w]) ⋅ (r ⋆ (ε ⋆ f) ⋆ w) ⋅ (r ⋆ a-1[f ⋆ f*, f, w])) ⋅
(r ⋆ a-1[f, f*, f ⋆ w]) ⋅ a[r, f, f* ⋆ f ⋆ w]) ⋅
(((r ⋆ f) ⋆ a[f*, f, w]) ⋅
(a-1[r, f, (f* ⋆ f) ⋆ w] ⋅ (r ⋆ a[f, f* ⋆ f, w]) ⋅
(r ⋆ (f ⋆ η) ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w]) ⋅
(ρ ⋆ trg w ⋆ w)) ⋅ (g ⋆ l-1[w])"
proof -
have 3: "r ⋆ ε ⋆ f ⋆ w =
(r ⋆ a[src r, f, w]) ⋅ (r ⋆ (ε ⋆ f) ⋆ w) ⋅ (r ⋆ a-1[f ⋆ f*, f, w])"
proof -
have "r ⋆ ε ⋆ f ⋆ w =
((r ⋆ a[src r, f, w]) ⋅ (r ⋆ a-1[src r, f, w])) ⋅ (r ⋆ ε ⋆ f ⋆ w)"
using T0.antipar whisker_left [of r "a[src r, f, w]" "a-1[src r, f, w]"]
comp_cod_arr comp_assoc_assoc'
by simp
also have "... = (r ⋆ a[src r, f, w]) ⋅ (r ⋆ (ε ⋆ f) ⋆ w) ⋅
(r ⋆ a-1[f ⋆ f*, f, w])"
using assoc'_naturality [of ε f w]
whisker_left [of r "a-1[src r, f, w]" "ε ⋆ f ⋆ w"]
whisker_left comp_assoc T0.antipar
by simp
finally show ?thesis
using T0.antipar by simp
qed
have 4: "(r ⋆ f) ⋆ η ⋆ w =
a-1[r, f, (f* ⋆ f) ⋆ w] ⋅ (r ⋆ a[f, f* ⋆ f, w]) ⋅
(r ⋆ (f ⋆ η) ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w]"
proof -
have "(r ⋆ f) ⋆ η ⋆ w =
(a-1[r, f, (f* ⋆ f) ⋆ w] ⋅
((r ⋆ a[f, f* ⋆ f, w]) ⋅ (r ⋆ a-1[f, f* ⋆ f, w])) ⋅
a[r, f, (f* ⋆ f) ⋆ w]) ⋅
((r ⋆ f) ⋆ η ⋆ w)"
proof -
have "ide r" by simp
moreover have "seq a[f, f* ⋆ f, w] a-1[f, f* ⋆ f, w]"
using T0.antipar comp_cod_arr ide_base by simp
ultimately have "(r ⋆ a[f, f* ⋆ f, w]) ⋅ (r ⋆ a-1[f, f* ⋆ f, w]) =
r ⋆ a[f, f* ⋆ f, w] ⋅ a-1[f, f* ⋆ f, w]"
using whisker_left by metis
thus ?thesis
using T0.antipar comp_cod_arr comp_assoc_assoc' by simp
qed
also have "... =
a-1[r, f, (f* ⋆ f) ⋆ w] ⋅
(r ⋆ a[f, f* ⋆ f, w]) ⋅ ((r ⋆ a-1[f, f* ⋆ f, w]) ⋅
(r ⋆ f ⋆ η ⋆ w)) ⋅
a[r, f, trg w ⋆ w]"
using assoc_naturality [of r f "η ⋆ w"] comp_assoc by fastforce
also have "... =
a-1[r, f, (f* ⋆ f) ⋆ w] ⋅
(r ⋆ a[f, f* ⋆ f, w]) ⋅ (r ⋆ (f ⋆ η) ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅
a[r, f, trg w ⋆ w]"
using assoc'_naturality [of f η w] T0.antipar comp_assoc
whisker_left [of r "a-1[f, f* ⋆ f, w]" "f ⋆ η ⋆ w"]
whisker_left [of r "(f ⋆ η) ⋆ w" "a-1[f, trg w, w]"]
by simp
finally show ?thesis by blast
qed
show ?thesis
using 3 4 T0.antipar by simp
qed
also have "... = ν ⋅ r[r] ⋅ ((r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ') ⋅
(r ⋆ a[src r, f, w]) ⋅
((r ⋆ (ε ⋆ f) ⋆ w) ⋅
((r ⋆ a-1[f ⋆ f*, f, w]) ⋅ (r ⋆ a-1[f, f*, f ⋆ w]) ⋅
a[r, f, f* ⋆ f ⋆ w] ⋅ ((r ⋆ f) ⋆ a[f*, f, w]) ⋅
a-1[r, f, (f* ⋆ f) ⋆ w] ⋅ (r ⋆ a[f, f* ⋆ f, w])) ⋅
(r ⋆ (f ⋆ η) ⋆ w)) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
(ρ ⋆ trg w ⋆ w)) ⋅ (g ⋆ l-1[w])"
using comp_assoc T0.antipar by auto
also have "... = ν ⋅ r[r] ⋅ ((r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ') ⋅
(r ⋆ a[src r, f, w]) ⋅
((r ⋆ (ε ⋆ f) ⋆ w) ⋅ (r ⋆ a-1[f, f*, f] ⋆ w) ⋅
(r ⋆ (f ⋆ η) ⋆ w)) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
(ρ ⋆ trg w ⋆ w)) ⋅ (g ⋆ l-1[w])"
proof -
have "(r ⋆ a-1[f ⋆ f*, f, w]) ⋅ (r ⋆ a-1[f, f*, f ⋆ w]) ⋅
a[r, f, f* ⋆ f ⋆ w] ⋅ ((r ⋆ f) ⋆ a[f*, f, w]) ⋅
a-1[r, f, (f* ⋆ f) ⋆ w] ⋅ (r ⋆ a[f, f* ⋆ f, w]) =
r ⋆ a-1[f, f*, f] ⋆ w"
proof -
text ‹We can compress the reasoning about the associativities using coherence.›
have "(r ⋆ a-1[f ⋆ f*, f, w]) ⋅ (r ⋆ a-1[f, f*, f ⋆ w]) ⋅
a[r, f, f* ⋆ f ⋆ w] ⋅ ((r ⋆ f) ⋆ a[f*, f, w]) ⋅
a-1[r, f, (f* ⋆ f) ⋆ w] ⋅ (r ⋆ a[f, f* ⋆ f, w]) =
{(\⟨r\⟩ \⋆ \a-1[\⟨f\⟩ \⋆ \⟨f*\⟩, \⟨f\⟩, \⟨w\⟩]) \⋅ (\⟨r\⟩ \⋆ \a-1[\⟨f\⟩, \⟨f*\⟩, \⟨f\⟩ \⋆ \⟨w\⟩]) \⋅
\a[\⟨r\⟩, \⟨f\⟩, \⟨f*\⟩ \⋆ \⟨f\⟩ \⋆ \⟨w\⟩] \⋅ ((\⟨r\⟩ \⋆ \⟨f\⟩) \⋆ \a[\⟨f*\⟩, \⟨f\⟩, \⟨w\⟩]) \⋅
\a-1[\⟨r\⟩, \⟨f\⟩, (\⟨f*\⟩ \⋆ \⟨f\⟩) \⋆ \⟨w\⟩] \⋅ (\⟨r\⟩ \⋆ \a[\⟨f\⟩, \⟨f*\⟩ \⋆ \⟨f\⟩, \⟨w\⟩])}"
using T0.antipar a'_def α_def assoc'_eq_inv_assoc by auto
also have "... = {\⟨r\⟩ \⋆ \a-1[\⟨f\⟩, \⟨f*\⟩, \⟨f\⟩] \⋆ \⟨w\⟩}"
using T0.antipar by (intro E.eval_eqI, auto)
also have "... = r ⋆ a-1[f, f*, f] ⋆ w"
using T0.antipar a'_def α_def assoc'_eq_inv_assoc by simp
finally show ?thesis
by simp
qed
thus ?thesis by simp
qed
also have "... = ν ⋅ r[r] ⋅ ((r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ') ⋅
(r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
(ρ ⋆ trg w ⋆ w)) ⋅ (g ⋆ l-1[w])"
proof -
have "(r ⋆ (ε ⋆ f) ⋆ w) ⋅ (r ⋆ a-1[f, f*, f] ⋆ w) ⋅ (r ⋆ (f ⋆ η) ⋆ w) =
r ⋆ l-1[f] ⋅ r[f] ⋆ w"
proof -
have "(r ⋆ (ε ⋆ f) ⋆ w) ⋅ (r ⋆ a-1[f, f*, f] ⋆ w) ⋅ (r ⋆ (f ⋆ η) ⋆ w) =
r ⋆ (ε ⋆ f) ⋅ a-1[f, f*, f] ⋅ (f ⋆ η) ⋆ w"
using whisker_left whisker_right T0.antipar by simp
also have "... = r ⋆ l-1[f] ⋅ r[f] ⋆ w"
using T0.triangle_left by simp
finally show ?thesis by blast
qed
thus ?thesis by simp
qed
also have "... = ν ⋅ r[r] ⋅ ((r ⋆ r[src f*]) ⋅ (r ⋆ src f* ⋆ θ') ⋅ (r ⋆ a[src f*, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
(ρ ⋆ trg w ⋆ w)) ⋅ (g ⋆ l-1[w])"
using T0.antipar by simp
finally show ?thesis by simp
qed
also have "... = ν ⋅ r[r] ⋅
((r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ')) ⋅
(r ⋆ a[src r, f, w]) ⋅ (r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
((ρ ⋆ trg w ⋆ w) ⋅ (g ⋆ l-1[w]))"
using comp_assoc T0.antipar by simp
also have "... = ν ⋅ r[r] ⋅
((r ⋆ θ') ⋅ (r ⋆ l[f ⋆ w])) ⋅
(r ⋆ a[src r, f, w]) ⋅ (r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅
(r ⋆ a-1[f, trg w, w]) ⋅ a[r, f, trg w ⋆ w] ⋅
(((r ⋆ f) ⋆ l-1[w]) ⋅ (ρ ⋆ w))"
proof -
have "(r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ') = (r ⋆ θ') ⋅ (r ⋆ l[f ⋆ w])"
proof -
have "(r ⋆ r[src r]) ⋅ (r ⋆ src r ⋆ θ') = r ⋆ r[src r] ⋅ (src r ⋆ θ')"
using whisker_left by simp
also have "... = r ⋆ θ' ⋅ l[f ⋆ w]"
using lunit_naturality [of θ'] unitor_coincidence by simp
also have "... = (r ⋆ θ') ⋅ (r ⋆ l[f ⋆ w])"
using whisker_left by simp
finally show ?thesis by simp
qed
moreover have "(ρ ⋆ trg w ⋆ w) ⋅ (g ⋆ l-1[w]) = ((r ⋆ f) ⋆ l-1[w]) ⋅ (ρ ⋆ w)"
proof -
have "(ρ ⋆ trg w ⋆ w) ⋅ (g ⋆ l-1[w]) = ρ ⋅ g ⋆ (trg w ⋆ w) ⋅ l-1[w]"
using interchange by simp
also have "... = ρ ⋆ l-1[w]"
using comp_arr_dom comp_cod_arr by simp
also have "... = (r ⋆ f) ⋅ ρ ⋆ l-1[w] ⋅ w"
using comp_arr_dom comp_cod_arr by simp
also have "... = ((r ⋆ f) ⋆ l-1[w]) ⋅ (ρ ⋆ w)"
using interchange by simp
finally show ?thesis by simp
qed
ultimately show ?thesis by simp
qed
also have "... = ν ⋅ r[r] ⋅ (r ⋆ θ') ⋅
((r ⋆ l[f ⋆ w]) ⋅ (r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅
a[r, f, trg w ⋆ w] ⋅ ((r ⋆ f) ⋆ l-1[w])) ⋅
(ρ ⋆ w)"
using comp_assoc by simp
also have "... = ν ⋅ r[r] ⋅ (r ⋆ θ') ⋅ a[r, f, w] ⋅ (ρ ⋆ w)"
proof -
have "((r ⋆ l[f ⋆ w]) ⋅ (r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅
a[r, f, trg w ⋆ w] ⋅ ((r ⋆ f) ⋆ l-1[w])) =
a[r, f, w]"
proof -
have "((r ⋆ l[f ⋆ w]) ⋅ (r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅
a[r, f, trg w ⋆ w] ⋅ ((r ⋆ f) ⋆ l-1[w])) =
((r ⋆ (l[f] ⋆ w) ⋅ a-1[trg f, f, w]) ⋅ (r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅
(r ⋆ f ⋆ l-1[w])) ⋅ a[r, f, w]"
using comp_assoc assoc_naturality [of r f "l-1[w]"] lunit_hcomp by simp
also have "... = a[r, f, w]"
proof -
have "(r ⋆ (l[f] ⋆ w) ⋅ a-1[trg f, f, w]) ⋅ (r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅
(r ⋆ f ⋆ l-1[w]) =
r ⋆ f ⋆ w"
proof -
text ‹Again, get a little more mileage out of coherence.›
have "(r ⋆ (l[f] ⋆ w) ⋅ a-1[trg f, f, w]) ⋅ (r ⋆ a[src r, f, w]) ⋅
(r ⋆ l-1[f] ⋅ r[f] ⋆ w) ⋅ (r ⋆ a-1[f, trg w, w]) ⋅
(r ⋆ f ⋆ l-1[w]) =
{(\⟨r\⟩ \⋆ (\l[\⟨f\⟩] \⋆ \⟨w\⟩) \⋅ \a-1[E.Trg \⟨f\⟩, \⟨f\⟩, \⟨w\⟩]) \⋅
(\⟨r\⟩ \⋆ \a[E.Src \⟨r\⟩, \⟨f\⟩, \⟨w\⟩]) \⋅
(\⟨r\⟩ \⋆ \l-1[\⟨f\⟩] \⋅ \r[\⟨f\⟩] \⋆ \⟨w\⟩) \⋅ (\⟨r\⟩ \⋆ \a-1[\⟨f\⟩, E.Trg \⟨w\⟩, \⟨w\⟩]) \⋅
(\⟨r\⟩ \⋆ \⟨f\⟩ \⋆ \l-1[\⟨w\⟩])}"
using l_ide_simp r_ide_simp a'_def α_def assoc'_eq_inv_assoc by simp
also have "... = {\⟨r\⟩ \⋆ \⟨f\⟩ \⋆ \⟨w\⟩}"
by (intro E.eval_eqI, auto)
also have "... = r ⋆ f ⋆ w"
by simp
finally show ?thesis by blast
qed
thus ?thesis
using comp_cod_arr
by (metis assoc_naturality1 base_simps(2-3) leg0_simps(2-4)
w_simps(2) w_simps(4) w_simps(5))
qed
finally show ?thesis by blast
qed
thus ?thesis by simp
qed
also have "... = ν ⋅ r[r] ⋅ r-1[r] ⋅ inv ν"
proof -
have "r-1[r] ⋅ inv ν = (r ⋆ θ') ⋅ a[r, f, w] ⋅ (ρ ⋆ w)"
using ** wθ'ν ide_base ide_leg0 tab_in_hom invert_side_of_triangle(2) comp_arr_dom
T0.antipar comp_assoc runit'_simps(1)
by metis
thus ?thesis by simp
qed
also have "... = g ⋆ w"
using ** wθ'ν ide_base comp_arr_inv'
by (metis calculation in_homE invert_side_of_triangle(1) iso_runit iso_runit')
finally show ?thesis by simp
qed
thus ?thesis by simp
qed
qed
ultimately have 1: "iso (g ⋆ γ)"
using iso_iff_section_and_retraction by simp
have "iso (inv (ν ⋅ r[r]) ⋅ (g ⋆ γ))"
proof -
have "iso (inv (ν ⋅ r[r]))"
using wθ'ν γ iso_runit
by (elim conjE in_homE, intro iso_inv_iso isos_compose, auto)
thus ?thesis
using 1 wθ'ν γ trg_γ_eq isos_compose
by (elim conjE in_homE, auto)
qed
moreover have "inv (ν ⋅ r[r]) ⋅ (g ⋆ γ) = composite_cell f* ε"
proof -
have "inv (ν ⋅ r[r]) ⋅ (g ⋆ γ) = inv (ν ⋅ r[r]) ⋅ ν ⋅ r[r] ⋅ composite_cell f* ε"
using γ by auto
also have "... = ((inv (ν ⋅ r[r]) ⋅ (ν ⋅ r[r])) ⋅ (r ⋆ ε)) ⋅ a[r, f, f*] ⋅ (ρ ⋆ f*)"
using wθ'ν comp_assoc by auto
also have "... = composite_cell f* ε"
proof -
have "dom ν = r"
using wθ'ν by auto
thus ?thesis
using iso_runit wθ'ν isos_compose comp_cod_arr whisker_left comp_inv_arr'
by auto
qed
finally show ?thesis by blast
qed
ultimately have "iso (composite_cell f* ε)" by simp
thus "iso (T0.trnr\ε r ρ)"
using T0.trnr\<epsilon>_def ide_base runit_in_hom iso_runit isos_compose
by (metis A arrI seqE)
qed
text ‹
It is convenient to have a simpler version of the previous result for when we do
not care about the details of the isomorphism.
›
lemma yields_isomorphic_representation':
obtains ψ where "«ψ : g ⋆ f* → r¬" and "iso ψ"
using yields_isomorphic_representation adjoint_pair_def by simp
end
text ‹
It is natural to ask whether if ‹«ψ : g ⋆ f* → r¬› is an isomorphism
then ‹ρ = (ψ ⋆ f) ⋅ T0.trnr\<eta> g (g ⋆ f*)› is a tabulation of ‹r›.
This is not true without additional conditions on ‹f› and ‹g›
(\emph{cf.}~the comments following CKS Proposition 6).
So only rather special isomorphisms ‹«ψ : g ⋆ f* → r¬› result from tabulations of ‹r›.
›
subsection "Tabulation of a Right Adjoint"
text ‹
Here we obtain a tabulation of the right adjoint of a map. This is CKS Proposition 1(e).
It was somewhat difficult to find the correct way to insert the unitors
that CKS omit. At first I thought I could only prove this under the assumption
that the bicategory is normal, but later I saw how to do it in the general case.
\<close>
context adjunction_in_bicategory
begin
lemma tabulation_of_right_adjoint:
shows "tabulation V H \<a> \<i> src trg g \<eta> f (src f)"
proof -
interpret T: tabulation_data V H \<a> \<i> src trg g \<eta> f \<open>src f\<close>
using unit_in_hom antipar by (unfold_locales, simp_all)
show ?thesis
proof
show T1: "\<And>u \<omega>. \<lbrakk> ide u; \<guillemotleft>\<omega> : dom \<omega> \<Rightarrow> g \<star> u\<guillemotright> \<rbrakk> \<Longrightarrow>
\<exists>w \<theta> \<nu>. ide w \<and> \<guillemotleft>\<theta> : f \<star> w \<Rightarrow> u\<guillemotright> \<and> \<guillemotleft>\<nu> : dom \<omega> \<Rightarrow> src f \<star> w\<guillemotright> \<and> iso \<nu> \<and>
T.composite_cell w \<theta> \<cdot> \<nu> = \<omega>"
proof -
fix u v \<omega>
assume u: "ide u"
assume \<omega>: "\<guillemotleft>\<omega> : v \<Rightarrow> g \<star> u\<guillemotright>"
have v: "ide v"
using \<omega> by auto
have 1: "src g = trg u"
using \<omega> by (metis arr_cod in_homE not_arr_null seq_if_composable)
have 2: "src f = trg v"
using \<omega> 1 u ide_right antipar(1) vconn_implies_hpar(4) by force
text \<open>It seems clear that we need to take \<open>w = v\<close> and \<open>\<nu> = \<l>\<^sup>-\<^sup>1[v]\<close>. \<close>
let ?w = v
let ?\<nu> = "\<l>\<^sup>-\<^sup>1[v]"
have \<nu>: "\<guillemotleft>?\<nu> : v \<Rightarrow> src f \<star> ?w\<guillemotright> \<and> iso ?\<nu>"
using v 2 iso_lunit' by auto
text \<open>
We need \<open>\<theta>\<close>, defined to satisfy \<open>\<guillemotleft>\<theta> : f \<star> v \<Rightarrow> u\<guillemotright>\<close> and
\<open>\<omega> = (v \<star> \<theta>) \<cdot> \<a>[v, f, v] \<cdot> (\<eta> \<star> w) \<cdot> \<l>\<^sup>-\<^sup>1[v]\<close>.
We have \<open>\<guillemotleft>\<omega> : v \<Rightarrow> g \<star> u\<guillemotright>\<close>, so we can get arrow \<open>\<guillemotleft>\<theta> : f \<star> v \<Rightarrow> u\<guillemotright>\<close> by adjoint transpose.
Note that this uses adjoint transpose on the \emph{left}, rather than on the right.
\<close>
let ?\<theta> = "trnl\<^sub>\<epsilon> u \<omega>"
have \<theta>: "\<guillemotleft>?\<theta> : f \<star> ?w \<Rightarrow> u\<guillemotright>"
using u v antipar 1 2 \<omega> adjoint_transpose_left(2) [of u v] by auto
text \<open>
Now, \<open>trnl\<^sub>\<eta> v \<theta> \<equiv> (g \<star> \<theta>) \<cdot> \<a>[g, f, v] \<cdot> (\<eta> \<star> v) \<cdot> \<l>\<^sup>-\<^sup>1[v]\<close>, which suggests that
we ought to have \<open>\<omega> = trnl\<^sub>\<eta> v \<theta>\<close> and \<open>\<nu> = \<l>\<^sup>-\<^sup>1[v]\<close>;
\<close>
have "T.composite_cell ?w ?\<theta> \<cdot> ?\<nu> = \<omega>"
using u v \<omega> 1 2 adjoint_transpose_left(4) [of u v \<omega>] trnl\<^sub>\<eta>_def comp_assoc by simp
thus "\<exists>w java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
.w < <>< = <"
using \theta>\<u antipar by
T2:"<>u w <><> \beta>.
* >sbjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
ctx->pos = ( + 1)<
T. w \<heta>=T. ' <'\cdot <>\rbrakk>\Longrightarrow>
\<exists>!\<gamma>. \<guillemotleft*/
folio_release_(olio,lf;
fix w < \theta> \>
(i ;i <limit; i+, de+){
(olio, de-i)
assume \<theta>: "\<guillemotleft>\<theta> : f \<star> w \<Rightarrow> u\<guillemotright>"
assume \<theta>': "\<guillemotleft>\<theta>' : f \<star> w' \<Rightarrow> u\<guillemotright>"
assume \<beta>: "\<guillemotleft>\<beta> : src f \<star> w \<Rightarrow> src f \<star> w'\<guillemotright>"
assume E: "T.composite_cell w \<theta> = T.composite_cell w' \<theta>' \<cdot> \<beta>"
interpret T: uw\<theta>w'\<theta>'\<beta> V H \<a> \<i> src trg g \<eta> f \<open>src f\<close> u w \<theta> w' \<theta>' \<beta>
using w w' \<theta> \<theta>' \<beta> E comp_assoc by (unfold_locales, auto)
have 2: "src f = trg \<beta>"
using antipar by simp
show "\<exists>!\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = src f \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f \<star> \<gamma>)"
proof -
text \<open>
The requirement \<open>\<beta> = src f \<star> \<gamma>\<close> means we have to essentially invert \<open>\<lambda>\<gamma>. src f \<star> \<gamma>\<close>
to obtain \<open>\<gamma>\<close>. CKS say only: ``the strong form of \<open>T2\<close> is clear since \<open>g = 1\<close>"
(here by ``\<open>g\<close>'' they are referring to \<open>dom \<eta>\<close>, the ``output leg'' of the span in
the tabulation). This would mean that we would have to take \<open>\<gamma> = \<beta>\<close>, which doesn't
work for a general bicategory (we don't necessarily have \<open>src f \<star> \<gamma> = \<gamma>\<close>).
For a general bicategory, we have to take \<open>\<gamma> = \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w]\<close>.
\<close>
let ?\<gamma> = "\<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w]"
have \<gamma>: "\<guillemotleft>?\<gamma> : w \<Rightarrow> w'\<guillemotright>"
using \<beta> by simp
have 3: "\<beta> = src f \<star> ?\<gamma>"
proof -
have "\<beta> = \<l>\<^sup>-\<^sup>1[w'] \<cdot> ?\<gamma> \<cdot> \<l>[w]"
using \<beta> iso_lunit
by (simp add: comp_arr_dom invert_side_of_triangle(1) comp_assoc)
also have "... = \<l>\<^sup>-\<^sup>1[w'] \<cdot> \<l>[w'] \<cdot> (src f \<star> ?\<gamma>)"
using \<gamma> lunit_naturality
by (metis T.uw\<theta>.w_simps(4) in_homE trg_dom)
also have "... = (\<l>\<^sup>-\<^sup>1[w'] \<cdot> \<l>[w']) \<cdot> (src f \<star> ?\<gamma>)"
using comp_assoc by simp
also have "... = src f \<star> ?\<gamma>"
using \<gamma> iso_lunit comp_inv_arr comp_cod_arr
by (metis T.\<beta>_simps(1) calculation comp_ide_arr inv_is_inverse inverse_arrowsE w')
finally show ?thesis by simp
qed
have "\<theta> = \<theta>' \<cdot> (f \<star> ?\<gamma>)"
proof -
have "\<theta> = trnl\<^sub>\<epsilon> u (trnl\<^sub>\<eta> w \<theta>)"
using \<theta> adjoint_transpose_left(3) [of u w \<theta>] by simp
also have "... = trnl\<^sub>\<epsilon> u (trnl\<^sub>\<eta> w' \<theta>' \<cdot> \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w])"
proof -
have "trnl\<^sub>\<eta> w \<theta> = trnl\<^sub>\<eta> w' \<theta>' \<cdot> \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w]"
proof -
have "trnl\<^sub>\<eta> w \<theta> \<cdot> \<l>[w] = (T.composite_cell w \<theta> \<cdot> \<l>\<^sup>-\<^sup>1[w]) \<cdot> \<l>[w]"
unfolding trnl\<^sub>\<eta>_def using comp_assoc by simp
also have "... = T.composite_cell w \<theta> \<cdot> (\<l>\<^sup>-\<^sup>1[w] \<cdot> \<l>[w])"
using comp_assoc by simp
also have 4: "... = T.composite_cell w \<theta>"
using comp_arr_dom by (simp add: comp_inv_arr')
also have "... = T.composite_cell w' \<theta>' \<cdot> \<beta>"
using E by simp
also have "... = (T.composite_cell w' \<theta>' \<cdot> \<l>\<^sup>-\<^sup>1[w']) \<cdot> \<l>[w'] \<cdot> \<beta>"
proof -
have "(\<l>\<^sup>-\<^sup>1[w'] \<cdot> \<l>[w']) \<cdot> \<beta> = \<beta>"
using iso_lunit \<beta> comp_cod_arr comp_assoc comp_inv_arr' by simp
thus ?thesis
using comp_assoc by simp
qed
also have "... = trnl\<^sub>\<eta> w' \<theta>' \<cdot> \<l>[w'] \<cdot> \<beta>"
unfolding trnl\<^sub>\<eta>_def using comp_assoc by simp
finally have "trnl\<^sub>\<eta> w \<theta> \<cdot> \<l>[w] = trnl\<^sub>\<eta> w' \<theta>' \<cdot> \<l>[w'] \<cdot> \<beta>"
by simp
thus ?thesis
using \<beta> 4 invert_side_of_triangle(2) adjoint_transpose_left iso_lunit
trnl\<^sub>\<eta>_def comp_assoc
by metis
qed
thus ?thesis by simp
qed
also have "... = \<l>[u] \<cdot> (\<epsilon> \<star> u) \<cdot> \<a>\<^sup>-\<^sup>1[f, g, u] \<cdot> (f \<star> trnl\<^sub>\<eta> w' \<theta>' \<cdot> \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w])"
using trnl\<^sub>\<epsilon>_def by simp
also have
"... = \<l>[u] \<cdot> (\<epsilon> \<star> u) \<cdot> \<a>\<^sup>-\<^sup>1[f, g, u] \<cdot> (f \<star> trnl\<^sub>\<eta> w' \<theta>') \<cdot> (f \<star> \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w])"
using ide_left ide_right w w' 2 \<beta> \<theta> antipar trnl\<^sub>\<epsilon>_def adjoint_transpose_left
whisker_left
by (metis T.uw\<theta>.\<theta>_simps(1) calculation hseqE seqE)
also have
"... = (\<l>[u] \<cdot> (\<epsilon> \<star> u) \<cdot> \<a>\<^sup>-\<^sup>1[f, g, u] \<cdot> (f \<star> trnl\<^sub>\<eta> w' \<theta>')) \<cdot> (f \<star> \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w])"
using comp_assoc by simp
also have "... = trnl\<^sub>\<epsilon> u (trnl\<^sub>\<eta> w' \<theta>') \<cdot> (f \<star> \<l>[w'] \<cdot> \<beta> \<cdot> \<l>\<^sup>-\<^sup>1[w])"
unfolding trnl\<^sub>\<epsilon>_def by simp
also have "... = \<theta>' \<cdot> (f \<star> ?\<gamma>)"
using \<theta>' adjoint_transpose_left(3) by auto
finally show ?thesis by simp
qed
hence "\<exists>\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = src f \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f \<star> \<gamma>)"
using \<gamma> 3 hcomp_obj_arr by blast
moreover have "\<And>\<gamma> \<gamma>'. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = src f \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f \<star> \<gamma>) \<and>
\<guillemotleft>\<gamma>' : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = src f \<star> \<gamma>' \<and> \<theta> = \<theta>' \<cdot> (f \<star> \<gamma>') \<Longrightarrow> \<gamma> = \<gamma>'"
proof -
fix \<gamma> \<gamma>'
assume \<gamma>\<gamma>': "\<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = src f \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f \<star> \<gamma>) \<and>
\<guillemotleft>\<gamma>' : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = src f \<star> \<gamma>' \<and> \<theta> = \<theta>' \<cdot> (f \<star> \<gamma>')"
show "\<gamma> = \<gamma>'"
using \<gamma>\<gamma>' vconn_implies_hpar(2) L.is_faithful [of \<gamma> \<gamma>'] by force
qed
ultimately show ?thesis by blast
qed
qed
qed
qed
end
subsection "Preservation by Isomorphisms"
text \<open>
Next, we show that tabulations are preserved under composition on all three sides by
isomorphisms. This is something that we would expect to hold if ``tabulation'' is a
properly bicategorical notion.
\<close>
context tabulation
begin
text \<open>
Tabulations are preserved under composition of an isomorphism with the ``input leg''.
\<close>
lemma preserved_by_input_iso:
assumes "\<guillemotleft>\<phi> : f \<Rightarrow> f'\<guillemotright>" and "iso \<phi>"
shows "tabulation V H \<a> \<i> src trg r ((r \<star> \<phi>) \<cdot> \<rho>) f' g"
proof -
interpret T': tabulation_data V H \<a> \<i> src trg r \<open>(r \<star> \<phi>) \<cdot> \<rho>\<close> f'
using assms(1) tab_in_hom
apply unfold_locales
apply auto
by force
show ?thesis
proof
show "\<And>u \<omega>. \<lbrakk> ide u; \<guillemotleft>\<omega> : dom \<omega> \<Rightarrow> r \<star> u\<guillemotright> \<rbrakk> \<Longrightarrow>
\<exists>w \<theta> \<nu>. ide w \<and> \<guillemotleft>\<theta> : f' \<star> w \<Rightarrow> u\<guillemotright> \<and> \<guillemotleft>\<nu> : dom \<omega> \<Rightarrow> g \<star> w\<guillemotright> \<and>
iso \<nu> \<and> T'.composite_cell w \<theta> \<cdot> \<nu> = \<omega>"
proof -
fix u \<omega>
assume u: "ide u" and \<omega>: "\<guillemotleft>\<omega> : dom \<omega> \<Rightarrow> r \<star> u\<guillemotright>"
obtain w \<theta> \<nu> where w\<theta>\<nu>: "ide w \<and> \<guillemotleft>\<theta> : f \<star> w \<Rightarrow> u\<guillemotright> \<and> \<guillemotleft>\<nu> : dom \<omega> \<Rightarrow> g \<star> w\<guillemotright> \<and>
iso \<nu> \<and> composite_cell w \<theta> \<cdot> \<nu> = \<omega>"
using u \<omega> T1 by blast
interpret T1: uw\<theta>\<omega>\<nu> V H \<a> \<i> src trg r \<rho> f g u w \<theta> \<omega> \<nu>
using w\<theta>\<nu> comp_assoc by (unfold_locales, auto)
have 1: "\<guillemotleft>inv \<phi> \<star> w : f' \<star> w \<Rightarrow> f \<star> w\<guillemotright>"
using assms by (intro hcomp_in_vhom, auto)
have "ide w \<and> \<guillemotleft>\<theta> \<cdot> (inv \<phi> \<star> w) : f' \<star> w \<Rightarrow> u\<guillemotright> \<and> \<guillemotleft>\<nu> : dom \<omega> \<Rightarrow> g \<star> w\<guillemotright> \<and> iso \<nu> \<and>
T'.composite_cell w (\<theta> \<cdot> (inv \<phi> \<star> w)) \<cdot> \<nu> = \<omega>"
using w\<theta>\<nu> 1
apply (intro conjI)
apply auto[4]
proof -
show "T'.composite_cell w (\<theta> \<cdot> (inv \<phi> \<star> w)) \<cdot> \<nu> = \<omega>"
proof -
have "T'.composite_cell w (\<theta> \<cdot> (inv \<phi> \<star> w)) \<cdot> \<nu> =
(r \<star> \<theta>) \<cdot> ((r \<star> inv \<phi> \<star> w) \<cdot> \<a>[r, f', w]) \<cdot> ((r \<star> \<phi>) \<cdot> \<rho> \<star> w) \<cdot> \<nu>"
using assms(1) 1 whisker_left [of r \<theta> "inv \<phi> \<star> w"] comp_assoc by auto
also have "... = (r \<star> \<theta>) \<cdot> (\<a>[r, f, w] \<cdot> ((r \<star> inv \<phi>) \<star> w)) \<cdot> ((r \<star> \<phi>) \<cdot> \<rho> \<star> w) \<cdot> \<nu>"
using assms assoc_naturality [of r "inv \<phi>" w]
by (metis 1 T'.tab_simps(1) base_simps(3) base_simps(4) T1.w_simps(5-6)
cod_inv dom_inv hseqE in_homE seqE trg_inv)
also have "... = (r \<star> \<theta>) \<cdot> \<a>[r, f, w] \<cdot> ((((r \<star> inv \<phi>) \<star> w) \<cdot> ((r \<star> \<phi>) \<star> w)) \<cdot> (\<rho> \<star> w)) \<cdot> \<nu>"
using whisker_right [of w "r \<star> \<phi>" \<rho>] comp_assoc T1.ide_w vseq_implies_hpar(1)
by auto
also have "... = composite_cell w \<theta> \<cdot> \<nu>"
proof -
have "(((r \<star> inv \<phi>) \<star> w) \<cdot> ((r \<star> \<phi>) \<star> w)) \<cdot> (\<rho> \<star> w) = \<rho> \<star> w"
proof -
have "\<guillemotleft>r \<star> \<phi> : r \<star> f \<Rightarrow> r \<star> f'\<guillemotright>"
using assms(1) by (intro hcomp_in_vhom, auto)
moreover have "\<guillemotleft>r \<star> inv \<phi> : r \<star> f' \<Rightarrow> r \<star> f\<guillemotright>"
using assms by (intro hcomp_in_vhom, auto)
ultimately show ?thesis
using comp_cod_arr
by (metis T1.w_in_hom(2) tab_simps(1) tab_simps(5) assms(1-2) comp_inv_arr'
in_homE leg0_simps(2) interchange base_in_hom(2) seqI')
qed
thus ?thesis
using comp_assoc by simp
qed
also have "... = \<omega>"
using w\<theta>\<nu> by simp
finally show ?thesis by simp
qed
qed
thus "\<exists>w \<theta> \<nu>. ide w \<and> \<guillemotleft>\<theta> : f' \<star> w \<Rightarrow> u\<guillemotright> \<and> \<guillemotleft>\<nu> : dom \<omega> \<Rightarrow> g \<star> w\<guillemotright> \<and> iso \<nu> \<and>
T'.composite_cell w \<theta> \<cdot> \<nu> = \<omega>"
by blast
qed
show "\<And>u w w' \<theta> \<theta>' \<beta>. \<lbrakk> ide w; ide w'; \<guillemotleft>\<theta> : f' \<star> w \<Rightarrow> u\<guillemotright>; \<guillemotleft>\<theta>' : f' \<star> w' \<Rightarrow> u\<guillemotright>;
\<guillemotleft>\<beta> : g \<star> w \<Rightarrow> g \<star> w'\<guillemotright>;
T'.composite_cell w \<theta> = T'.composite_cell w' \<theta>' \<cdot> \<beta> \<rbrakk> \<Longrightarrow>
\<exists>!\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = g \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f' \<star> \<gamma>)"
proof -
fix u w w' \<theta> \<theta>' \<beta>
assume w: "ide w" and w': "ide w'"
and \<theta>: "\<guillemotleft>\<theta> : f' \<star> w \<Rightarrow> u\<guillemotright>" and \<theta>': "\<guillemotleft>\<theta>' : f' \<star> w' \<Rightarrow> u\<guillemotright>"
and \<beta>: "\<guillemotleft>\<beta> : g \<star> w \<Rightarrow> g \<star> w'\<guillemotright>"
and eq: "T'.composite_cell w \<theta> = T'.composite_cell w' \<theta>' \<cdot> \<beta>"
interpret uw\<theta>w'\<theta>'\<beta> V H \<a> \<i> src trg r \<open>(r \<star> \<phi>) \<cdot> \<rho>\<close> f' g u w \<theta> w' \<theta>' \<beta>
using w w' \<theta> \<theta>' \<beta> eq comp_assoc by (unfold_locales, auto)
show "\<exists>!\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = g \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f' \<star> \<gamma>)"
proof -
have \<phi>_w: "\<guillemotleft>\<phi> \<star> w : f \<star> w \<Rightarrow> f' \<star> w\<guillemotright>"
using assms(1) by (intro hcomp_in_vhom, auto)
have \<phi>_w': "\<guillemotleft>\<phi> \<star> w' : f \<star> w' \<Rightarrow> f' \<star> w'\<guillemotright>"
using assms(1) by (intro hcomp_in_vhom, auto)
have "\<guillemotleft>\<theta> \<cdot> (\<phi> \<star> w) : f \<star> w \<Rightarrow> u\<guillemotright>"
using \<theta> assms(1) by fastforce
moreover have "\<guillemotleft>\<theta>' \<cdot> (\<phi> \<star> w') : f \<star> w' \<Rightarrow> u\<guillemotright>"
using \<theta>' assms(1) by fastforce
moreover have "composite_cell w (\<theta> \<cdot> (\<phi> \<star> w)) = composite_cell w' (\<theta>' \<cdot> (\<phi> \<star> w')) \<cdot> \<beta>"
proof -
have "composite_cell w (\<theta> \<cdot> (\<phi> \<star> w)) =
(r \<star> \<theta>) \<cdot> ((r \<star> \<phi> \<star> w) \<cdot> \<a>[r, f, w]) \<cdot> (\<rho> \<star> w)"
using assms(2) \<phi>_w \<theta> whisker_left comp_assoc by auto
also have "... = (r \<star> \<theta>) \<cdot> \<a>[r, f', w] \<cdot> ((r \<star> \<phi>) \<star> w) \<cdot> (\<rho> \<star> w)"
using assms(1) assoc_naturality [of r \<phi> w] comp_assoc
by (metis \<phi>_w T'.tab_simps(1) base_simps(3) base_simps(4) hseq_char
in_homE seqE uw\<theta>.w_simps(5) uw\<theta>.w_simps(6))
also have "... = T'.composite_cell w \<theta>"
using assms(2) w whisker_right [of w] by simp
also have "... = T'.composite_cell w' \<theta>' \<cdot> \<beta>"
using eq by simp
also have "... = (r \<star> \<theta>') \<cdot> (\<a>[r, f', w'] \<cdot> ((r \<star> \<phi>) \<star> w')) \<cdot> (\<rho> \<star> w') \<cdot> \<beta>"
using assms(2) w' whisker_right [of w'] comp_assoc by simp
also have "... = ((r \<star> \<theta>') \<cdot> (r \<star> \<phi> \<star> w')) \<cdot> \<a>[r, f, w'] \<cdot> (\<rho> \<star> w') \<cdot> \<beta>"
using assms(1) assoc_naturality [of r \<phi> w'] comp_assoc
by (metis \<phi>_w' T'.tab_simps(1) base_simps(3) base_simps(4) hseqE in_homE seqE
uw'\<theta>'.w_simps(5) uw'\<theta>'.w_simps(6))
also have "... = composite_cell w' (\<theta>' \<cdot> (\<phi> \<star> w')) \<cdot> \<beta>"
using assms(2) whisker_left [of r] \<open>\<guillemotleft>\<theta>' \<cdot> (\<phi> \<star> w') : f \<star> w' \<Rightarrow> u\<guillemotright>\<close> comp_assoc
by auto
finally show ?thesis by simp
qed
ultimately have *: "\<exists>!\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = g \<star> \<gamma> \<and>
\<theta> \<cdot> (\<phi> \<star> w) = (\<theta>' \<cdot> (\<phi> \<star> w')) \<cdot> (f \<star> \<gamma>)"
using w w' \<beta> T2 by auto
show ?thesis
proof -
have **: "\<And>\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<Longrightarrow> \<theta>' \<cdot> (\<phi> \<star> w') \<cdot> (f \<star> \<gamma>) \<cdot> (inv \<phi> \<star> w) = \<theta>' \<cdot> (f' \<star> \<gamma>)"
proof -
fix \<gamma>
assume \<gamma>: "\<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright>"
have "\<theta>' \<cdot> (\<phi> \<star> w') \<cdot> (f \<star> \<gamma>) \<cdot> (inv \<phi> \<star> w) = \<theta>' \<cdot> (\<phi> \<star> w') \<cdot> (f \<cdot> inv \<phi> \<star> \<gamma> \<cdot> w)"
using \<gamma> assms(1-2) interchange
by (metis arr_inv cod_inv in_homE leg0_simps(2) leg0_simps(4) uw\<theta>.w_in_hom(2)
seqI)
also have "... = \<theta>' \<cdot> (\<phi> \<cdot> f \<cdot> inv \<phi> \<star> w' \<cdot> \<gamma> \<cdot> w)"
using assms(1-2) interchange
by (metis \<gamma> arr_inv cod_inv comp_arr_dom comp_cod_arr in_homE seqI)
also have "... = \<theta>' \<cdot> (f' \<star> \<gamma>)"
proof -
have "\<phi> \<cdot> f \<cdot> inv \<phi> = f'"
using assms(1-2) comp_cod_arr comp_arr_inv' by auto
moreover have "w' \<cdot> \<gamma> \<cdot> w = \<gamma>"
using \<gamma> comp_arr_dom comp_cod_arr by auto
ultimately show ?thesis by simp
qed
finally show "\<theta>' \<cdot> (\<phi> \<star> w') \<cdot> (f \<star> \<gamma>) \<cdot> (inv \<phi> \<star> w) = \<theta>' \<cdot> (f' \<star> \<gamma>)" by simp
qed
obtain \<gamma> where \<gamma>: "\<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = g \<star> \<gamma> \<and>
\<theta> \<cdot> (\<phi> \<star> w) = (\<theta>' \<cdot> (\<phi> \<star> w')) \<cdot> (f \<star> \<gamma>)"
using * by blast
have "\<theta> = \<theta>' \<cdot> (\<phi> \<star> w') \<cdot> (f \<star> \<gamma>) \<cdot> (inv \<phi> \<star> w)"
proof -
have "seq (\<theta>' \<cdot> (\<phi> \<star> w')) (f \<star> \<gamma>)"
using assms(2) \<phi>_w \<phi>_w' \<gamma> \<beta> \<theta>
apply (intro seqI)
apply auto
by (metis seqE seqI')
thus ?thesis
using assms \<phi>_w \<gamma> comp_assoc invert_side_of_triangle(2) iso_hcomp
by (metis hcomp_in_vhomE ide_is_iso inv_hcomp inv_ide w)
qed
hence "\<theta> = \<theta>' \<cdot> (f' \<star> \<gamma>)"
using \<gamma> ** by simp
hence "\<exists>\<gamma>. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = g \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f' \<star> \<gamma>)"
using \<gamma> by auto
moreover have "\<And>\<gamma> \<gamma>'. \<guillemotleft>\<gamma> : w \<Rightarrow> w'\<guillemotright> \<and> \<beta> = g \<star> \<gamma> \<and> \<theta> = \<theta>' \<cdot> (f' \<star> \<gamma>) \<and>
«γ' : w → w'¬ ∧ β = g ⋆ γ' ∧ θ = θ' ⋅ (f' ⋆ γ')
==> γ = γ'"
proof -
fix γ γ'
assume A: "«γ : w → w'¬ ∧ β = g ⋆ γ ∧ θ = θ' ⋅ (f' ⋆ γ) ∧
«γ' : w → w'¬ ∧ β = g ⋆ γ' ∧ θ = θ' ⋅ (f' ⋆ γ')"
have "θ ⋅ (φ ⋆ w) = (θ' ⋅ (φ ⋆ w')) ⋅ (f ⋆ γ)"
proof -
have "θ = ((θ' ⋅ (φ ⋆ w')) ⋅ (f ⋆ γ)) ⋅ (inv φ ⋆ w)"
using A ** comp_assoc by simp
thus ?thesis
using assms(1-2) A iso_inv_iso
by (metis comp_arr_dom comp_cod_arr in_homE comp_assoc interchange)
qed
moreover have "θ ⋅ (φ ⋆ w) = (θ' ⋅ (φ ⋆ w')) ⋅ (f ⋆ γ')"
proof -
have "θ = ((θ' ⋅ (φ ⋆ w')) ⋅ (f ⋆ γ')) ⋅ (inv φ ⋆ w)"
using A ** comp_assoc by auto
thus ?thesis
using assms(1-2) A iso_inv_iso
by (metis comp_arr_dom comp_cod_arr in_homE comp_assoc interchange)
qed
ultimately show "γ = γ'"
using A * by blast
qed
ultimately show "∃!γ. «γ : w → w'¬ ∧ β = g ⋆ γ ∧ θ = θ' ⋅ (f' ⋆ γ)"
by metis
qed
qed
qed
qed
qed
text ‹
Similarly, tabulations are preserved under composition of an isomorphism with
the ``output leg''.
›
lemma preserved_by_output_iso:
assumes "«φ : g' → g¬" and "iso φ"
shows "tabulation V H a i src trg r (ρ ⋅ φ) f g'"
proof -
have τφ: "«ρ ⋅ φ : g' → r ⋆ f¬"
using assms by auto
interpret T': tabulation_data V H a i src trg r ‹ρ ⋅ φ› f g'
using assms(2) τφ by (unfold_locales, auto)
have φ_in_hhom: "«φ : src f → trg r¬"
using assms src_cod [of φ] trg_cod [of φ]
by (elim in_homE, simp)
show ?thesis
proof
fix u ψ
assume u: "ide u" and ψ: "«ψ : dom ψ → r ⋆ u¬"
show "∃w θ ν'. ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν' : dom ψ → g' ⋆ w¬ ∧ iso ν' ∧
T'.composite_cell w θ ⋅ ν' = ψ"
proof -
obtain w θ ν where wθν: "ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν : dom ψ → g ⋆ w¬ ∧
iso ν ∧ composite_cell w θ ⋅ ν = ψ"
using u ψ T1 [of u ψ] by auto
interpret uwθψν: uwθψν V H a i src trg r ρ f g u w θ ψ ν
using wθν comp_assoc by (unfold_locales, auto)
let ?ν' = "(inv φ ⋆ w) ⋅ ν"
have ν': "«?ν' : dom ψ → g' ⋆ w¬"
using assms φ_in_hhom uwθψν.ν_in_hom
by (intro comp_in_homI, auto)
moreover have "iso ?ν'"
using assms ν' wθν φ_in_hhom
by (intro iso_hcomp isos_compose) auto
moreover have "T'.composite_cell w θ ⋅ ?ν' = ψ"
proof -
have "composite_cell w θ ⋅ ((φ ⋆ w) ⋅ ?ν') = ψ"
proof -
have "(φ
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
(metis comp_arr_inv' in_homE leg1_simps(2) uwθψν.uwθψν)
thus ?thesis
using wθν by simp
qed
moreover have "(ρ ⋅ φ ⋆ w) ⋅ ?ν' = (ρ ⋆ w) ⋅ ((φ ⋆ w) ⋅ ?ν')"
using assms φ_in_hhom whisker_right comp_assoc by simp
ultimately show ?thesis
using comp_assoc by simp
qed
ultimately show ?thesis
using wθν by blast
qed
next
fix u w w' θ θ' β'
assume w: "ide w" and w': "ide w'"
and θ: "«θ : f ⋆ w → u¬" and θ': "«θ' : f ⋆ w' → u¬"
and β': "«β' : g' ⋆ w → g' ⋆ w'¬"
and eq': "T'.composite_cell w θ = T'.composite_cell w' θ' ⋅ β'"
interpret uwθw'θ'β: uwθw'θ'β V H a i src trg r ‹ρ ⋅ φ› f g' u w θ w' θ' β'
using assms w w' θ θ' β' eq' comp_assoc by (unfold_locales, auto)
let ?β = "(φ ⋆ w') ⋅ β' ⋅ (inv φ ⋆ w)"
have β: "«?β : g ⋆ w → g ⋆ w'¬"
using assms φ_in_hhom β'
by (intro comp_in_homI hcomp_in_vhom, auto)
have eq: "composite_cell w θ = composite_cell w' θ' ⋅ ((φ ⋆ w') ⋅ β' ⋅ (inv φ ⋆ w))"
proof -
have "composite_cell w θ = (r ⋆ θ) ⋅ a[r, f, w] ⋅ ((ρ ⋆ w) ⋅ (φ ⋆ w)) ⋅ (inv φ ⋆ w)"
proof -
have "ρ ⋆ w = (ρ ⋆ w) ⋅ (φ ⋆ w) ⋅ (inv φ ⋆ w)"
using assms w φ_in_hhom whisker_right comp_arr_dom comp_arr_inv'
by (metis tab_simps(1) tab_simps(4) in_homE leg1_simps(2))
thus ?thesis
using comp_assoc by simp
qed
also have "... = T'.composite_cell w θ ⋅ (inv φ ⋆ w)"
using assms φ_in_hhom whisker_right comp_assoc by simp
also have "... = T'.composite_c w''\theta' ⋅ (inv φ ⋆
using eq' comp_assoc by simp
". opost_elw θ ((φ ⋆ β' ⋅ \star w))"
p:
finaly ho ?hes y m
show \exists!\gamma. « w'¬ β γ ∧ = θ (f ⋆ga>)"
proof -
obtain γ where γ: "«γ : w → w'¬ ∧ ?β = g ⋆ γ ∧ θ = θ' ⋅ (f ⋆ γ)"
using assms w w' θ θ' β eq φ_in_hhom T2 [of w w' θ u θ' ?β] by auto
have "β' = g' ⋆ γ"
proof -
have "g ⋆ γ = (φ ⋆ w') ⋅ β' ⋅ (inv φ ⋆ w)"
using γ by simp
hence "(inv φ ⋆ w') ⋅ (g ⋆ γ) = β' ⋅ (inv φ ⋆ w)"
using assms w' β φ_in_hhom invert_side_of_triangle arrI iso_hcomp
hseqE ide_is_iso inv_hcomp inv_ide seqE
by metis
hence "β' = (inv φ ⋆ w') ⋅ (g ⋆ γ) ⋅ (φ ⋆ w)"
using assms w β φ_in_hhom invert_side_of_triangle comp_assoc seqE
by (metis comp_arr_dom in_homE local.uwθw'θ'β.β_simps(4) whisker_right)
also have "... = (inv φ ⋆ w') ⋅ (φ ⋆ γ)"
using assms φ_in_hhom γ interchange comp_arr_dom comp_cod_arr
by (metis in_homE)
also have "... = g' ⋆ γ"
using assms φ_in_hhom γ interchange comp_inv_arr inv_is_inverse comp_cod_arr
by (metis arr_dom calculation in_homE)
finally show ?thesis by simp
qed
hence "∃γ. «γ : w → w'¬ ∧ β' = g' ⋆ γ ∧ θ = θ' ⋅ (f ⋆ γ)"
using β γ by auto
moreover have "∧ :\open>'::lewr\close
«
proof -
have *: "∧ips
-
fix γ
assume γ: "«γ : w → w'¬"
have "(φ ⋆ w') ⋅ (g' ⋆ γ) ⋅ (inv φ ⋆ w) = (φ ⋆ w') ⋅ (inv φ ⋆ γ)"
using assms φ_in_hhom γ interchange comp_arr_dom comp_cod_arr
by (metis arr_dom comp_inv_arr' in_homE invert_side_of_triangle(2))
also have "... = g ⋆ γ"
using assms φ_in_hhom interchange comp_arr_inv inv_is_inverse comp_cod_arr
by (metis γ comp_arr_inv' in_homE leg1_simps(2))
finally show "(φ ⋆ w') ⋅ (g' ⋆ γ) ⋅ (inv φ ⋆ w) = g ⋆ γ" by blast
qed
fix γ γ'
assume γ: "«γ : w → w'¬ ∧ β' = g' ⋆ γ ∧ θ = θ' ⋅ (f ⋆ γ)"
and γ': "«γ' : w → w'¬ ∧ β' = g' ⋆ γ' ∧ θ = θ' ⋅ (f ⋆ γ')"
show "γ = γ'"
using w w' θ θ' β γ γ' eq * T2 by metis
qed
ultimately show "∃oreds:u_cs_n)
java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
qed " * 2 y 2^ (m + n)" using ux uy nv mnv xv' *
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 16
Finally, tabulations
from usszv obtain q where qv: "sz = us + q"
unat_lt2pn_lp[f]
assumes "«: r\Rightarr> r'¬" and "iso φ"
shows "tabulation V H a i src trg r' ((φ ⋆ f) ⋅ ρ) f g"
proof -
have φf: "«φ ⋆ f : r ⋆ f → r' ⋆ f¬"
using assms ide_leg0 by auto
interpret T: tabulation_data V H a i src trg r' ‹(φ ⋆ f) ⋅ ρ› f
proof
show ide_r': "ide r'" using assms by auto
show "ide f" using ide_leg0 by auto
show "«(φ ⋆ f) ⋅ ρ : g → r' ⋆ f¬"
using tab_in_hom φf by force
qed
show ?thesis
proof
have *: "∧u v w θ ν. [ ide u; ide v; ide w; «θ : f ⋆ w → u¬; «ν : v → g ⋆ w¬ ] ==>
((φ ⋆ u) ⋅ (r ⋆ θ)) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν =
T.composite_cell w θ ⋅ ν"
proof -
fix u v w θ ν
assume u: "ide u" and v: "ide v" and w: "ide w"
and θ: "«θ : f ⋆ w → u¬" and ν: "«ν : v → g ⋆ w¬"
have fw: "hseq f w"
using θ ide_dom [of θ] by fastforce
have rθ: "hseq r θ"
using θ ide_base ide_dom [of θ] trg_dom [of θ]
using arrI fw vconn_implies_hpar(2) by auto
have "((φ ⋆ u) ⋅ (r ⋆ θ)) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν =
((r' ⋆ θ) ⋅ (φ ⋆ f ⋆ w)) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν"
using assms u w ide_base ide_leg0 θ interchange comp_arr_dom comp_cod_arr
by (metis rθ hseq_char in_homE)
also have "... = (r' \star θ ((φ ⋆ w) ⋅[r, f, w]) ⋅sta> w) ⋅
using comp_assoc by si
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 154
proof -
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 125
using assms ide_leg0 w assoc_naturality [of φfoc
thus tsiss
gcm_so ysip
qed
also have". .opst_cl < ν"
using assms ide_leg0 whisker_right fw T.tab_in_hom arrI w cmpasscb uo
finally show "((φ> u) ⋅ (r < <heta)u} = {m + 1..u}› if ‹m ≠ - 1› for m :: ‹'a::len word›
by simp
qed
show "∧u ψ'. [ ide u; «ψ' : dom ψ' → r' ⋆ u¬ ] ==>
∃w θ ν. ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν : dom ψ' → g ⋆ w¬ ∧ iso ν ∧
T.composite_cell w θ ⋅ ν = ψ'"
proof -
fix u v ψ'
assume u: "ide u" and ψ': "«ψ' : v → r' ⋆ u¬"
have ψ: "«(inv φ ⋆ u) ⋅ ψ' : v → r ⋆ u¬"
proof
show "«ψ' : v → r' ⋆ u¬" by fact
show "«inv φ ⋆ u : r' ⋆ u → r ⋆ u¬"
proof -
have "ide (r' ⋆ u)"
using ψ' ide_cod by fastforce
hence "hseq r' u" by simp
thus ?hesis
using assms u by
qed
qed
phiu: "hp> u"
java.lang.StringIndexOutOfBoundsException: Range [50, 19) out of bounds for length 50
by1_iff_lt_ der_not_lesser_zero_iff
src_invjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
obtain w θ: "ide w ∧ : f ⋆ ∧ν g ⋆ ∧
composite_cell w θlem int_e:
using u ψ sint (of_nat a :: 'a :: len word) ≤
interpret uwθψ V H a src trg r ρ ‹ u) ⋅'›
using wθ 🚫^ n div 2 ^ m. w = word_of_nat k"
have "ide w ∧ «θ : f ⋆ w → u¬ ∧ «ν : v → g ⋆ w¬ ∧ iso ν ∧
T.composite_cell w θ ⋅ ν = ψ'"
proof -
have "ψ' = ((φ ⋆ u) ⋅ (r ⋆ θ)) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν"
proof -
have "seq (r ⋆ θ) (a[r, f, w] ⋅ (ρ ⋆ w) ⋅ ν)" by fastforce
moreover have "iso (inv φ ⋆ u)"
using assms u φu by auto
moreover have "inv (inv φ ⋆ u) = φ ⋆ u"
using assms u φu by auto
ultimately show ?thesis
using invert_side_of_triangle(1) wθν comp_assoc by metis
qed
also have "... = T.composite_cell w θ ⋅ ν"
using u wθν * [of u v w θ ν] by force
finally have "ψ' = T.composite_cell w θ ⋅ ν" by simp
thus ?thesis
usingifk<2
java.lang.StringIndexOutOfBoundsException: Range [5, 3) out of bounds for length 39
T.composite_cell w θ
byast
qed
showu w w' θ ide w; ide w'; « s>w → u¬; «θ' : f ⋆ w' → u¬;
«β : g ⋆ w → g ⋆ w'¬;
T.composite_cell w θ = T.composite_cell w' θ' ⋅ β ] ==>
∃!γ. «γ : w → w'¬ ∧ β = g ⋆ γ ∧ θ = θ' ⋅ (f ⋆ γ)"
proof -
fix u w w' θ θ' β
assume w: "ide w" and w': "ide w'"
and θ: "«θ : f ⋆ w → u¬" and θ': "«θ' : f ⋆ w' → u¬"
and β: "«β : g ⋆ w → g ⋆ w'¬"
and eq': "T.composite_cell w θ = T.composite_cell w' θ' ⋅ β"
interpret T: uwθw'θ'β V H a i src trg r' ‹(φ ⋆ f) ⋅ ρ› f g u w θ w' θ' β
using w w' θ θ' β eq' comp_assoc
by (em word_range'
have eq: "composite_cell w θ = composite_cell w' θ' ⋅ β"
proof -
have "(φ ⋆ u) ⋅ composite_cell w θ = (φ ⋆ u) ⋅ composite_cell w' θ' ⋅ β"
proof -
have "(φ ⋆ u) ⋅ composite_cell w θ =
((φ ⋆ u) ⋅ (r ⋆ θ)) ⋅ a[r, f, w] ⋅ (ρ ⋆ w) ⋅ (g ⋆ w)"
proof -
have "«ρ ⋆ w : g ⋆ w → (r ⋆ f) ⋆ w¬"
using w by auto
thus ?thesis
using comp_arr_dom comp_assoc by auto
qed
also have "... = T.composite_cell w θ ⋅ (g ⋆ w)"
using * [of u "g ⋆ w" w θ "g ⋆ w"] by fastforce
also have "... = T.composite_cell w θ"
proof -
have "«(φ ⋆ f) ⋅ ρ ⋆ w : g ⋆ w → (r' ⋆ f) ⋆ w¬"
thus ?thesis
using com_ardmcm_sscb uo
qed
also have "... = java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 27
using java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
also have "... = ((φ u) ⋅ <>')) \cdot \a[r, f, w'] ⋅ (ρ ⋆ w') ⋅ β"
using * [of u "g ⋆ w" w' θ' β] by fastforce
finally show ?thesis
using comp_assoc by simp
qed
moreover have "iso (φ ⋆ u)"
using assms by auto
moreover have "seq (φ ⋆ u) ((r ⋆ θ) ⋅ a[r, f, w] ⋅ (ρ ⋆ w))"
proof -
have "«φ ⋆ u : r ⋆ u → r' ⋆ u¬"
using assms by (intro hcomp_in_vhom, auto)
thus ?thesis
using composite_cell_in_hom [of w u θ] by auto
qed
moreover have "seq (φ ⋆ u) (composite_cell w' θ' ⋅ β)"
using assmsby(addt_of_nat_lenlnat_alt
ultimately show ?thesis
using mono_cancel section_is_mono iso_is_sectionusing1_eq_on_maskaskk ast
qed
show "∃
w w' θ θ' β eq T2 by simp
qed
qed
qed
end
subsection "Canonical Tabulations"
text ‹
If the 1-cell ‹g ⋆ f*› has any tabulation ‹(f, ρ, g)›, then it has the canonical
tabulation obtained as the adjoint transpose of (the identity on) ‹g ⋆ f*›.
›
context map_in_bicategory
begin
lemma canonical_tabulation:
assumes "ide g" and "src f = src g"
and "∃ρ. tabulation V H a i src trg (g ⋆ f*) ρ f g"
shows "tabulation V H a i src trg (g ⋆ f*) (trnr\η g (g ⋆ f*)) f g"
proof -
have 1: "ide (g ⋆ f*)"
using assms(1-2) ide_right antipar by simp
obtain ρ where ρ: "tabulation V H a i src trg (g ⋆ f*) ρ f g"
using assms(3) by auto
interpret \<shows
🚫
let ?ψ take_bit_wo [of n p] by auto
have 3: <guillemotleft>??\psi>: g ⋆ f* → g ⋆ f*¬ ∧ iso ?ψ"
using ρ.yields_isomorphic_representation by blast
hence "tabulation (⋅) (⋆) a i src trg (g ⋆ f*) ((inv ?ψ ⋆ f) ⋅ ρ) f g"
using ρ.is_preserved_by_base_iso [of "inv ?ψ" "g ⋆ f*"] by simp
moreover have "(inv ?ψ ⋆ f) ⋅ ρ = trnr\<eta> g (g ⋆ f*)"
proof -
have "(inv ?ψ ⋆ f) ⋅ ρ = ((inv ?ψ ⋆ f) ⋅ (?ψ ⋆ f)) ⋅ trnr\<eta> g (g ⋆ f*)"
using ρ.ρ_in_terms_of_rep comp_assoc by simp
also have "... = ((g ⋆ f*) ⋆ f) ⋅ trnr\<eta> g (g ⋆ f*)"
proof -
have "src (inv ?ψf""
using 3 antipar
by (metis ρ.lle test_:
hence "(inv ?ψby n "(a si: test word_ops_nth_size word_size)
using 3 whisker_right [of f "inv ?ψ" ?ψ
thus ?thesis
using comp_cod_arr by simp
qed
also have "... = trnr java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
proof -
have "
moreover have"java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 39
ultimately have "\div_les:
using 1 adjoint_transpose_right(1) ide_in_hom antipar by blast
thus ?thesis
using comp_cod_arr by blast
qed
finally show ?thesis by simp
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
ultimately show ?thesis by simp
qed
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
subsection "Uniqueness of Tabulations"mpad oresz_e agtsz_e i_odeIbtsms
text ‹)an
We now intend to shwta auaino <o>r<clo> i``uiu pt qiaec',
which is a property that any proper bicategorical limit should have.
What do w
java.lang.StringIndexOutOfBoundsException: Range [43, 37) out of bounds for length 137
induces ‹>(x AND NOT (mask n)) AND NOT (mask m) = x AND NOT (mask m)"
‹'a::len word›
from ‹(qed
‹«
This means that we obtain isomorphisms ‹(ν' \<star ν g' ⋆ w¬ and
‹
These isomorphisms then induce, via ‹
and from ‹
equivalence maps.
\c
context tabulation
begin
text ‹
We will need the following technical lemma.
›
lemma apex_equivalence_lemma:
assumes " «ρ' : g' → r ⋆ f'¬"
and "ide w ∧ «θ : f' ⋆ w → f¬ ∧ «ν : g → g' ⋆ w¬ ∧ iso ν ∧
(r ⋆ θ) ⋅ a[r, f', w] ⋅ (ρ' ⋆ w) ⋅ ν = ρ"
and "ide w' ∧ «θ' : f ⋆ w' → f'¬ ∧ «ν' : g' → g ⋆ w'¬ ∧ iso ν' ∧
(r ⋆ θ') ⋅ a[r, f, w'] ⋅ (ρ ⋆ w') ⋅ ν' = ρ'"
shows "∃φ. «φ : src f → w' ⋆ w¬ ∧ iso φ"
proof -
θρ'
using assms(1,3) apply unfold_locales by auto
interpret T:
using assms(1,2) apply unfold_locales by auto
upper_bits_unset_is_l2p [wwhe p=p]
using assms(1,2) apply unfold_locales by auto
(* These next simps are very important. *)
have_le
using assms(2) by auto
have dom_ν' [simp]: "dom ν
using assms(3) by auto
let ?\<nu>'\<nu> = "\<a>[dom \<rho>, w', w] \<cdot> (\<nu>' \<star> w) \<cdot> \<nu>"
have\<>\n> \guillemotleft?<u'<u \rho \R <ho <tar> w' <tarw<uillemotright>
by fastforce
have "\<guillemotleft>\<nu> : src \<rho> \<rightarrow> trg r\<guillemotright>" by simp
\theta>< "<heta>\<dot>(<heta' <tar>w) <dot> \<><s>\^up[, w,w]java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
have \<lemma[] " <unat( : a:en)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 20
have iso_\<nu>'\<nu>_r: "iso (?\<nu>'\<nu> \<cdot> \<r>[g])"
using iso_runit \<nu>'\<nu>
apply (intro isos_compose) by auto
have eq: "composite_cell (src f) \<r>[f] = if"ENGTH')+ LENGTH LENGTH('"
proof -
have "composite_cell (w' \<star> w) ?\<theta>\<theta>' \<cdot> (?\<nu>'\<nu> \<cdot> \<r>[g]) =
((r \<star> \<theta>) \<cdot> (r \<star> \<theta>' \<star> w) \<cdot> (r \<star> \<a>\<^sup>-\<^sup>1[java.lang.StringIndexOutOfBoundsException: Range [2, 117) out of bounds for length 47
\<a>[r, f, w' \<star> w] \<cdot> ((\<rho> \<by (not_less p2_gt_0power_0power_0
using whisker_left comp_assoc by simp
> \t) \< (r<tar\theta>'\ w)\c>( <tar <>^up-<s>f w' ]) <dot
\<a>[r, f, w' \<star> w] \<cdot> (\<word_of_int (<ambda l concat_bitn k)w(ize uint )"
((\<rho> \<star> w') \<star> w)) \<cdot> (\<nu>' \<star> w) \<cdot> \<nu> \<cdot> \<r>[g]"
using assoc_naturality [of \<rho> w' w] by simp
". (\star> \ \>r \s <> \<tar>w \cdot>
((<tar> \a\^sup>\<sup1 ' w) \cdot> \a>r,f, '< w]r \ f w',w]) \<cdot>
((\<>\star> ' <tar>w) \cdot> (\n> \s>w \c>\nu\cdot><>g"
using comp_assoc by simp
also have "... = (r \<star> \<theta>) \<cdot>proof -
(<>r w]\star <dot
((\<rho> \<star> w') \<star> w) \<cdot> (\<nu>' \<star> w) \<cdot>show ? Q?
-
have "seq \<a>[r, f, w' \<star> w] \<a>[r \<star> f, w', w]" by simp
eover"(r\<>\<> w, ] =\<java.lang.StringIndexOutOfBoundsException: Range [68, 66) out of bounds for length 99
by simp
moreover have "(r \<star> \<a>[f, w', w]) \<cdot> \<a>[r, f \<star> w', w] \<cdot> (\<a>[r, f, w'] \< includes bit_operations_syntax
\<a>[r, f, w' \<star> w] \<cdot> \<a>[r \<star> f, w', w]"
using pentagon by simp
ultimately have "(r \<star> \<a>\<^sup>-\<^sup>1
\<a>[r, f \<star> w', w] \<cdot> (\<a>[r, f, w'] \<star> w)"
using iso_assoc [of f w' w] iso_hcomp
invert_side_of_triangle(1)
[of "\<a>[r, f, w' \<star> w] \<cdot> \<a>[r \<star> f, w', w]" "r \<star> \<a>[f, w', w]"
"\<a>[r, f \<star> w', w] \<cdot> (\<a>[r, f, w'] \<star> w)"]
by simp
thus ?thesis
using comp_assoc by simp
qed
also have "... = (r \<star> \<theta>) \<cdot> \<a>[r, f', w] \<cdot>
(((r \<star> \<theta>') \<star> w) \<cdot> (\<a>[r, f, w'] \<star> w) \<cdot> ((\<rho> \<star> w') \<star> w)) \<cdot>
(\<nu>' \<star> w) \<cdot> \<nu> \<cdot> \<r>[g]"
proof -
have "(r \<star> \<theta>' \<star> w) \<cdot> \<a>[r, f \<star> w', w] = \<a>[r, f', w] \<cdot> ((r \<star> \<theta>') \<star> w)"
using assoc_naturality [of r \<theta>' w] by simp
thus ?thesis
using comp_assoc by simp
qed
also have "... = (r \<star> \<theta>) \<cdot> \<a>[r, f', w] \<cdot> (composite_cell w' \<theta>' \<star> w) \<cdot> (\<nu>' \<star> w) \<cdot> \<nu> \<cdot> \<r>[g]"
using whisker_right
by (metis T'.uw\<theta>\<omega> T'.w_in_hom(1) composite_cell_in_hom T'.\<theta>_simps(2) T'.ide_w
T.ide_w arrI seqE)
also have "... = (r \<star> \<theta>) \<cdot> \<a>[r, f', w] \<cdot> ((\<rho>' \<cdot> inv \<nu>' \<star> w) \<cdot> (\<nu>' \<star> w)) \<cdot> \<nu> \<cdot> \<r>[g]"
proof -
have "composite_cell w' \<theta>' = \<rho>' \<cdot> inv \<nu>'"
using assms invert_side_of_triangle(2) T.tab_simps(1) comp_assoc by presburger
thus ?thesis
using comp_assoc by simp
qed
also have "... = (T.composite_cell w \<theta> \<cdot> \<nu>) \<cdot> \<r>[g]"
using whisker_right [of w "\<rho>' \<cdot> inv \<nu>'" \<nu>'] dom_\<nu>' comp_assoc comp_inv_arr'
comp_arr_dom
by simp
also have "... = \<rho> \<cdot> \<r>[g]"
using assms(2) comp_assoc by simp
also have "... = composite_cell (src f) \<r>[f]"
using comp_assoc runit_hcomp runit_naturality [of \<rho>] by simp
finally show ?thesis by simp
qed
have eq': "(r \<star> \<r>[f]) \<cdot> \<a>[r, f, src f] \<cdot> (\<rho> \<star> src f) \<cdot> (inv (?\<nu>'\<nu> \<cdot> \<r>[g])) =
composite_cell (w' \<star> w) ?\<theta>\<theta>'"
proof -
have 1: "composite_cell (src f) \<r>[f] = (composite_cell (w' \<star> w) ?\<theta>\<theta>') \<cdot> ?\<nu>'\<nu> \<cdot> \<r>[g]"
using eq comp_assoc by simp
have "composite_cell (src f) \<r>[f] \<cdot> (inv (?\<nu>'\<nu> \<cdot> \<r>[g])) = composite_cell (w' \<star> w) ?\<theta>\<theta>'"
proof -
have "seq (r \<star> \<r>[f]) (\<a>[r, f, src f] \<cdot> (\<rho> \<star> src f))"
by fastforce
thus ?thesis
using iso_\<nu>'\<nu>_r 1 invert_side_of_triangle(2) by simp
qed
thus ?thesis
using comp_assoc by simp
qed
have \<nu>'\<nu>_r: "\<guillemotleft>?\<nu>'\<nu> \<cdot> \<r>[g] : g \<star> src f \<Rightarrow> g \<star> w' \<star> w\<guillemotright>"
by force
have inv_\<nu>'\<nu>_r: "\<guillemotleft>inv (?\<nu>'\<nu> \<cdot> \<r>[g]) : g \<star> w' \<star> w \<Rightarrow> g \<star> src f\<guillemotright>"
using \<nu>'\<nu> iso_\<nu>'\<nu>_r by auto
let ?P = "\<lambda>\<gamma>. \<guillemotleft>\<gamma> : src f \<Rightarrow> w' \<star> w\<guillemotright> \<and> ?\<nu>'\<nu> \<cdot> \<r>[g] = dom \<rho> \<star> \<gamma> \<and> \<r>[f] = ?\<theta>\<theta>' \<cdot> (f \<star> \<gamma>)"
let ?\<gamma> = "THE \<gamma>. ?P \<gamma>"
have "?P ?\<gamma>"
proof -
have "\<exists>!\<gamma>. ?P \<gamma>"
using \<nu>'\<nu>_r \<theta>\<theta>' eq T2 [of "src f" "w' \<star> w" "\<r>[f]" f ?\<theta>\<theta>' "?\<nu>'\<nu> \<cdot> \<r>[g]"] by simp
thus ?thesis
using the1_equality [of ?P] by blast
qed
hence \<gamma>: "\<guillemotleft>?\<gamma> : src f \<rightarrow> src f\<guillemotright> \<and> ?P ?\<gamma>"
using vconn_implies_hpar(1-2) by auto
let ?P' = "\<lambda>\<gamma>. \<guillemotleft>\<gamma> : w' \<star> w \<Rightarrow> src f\<guillemotright> \<and> inv (?\<nu>'\<nu> \<cdot> \<r>[g]) = g \<star> \<gamma> \<and> ?\<theta>\<theta>' = \<r>[f] \<cdot> (f \<star> \<gamma>)"
let ?\<gamma>' = "THE \<gamma>. ?P' \<gamma>"
have "?P' ?\<gamma>'"
proof -
have "\<exists>!\<gamma>. ?P' \<gamma>"
using inv_\<nu>'\<nu>_r \<theta>\<theta>' eq'
T2 [of "w' \<star> w" "src f" "\<theta> \<cdot> (\<theta>' \<star> w) \<cdot> \<a>\<^sup>-\<^sup>1[f, w', w]" f] comp_assoc
by simp
thus ?thesis
using the1_equality [of ?P'] by blast
qed
hence \<gamma>': "\<guillemotleft>?\<gamma>' : src f \<rightarrow> src f\<guillemotright> \<and> ?P' ?\<gamma>'"
using vconn_implies_hpar(1-2) by auto
have "inverse_arrows ?\<gamma> ?\<gamma>'"
proof
let ?Q = "\<lambda>\<gamma>. \<guillemotleft>\<gamma> : src f \<Rightarrow> src f\<guillemotright> \<and> dom \<rho> \<star> src f = g \<star> \<gamma> \<and> \<r>[f] = \<r>[f] \<cdot> (f \<star> \<gamma>)"
have "\<exists>!\<gamma>. ?Q \<gamma>"
proof -
have "ide (src f)" by simp
moreover have "\<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>" by simp
moreover have "\<guillemotleft>dom \<rho> \<star> src f : g \<star> src f \<Rightarrow> g \<star> src f\<guillemotright>" by auto
moreover have "(\<rho> \<star> src f) \<cdot> (dom \<rho> \<star> src f) = \<rho> \<star> src f"
proof -
have "(\<rho> \<star> src \<rho>) \<cdot> (dom \<rho> \<star> src (dom \<rho>)) = \<rho> \<star> src \<rho>"
using R.as_nat_trans.naturality1 arr_dom tab_simps(1) by presburger
thus ?thesis
by simp
qed
ultimately show ?thesis
using comp_arr_dom T2 [of "src f" "src f" "\<r>[f]" f "\<r>[f]" "dom \<rho> \<star> src f"]
comp_assoc
by metis
qed
moreover have "?Q (src f)"
using comp_arr_dom by auto
moreover have "?Q (?\<gamma>' \<cdot> ?\<gamma>)"
proof (intro conjI)
show "\<guillemotleft>?\<gamma>' \<cdot> ?\<gamma> : src f \<Rightarrow> src f\<guillemotright>"
using \<gamma> \<gamma>' by auto
show "dom \<rho> \<star> src f = g \<star> ?\<gamma>' \<cdot> ?\<gamma>"
proof -
have "g \<star> ?\<gamma>' \<cdot> ?\<gamma> = (g \<star> ?\<gamma>') \<cdot> (g \<star> ?\<gamma>)"
using \<gamma> \<gamma>' whisker_left by fastforce
also have "... = inv (?\<nu>'\<nu> \<cdot> \<r>[g]) \<cdot> (?\<nu>'\<nu> \<cdot> \<r>[g])"
using \<gamma> \<gamma>' by simp
also have "... = dom \<rho> \<star> src f"
using \<nu>'\<nu> iso_\<nu>'\<nu>_r comp_inv_arr inv_is_inverse by auto
finally show ?thesis by simp
qed
show "\<r>[f] = \<r>[f] \<cdot> (f \<star> ?\<gamma>' \<cdot> ?\<gamma>)"
proof -
have "\<r>[f] \<cdot> (f \<star> ?\<gamma>' \<cdot> ?\<gamma>) = \<r>[f] \<cdot> (f \<star> ?\<gamma>') \<cdot> (f \<star> ?\<gamma>)"
using \<gamma> \<gamma>' whisker_left by fastforce
also have "... = (\<r>[f] \<cdot> (f \<star> ?\<gamma>')) \<cdot> (f \<star> ?\<gamma>)"
using comp_assoc by simp
also have "... = \<r>[f]"
using \<gamma> \<gamma>' by simp
finally show ?thesis by simp
qed
qed
ultimately have "?\<gamma>' \<cdot> ?\<gamma> = src f" by blast
thus "ide (?\<gamma>' \<cdot> ?\<gamma>)" by simp
let ?Q' = "\<lambda>\<gamma>. \<guillemotleft>\<gamma> : w' \<star> w \<Rightarrow> w' \<star> w\<guillemotright> \<and> g \<star> w' \<star> w = g \<star> \<gamma> \<and> ?\<theta>\<theta>' = ?\<theta>\<theta>' \<cdot> (f \<star> \<gamma>)"
have "\<exists>!\<gamma>. ?Q' \<gamma>"
proof -
have "ide (w' \<star> w)" by simp
moreover have "\<guillemotleft>?\<theta>\<theta>' : f \<star> w' \<star> w \<Rightarrow> f\<guillemotright>"
using \<theta>\<theta>' by simp
moreover have "\<guillemotleft>g \<star> w' \<star> w : g \<star> w' \<star> w \<Rightarrow> g \<star> w' \<star> w\<guillemotright>"
by auto
moreover have
"composite_cell (w' \<star> w) ?\<theta>\<theta>' = composite_cell (w' \<star> w) ?\<theta>\<theta>' \<cdot> (g \<star> w' \<star> w)"
proof -
have "\<guillemotleft>\<rho> \<star> w' \<star> w : g \<star> w' \<star> w \<Rightarrow> (r \<star> f) \<star> w' \<star> w\<guillemotright>"
by (intro hcomp_in_vhom, auto)
hence "(\<rho> \<star> w' \<star> w) \<cdot> (g \<star> w' \<star> w) = \<rho> \<star> w' \<star> w"
using comp_arr_dom by auto
thus ?thesis
using comp_assoc by simp
qed
ultimately show ?thesis
using T2 by presburger
qed
moreover have "?Q' (w' \<star> w)"
using \<theta>\<theta>' comp_arr_dom by auto
moreover have "?Q' (?\<gamma> \<cdot> ?\<gamma>')"
proof (intro conjI)
show "\<guillemotleft>?\<gamma> \<cdot> ?\<gamma>' : w' \<star> w \<Rightarrow> w' \<star> w\<guillemotright>"
using \<gamma> \<gamma>' by auto
show "g \<star> w' \<star> w = g \<star> ?\<gamma> \<cdot> ?\<gamma>'"
proof -
have "g \<star> ?\<gamma> \<cdot> ?\<gamma>' = (g \<star> ?\<gamma>) \<cdot> (g \<star> ?\<gamma>')"
using \<gamma> \<gamma>' whisker_left by fastforce
also have "... = (?\<nu>'\<nu> \<cdot> \<r>[g]) \<cdot> inv (?\<nu>'\<nu> \<cdot> \<r>[g])"
using \<gamma> \<gamma>' by simp
also have "... = g \<star> w' \<star> w"
using \<nu>'\<nu> iso_\<nu>'\<nu>_r comp_arr_inv inv_is_inverse by auto
finally show ?thesis by simp
qed
show "?\<theta>\<theta>' = ?\<theta>\<theta>' \<cdot> (f \<star> ?\<gamma> \<cdot> ?\<gamma>')"
proof -
have "?\<theta>\<theta>' \<cdot> (f \<star> ?\<gamma> \<cdot> ?\<gamma>') = ?\<theta>\<theta>' \<cdot> (f \<star> ?\<gamma>) \<cdot> (f \<star> ?\<gamma>')"
using \<gamma> \<gamma>' whisker_left by fastforce
also have "... = (?\<theta>\<theta>' \<cdot> (f \<star> ?\<gamma>)) \<cdot> (f \<star> ?\<gamma>')"
using comp_assoc by simp
also have "... = ?\<theta>\<theta>'"
using \<gamma> \<gamma>' by simp
finally show ?thesis by simp
qed
qed
ultimately have "?\<gamma> \<cdot> ?\<gamma>' = w' \<star> w" by blast
thus "ide (?\<gamma> \<cdot> ?\<gamma>')" by simp
qed
hence "\<guillemotleft>?\<gamma> : src f \<Rightarrow> w' \<star> w\<guillemotright> \<and> iso ?\<gamma>"
using \<gamma> by auto
thus ?thesis by auto
qed
text \<open>
Now we can show that, given two tabulations of the same 1-cell,
there is an equivalence map between the apexes that extends to a transformation
of one tabulation into the other.
\<close>
lemma apex_unique_up_to_equivalence:
assumes "tabulation V H \<a> \<i> src trg r \<rho>' f' g'"
shows "\<exists>w w' \<phi> \<psi> \<theta> \<nu> \<theta>' \<nu>'.
equivalence_in_bicategory V H \<a> \<i> src trg w' w \<psi> \<phi> \<and>
\<guillemotleft>w : src f \<rightarrow> src f'\<guillemotright> \<and> \<guillemotleft>w' : src f' \<rightarrow> src f\<guillemotright> \<and>
\<guillemotleft>\<theta> : f' \<star> w \<Rightarrow> f\<guillemotright> \<and> \<guillemotleft>\<nu> : g \<Rightarrow> g' \<star> w\<guillemotright> \<and> iso \<nu> \<and>
\<rho> = (r \<star> \<theta>) \<cdot> \<a>[r, f', w] \<cdot> (\<rho>' \<star> w) \<cdot> \<nu> \<and>
\<guillemotleft>\<theta>' : f \<star> w' \<Rightarrow> f'\<guillemotright> \<and> \<guillemotleft>\<nu>' : g' \<Rightarrow> g \<star> w'\<guillemotright> \<and> iso \<nu>' \<and>
\<rho>' = (r \<star> \<theta>') \<cdot> \<a>[r, f, w'] \<cdot> (\<rho> \<star> w') \<cdot> \<nu>'"
proof -
interpret T': tabulation V H \<a> \<i> src trg r \<rho>' f' g'
using assms by auto
obtain w \<theta> \<nu>
where w\<theta>\<nu>: "ide w \<and> \<guillemotleft>\<theta> : f' \<star> w \<Rightarrow> f\<guillemotright> \<and> \<guillemotleft>\<nu> : g \<Rightarrow> g' \<star> w\<guillemotright> \<and> iso \<nu> \<and>
\<rho> = T'.composite_cell w \<theta> \<cdot> \<nu>"
using T'.T1 [of f \<rho>] ide_leg0 tab_in_hom by auto
obtain w' \<theta>' \<nu>'
where w'\<theta>'\<nu>': "ide w' \<and> \<guillemotleft>\<theta>' : f \<star> w' \<Rightarrow> f'\<guillemotright> \<and> \<guillemotleft>\<nu>' : g' \<Rightarrow> g \<star> w'\<guillemotright> \<and> iso \<nu>' \<and>
\<rho>' = composite_cell w' \<theta>' \<cdot> \<nu>'"
using T1 [of f' \<rho>'] T'.ide_leg0 T'.tab_in_hom by auto
obtain \<phi> where \<phi>: "\<guillemotleft>\<phi> : src f \<Rightarrow> w' \<star> w\<guillemotright> \<and> iso \<phi>"
using w\<theta>\<nu> w'\<theta>'\<nu>' apex_equivalence_lemma T'.tab_in_hom comp_assoc by metis
obtain \<psi> where \<psi>: "\<guillemotleft>\<psi> : src f' \<Rightarrow> w \<star> w'\<guillemotright> \<and> iso \<psi>"
using w\<theta>\<nu> w'\<theta>'\<nu>' T'.apex_equivalence_lemma tab_in_hom comp_assoc by metis
have 1: "src f = src w"
using \<phi> src_dom [of \<phi>] hcomp_simps(1) [of w' w]
by (metis arr_cod in_homE leg0_simps(2) src_hcomp src_src vconn_implies_hpar(3))
have 2: "src f' = src w'"
using \<psi> src_dom [of \<psi>] hcomp_simps(1) [of w w']
by (metis T'.leg0_simps(2) arr_cod in_homE src_hcomp src_src vconn_implies_hpar(3))
interpret E: equivalence_in_bicategory V H \<a> \<i> src trg w' w \<psi> \<open>inv \<phi>\<close>
using \<phi> \<psi> 1 2 w\<theta>\<nu> w'\<theta>'\<nu>' by unfold_locales auto
have "\<guillemotleft>w : src f \<rightarrow> src f'\<guillemotright>"
using \<psi> w\<theta>\<nu> 1 2 trg_cod hcomp_simps(2) E.antipar(1) by simp
moreover have "\<guillemotleft>w' : src f' \<rightarrow> src f\<guillemotright>"
using \<phi> w'\<theta>'\<nu>' 1 2 E.antipar(2) by simp
ultimately show ?thesis
using E.equivalence_in_bicategory_axioms w\<theta>\<nu> w'\<theta>'\<nu>' comp_assoc by metis
qed
end
subsection "`Tabulation' is Bicategorical"
text \<open>
In this section we show that ``tabulation'' is a truly bicategorical notion,
in the sense that tabulations are preserved and reflected by equivalence pseudofunctors.
The proofs given here is are elementary proofs from first principles.
It should also be possible to give a proof based on birepresentations,
but for this to actually save work it would first be necessary to carry out a general
development of birepresentations and bicategorical limits, and I have chosen not to
attempt this here.
\<close>
context equivalence_pseudofunctor
begin
lemma preserves_tabulation:
assumes "tabulation (\<cdot>\<^sub>C) (\<star>\<^sub>C) \<a>\<^sub>C \<i>\<^sub>C src\<^sub>C trg\<^sub>C r \<rho> f g"
shows "tabulation (\<cdot>\<^sub>D) (\<star>\<^sub>D) \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D (F r) (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho>) (F f) (F g)"
proof -
let ?\<rho>' = "D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho>"
interpret T: tabulation V\<^sub>C H\<^sub>C \<a>\<^sub>C \<i>\<^sub>C src\<^sub>C trg\<^sub>C r \<rho> f
using assms by auto
interpret T': tabulation_data V\<^sub>D H\<^sub>D \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D \<open>F r\<close> ?\<rho>' \<open>F f\<close> \<open>F g\<close>
using cmp_in_hom \<Phi>.components_are_iso C.VV.ide_char\<^sub>S\<^sub>b\<^sub>C C.VV.arr_char\<^sub>S\<^sub>b\<^sub>C
apply unfold_locales
apply auto
by (intro D.comp_in_homI, auto)
interpret T': tabulation V\<^sub>D H\<^sub>D \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D \<open>F r\<close> ?\<rho>' \<open>F f\<close> \<open>F g\<close>
text \<open>
How bad can it be to just show this directly from first principles?
It is worse than it at first seems, once you start filling in the details!
\<close>
proof
fix u' \<omega>'
assume u': "D.ide u'"
assume \<omega>': "\<guillemotleft>\<omega>' : D.dom \<omega>' \<Rightarrow>\<^sub>D F r \<star>\<^sub>D u'\<guillemotright>"
show "\<exists>w' \<theta>' \<nu>'. D.ide w' \<and> \<guillemotleft>\<theta>' : F f \<star>\<^sub>D w' \<Rightarrow>\<^sub>D u'\<guillemotright> \<and>
\<guillemotleft>\<nu>' : D.dom \<omega>' \<Rightarrow>\<^sub>D F g \<star>\<^sub>D w'\<guillemotright> \<and> D.iso \<nu>' \<and>
T'.composite_cell w' \<theta>' \<cdot>\<^sub>D \<nu>' = \<omega>'"
proof -
text \<open>
First, obtain \<open>\<omega>\<close> in \<open>C\<close> such that \<open>F \<omega>\<close> is related to \<open>\<omega>'\<close> by an equivalence in \<open>D\<close>.
\<close>
define v' where "v' = D.dom \<omega>'"
have v': "D.ide v'"
using assms v'_def D.ide_dom \<omega>' by blast
have \<omega>': "\<guillemotleft>\<omega>' : v' \<Rightarrow>\<^sub>D F r \<star>\<^sub>D u'\<guillemotright>"
using v'_def \<omega>' by simp
define a' where "a' = src\<^sub>D \<omega>'"
have [simp]: "src\<^sub>D u' = a'"
using a'_def \<omega>'
by (metis D.arr_cod D.ide_char D.in_homE D.src.preserves_cod D.src_dom
D.src_hcomp v')
have [simp]: "trg\<^sub>D u' = src\<^sub>D (F r)"
using \<omega>'
by (metis D.cod_trg D.in_homE D.not_arr_null D.seq_if_composable D.trg.extensionality
D.trg.preserves_arr D.trg.preserves_cod)
have [simp]: "src\<^sub>D v' = a'"
using v'_def \<omega>' a'_def by auto
have [simp]: "trg\<^sub>D v' = trg\<^sub>D (F r)"
using v'_def D.vconn_implies_hpar(4) \<omega>' u' by force
have [simp]: "src\<^sub>D \<omega>' = a'"
using \<omega>' a'_def by blast
have [simp]: "trg\<^sub>D \<omega>' = trg\<^sub>D (F r)"
using \<omega>' v'_def \<open>trg\<^sub>D v' = trg\<^sub>D (F r)\<close> by auto
obtain a where a: "C.obj a \<and> D.equivalent_objects (map\<^sub>0 a) a'"
using u' \<omega>' a'_def biessentially_surjective_on_objects D.obj_src by blast
obtain e' where e': "\<guillemotleft>e' : map\<^sub>0 a \<rightarrow>\<^sub>D a'\<guillemotright> \<and> D.equivalence_map e'"
using a D.equivalent_objects_def by auto
have u'_in_hhom: "\<guillemotleft>u' : a' \<rightarrow>\<^sub>D map\<^sub>0 (src\<^sub>C r)\<guillemotright>"
by (simp add: u')
hence 1: "\<guillemotleft>u' \<star>\<^sub>D e' : map\<^sub>0 a \<rightarrow>\<^sub>D map\<^sub>0 (src\<^sub>C r)\<guillemotright>"
using e' by blast
have v'_in_hhom: "\<guillemotleft>v' : a' \<rightarrow>\<^sub>D map\<^sub>0 (trg\<^sub>C r)\<guillemotright>"
by (simp add: v')
hence 2: "\<guillemotleft>v' \<star>\<^sub>D e' : map\<^sub>0 a \<rightarrow>\<^sub>D map\<^sub>0 (trg\<^sub>C r)\<guillemotright>"
using e' by blast
obtain d' \<eta>' \<epsilon>'
where d'\<eta>'\<epsilon>': "adjoint_equivalence_in_bicategory (\<cdot>\<^sub>D) (\<star>\<^sub>D) \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D e' d' \<eta>' \<epsilon>'"
using e' D.equivalence_map_extends_to_adjoint_equivalence by blast
interpret e': adjoint_equivalence_in_bicategory \<open>(\<cdot>\<^sub>D)\<close> \<open>(\<star>\<^sub>D)\<close> \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D e' d' \<eta>' \<epsilon>'
using d'\<eta>'\<epsilon>' by auto
interpret d': adjoint_equivalence_in_bicategory \<open>(\<cdot>\<^sub>D)\<close> \<open>(\<star>\<^sub>D)\<close> \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D
d' e' "D.inv \<epsilon>'" "D.inv \<eta>'"
using e'.dual_adjoint_equivalence by simp
have [simp]: "src\<^sub>D e' = map\<^sub>0 a"
using e' by auto
have [simp]: "trg\<^sub>D e' = a'"
using e' by auto
have [simp]: "src\<^sub>D d' = a'"
by (simp add: e'.antipar(2))
have [simp]: "trg\<^sub>D d' = map\<^sub>0 a"
using e'.antipar by simp
obtain u where u: "\<guillemotleft>u : a \<rightarrow>\<^sub>C src\<^sub>C r\<guillemotright> \<and> C.ide u \<and> D.isomorphic (F u) (u' \<star>\<^sub>D e')"
using a e' u' 1 u'_in_hhom locally_essentially_surjective [of a "src\<^sub>C r" "u' \<star>\<^sub>D e'"]
C.obj_src D.equivalence_map_is_ide T.base_simps(2)
by blast
obtain \<phi> where \<phi>: "\<guillemotleft>\<phi> : u' \<star>\<^sub>D e' \<Rightarrow>\<^sub>D F u\<guillemotright> \<and> D.iso \<phi>"
using u D.isomorphic_symmetric by blast
obtain v where v: "\<guillemotleft>v : a \<rightarrow>\<^sub>C trg\<^sub>C r\<guillemotright> \<and> C.ide v \<and> D.isomorphic (F v) (v' \<star>\<^sub>D e')"
using a e' v' v'_in_hhom locally_essentially_surjective [of a "trg\<^sub>C r" "v' \<star>\<^sub>D e'"]
C.obj_trg D.equivalence_map_is_ide T.base_simps(2)
by blast
obtain \<psi> where \<psi>: "\<guillemotleft>\<psi> : F v \<Rightarrow>\<^sub>D v' \<star>\<^sub>D e'\<guillemotright> \<and> D.iso \<psi>"
using v by blast
have [simp]: "src\<^sub>C u = a" using u by auto
have [simp]: "trg\<^sub>C u = src\<^sub>C r" using u by auto
have [simp]: "src\<^sub>C v = a" using v by auto
have [simp]: "trg\<^sub>C v = trg\<^sub>C r" using v by auto
have [simp]: "src\<^sub>D \<phi> = map\<^sub>0 a"
using \<phi> by (metis "1" D.dom_src D.in_hhomE D.in_homE D.src.preserves_dom)
have [simp]: "trg\<^sub>D \<phi> = trg\<^sub>D u'"
using \<phi>
by (metis D.cod_trg D.hseqI D.in_homE D.isomorphic_implies_hpar(4)
D.trg.preserves_cod D.trg_hcomp e' u u'_in_hhom)
have [simp]: "src\<^sub>D \<psi> = map\<^sub>0 a"
using \<psi>
by (metis C.in_hhomE D.in_homE D.src_dom \<open>src\<^sub>D e' = map\<^sub>0 a\<close> preserves_src v)
have [simp]: "trg\<^sub>D \<psi> = trg\<^sub>D v'"
using \<psi>
by (metis "2" D.cod_trg D.in_hhomE D.in_homE D.trg.preserves_cod T.base_simps(2)
\<open>trg\<^sub>D v' = trg\<^sub>D (F r)\<close> preserves_trg)
define F\<omega> where "F\<omega> = \<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi>"
have F\<omega>: "\<guillemotleft>F\<omega> : F v \<Rightarrow>\<^sub>D F (r \<star>\<^sub>C u)\<guillemotright>"
proof (unfold F\<omega>_def, intro D.comp_in_homI)
show "\<guillemotleft>\<psi> : F v \<Rightarrow>\<^sub>D v' \<star>\<^sub>D e'\<guillemotright>"
using \<psi> by simp
show "\<guillemotleft>\<omega>' \<star>\<^sub>D e' : v' \<star>\<^sub>D e' \<Rightarrow>\<^sub>D (F r \<star>\<^sub>D u') \<star>\<^sub>D e'\<guillemotright>"
using e' \<omega>' D.equivalence_map_is_ide v'_in_hhom by blast
show "\<guillemotleft>\<a>\<^sub>D[F r, u', e'] : (F r \<star>\<^sub>D u') \<star>\<^sub>D e' \<Rightarrow>\<^sub>D F r \<star>\<^sub>D u' \<star>\<^sub>D e'\<guillemotright>"
using e' u' D.equivalence_map_is_ide D.in_hhom_def u'_in_hhom by auto
show "\<guillemotleft>F r \<star>\<^sub>D \<phi> : F r \<star>\<^sub>D u' \<star>\<^sub>D e' \<Rightarrow>\<^sub>D F r \<star>\<^sub>D F u\<guillemotright>"
using e' u' u \<phi>
by (metis C.in_hhomE D.hcomp_in_vhom D.isomorphic_implies_hpar(4)
T'.base_in_hom(2) T.base_simps(2) preserves_src preserves_trg)
show "\<guillemotleft>\<Phi> (r, u) : F r \<star>\<^sub>D F u \<Rightarrow>\<^sub>D F (r \<star>\<^sub>C u)\<guillemotright>"
using u cmp_in_hom(2) [of r u] by auto
qed
obtain \<omega> where \<omega>: "\<guillemotleft>\<omega> : v \<Rightarrow>\<^sub>C r \<star>\<^sub>C u\<guillemotright> \<and> F \<omega> = F\<omega>"
using u v \<omega>' \<phi> \<psi> F\<omega> locally_full [of v "r \<star>\<^sub>C u" F\<omega>]
by (metis C.ide_hcomp C.hseqI C.in_hhomE C.src_hcomp C.trg_hcomp
T.ide_base T.base_in_hom(1))
have [simp]: "src\<^sub>C \<omega> = src\<^sub>C u"
using \<omega>
by (metis C.hseqI C.in_homE C.src_cod C.src_hcomp T.base_in_hom(1) u)
have [simp]: "trg\<^sub>C \<omega> = trg\<^sub>C r"
using \<omega>
by (metis C.ide_char C.ide_trg C.in_homE C.trg.preserves_hom \<open>trg\<^sub>C v = trg\<^sub>C r\<close>)
text \<open>Apply \<open>T.T1\<close> to \<open>u\<close> and \<open>\<omega>\<close> to obtain \<open>w\<close>, \<open>\<theta>\<close>, \<open>\<nu>\<close>.\<close>
obtain w \<theta> \<nu>
where w\<theta>\<nu>: "C.ide w \<and> \<guillemotleft>\<theta> : f \<star>\<^sub>C w \<Rightarrow>\<^sub>C u\<guillemotright> \<and> \<guillemotleft>\<nu> : C.dom \<omega> \<Rightarrow>\<^sub>C g \<star>\<^sub>C w\<guillemotright> \<and>
C.iso \<nu> \<and> T.composite_cell w \<theta> \<cdot>\<^sub>C \<nu> = \<omega>"
using u \<omega> T.T1 [of u \<omega>] by auto
text \<open>
Combining \<open>\<omega>\<close> and \<open>w\<theta>\<nu>\<close> yields the situation depicted in the diagram below.
In this as well as subsequent diagrams, canonical isomorphisms have been suppressed
in the interests of clarity.
$$
F (
\xy/67pt/
\xymatrix{
& {\scriptstyle{a}}
\xlowertwocell[ddddl]{}_{v}{^\nu}
\xuppertwocell[ddddr]{}^{u}{^\theta}
\ar@ {.>}[dd]^{w}
\\
\\
& \scriptstyle{{\rm src}~g \;=\;{\rm src}~f} \xtwocell[ddd]{}\omit{^\rho}
\ar[ddl] _{g}
\ar[ddr] ^{f}
\\
\\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll] ^{r}
\\
&
}
\endxy
)
\qquad = \qquad
\xy/67pt/
\xymatrix{
& {\scriptstyle{{\rm src}(F a)}}
\xlowertwocell[ddddl]{}^{<2>F v}{^{\psi}}
\xuppertwocell[ddddr]{}^{<2>F u}{^{\phi}}
\ar[dd] ^{e'}
\\
\\
& \scriptstyle{a'} \xtwocell[ddd]{}\omit{^{\omega'}}
\ar[ddl] _{v'}
\ar[ddr] ^{u'}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
$$
\<close>
have [simp]: "src\<^sub>C w = src\<^sub>C u"
by (metis C.arrI C.seqE C.src_hcomp C.src_vcomp C.vseq_implies_hpar(1)
\<omega> \<open>src\<^sub>C \<omega> = src\<^sub>C u\<close> w\<theta>\<nu>)
have [simp]: "trg\<^sub>C w = src\<^sub>C f"
by (metis C.arrI C.hseq_char C.seqE T.tab_simps(2) \<omega> w\<theta>\<nu>)
have [simp]: "src\<^sub>D (F u) = map\<^sub>0 a"
using e'.antipar(1) u by auto
have [simp]: "src\<^sub>D (F v) = map\<^sub>0 a"
using v e' e'.antipar by force
have [simp]: "src\<^sub>D (F w) = map\<^sub>0 a"
by (simp add: w\<theta>\<nu>)
have *: "F (T.composite_cell w \<theta> \<cdot>\<^sub>C \<nu>) =
\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu>"
text \<open>
$$
F (
\xy/67pt/
\xymatrix{
& {\scriptstyle{a}}
\xlowertwocell[ddddl]{}_{v}{^\nu}
\xuppertwocell[ddddr]{}^{u}{^\theta}
\ar[dd] ^{w}
\\
\\
& \scriptstyle{{\rm src}~g \;=\;{\rm src}~f} \xtwocell[ddd]{}\omit{^\rho}
\ar[ddl] _{g}
\ar[ddr] ^{f}
\\
\\
\scriptstyle{{\rm trg}~r} & & \scriptstyle{{\rm src}~r} \ar[ll] ^{r}
\\
&
}
\endxy
)
\qquad = \qquad
\xy/67pt/
\xymatrix{
& {\scriptstyle{{\rm src}(F a)}}
\xlowertwocell[ddddl]{}^{<2>F v}{^{F \nu}}
\xuppertwocell[ddddr]{}^{<2>F u}{^{F \theta}}
\ar[dd] ^{Fw}
\\
\\
& \scriptstyle{{\rm src}(F g) \;=\;{\rm src}(F f)} \xtwocell[ddd]{}\omit{^{F \rho}}
\ar[ddl] _{F g}
\ar[ddr] ^{F f}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
$$
\<close>
proof -
have "F (T.composite_cell w \<theta> \<cdot>\<^sub>C \<nu>) = F ((r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>C \<a>\<^sub>C[r, f, w] \<cdot>\<^sub>C (\<rho> \<star>\<^sub>C w) \<cdot>\<^sub>C \<nu>)"
using C.comp_assoc by simp
also have "... = F (r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>D F \<a>\<^sub>C[r, f, w] \<cdot>\<^sub>D F (\<rho> \<star>\<^sub>C w) \<cdot>\<^sub>D F \<nu>"
by (metis C.arr_dom_iff_arr C.comp_assoc C.in_homE C.seqE
as_nat_trans.preserves_comp_2 w\<theta>\<nu>)
also have "... =
F (r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>D (\<Phi> (r, f \<star>\<^sub>C w) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (r \<star>\<^sub>C f, w))) \<cdot>\<^sub>D F (\<rho> \<star>\<^sub>C w) \<cdot>\<^sub>D F \<nu>"
using \<omega> w\<theta>\<nu> preserves_assoc [of r f w]
by (metis C.hseqE C.in_homE C.seqE T.tab_simps(2) T.ide_leg0 T.ide_base
T.leg0_simps(3))
also have "... =
((F (r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>D \<Phi> (r, f \<star>\<^sub>C w)) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w))) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (r \<star>\<^sub>C f, w))) \<cdot>\<^sub>D F (\<rho> \<star>\<^sub>C w) \<cdot>\<^sub>D F \<nu>"
using D.comp_assoc by simp
also have "... =
\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (r \<star>\<^sub>C f, w)) \<cdot>\<^sub>D F (\<rho> \<star>\<^sub>C w)) \<cdot>\<^sub>D F \<nu>"
proof -
have "(F (r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>D \<Phi> (r, f \<star>\<^sub>C w)) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) =
(\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta>) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)))"
proof -
have "F (r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>D \<Phi> (r, f \<star>\<^sub>C w) = \<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta>)"
using \<omega> \<Phi>.naturality [of "(r, \<theta>)"] FF_def w\<theta>\<nu> C.VV.arr_char\<^sub>S\<^sub>b\<^sub>C
C.VV.dom_simp C.VV.cod_simp
apply simp
by (metis (no_types, lifting) C.hseqE C.in_homE C.seqE)
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = \<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w))"
proof -
have "(F r \<star>\<^sub>D F \<theta>) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) = F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)"
using \<omega> w\<theta>\<nu> D.whisker_right [of "F r" "F \<theta>" "\<Phi> (f, w)"]
by (metis C.hseqE C.in_homE C.seqE D.comp_ide_self D.interchange D.seqI'
T'.ide_base T'.base_in_hom(2) T.tab_simps(2) T.ide_leg0 cmp_in_hom(2)
preserves_hom)
thus ?thesis by simp
qed
finally have "(F (r \<star>\<^sub>C \<theta>) \<cdot>\<^sub>D \<Phi> (r, f \<star>\<^sub>C w)) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) =
\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w))"
by simp
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = \<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w))) \<cdot>\<^sub>D F \<nu>"
proof -
have "(D.inv (\<Phi> (r, f)) \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (r \<star>\<^sub>C f, w)) \<cdot>\<^sub>D F (\<rho> \<star>\<^sub>C w) =
((D.inv (\<Phi> (r, f)) \<star>\<^sub>D F w) \<cdot>\<^sub>D (F \<rho> \<star>\<^sub>D F w)) \<cdot>\<^sub>D D.inv (\<Phi> (g, w))"
proof -
have "D.inv (\<Phi> (r \<star>\<^sub>C f, w)) \<cdot>\<^sub>D F (\<rho> \<star>\<^sub>C w) = (F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w))"
proof -
have "src\<^sub>C (r \<star>\<^sub>C f) = trg\<^sub>C w"
using \<omega> w\<theta>\<nu>
by (metis C.arrI C.hseq_char C.seqE C.hcomp_simps(1) T.tab_simps(2)
T.leg0_simps(2) T.leg0_simps(3))
hence "D.seq (\<Phi> (r \<star>\<^sub>C f, w)) (F \<rho> \<star>\<^sub>D F w)"
using \<omega> w\<theta>\<nu> cmp_in_hom(2) [of "r \<star>\<^sub>C f" w] C.VV.arr_char\<^sub>S\<^sub>b\<^sub>C FF_def by auto
moreover have "\<Phi> (r \<star>\<^sub>C f, w) \<cdot>\<^sub>D (F \<rho> \<star>\<^sub>D F w) = F (\<rho> \<star>\<^sub>C w) \<cdot>\<^sub>D \<Phi> (g, w)"
using \<omega> w\<theta>\<nu> \<Phi>.naturality [of "(\<rho>, w)"] cmp_components_are_iso FF_def
C.VV.arr_char\<^sub>S\<^sub>b\<^sub>C C.VV.dom_simp C.VV.cod_simp
by simp
moreover have "D.iso (\<Phi> (r \<star>\<^sub>C f, w))"
using w\<theta>\<nu> cmp_components_are_iso
by (metis C.arrI C.ide_hcomp C.hseqE C.hseqI' C.seqE C.src_hcomp
T.tab_simps(2) T.ide_leg0 T.ide_base T.leg0_simps(2-3) \<omega>)
moreover have "D.iso (\<Phi> (g, w))"
using w\<theta>\<nu> cmp_components_are_iso
by (metis C.arrI C.hseqE C.seqE T.tab_simps(2) T.ide_leg1 T.leg1_simps(3) \<omega>)
ultimately show ?thesis
using \<omega> w\<theta>\<nu> \<Phi>.naturality cmp_components_are_iso FF_def C.VV.arr_char\<^sub>S\<^sub>b\<^sub>C
D.invert_opposite_sides_of_square
by presburger
qed
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w))"
using \<omega> w\<theta>\<nu> D.whisker_right cmp_components_are_iso cmp_in_hom D.comp_assoc
by auto
finally show ?thesis
using D.comp_assoc by simp
qed
finally show ?thesis
using D.comp_assoc by simp
qed
text \<open>We can now define the \<open>w'\<close>, \<open>\<theta>'\<close>, and \<open>\<nu>'\<close> that we are required to exhibit.\<close>
define \<phi>' where "\<phi>' = e'.trnr\<^sub>\<epsilon> u' (D.inv \<phi>)"
have "\<phi>' = \<r>\<^sub>D[u'] \<cdot>\<^sub>D (u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D \<a>\<^sub>D[u', e', d'] \<cdot>\<^sub>D (D.inv \<phi> \<star>\<^sub>D d')"
unfolding \<phi>'_def e'.trnr\<^sub>\<epsilon>_def by simp
have \<phi>': "\<guillemotleft>\<phi>' : F u \<star>\<^sub>D d' \<Rightarrow>\<^sub>D u'\<guillemotright>"
using \<phi> \<phi>'_def u u' e'.adjoint_transpose_right(2) [of u' "F u"] by auto
have [simp]: "src\<^sub>D \<phi>' = src\<^sub>D u'"
using \<phi>' by fastforce
have [simp]: "trg\<^sub>D \<phi>' = trg\<^sub>D u'"
using \<phi>' by fastforce
define \<psi>' where "\<psi>' = d'.trnr\<^sub>\<eta> v' (D.inv \<psi>)"
have \<psi>'_eq: "\<psi>' = (D.inv \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d'] \<cdot>\<^sub>D (v' \<star>\<^sub>D D.inv \<epsilon>') \<cdot>\<^sub>D \<r>\<^sub>D\<^sup>-\<^sup>1[v']"
unfolding \<psi>'_def d'.trnr\<^sub>\<eta>_def by simp
have \<psi>': "\<guillemotleft>\<psi>' : v' \<Rightarrow>\<^sub>D F v \<star>\<^sub>D d'\<guillemotright>"
using \<psi> \<psi>'_def v v' d'.adjoint_transpose_right(1) [of "F v" v'] by auto
have iso_\<psi>': "D.iso \<psi>'"
unfolding \<psi>'_def d'.trnr\<^sub>\<eta>_def
using \<psi> e'.counit_is_iso
by (metis D.arrI D.iso_hcomp D.hseq_char D.ide_is_iso D.iso_assoc'
D.iso_inv_iso D.iso_runit' D.isos_compose D.seqE \<psi>'_eq
\<psi>' d'.unit_simps(5) e'.antipar(1) e'.antipar(2) e'.ide_left e'.ide_right v')
have [simp]: "src\<^sub>D \<psi>' = src\<^sub>D v'"
using \<psi>' by fastforce
have [simp]: "trg\<^sub>D \<psi>' = trg\<^sub>D v'"
using \<psi>' by fastforce
define w' where "w' = F w \<star>\<^sub>D d'"
define \<theta>' where "\<theta>' = \<phi>' \<cdot>\<^sub>D (F \<theta> \<cdot>\<^sub>D \<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']"
define \<nu>' where "\<nu>' = \<a>\<^sub>D[F g, F w, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
have w': "D.ide w' \<and> \<guillemotleft>w' : src\<^sub>D u' \<rightarrow>\<^sub>D src\<^sub>D (F f)\<guillemotright>"
using w'_def \<omega> w\<theta>\<nu> by simp
have \<theta>': "\<guillemotleft>\<theta>' : F f \<star>\<^sub>D w' \<Rightarrow>\<^sub>D u'\<guillemotright>"
unfolding \<theta>'_def w'_def
using \<phi>' \<omega> w\<theta>\<nu> cmp_in_hom
apply (intro D.comp_in_homI D.hcomp_in_vhom)
apply auto
by (intro D.comp_in_homI D.hcomp_in_vhom, auto)
have \<nu>': "\<guillemotleft>\<nu>' : v' \<Rightarrow>\<^sub>D F g \<star>\<^sub>D w'\<guillemotright>"
unfolding \<nu>'_def w'_def
using \<psi>' \<omega> w\<theta>\<nu> cmp_in_hom cmp_components_are_iso
apply (intro D.comp_in_homI)
apply auto
by (intro D.hcomp_in_vhom D.comp_in_homI, auto)
have iso_\<nu>': "D.iso \<nu>'"
using \<nu>'_def iso_\<psi>' cmp_in_hom D.isos_compose preserves_iso
by (metis (no_types, lifting) C.ideD(1) D.arrI D.iso_hcomp D.hseqE D.ide_is_iso
D.iso_assoc D.iso_inv_iso D.seqE T.ide_leg1 T.leg1_simps(3) cmp_components_are_iso
\<nu>' \<open>src\<^sub>D (F w) = map\<^sub>0 a\<close> \<open>src\<^sub>D e' = map\<^sub>0 a\<close> \<open>trg\<^sub>C w = src\<^sub>C f\<close> e'.antipar(1)
e'.ide_right preserves_ide preserves_src preserves_trg w\<theta>\<nu>)
have "T'.composite_cell w' \<theta>' \<cdot>\<^sub>D \<nu>' = \<omega>'"
text \<open>
$$
\xy/67pt/
\xymatrix{
&
\xlowertwocell[ddddddl]{\scriptstyle{a'}}<-13>^{<2>v'}{^{\psi'}}
\xuppertwocell[ddddddr]{}<13>^{<2>u'}{^{\phi'}}
\ar [dd] ^{d'}
\\
\\
& {\scriptstyle{{\rm src}(F g) \;=\;{\rm src}(F f)}}
\xlowertwocell[ddddl]{}^{<2>F v}{^{F \nu}}
\xuppertwocell[ddddr]{}^{<2>F u}{^{F \theta}}
\ar[dd] ^{Fw}
\\
\\
& \scriptstyle{a'} \xtwocell[ddd]{}\omit{^{F \rho}}
\ar[ddl] _{F g}
\ar[ddr] ^{F f}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
\qquad = \qquad
\xy/33pt/
\xymatrix{
& \scriptstyle{\scriptstyle{a'}} \xtwocell[ddd]{}\omit{^{\omega'}}
\ar[ddl] _{v'}
\ar[ddr] ^{u'}
\\
\\
\scriptstyle{{\rm trg}~(Fr)} & & \scriptstyle{{\rm src}~(Fr)} \ar[ll] ^{Fr}
\\
&
}
\endxy
$$
\<close>
proof -
have 1: "\<guillemotleft>T'.composite_cell w' \<theta>' \<cdot>\<^sub>D \<nu>' : v' \<Rightarrow>\<^sub>D F r \<star>\<^sub>D u'\<guillemotright>"
using w' \<theta>' \<nu>' w\<theta>\<nu> T'.composite_cell_in_hom by blast
have "T'.composite_cell w' \<theta>' \<cdot>\<^sub>D \<nu>' =
(F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D
(F (T.composite_cell w \<theta> \<cdot>\<^sub>C \<nu>) \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "T'.composite_cell w' \<theta>' \<cdot>\<^sub>D \<nu>' =
(F r \<star>\<^sub>D \<phi>' \<cdot>\<^sub>D (F \<theta> \<cdot>\<^sub>D \<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f, w'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D w') \<cdot>\<^sub>D \<a>\<^sub>D[F g, F w, d'] \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using \<theta>'_def \<nu>'_def D.comp_assoc by simp
also have
"... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D (F \<theta> \<cdot>\<^sub>D \<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D[F g, F w, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using \<theta>' \<theta>'_def w'_def D.comp_assoc D.whisker_left by auto
also have
"... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D (F \<theta> \<star>\<^sub>D d') \<cdot>\<^sub>D (\<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D[F g, F w, d']) \<cdot>\<^sub>D (D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using \<theta>' \<theta>'_def D.whisker_right cmp_in_hom D.comp_assoc by fastforce
also have
"... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D (F \<theta> \<star>\<^sub>D d') \<cdot>\<^sub>D (\<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<cdot>\<^sub>D
\<a>\<^sub>D[F r \<star>\<^sub>D F f, F w, d'] \<cdot>\<^sub>D ((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d') \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F g, F w, d'] =
\<a>\<^sub>D[F r \<star>\<^sub>D F f, F w, d'] \<cdot>\<^sub>D ((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d')"
using D.assoc_naturality [of "D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho>" "F w" d']
cmp_in_hom cmp_components_are_iso
by (simp add: w\<theta>\<nu>)
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<cdot>\<^sub>D \<a>\<^sub>D[F r \<star>\<^sub>D F f, F w, d']) \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d') \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using 1 D.whisker_left D.comp_assoc
by (metis D.arrI D.hseq_char D.seqE T'.ide_base calculation)
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<star>\<^sub>D d') \<cdot>\<^sub>D ((F r \<star>\<^sub>D \<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f \<star>\<^sub>D F w, d']) \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F f, F w] \<star>\<^sub>D d') \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d') \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "D.seq \<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<a>\<^sub>D[F r \<star>\<^sub>D F f, F w, d']"
by (metis 1 D.arrI D.seqE calculation)
hence "(F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[F f, F w, d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<cdot>\<^sub>D
\<a>\<^sub>D[F r \<star>\<^sub>D F f, F w, d'] =
\<a>\<^sub>D[F r, F f \<star>\<^sub>D F w, d'] \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F f, F w] \<star>\<^sub>D d')"
using w\<theta>\<nu> D.pentagon
D.invert_side_of_triangle(1)
[of "\<a>\<^sub>D[F r, F f, F w \<star>\<^sub>D d'] \<cdot>\<^sub>D \<a>\<^sub>D[F r \<star>\<^sub>D F f, F w, d']"
"F r \<star>\<^sub>D \<a>\<^sub>D[F f, F w, d']"
"\<a>\<^sub>D[F r, F f \<star>\<^sub>D F w, d'] \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F f, F w] \<star>\<^sub>D d')"]
by (simp add: w\<theta>\<nu>)
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D ((F r \<star>\<^sub>D F \<theta> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F (f \<star>\<^sub>C w), d']) \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<Phi> (f, w)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F f, F w] \<star>\<^sub>D d') \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d') \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "(F r \<star>\<^sub>D \<Phi> (f, w) \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f \<star>\<^sub>D F w, d'] =
\<a>\<^sub>D[F r, F (f \<star>\<^sub>C w), d'] \<cdot>\<^sub>D ((F r \<star>\<^sub>D \<Phi> (f, w)) \<star>\<^sub>D d')"
using 1 w\<theta>\<nu> D.assoc_naturality [of "F r" "\<Phi> (f, w)" d']
\<open>trg\<^sub>C w = src\<^sub>C f\<close> e'.ide_right
by (metis D.arrI D.hseq_char D.ide_char D.seqE T'.base_simps(3)
T'.base_simps(4) T'.leg0_simps(3) T.ide_leg0 cmp_simps(1-5) w'_def)
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (((F r \<star>\<^sub>D F \<theta>) \<star>\<^sub>D d') \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<Phi> (f, w)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F f, F w] \<star>\<^sub>D d') \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d') \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d')) \<cdot>\<^sub>D \<psi>'"
proof -
have "src\<^sub>D (F r) = trg\<^sub>D (F \<theta>)"
using w\<theta>\<nu> by (metis C.arrI C.hseqE C.seqE \<omega> preserves_hseq)
moreover have "src\<^sub>D (F \<theta>) = trg\<^sub>D d'"
using w\<theta>\<nu> C.arrI C.vconn_implies_hpar(1) by auto
ultimately
have "(F r \<star>\<^sub>D F \<theta> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F (f \<star>\<^sub>C w), d'] =
\<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D ((F r \<star>\<^sub>D F \<theta>) \<star>\<^sub>D d')"
using w\<theta>\<nu> D.assoc_naturality [of "F r" "F \<theta>" d'] by auto
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
(((F r \<star>\<^sub>D F \<theta>) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w))) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "((F r \<star>\<^sub>D F \<theta>) \<star>\<^sub>D d') \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<Phi> (f, w)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F f, F w] \<star>\<^sub>D d') \<cdot>\<^sub>D
((D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<star>\<^sub>D d') \<cdot>\<^sub>D
(D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') =
(F r \<star>\<^sub>D F \<theta>) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu>
\<star>\<^sub>D d'"
proof -
have "\<guillemotleft>(F r \<star>\<^sub>D F \<theta>) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> :
F v \<Rightarrow>\<^sub>D F r \<star>\<^sub>D F u\<guillemotright>"
using w\<theta>\<nu> \<omega> cmp_in_hom
apply (intro D.comp_in_homI)
apply auto
by (intro D.hcomp_in_vhom, auto)
hence "D.arr ((F r \<star>\<^sub>D F \<theta>) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu>)"
by auto
thus ?thesis
using D.whisker_right by fastforce
qed
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using w\<theta>\<nu> D.whisker_left cmp_in_hom
by (metis D.seqI' T'.ide_base T.ide_leg0 \<open>trg\<^sub>C w = src\<^sub>C f\<close> preserves_hom)
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, u)) \<cdot>\<^sub>D \<Phi> (r, u) \<cdot>\<^sub>D
(F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w))) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "(D.inv (\<Phi> (r, u)) \<cdot>\<^sub>D \<Phi> (r, u)) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) =
F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)"
proof -
have "(D.inv (\<Phi> (r, u)) \<cdot>\<^sub>D \<Phi> (r, u)) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) =
(F r \<star>\<^sub>D F u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w))"
using u cmp_components_are_iso
by (simp add: D.comp_inv_arr')
also have "... = F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)"
using u \<omega> w\<theta>\<nu> cmp_in_hom \<open>trg\<^sub>C u = src\<^sub>C r\<close>
D.comp_cod_arr [of "F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)" "F r \<star>\<^sub>D F u"]
by (metis (full_types) "*" D.arrI D.cod_comp D.seqE F\<omega> T.ide_base
cmp_simps(4))
finally show ?thesis by blast
qed
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, u)) \<cdot>\<^sub>D \<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using D.comp_assoc by simp
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D
(\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D \<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D
(D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "D.inv (\<Phi> (r, u)) \<cdot>\<^sub>D \<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d' =
(D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D F \<theta> \<cdot>\<^sub>D \<Phi> (f, w)) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, F f, F w] \<cdot>\<^sub>D (D.inv (\<Phi> (r, f)) \<cdot>\<^sub>D F \<rho> \<star>\<^sub>D F w) \<cdot>\<^sub>D
D.inv (\<Phi> (g, w)) \<cdot>\<^sub>D F \<nu> \<star>\<^sub>D d')"
using D.whisker_right cmp_in_hom cmp_components_are_iso
by (metis * D.arrI D.invert_side_of_triangle(1) F\<omega> T.ide_base \<omega>
\<open>trg\<^sub>C u = src\<^sub>C r\<close> e'.ide_right u w\<theta>\<nu>)
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D
(F (T.composite_cell w \<theta> \<cdot>\<^sub>C \<nu>) \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using D.comp_assoc * by simp
finally show ?thesis by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D
(F \<omega> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using w\<theta>\<nu> by simp
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D
(\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D
\<psi>'"
using \<omega> F\<omega>_def by simp
text \<open>
$$
\xy/67pt/
\xymatrix{
& {\scriptstyle{a'}}
\xlowertwocell[ddddl]{}^{<2>F v}{^{\psi'}}
\xuppertwocell[ddddr]{}^{<2>F u}{^{\phi'}}
\ar@ {.}[dd] ^{d'}
\\
\\
& \scriptstyle{{\rm src}(F a)} \xtwocell[ddd]{}\omit{^{F \omega}}
\ar[ddl] _{F v}
\ar[ddr] ^{F u}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
\qquad = \qquad
\xy/67pt/
\xymatrix{
&
\xlowertwocell[ddddddl]{\scriptstyle{a'}}<-13>^{<2>v'}{^{\psi'}}
\xuppertwocell[ddddddr]{}<13>^{<2>u'}{^{\phi'}}
\ar@ {.}[dd] ^{d'}
\\
\\
& {\scriptstyle{{\rm src}(F a)}}
\xlowertwocell[ddddl]{}^{<2>F v}{^{\psi}}
\xuppertwocell[ddddr]{}^{<2>F u}{^{\phi}}
\ar@ {.}[dd] ^{e'}
\\
\\
& \scriptstyle{a'} \xtwocell[ddd]{}\omit{^{\omega'}}
\ar[ddl] _{v'}
\ar[ddr] ^{u'}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
$$
\<close>
also have "... = \<omega>'"
text \<open>
$$
\xy/67pt/
\xymatrix{
&
\xlowertwocell[ddddddl]{\scriptstyle{a'}}<-13>^{<2>v'}{^{\psi'}}
\xuppertwocell[ddddddr]{}<13>^{<2>u'}{^{\phi'}}
\ar[dd] ^{d'}
\\
\\
& {\scriptstyle{{\rm src}(F a)}}
\xlowertwocell[ddddl]{}^{<2>F v}{^{\psi}}
\xuppertwocell[ddddr]{}^{<2>F u}{^{\phi}}
\ar[dd] ^{e'}
\\
\\
& \scriptstyle{a'} \xtwocell[ddd]{}\omit{^{\omega'}}
\ar[ddl] _{v'}
\ar[ddr] ^{u'}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
\qquad = \qquad
\xy/33pt/
\xymatrix{
& \scriptstyle{a'} \xtwocell[ddd]{}\omit{^{\omega'}}
\ar[ddl] _{v'}
\ar[ddr] ^{u'}
\\
\\
\scriptstyle{{\rm trg}~(F r)} & & \scriptstyle{{\rm src}~)(F r)} \ar[ll] ^{F r}
\\
&
}
\endxy
$$
\<close>
proof -
have "(F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D (D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D
(\<Phi> (r, u) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>' =
(F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<Phi> (r, u) \<star>\<^sub>D d')) \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using D.whisker_right cmp_in_hom D.comp_assoc
by (metis D.arrI F\<omega> F\<omega>_def e'.ide_right)
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "(D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<Phi> (r, u) \<star>\<^sub>D d') =
D.inv (\<Phi> (r, u)) \<cdot>\<^sub>D \<Phi> (r, u) \<star>\<^sub>D d'"
using cmp_in_hom cmp_components_are_iso D.whisker_right
by (metis C.hseqI D.comp_arr_inv' D.in_homE D.invert_opposite_sides_of_square
D.iso_inv_iso T.ide_base T.base_in_hom(1) \<open>trg\<^sub>C u = src\<^sub>C r\<close> e'.ide_right
preserves_arr u)
also have "... = (F r \<star>\<^sub>D F u) \<star>\<^sub>D d'"
using u cmp_components_are_iso D.comp_inv_arr' by simp
finally have "(F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((D.inv (\<Phi> (r, u)) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<Phi> (r, u) \<star>\<^sub>D d')) \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>' =
(F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D ((F r \<star>\<^sub>D F u) \<star>\<^sub>D d') \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
by simp
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D ((F r \<star>\<^sub>D F u) \<star>\<^sub>D d')) \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using D.comp_assoc by auto
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D \<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using u D.comp_arr_dom by simp
finally show ?thesis by blast
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (\<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D
((F r \<star>\<^sub>D \<phi>) \<star>\<^sub>D d')) \<cdot>\<^sub>D (\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d') \<cdot>\<^sub>D
((\<omega>' \<star>\<^sub>D e') \<star>\<^sub>D d') \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have
"(F r \<star>\<^sub>D \<phi>) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e') \<cdot>\<^sub>D \<psi> \<star>\<^sub>D d' =
((F r \<star>\<^sub>D \<phi>) \<star>\<^sub>D d') \<cdot>\<^sub>D (\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d') \<cdot>\<^sub>D ((\<omega>' \<star>\<^sub>D e') \<star>\<^sub>D d') \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D d')"
using D.whisker_right \<phi> \<phi>' e' e'.antipar(1) u' u'_in_hhom
by (metis D.arrI D.seqE F\<omega> F\<omega>_def e'.ide_right)
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d'] \<cdot>\<^sub>D
((\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d') \<cdot>\<^sub>D ((\<omega>' \<star>\<^sub>D e') \<star>\<^sub>D d')) \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "\<a>\<^sub>D[F r, F u, d'] \<cdot>\<^sub>D ((F r \<star>\<^sub>D \<phi>) \<star>\<^sub>D d') =
(F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d']"
using D.assoc_naturality [of "F r" \<phi> d'] \<phi> by auto
thus ?thesis
using D.comp_assoc by simp
qed
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d'] \<cdot>\<^sub>D
((\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d') \<cdot>\<^sub>D (\<a>\<^sub>D\<^sup>-\<^sup>1[F r \<star>\<^sub>D u', e', d'] \<cdot>\<^sub>D
(\<omega>' \<star>\<^sub>D e' \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[v', e', d'])) \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
using F\<omega> F\<omega>_def \<omega>' D.comp_assoc D.hcomp_reassoc(1) [of \<omega>' e' d']
by (elim D.in_homE, simp)
also have "... = (F r \<star>\<^sub>D \<phi>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) \<cdot>\<^sub>D
\<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e' \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[v', e', d'] \<cdot>\<^sub>D
(\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<psi>'"
proof -
have "D.seq (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d'])
(\<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d'] \<cdot>\<^sub>D (\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d'))"
using u' by simp
moreover have "(F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d'] \<cdot>\<^sub>D
(\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d') =
\<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d'] \<cdot>\<^sub>D \<a>\<^sub>D[F r \<star>\<^sub>D u', e', d']"
using u' D.pentagon by simp
moreover have "D.iso (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d'])"
using u' by simp
moreover have "D.inv (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']) = F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']"
using u' by simp
ultimately
have "\<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d'] \<cdot>\<^sub>D (\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[F r \<star>\<^sub>D u', e', d'] =
(F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d']"
using u' D.comp_assoc
D.invert_opposite_sides_of_square
[of "F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']"
"\<a>\<^sub>D[F r, u' \<star>\<^sub>D e', d'] \<cdot>\<^sub>D (\<a>\<^sub>D[F r, u', e'] \<star>\<^sub>D d')"
"\<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d']" "\<a>\<^sub>D[F r \<star>\<^sub>D u', e', d']"]
by simp
thus ?thesis
using D.comp_assoc by metis
qed
also have
"... = (F r \<star>\<^sub>D \<r>\<^sub>D[u'] \<cdot>\<^sub>D (u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D \<a>\<^sub>D[u', e', d'] \<cdot>\<^sub>D (D.inv \<phi> \<star>\<^sub>D d')) \<cdot>\<^sub>D
(F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d'] \<cdot>\<^sub>D
(\<omega>' \<star>\<^sub>D e' \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D[v', e', d'] \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D (D.inv \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d'] \<cdot>\<^sub>D (v' \<star>\<^sub>D D.inv \<epsilon>') \<cdot>\<^sub>D \<r>\<^sub>D\<^sup>-\<^sup>1[v']"
unfolding \<phi>'_def \<psi>'_def e'.trnr\<^sub>\<epsilon>_def d'.trnr\<^sub>\<eta>_def by simp
also have
"... = (F r \<star>\<^sub>D \<r>\<^sub>D[u']) \<cdot>\<^sub>D (F r \<star>\<^sub>D u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']) \<cdot>\<^sub>D
(F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D
(F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e' \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D[v', e', d'] \<cdot>\<^sub>D (\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D (D.inv \<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d'] \<cdot>\<^sub>D
(v' \<star>\<^sub>D D.inv \<epsilon>') \<cdot>\<^sub>D \<r>\<^sub>D\<^sup>-\<^sup>1[v']"
proof -
have "F r \<star>\<^sub>D \<r>\<^sub>D[u'] \<cdot>\<^sub>D (u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D \<a>\<^sub>D[u', e', d'] \<cdot>\<^sub>D (D.inv \<phi> \<star>\<^sub>D d') =
(F r \<star>\<^sub>D \<r>\<^sub>D[u']) \<cdot>\<^sub>D (F r \<star>\<^sub>D u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']) \<cdot>\<^sub>D
(F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d')"
proof -
have "D.ide (F r)" by simp
moreover have "D.seq \<r>\<^sub>D[u'] ((u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D \<a>\<^sub>D[u', e', d'] \<cdot>\<^sub>D (D.inv \<phi> \<star>\<^sub>D d')) \<and>
D.seq (u' \<star>\<^sub>D \<epsilon>') (\<a>\<^sub>D[u', e', d'] \<cdot>\<^sub>D (D.inv \<phi> \<star>\<^sub>D d')) \<and>
D.seq \<a>\<^sub>D[u', e', d'] (D.inv \<phi> \<star>\<^sub>D d')"
using \<phi>' \<phi>'_def unfolding e'.trnr\<^sub>\<epsilon>_def by blast
ultimately show ?thesis
using D.whisker_left by metis
qed
thus ?thesis
using D.comp_assoc by simp
qed
also have
"... = (F r \<star>\<^sub>D \<r>\<^sub>D[u']) \<cdot>\<^sub>D (F r \<star>\<^sub>D u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']) \<cdot>\<^sub>D
(((F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d')) \<cdot>\<^sub>D
(F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d'])) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e' \<star>\<^sub>D d') \<cdot>\<^sub>D
\<a>\<^sub>D[v', e', d'] \<cdot>\<^sub>D (((\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D (D.inv \<psi> \<star>\<^sub>D d')) \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d']) \<cdot>\<^sub>D
(v' \<star>\<^sub>D D.inv \<epsilon>') \<cdot>\<^sub>D \<r>\<^sub>D\<^sup>-\<^sup>1[v']"
using D.comp_assoc by simp
also have
"... = (F r \<star>\<^sub>D \<r>\<^sub>D[u']) \<cdot>\<^sub>D (F r \<star>\<^sub>D u' \<star>\<^sub>D \<epsilon>') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D[u', e', d']) \<cdot>\<^sub>D
(F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) \<cdot>\<^sub>D \<a>\<^sub>D[F r, u', e' \<star>\<^sub>D d'] \<cdot>\<^sub>D (\<omega>' \<star>\<^sub>D e' \<star>\<^sub>D d') \<cdot>\<^sub>D
((\<a>\<^sub>D[v', e', d'] \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d']) \<cdot>\<^sub>D (v' \<star>\<^sub>D D.inv \<epsilon>')) \<cdot>\<^sub>D \<r>\<^sub>D\<^sup>-\<^sup>1[v']"
proof -
have "((F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d')) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) =
F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']"
proof -
have "(F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') = F r \<star>\<^sub>D D.inv \<phi> \<cdot>\<^sub>D \<phi> \<star>\<^sub>D d'"
using u u' \<phi> 1 2 D.src_dom e'.antipar D.whisker_left D.whisker_right
by auto
also have "... = F r \<star>\<^sub>D (u' \<star>\<^sub>D e') \<star>\<^sub>D d'"
using \<phi> D.comp_inv_arr' by auto
finally have
"(F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d') = F r \<star>\<^sub>D (u' \<star>\<^sub>D e') \<star>\<^sub>D d'"
by simp
hence
"((F r \<star>\<^sub>D D.inv \<phi> \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<phi> \<star>\<^sub>D d')) \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']) =
(F r \<star>\<^sub>D (u' \<star>\<^sub>D e') \<star>\<^sub>D d') \<cdot>\<^sub>D (F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d'])"
using D.comp_assoc by simp
also have "... = F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d']"
proof -
have "\<guillemotleft>F r \<star>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[u', e', d'] :
F r \<star>\<^sub>D u' \<star>\<^sub>D e' \<star>\<^sub>D d' \<Rightarrow>\<^sub>D F r \<star>\<^sub>D (u' \<star>\<^sub>D e') \<star>\<^sub>D d'\<guillemotright>"
using u' e'.antipar \<phi>' D.assoc'_in_hom
unfolding e'.trnr\<^sub>\<epsilon>_def
by (intro D.hcomp_in_vhom, auto)
thus ?thesis
using D.comp_cod_arr by blast
qed
finally show ?thesis by simp
qed
moreover have
"((\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D (D.inv \<psi> \<star>\<^sub>D d')) \<cdot>\<^sub>D \<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d'] = \<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d']"
proof -
have "(\<psi> \<star>\<^sub>D d') \<cdot>\<^sub>D (D.inv \<psi> \<star>\<^sub>D d') = (v' \<star>\<^sub>D e') \<star>\<^sub>D d'"
using \<psi> e'.antipar D.src_cod v' e'.antipar \<psi>' d'.trnr\<^sub>\<eta>_def
D.whisker_right [of d' \<psi> "D.inv \<psi>"] D.comp_arr_inv'
by auto
moreover have "\<guillemotleft>\<a>\<^sub>D\<^sup>-\<^sup>1[v', e', d'] : v' \<star>\<^sub>D e' \<star>\<^sub>D d' \<Rightarrow>\<^sub>D (v' \<star>\<^sub>D e') \<star>\<^sub>D d'\<guillemotright>" | | |