This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\lmcsdoi

1713 \lmcsheadingLABEL:LastPageSep. 14, 2020Jan. 22, 2021

2-adjoint equivalences in homotopy type theory

Daniel Carranza Department of Mathematics, University of Western Ontario http://daniel-carranza.github.io/ [email protected] Jonathan Chang Department of Combinatorics and Optimization, University of Waterloo [email protected] Krzysztof Kapulkin Department of Mathematics, University of Western Ontario [email protected]  and  Ryan Sandford Department of Computer Science, University of Western Ontario [email protected]
Abstract.

We introduce the notion of (half) 2-adjoint equivalences in Homotopy Type Theory and prove their expected properties. We formalized these results in the Lean Theorem Prover.

Key words and phrases:
homotopy type theory, quasi-inverse, adjoint equivalence, 2-adjunction

Introduction

There are numerous notions of equivalence in homotopy type theory: bi-invertible maps, contractible maps, and half adjoint equivalences. Other natural choices, such as quasi-invertible maps and adjoint equivalences, while logically equivalent to the above, are not propositions, making them unsuitable to serve as the definition of an equivalence. One can use a simple semantical argument, which in essence comes down to analyzing subcomplexes of the nerve of the groupoid (01)(0\cong 1), to see why some definitions work and others do not. The conclusion here is that while the definition as a “half nn-adjoint equivalence” gives us a proposition, the definition as a “(full) nn-adjoint equivalence” does not.

In this paper, we take the first step towards expressing these results internally in type theory, putting special emphasis on their formalization. In particular, we revisit the notions of a quasi-invertible map, a half adjoint equivalence, and an adjoint equivalence, giving the formal proofs of their expected properties. Our proofs are more modular than those given in [Uni13], and help improve efficiency. We then turn our attention to corresponding notions arising from 22-adjunctions, namely half 22-adjoint equivalences and (full) 22-adjoint equivalences, and show that while the former is always a proposition, the latter fails to be one in general.

As indicated above, the results proven here certainly will not come as a surprise to experts and they constitute merely the first step towards understanding general nn-adjoint equivalences. One can therefore envision future work in which the notions of 33-, 44-, …and, more generally, nn-adjoint equivalence are studied. We have chosen not to pursue this direction, simply because the corresponding notions of 33-, 44-, and nn-adjunction have not — to our knowledge — received rigorous treatment in literature on category theory. In particular, it is not immediately clear what the higher-dimensional analog of the coherences appearing in the swallow-tail identities ought to be (cf. 𝖢𝗈𝗁η\mathsf{Coh}\>\eta in Definition 3.1). Having said that, we believe that the approach developed here can serve as a blueprint for proving analogous properties of nn-adjoint equivalences when these notions are introduced.

These results have been formalized using the Lean Theorem Prover, version 3.4.2 (https://github.com/leanprover/lean) as part of the HoTT in Lean 3 library (https://github.com/gebner/hott3); the formalization consists of 528 lines of code across 3 files and may be found in the directory hott3/src/hott/types/2_adj. We write file/name for a newly-formalized result, where file denotes the file it is found in and name denotes the name of the formal proof in the code.

Organization.

Section 1 recalls the necessary background on equivalences which will be used throughout. Section 2 introduces new formal proofs that the types of quasi-inverses and adjoint equivalences are not propositions. Note that specific examples where this fails are presented, but not formally proven since the current version of the HoTT in Lean 3 library does not contain induction principles for the higher inductive types S1S^{1} and S2S^{2}. Section 3 introduces half 2-adjoint equivalences, which are propositions containing the data of adjoint equivalences, as well as 2-adjoint equivalences, which are non-propositions related to both quasi-inverses and adjoint equivalences.

1. Preliminaries

We largely adopt the notation of [Uni13], with additional and differing notation stated here. We notate the 𝖺𝗉\mathsf{ap} function for f:ABf:A\to B by

f[]:(x=y)(fx=fy).f[-]:(x=y)\to(fx=fy).

For 𝖺𝗉2\mathsf{ap}_{2}, the action of ff on 2-dimensional paths, we write

f:(p=q)(f[p]=f[q]).f\llbracket-\rrbracket:(p=q)\to(f[p]=f[q]).

We write 𝗋𝖾𝖿𝗅\mathsf{refl} for the homotopy λx.𝗋𝖾𝖿𝗅x:𝗂𝖽A𝗂𝖽A\lambda x.\mathsf{refl}_{x}\colon\mathsf{id}_{A}\sim\mathsf{id}_{A}. For a homotopy H:fgH:f\sim g between dependent functions f,g:x:ABxf,g:\prod\limits_{x:A}Bx and a non-dependent function h:CAh:C\to A, we write

Hh:fhghH_{h}:fh\sim gh

for the composition of HH and hh. If f,g:ABf,g:A\to B are non-dependent and we instead have h:BCh:B\to C, we write

h[H]:hfhgh[H]:hf\sim hg

for the composition of h[]h[-] and HH. Given an additional homotopy H:fgH^{\prime}:f\sim g and α:HH\alpha:H\sim H^{\prime}, we similarly write

hα:h[H]h[H]h\llbracket\alpha\rrbracket:h[H]\sim h[H^{\prime}]

for the composition of hh\llbracket-\rrbracket and α\alpha. Lastly, for H:fgH:f\sim g and H:ghH^{\prime}:g\sim h, we write transitivity of homotopies as

HH:fhH\cdot H^{\prime}:f\sim h

in path-concatenation order.

{defi}

[adj/qinv, adj/is_hadj_l] A function f:ABf:A\to B

  1. (1)

    has a quasi-inverse if the following type is inhabited:

    𝗊𝗂𝗇𝗏f:g:BAgf𝗂𝖽A×fg𝗂𝖽B.\mathsf{qinv}\>f:\equiv\sum_{g:B\to A}gf\sim\mathsf{id}_{A}\times fg\sim\mathsf{id}_{B}.
  2. (2)

    is a half-adjoint equivalence if the following type is inhabited:

    𝗂𝗌𝗁𝖺𝖽𝗃f:g:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bf[η]εf.\mathsf{ishadj}\>f:\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}f[\eta]\sim\varepsilon_{f}.
  3. (3)

    is a left half-adjoint equivalence if the following type is inhabited:

    𝗂𝗌𝗁𝖺𝖽𝗃𝗅f:g:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bηgg[ε].\mathsf{ishadjl}\>f:\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\eta_{g}\sim g[\varepsilon].

    For types A,B:𝒰A,B:\mathcal{U}, the type of equivalences between AA and BB is:

    AB:f:AB𝗂𝗌𝗁𝖺𝖽𝗃f.A\simeq B:\equiv\sum_{f:A\to B}\mathsf{ishadj}\>f.
{thmC}

