1713 \lmcsheadingLABEL:LastPageSep. 14, 2020Jan. 22, 2021
2-adjoint equivalences in homotopy type theory
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-adjunctionIntroduction
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 , to see why some definitions work and others do not. The conclusion here is that while the definition as a “half -adjoint equivalence” gives us a proposition, the definition as a “(full) -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 -adjunctions, namely half -adjoint equivalences and (full) -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 -adjoint equivalences. One can therefore envision future work in which the notions of -, -, …and, more generally, -adjoint equivalence are studied. We have chosen not to pursue this direction, simply because the corresponding notions of -, -, and -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. in Definition 3.1). Having said that, we believe that the approach developed here can serve as a blueprint for proving analogous properties of -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 and . 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 function for by
For , the action of on 2-dimensional paths, we write
We write for the homotopy . For a homotopy between dependent functions and a non-dependent function , we write
for the composition of and . If are non-dependent and we instead have , we write
for the composition of and . Given an additional homotopy and , we similarly write
for the composition of and . Lastly, for and , we write transitivity of homotopies as
in path-concatenation order.
[adj/qinv, adj/is_hadj_l] A function
-
(1)
has a quasi-inverse if the following type is inhabited:
-
(2)
is a half-adjoint equivalence if the following type is inhabited:
-
(3)
is a left half-adjoint equivalence if the following type is inhabited:
For types , the type of equivalences between and is:
[[Uni13, Lem. 4.2.2, Thms. 4.2.3, 4.2.13]] For , there are maps
where the top two types are propositions. ∎
The perhaps most intuitive definition of an equivalence between types 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 and , there exists
such that for all . ∎
Lemma 2 (prelim/sigma_hty_is_contr, [Uni13, Cor. 5.8.6, Thm. 5.8.4]).
Given , the types
are both contractible with center . ∎
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 such that is inhabited, we have
Proof 2.1.
This result implies that any type with non-trivial may be used to construct non-trivial inhabitants of this type. For instance, since , we have:
Corollary 4.
The type is not a proposition. ∎
Conceptually, this proof takes the pair 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 , the structure of an adjoint equivalence on is the type:
Theorem 5 (adj/adj_equiv_pi_refl_eq).
Given such that is inhabited, we have
Proof 2.2.
This result implies that any type with non-trivial may be used to construct non-trivial inhabitants of this type. In particular, proves the following:
Corollary 6.
The type 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 and 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 , this proof is reduced to manipulating -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 , we expect there is an additional coherence that may be appended to the type to create a proposition. To define this coherence, we use the following homotopy:
Lemma 7 (two_adj/nat_coh).
Given and with a homotopy , we have a homotopy
such that
Proof 3.1.
Fix . We have
where the first equality holds by naturality and the second holds by functoriality of .
With this, we define the type of half 2-adjoint equivalences. {defi}[two_adj/is_two_hae] A function is a half 2-adjoint equivalence if the following type is inhabited:
In parallel with adjoint equivalences, we give a definition which uses an alternate coherence. {defi}[two_adj/is_two_hae_l] A function is a left half 2-adjoint equivalence if the following type is inhabited:
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 with , we have
where .
Proof 3.2.
We have
(4) | ||||
(5) | ||||
(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 with , the type
is contractible.
Proof 3.3.
Theorem 10 (two_adj/is_prop_is_two_hae).
For any , the type is a proposition.
Proof 3.4.
It suffices to assume and show this type is contractible. Observe that
The last equivalence holds since is contractible (it is a proposition and inhabited by after discarding coherences); we write for its center of contraction. This final type is contractible by Lemma 9, therefore 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 with , the type
is contractible.
Proof 3.5.
Analogous to Lemma 9.
Theorem 12 (two_adj/is_prop_is_two_hae_l).
For , the type 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 , we have maps
-
(1)
-
(2)
This implies that an adjoint equivalence may be promoted to either half 2-adjoint equivalence.
Corollary 14.
For , we have maps
-
(1)
-
(2)
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 , we have maps
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:
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 , the structure of a 2-adjoint equivalence on is the type:
Theorem 16 (two_adj/two_adj_equiv_pi_refl_eq).
Given such that is inhabited, we have
Proof 3.10.
Once again, this result implies any type with non-trivial may be used to construct non-trivial inhabitants of this type. We know , which proves:
Corollary 17.
The type 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 , similar to the analogous proof for , this result may be proven by manipulating -types and applying Lemma 2 three times, with the formal proof in the library being 44 lines of code. As with , 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.