[[Uni13, Lem. 4.2.2, Thms. 4.2.3, 4.2.13]] For f:ABf:A\to B, there are maps

𝗂𝗌𝗁𝖺𝖽𝗃f{\mathsf{ishadj}\>f}𝗂𝗌𝗁𝖺𝖽𝗃𝗅f{\mathsf{ishadjl}\>f}𝗊𝗂𝗇𝗏f{\mathsf{qinv}\>f}\scriptstyle{\simeq}

where the top two types are propositions. ∎

The perhaps most intuitive definition of an equivalence between types A,B:𝒰A,B:\mathcal{U} is that of a quasi-inverse. However, as this type is not a proposition, we define equivalences to be half adjoint equivalences. Since both half and left half adjoint equivalences are propositional types, one could also define the type of equivalences to be left half adjoint equivalences.

With a well-behaved notion of equivalence, we present the remaining lemmas to be used throughout.

Lemma 1 (Equivalence Induction/Univalence, [Uni13, Cor. 5.8.5]).

Given D:A,B:𝒰(AB)𝒰D:\prod_{A,B:\mathcal{U}}(A\simeq B)\to\mathcal{U} and d:A:𝒰D(A,A,𝗂𝖽A)d:\prod_{A:\mathcal{U}}D(A,A,\mathsf{id}_{A}), there exists

f:A,B:𝒰e:ABD(A,B,e)f:\prod_{A,B:\mathcal{U}}\ \prod_{e:A\simeq B}D(A,B,e)

such that f(A,A,𝗂𝖽A)=d(A)f(A,A,\mathsf{id}_{A})=d(A) for all A:𝒰A:\mathcal{U}. ∎

Lemma 2 (prelim/sigma_hty_is_contr, [Uni13, Cor. 5.8.6, Thm. 5.8.4]).

Given f:ABf:A\to B, the types

g:BAfg and g:BAgf\sum_{g:B\to A}f\sim g\text{ and }\sum_{g:B\to A}g\sim f

are both contractible with center (f,𝗋𝖾𝖿𝗅f)(f,\mathsf{refl}_{f}). ∎

{lemC}

[[Uni13, Lem. 4.2.5]] For any f:ABf:A\to B, y:By:B and (x,p),(x,p):𝖿𝗂𝖻fy(x,p),(x^{\prime},p^{\prime}):\mathsf{fib}_{f}\>y, we have

(x,p)=(x,p)γ:x=xp=f[γ]p.(x,p)=(x^{\prime},p^{\prime})\simeq\sum_{\gamma:x=x^{\prime}}p=f[\gamma]\cdot p^{\prime}.
{lemC}

[[Uni13, Thm. 4.2.6]] If f:ABf:A\to B is a half-adjoint equivalence, then for any y:By:B the fiber 𝖿𝗂𝖻fy\mathsf{fib}_{f}\>y is contractible. ∎

2. Quasi-inverses and adjoint equivalences, revisited

We present a proof that the type of quasi-inverses is not a proposition, using Lemma 2 for increased modularity over the proof presented in [Uni13, Lem. 4.1.1].

Theorem 3 (adj/qinv_equiv_pi_eq).

Given f:ABf:A\to B such that 𝗂𝗌𝗁𝖺𝖽𝗃f\mathsf{ishadj}\>f is inhabited, we have

𝗊𝗂𝗇𝗏fx:Ax=x.\mathsf{qinv}\>f\simeq\prod_{x:A}x=x.
Proof 2.1.

By Equivalence Induction 1, it suffices to show 𝗊𝗂𝗇𝗏𝗂𝖽Ax:Ax=x\mathsf{qinv}\>\mathsf{id}_{A}\simeq\prod\limits_{x:A}x=x. Observe that

𝗊𝗂𝗇𝗏𝗂𝖽A\displaystyle\mathsf{qinv}\>\mathsf{id}_{A} g:AAg𝗂𝖽A×g𝗂𝖽A\displaystyle\equiv\sum_{g:A\to A}g\sim\mathsf{id}_{A}\times g\sim\mathsf{id}_{A}
g:AAη:g𝗂𝖽Ag𝗂𝖽A\displaystyle\simeq\sum_{g:A\to A}\ \sum_{\eta:g\sim\mathsf{id}_{A}}g\sim\mathsf{id}_{A}
u:g:AAg𝗂𝖽A𝗉𝗋1u𝗂𝖽A\displaystyle\simeq\sum_{u:\sum\limits_{g:A\to A}g\sim\mathsf{id}_{A}}\mathsf{pr}_{1}\>u\sim\mathsf{id}_{A}
𝗂𝖽A𝗂𝖽A\displaystyle\simeq\mathsf{id}_{A}\sim\mathsf{id}_{A} (1)
x:Ax=x,\displaystyle\equiv\prod_{x:A}x=x,

where (1) follows from Lemma 2 (the type g:AAg𝗂𝖽A\sum\limits_{g:A\to A}g\sim\mathsf{id}_{A} is contractible with center (𝗂𝖽A,𝗋𝖾𝖿𝗅)(\mathsf{id}_{A},\mathsf{refl})).

This result implies that any type with non-trivial π1\pi_{1} may be used to construct non-trivial inhabitants of this type. For instance, since π1(S1)=\pi_{1}(S^{1})=\mathbb{Z}, we have:

Corollary 4.

The type 𝗊𝗂𝗇𝗏𝗂𝖽S1\mathsf{qinv}\>\mathsf{id}_{S^{1}} is not a proposition. ∎

Conceptually, this proof takes the pair (g,η)(g,\eta) and uses Lemma 2 to contract it so that only one homotopy remains. This differs from the proof in [Uni13], which uses function extensionality to write the homotopies as paths and contracts using based path induction. This proof modularizes the proof in [Uni13] by packaging function extensionality and rewriting of contractible types into one result, simplifying both the proof and the formalization.

Thus, the type of half and left half adjoint equivalences each append an additional coherence to contract with the remaining homotopy. However, appending both coherences gives us a non-proposition. {defi}[adj/adj] Given f:ABf:A\to B, the structure of an adjoint equivalence on ff is the type:

𝖺𝖽𝗃f:g:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bf[η]εf×ηgg[ε].\mathsf{adj}\>f:\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\ f[\eta]\sim\varepsilon_{f}\times\eta_{g}\sim g[\varepsilon].
Theorem 5 (adj/adj_equiv_pi_refl_eq).

Given f:ABf:A\to B such that 𝗂𝗌𝗁𝖺𝖽𝗃f\mathsf{ishadj}\>f is inhabited, we have

𝖺𝖽𝗃fx:A(𝗋𝖾𝖿𝗅x=𝗋𝖾𝖿𝗅x).\mathsf{adj}\>f\simeq\prod_{x:A}(\mathsf{refl}_{x}=\mathsf{refl}_{x}).
Proof 2.2.

By Equivalence Induction 1, it suffices to show 𝖺𝖽𝗃𝗂𝖽Ax:A𝗋𝖾𝖿𝗅x=𝗋𝖾𝖿𝗅x\mathsf{adj}\>\mathsf{id}_{A}\simeq\prod\limits_{x:A}\mathsf{refl}_{x}=\mathsf{refl}_{x}. Observe that

𝖺𝖽𝗃𝗂𝖽A\displaystyle\mathsf{adj}\>\mathsf{id}_{A} g:AAη:g𝗂𝖽Aε:g𝗂𝖽A𝗂𝖽A[η]ε×ηgg[ε]\displaystyle\equiv\sum_{g:A\to A}\ \sum_{\eta:g\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:g\sim\mathsf{id}_{A}}\mathsf{id}_{A}[\eta]\sim\varepsilon\times\eta_{g}\sim g[\varepsilon]
ε:𝗂𝖽A𝗂𝖽A𝗋𝖾𝖿𝗅ε×𝗋𝖾𝖿𝗅𝗂𝖽A[ε]\displaystyle\simeq\sum_{\varepsilon:\mathsf{id}_{A}\sim\mathsf{id}_{A}}\mathsf{refl}\sim\varepsilon\times\mathsf{refl}\sim\mathsf{id}_{A}[\varepsilon] (2)
ε:𝗂𝖽A𝗂𝖽Aτ:𝗋𝖾𝖿𝗅ε𝗋𝖾𝖿𝗅𝗂𝖽A[ε]\displaystyle\simeq\sum_{\varepsilon:\mathsf{id}_{A}\sim\mathsf{id}_{A}}\ \sum_{\tau:\mathsf{refl}\sim\varepsilon}\mathsf{refl}\sim\mathsf{id}_{A}[\varepsilon]
u:ε:𝗂𝖽A𝗂𝖽A𝗋𝖾𝖿𝗅ε𝗋𝖾𝖿𝗅𝗂𝖽A[𝗉𝗋1u]\displaystyle\simeq\sum_{u:\sum\limits_{\varepsilon:\mathsf{id}_{A}\sim\mathsf{id}_{A}}\mathsf{refl}\sim\varepsilon}\mathsf{refl}\sim\mathsf{id}_{A}[\mathsf{pr}_{1}\>u]
𝗋𝖾𝖿𝗅𝗂𝖽A[𝗋𝖾𝖿𝗅]\displaystyle\simeq\mathsf{refl}\sim\mathsf{id}_{A}[\mathsf{refl}] (3)
x:A(𝗋𝖾𝖿𝗅x=𝗋𝖾𝖿𝗅x).\displaystyle\equiv\prod_{x:A}(\mathsf{refl}_{x}=\mathsf{refl}_{x}).

The equivalence (2) comes from the equivalence in Theorem 3, where the pair (g,η)(g,\eta) contracts to (𝗂𝖽A,𝗋𝖾𝖿𝗅)(\mathsf{id}_{A},\mathsf{refl}). The equivalence (3) follows from Lemma 2.

This result implies that any type with non-trivial π2\pi_{2} may be used to construct non-trivial inhabitants of this type. In particular, π2(S2)=\pi_{2}(S^{2})=\mathbb{Z} proves the following:

Corollary 6.

The type 𝖺𝖽𝗃𝗂𝖽S2\mathsf{adj}\>\mathsf{id}_{S^{2}} is not a proposition. ∎

This is a solution to Exercise 4.1 in [Uni13]. As before, this proof uses Lemma 2 to contract the pairs (g,η)(g,\eta) and (ε,τ)(\varepsilon,\tau) so that a single homotopy remains. Trying to apply path induction directly requires an equivalence which writes each homotopy as an equality; a formal proof using function extensionality for such an equivalence along with path induction reaches 60 lines of code (varying by format, syntax choice, etc.). By modularizing the case of 𝗊𝗂𝗇𝗏\mathsf{qinv}, this proof is reduced to manipulating Σ\Sigma-types and applying Lemma 2 twice, with the formal proof in the library being 23 lines of code.

3. 2-adjoint equivalences

As in the case of 𝗊𝗂𝗇𝗏\mathsf{qinv}, we expect there is an additional coherence that may be appended to the type 𝖺𝖽𝗃f\mathsf{adj}\>f to create a proposition. To define this coherence, we use the following homotopy:

Lemma 7 (two_adj/nat_coh).

Given f:ABf:A\to B and g:BAg:B\to A with a homotopy H:gf𝗂𝖽AH:gf\sim\mathsf{id}_{A}, we have a homotopy

𝖢𝗈𝗁H:Hgfg[f[H]]\mathsf{Coh}\>H:H_{gf}\sim g[f[H]]

such that

𝖢𝗈𝗁𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅.\mathsf{Coh}\>\mathsf{refl}\equiv\mathsf{refl}_{\mathsf{refl}}:\mathsf{refl}\sim\mathsf{refl}.
Proof 3.1.

Fix x:Ax:A. We have

Hg(fx)=(gf)[Hx]=g[f[Hx]],\begin{split}H_{g(fx)}&=(gf)[H_{x}]\\ &=g[f[H_{x}]],\end{split}

where the first equality holds by naturality and the second holds by functoriality of g[]g[-].

With this, we define the type of half 2-adjoint equivalences. {defi}[two_adj/is_two_hae] A function f:ABf:A\to B is a half 2-adjoint equivalence if the following type is inhabited:

𝗂𝗌𝗁𝟤𝖺𝖽𝗃f:g:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bτ:f[η]εfθ:ηgg[ε]𝖢𝗈𝗁ηgτθf.\mathsf{ish2adj}\>f:\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\ \sum_{\tau:f[\eta]\sim\varepsilon_{f}}\ \sum_{\theta:\eta_{g}\sim g[\varepsilon]}\ \mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}.

In parallel with adjoint equivalences, we give a definition which uses an alternate coherence. {defi}[two_adj/is_two_hae_l] A function f:ABf:A\to B is a left half 2-adjoint equivalence if the following type is inhabited:

𝗂𝗌𝗁𝟤𝖺𝖽𝗃𝗅f:g:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bτ:f[η]εfθ:ηgg[ε]τg𝖢𝗈𝗁εfθ.\mathsf{ish2adjl}\>f:\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\ \sum_{\tau:f[\eta]\sim\varepsilon_{f}}\ \sum_{\theta:\eta_{g}\sim g[\varepsilon]}\ \tau_{g}\cdot\mathsf{Coh}\>\varepsilon\sim f\llbracket\theta\rrbracket.

To show the type of half 2-adjoint equivalences is a proposition, we prove the following lemma:

Lemma 8 (two_adj/r2coh_equiv_fib_eq).

Given f:ABf:A\to B with (g,η,ε,θ):𝗂𝗌𝗁𝖺𝖽𝗃𝗅f(g,\eta,\varepsilon,\theta):\mathsf{ishadjl}\>f, we have

τ:f[η]εf𝖢𝗈𝗁ηgτθfx:A(f[ηx],𝖢𝗈𝗁ηxθfx)=(εfx,𝗋𝖾𝖿𝗅g[εfx]),\sum_{\tau:f[\eta]\sim\varepsilon_{f}}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}\\ \simeq\prod_{x:A}\left(f[\eta_{x}],\mathsf{Coh}\>\eta_{x}\cdot\theta_{fx}\right)=\left(\varepsilon_{fx},\mathsf{refl}_{g[\varepsilon_{fx}]}\right),

where (f[ηx],𝖢𝗈𝗁ηxθfx),(εfx,𝗋𝖾𝖿𝗅g[εfx]):𝖿𝗂𝖻g[]g[εfx]\left(f[\eta_{x}],\mathsf{Coh}\>\eta_{x}\cdot\theta_{fx}\right),\left(\varepsilon_{fx},\mathsf{refl}_{g[\varepsilon_{fx}]}\right):\mathsf{fib}_{g[-]}\>g[\varepsilon_{fx}].

Proof 3.2.

We have

τ:f[η]εf𝖢𝗈𝗁ηgτθf\displaystyle\sum_{\tau:f[\eta]\sim\varepsilon_{f}}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f} τ:x:Af[ηx]=εfxx:A𝖢𝗈𝗁ηxgτx=θfx,\displaystyle\equiv\sum_{\tau:\prod_{x:A}f[\eta_{x}]=\varepsilon_{fx}}\ \prod_{x:A}\mathsf{Coh}\>\eta_{x}\cdot g\llbracket\tau_{x}\rrbracket=\theta_{fx},
x:Aτ:f[ηx]=εfx𝖢𝗈𝗁ηxgτ=θfx\displaystyle\simeq\prod_{x:A}\ \sum_{\tau^{\prime}:f[\eta_{x}]=\varepsilon_{fx}}\mathsf{Coh}\>\eta_{x}\cdot g\llbracket\tau^{\prime}\rrbracket=\theta_{fx} (4)
x:Aτ:f[ηx]=εf(x)𝖢𝗈𝗁ηx1θfx=gτ\displaystyle\simeq\prod_{x:A}\ \sum_{\tau^{\prime}:f[\eta_{x}]=\varepsilon_{f(x)}}\mathsf{Coh}\>\eta_{x}^{-1}\cdot\theta_{fx}=g\llbracket\tau^{\prime}\rrbracket (5)
x:A(f[ηx],(Nη)1θf(x))=(εf(x),𝗋𝖾𝖿𝗅g[εf(x)]).\displaystyle\simeq\prod_{x:A}\left(f[\eta_{x}],(N_{\eta})^{-1}\cdot\theta_{f(x)}\right)=\left(\varepsilon_{f(x)},\mathsf{refl}_{g[\varepsilon_{f(x)}]}\right). (6)

The equivalence (4) holds by the Type-Theoretic Axiom of Choice, (5) is a rearrangment of equality, and (6) holds by Lemma 2.

Lemma 9 (two_adj/is_contr_r2coh).

Given f:ABf:A\to B with (g,η,ε,θ):𝗂𝗌𝗁𝖺𝖽𝗃f(g,\eta,\varepsilon,\theta):\mathsf{ishadj}\>f, the type

τ:f[η]εf𝖢𝗈𝗁ηgτθf\sum_{\tau:f[\eta]\sim\varepsilon_{f}}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}

is contractible.

Proof 3.3.

By Lemma 8 and contractibility of Π\Pi-types, it suffices to fix x:Ax:A and show the type

(f[ηx],𝖢𝗈𝗁ηx1θfx)=(εfx,𝗋𝖾𝖿𝗅g[εfx])\left(f[\eta_{x}],\mathsf{Coh}\>\eta_{x}^{-1}\cdot\theta_{fx}\right)=\left(\varepsilon_{fx},\mathsf{refl}_{g[\varepsilon_{fx}]}\right)

is contractible. Since gg is an equivalence, g[]g[-] is also an equivalence. By Lemma 1, the type 𝖿𝗂𝖻g[](g[εfx])\mathsf{fib}_{g[-]}(g[\varepsilon_{fx}]) is contractible, so its equality type is also contractible.

Theorem 10 (two_adj/is_prop_is_two_hae).

For any f:ABf:A\to B, the type 𝗂𝗌𝗁𝟤𝖺𝖽𝗃f\mathsf{ish2adj}\>f is a proposition.

Proof 3.4.

It suffices to assume e:𝗂𝗌𝗁𝟤𝖺𝖽𝗃fe:\mathsf{ish2adj}\>f and show this type is contractible. Observe that

𝗂𝗌𝗁𝟤𝖺𝖽𝗃fg:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bτ:f[η]εfθ:ηgg[ε]𝖢𝗈𝗁ηgτθfg:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bθ:ηgg[ε]τ:f[η]εf𝖢𝗈𝗁ηgτθf(g,η,ε,θ):𝗂𝗌𝗁𝖺𝖽𝗃𝗅fτ:f[η]εf𝖢𝗈𝗁ηgτθfτ:f[η0](ε0)f𝖢𝗈𝗁η0g0τ(θ0)f.\begin{split}\mathsf{ish2adj}\>f&\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\ \sum_{\tau:f[\eta]\sim\varepsilon_{f}}\ \sum_{\theta:\eta_{g}\sim g[\varepsilon]}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}\\ &\simeq\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\ \sum_{\theta:\eta_{g}\sim g[\varepsilon]}\ \sum_{\tau:f[\eta]\sim\varepsilon_{f}}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}\\ &\simeq\sum_{(g,\eta,\varepsilon,\theta):\mathsf{ishadjl}\>f}\ \sum_{\tau:f[\eta]\sim\varepsilon_{f}}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}\\ &\simeq\sum_{\tau:f[\eta_{0}]\sim(\varepsilon_{0})_{f}}\mathsf{Coh}\>\eta_{0}\cdot g_{0}\llbracket\tau\rrbracket\sim(\theta_{0})_{f}.\end{split}

The last equivalence holds since 𝗂𝗌𝗁𝖺𝖽𝗃𝗅f\mathsf{ishadjl}f is contractible (it is a proposition and inhabited by ee after discarding coherences); we write (g0,η0,ε0,θ0):𝗂𝗌𝗁𝖺𝖽𝗃𝗅f(g_{0},\eta_{0},\varepsilon_{0},\theta_{0}):\mathsf{ishadjl}f for its center of contraction. This final type is contractible by Lemma 9, therefore 𝗂𝗌𝗁𝟤𝖺𝖽𝗃f\mathsf{ish2adj}f is contractible.

Parallels of these proofs are used to obtain similar results about left half two-adjoint equivalences as well.

Lemma 11 (two_adj/is_contr_l2coh).

Given f:ABf:A\to B with (g,η,ε,τ):𝗂𝗌𝗁𝖺𝖽𝗃f(g,\eta,\varepsilon,\tau):\mathsf{ishadj}f, the type

θ:ηgg[ε]τg𝖢𝗈𝗁εfθ.\sum_{\theta:\eta_{g}\sim g[\varepsilon]}\tau_{g}\cdot\mathsf{Coh}\>\varepsilon\sim f\llbracket\theta\rrbracket.

is contractible.

Proof 3.5.

Analogous to Lemma 9.

Theorem 12 (two_adj/is_prop_is_two_hae_l).

For f:ABf:A\to B, the type 𝗂𝗌𝗁𝟤𝖺𝖽𝗃𝗅f\mathsf{ish2adjl}\>f is a proposition.

Proof 3.6.

Analogous to Theorem 10.

As well, either half adjoint equivalence may be promoted to the alternate half 2-adjoint equivalence.

Theorem 13 (two_adj/two_adjointify).

For f:ABf:A\to B, we have maps

  1. (1)

    𝗂𝗌𝗁𝖺𝖽𝗃𝗅f𝗂𝗌𝗁𝟤𝖺𝖽𝗃f\mathsf{ishadjl}\>f\to\mathsf{ish2adj}\>f

  2. (2)

    𝗂𝗌𝗁𝖺𝖽𝗃f𝗂𝗌𝗁𝟤𝖺𝖽𝗃𝗅f\mathsf{ishadj}\>f\to\mathsf{ish2adjl}\>f

Proof 3.7.

Take the missing coherences to be the centers of contraction from Lemmas 9 and 11.

This implies that an adjoint equivalence may be promoted to either half 2-adjoint equivalence.

Corollary 14.

For f:ABf:A\to B, we have maps

  1. (1)

    𝖺𝖽𝗃f𝗂𝗌𝗁𝟤𝖺𝖽𝗃f\mathsf{adj}\>f\to\mathsf{ish2adj}\>f

  2. (2)

    𝖺𝖽𝗃f𝗂𝗌𝗁𝟤𝖺𝖽𝗃𝗅f\mathsf{adj}\>f\to\mathsf{ish2adjl}\>f

Proof 3.8.

Discard either coherence and apply Theorem 13.

Finally, we have that the half 2-adjoint and left half 2-adjoint equivalences are logically equivalent.

Theorem 15 (two_adj/two_hae_equiv_two_hae_l).

For f:ABf:A\to B, we have maps

𝗂𝗌𝗁𝟤𝖺𝖽𝗃f𝗂𝗌𝗁𝟤𝖺𝖽𝗃𝗅f.\mathsf{ish2adj}\>f\leftrightarrow\mathsf{ish2adjl}\>f.
Proof 3.9.

In either direction, discard coherences and apply Theorem 13.

We summarize the properties of these 2-adjoint equivalances with the following diagram of maps:

𝗂𝗌𝗁𝟤𝖺𝖽𝗃𝗅f{\mathsf{ish2adjl}\>f}𝗂𝗌𝗁𝟤𝖺𝖽𝗃f{\mathsf{ish2adj}\>f}𝖺𝖽𝗃f{\mathsf{adj}\>f}𝗂𝗌𝗁𝖺𝖽𝗃𝗅f{\mathsf{ishadjl}\>f}𝗂𝗌𝗁𝖺𝖽𝗃f{\mathsf{ishadj}\>f}𝗊𝗂𝗇𝗏f{\mathsf{qinv}f}\scriptstyle{\simeq}\scriptstyle{\simeq}

where rows 1 and 3 are propositions.

As before, appending either one of these coherences yields a proposition, but appending both coherences yields a non-proposition once more. {defi}[two_adj/two_adj] Given f:ABf:A\to B, the structure of a 2-adjoint equivalence on ff is the type:

𝟤𝖺𝖽𝗃f:g:BAη:gf𝗂𝖽Aε:fg𝗂𝖽Bτ:f[η]εfθ:ηgg[ε]𝖢𝗈𝗁ηgτθf×τg𝖢𝗈𝗁εfθ.\mathsf{2adj}\>f:\equiv\sum_{g:B\to A}\ \sum_{\eta:gf\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:fg\sim\mathsf{id}_{B}}\ \sum_{\tau:f[\eta]\sim\varepsilon_{f}}\ \sum_{\theta:\eta_{g}\sim g[\varepsilon]}\ \mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta_{f}\times\tau_{g}\cdot\mathsf{Coh}\>\varepsilon\sim f\llbracket\theta\rrbracket.
Theorem 16 (two_adj/two_adj_equiv_pi_refl_eq).

Given f:ABf:A\to B such that 𝗂𝗌𝗁𝖺𝖽𝗃f\mathsf{ishadj}\>f is inhabited, we have

𝟤𝖺𝖽𝗃fx:A(𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅x=𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅x).\mathsf{2adj}\>f\simeq\prod_{x:A}(\mathsf{refl}_{\mathsf{refl}_{x}}=\mathsf{refl}_{\mathsf{refl}_{x}}).
Proof 3.10.

By Equivalence Induction 1, it suffices to show 𝟤𝖺𝖽𝗃𝗂𝖽Ax:A(𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅x=𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅x)\mathsf{2adj}\>\mathsf{id}_{A}\simeq\prod\limits_{x:A}(\mathsf{refl}_{\mathsf{refl}_{x}}=\mathsf{refl}_{\mathsf{refl}_{x}}). Observe that

𝟤𝖺𝖽𝗃𝗂𝖽A\displaystyle\mathsf{2adj}\>\mathsf{id}_{A} g:AAη:g𝗂𝖽Aε:g𝗂𝖽Aτ:𝗂𝖽A[η]εθ:ηgg[ε]𝖢𝗈𝗁ηgτθ×τg𝖢𝗈𝗁ε𝗂𝖽Aθ\displaystyle\equiv\sum_{g:A\to A}\ \sum_{\eta:g\sim\mathsf{id}_{A}}\ \sum_{\varepsilon:g\sim\mathsf{id}_{A}}\ \sum_{\tau:\mathsf{id}_{A}[\eta]\sim\varepsilon}\ \sum_{\theta:\eta_{g}\sim g[\varepsilon]}\mathsf{Coh}\>\eta\cdot g\llbracket\tau\rrbracket\sim\theta\times\tau_{g}\cdot\mathsf{Coh}\>\varepsilon\sim\mathsf{id}_{A}\llbracket\theta\rrbracket
θ:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝖢𝗈𝗁𝗋𝖾𝖿𝗅𝗂𝖽A𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ×𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝖢𝗈𝗁𝗋𝖾𝖿𝗅𝗂𝖽Aθ\displaystyle\simeq\sum_{\theta:\mathsf{refl}\sim\mathsf{refl}}\mathsf{Coh}\>\mathsf{refl}\cdot\mathsf{id}_{A}\llbracket\mathsf{refl}_{\mathsf{refl}}\rrbracket\sim\theta\times\mathsf{refl}_{\mathsf{refl}}\cdot\mathsf{Coh}\>\mathsf{refl}\sim\mathsf{id}_{A}\llbracket\theta\rrbracket (7)
θ:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ×𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗂𝖽Aθ\displaystyle\equiv\sum_{\theta:\mathsf{refl}\sim\mathsf{refl}}\mathsf{refl}_{\mathsf{refl}}\sim\theta\times\mathsf{refl}_{\mathsf{refl}}\sim\mathsf{id}_{A}\llbracket\theta\rrbracket
θ:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ×𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ\displaystyle\simeq\sum_{\theta:\mathsf{refl}\sim\mathsf{refl}}\mathsf{refl}_{\mathsf{refl}}\sim\theta\times\mathsf{refl}_{\mathsf{refl}}\sim\theta
θ:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝒜:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ\displaystyle\simeq\sum_{\theta:\mathsf{refl}\sim\mathsf{refl}}\ \sum_{\mathcal{A}:\mathsf{refl}_{\mathsf{refl}}\sim\theta}\mathsf{refl}_{\mathsf{refl}}\sim\theta
u:θ:𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅θ𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗉𝗋1u\displaystyle\simeq\sum_{u:\sum\limits_{\theta:\mathsf{refl}\sim\mathsf{refl}}\mathsf{refl}_{\mathsf{refl}}\sim\theta}\mathsf{refl}_{\mathsf{refl}}\sim\mathsf{pr}_{1}\>u
𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅\displaystyle\simeq\mathsf{refl}_{\mathsf{refl}}\sim\mathsf{refl}_{\mathsf{refl}} (8)
x:A𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅x=𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅x.\displaystyle\equiv\prod_{x:A}\mathsf{refl}_{\mathsf{refl}_{x}}=\mathsf{refl}_{\mathsf{refl}_{x}}.

The equivalence (7) is from Theorem 5; we contract (g,η,ε,τ)(g,\eta,\varepsilon,\tau) to (𝗂𝖽A,𝗋𝖾𝖿𝗅,𝗋𝖾𝖿𝗅,𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅)(\mathsf{id}_{A},\mathsf{refl},\mathsf{refl},\mathsf{refl}_{\mathsf{refl}}). The equivalence (8) is an application of Lemma 2.

Once again, this result implies any type with non-trivial π3\pi_{3} may be used to construct non-trivial inhabitants of this type. We know π3(S2)=\pi_{3}(S^{2})=\mathbb{Z}, which proves:

Corollary 17.

The type 𝟤𝖺𝖽𝗃𝗂𝖽S2\mathsf{2adj}\>\mathsf{id}_{S^{2}} is not a proposition. ∎

Proving this result using function extensionality directly and path induction requires an equivalence that writes homotopies as equalities. By modularizing the case of 𝗊𝗂𝗇𝗏\mathsf{qinv}, similar to the analogous proof for 𝖺𝖽𝗃\mathsf{adj}, this result may be proven by manipulating Σ\Sigma-types and applying Lemma 2 three times, with the formal proof in the library being 44 lines of code. As with 𝖺𝖽𝗃\mathsf{adj}, one would expect this approach to be 40 to 80 lines shorter than one which uses function extensionality directly.

Acknowledgements.

This work was carried out when the first, second, and fourth authors were undergraduates at the University of Western Ontario and was supported through two Undergraduate Student Research Awards and a Discovery Grant, all funded by the Natural Sciences and Engineering Research Council (NSERC) of Canada. We thank NSERC for its generosity.

References

  • [Uni13] The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics. http://homotopytypetheory.org/book, Institute for Advanced Study, 2013.