module 1Lab.Equiv.HalfAdjoint where
Adjoint equivalencesπ
An adjoint equivalence is an isomorphism where the homotopies ( satisfy the triangle identities, thus witnessing and as adjoint functors. In Homotopy Type Theory, we can use a half adjoint equivalence - satisfying only one of the triangle identities - as a good notion of equivalence.
is-half-adjoint-equiv : β {ββ ββ} {A : Type ββ} {B : Type ββ} (f : A β B) β Type _ is-half-adjoint-equiv {A = A} {B = B} f = Ξ£[ g β (B β A) ] Ξ£[ Ξ· β ((x : A) β g (f x) β‘ x) ] Ξ£[ Ξ΅ β ((y : B) β f (g y) β‘ y) ] ((x : A) β ap f (Ξ· x) β‘ Ξ΅ (f x))
The argument is an adaptation of a standard result of both category theory and homotopy theory - where we can βimproveβ an equivalence of categories into an adjoint equivalence, or a homotopy equivalence into a strong homotopy equivalence (Vogtβs lemma). In HoTT, we show this synthetically for equivalences between
is-isoβis-half-adjoint-equiv : β {ββ ββ} {A : Type ββ} {B : Type ββ} {f : A β B} β is-iso f β is-half-adjoint-equiv f is-isoβis-half-adjoint-equiv {A = A} {B} {f} iiso = g , Ξ· , Ξ΅' , Ξ» x β sym (zig x) where open is-iso iiso renaming (inv to g ; linv to Ξ· ; rinv to Ξ΅)
For
and
we can take the values provided by is-iso
. However, if we want
to satisfy the triangle identities, we can not in general take
We can, however, alter it like thus:
Ξ΅' : (y : B) β f (g y) β‘ y Ξ΅' y = sym (Ξ΅ (f (g y))) β ap f (Ξ· (g y)) β Ξ΅ y
Drawn as a diagram, the path above factors like:
There is a great deal of redundancy in this definition, given that and have the same boundary! The point is that while the definition of is entirely opaque to us, is written in such a way that we can use properties of paths to make the and cancel:
zig : (x : A) β Ξ΅' (f x) β‘ ap f (Ξ· x) zig x = Ξ΅' (f x) β‘β¨β© sym (Ξ΅ (f (g (f x)))) β ap f β (Ξ· (g (f x))) β β Ξ΅ (f x) β‘β¨ ap (Ξ» e β sym (Ξ΅ _) β ap f e β Ξ΅ _) (homotopy-invert Ξ·) β©β‘ sym (Ξ΅ (f (g (f x)))) β β ap (f β g β f) (Ξ· x) β Ξ΅ (f x) β β‘Λβ¨ apΒ‘ (homotopy-natural Ξ΅ _) β©β‘Λ sym (Ξ΅ (f (g (f x)))) β Ξ΅ (f (g (f x))) β ap f (Ξ· x) β‘β¨ β-cancell (Ξ΅ (f (g (f x)))) (ap f (Ξ· x)) β©β‘ ap f (Ξ· x) β
The notion of half-adjoint equivalence
is a
useful stepping stone in writing a more comprehensible proof that isomorphisms are equivalences
.
Since this result is fundamental, the proof we actually use is written
with efficiency of computation in mind - hence, cubically. The proof
here is intended to be more educational.
First, we give an equivalent characterisation of paths in fibre
s, which will be used in
proving that half adjoint equivalences are equivalences
.
fibre-paths : β {ββ ββ} {A : Type ββ} {B : Type ββ} {f : A β B} {y : B} β {f1 f2 : fibre f y} β (f1 β‘ f2) β (Ξ£[ Ξ³ β f1 .fst β‘ f2 .fst ] (ap f Ξ³ β f2 .snd β‘ f1 .snd))
The proof of this is not very enlightening, but itβs included here (rather than being completely invisible) for completeness:
fibre-paths {f = f} {y} {f1} {f2} = Path (fibre f y) f1 f2 ββ¨ IsoβEquiv Ξ£-path-iso eβ»ΒΉ β©β (Ξ£[ Ξ³ β f1 .fst β‘ f2 .fst ] (subst (Ξ» xβ β f xβ β‘ _) Ξ³ (f1 .snd) β‘ f2 .snd)) ββ¨ Ξ£-ap-snd (Ξ» x β pathβequiv (lemma x)) β©β (Ξ£[ Ξ³ β f1 .fst β‘ f2 .fst ] (ap f Ξ³ β f2 .snd β‘ f1 .snd)) ββ where helper : (p' : f (f1 .fst) β‘ y) β (subst (Ξ» x β f x β‘ y) refl (f1 .snd) β‘ p') β‘ (ap f refl β p' β‘ f1 .snd) helper p' = subst (Ξ» x β f x β‘ y) refl (f1 .snd) β‘ p' β‘β¨ apβ _β‘_ (transport-refl _) refl β©β‘ (f1 .snd) β‘ p' β‘β¨ IsoβPath (sym , iso sym (Ξ» x β refl) (Ξ» x β refl)) β©β‘ β p' β β‘ f1 .snd β‘Λβ¨ apΒ‘ (β-idl _) β©β‘Λ refl β p' β‘ f1 .snd β‘β¨β© ap f refl β p' β‘ f1 .snd β lemma : β {x'} {p'} β (Ξ³ : f1 .fst β‘ x') β (subst (Ξ» x β f x β‘ _) Ξ³ (f1 .snd) β‘ p') β‘ (ap f Ξ³ β p' β‘ f1 .snd) lemma {x'} {p'} p = J (Ξ» x' Ξ³ β β p' β (subst (Ξ» x β f x β‘ _) Ξ³ (f1 .snd) β‘ p') β‘ (ap f Ξ³ β p' β‘ f1 .snd)) helper p p'
Then, given an element we can construct a fibre of of and, using the above characterisation of paths, prove that this fibre is a centre of contraction:
is-half-adjoint-equivβis-equiv : β {ββ ββ} {A : Type ββ} {B : Type ββ} {f : A β B} β is-half-adjoint-equiv f β is-equiv f is-half-adjoint-equivβis-equiv {A = A} {B} {f} (g , Ξ· , Ξ΅ , zig) .is-eqv y = contr fib contract where fib : fibre f y fib = g y , Ξ΅ y
The fibre is given by which we can prove identical to another using a very boring calculation:
contract : (fibβ : fibre f y) β fib β‘ fibβ contract (x , p) = (fibre-paths eβ»ΒΉ) .fst (xβ‘gy , path) where xβ‘gy = ap g (sym p) β Ξ· x path : ap f (ap g (sym p) β Ξ· x) β p β‘ Ξ΅ y path = ap f (ap g (sym p) β Ξ· x) β p β‘β¨ apβ _β_ (ap-β f (ap g (sym p)) (Ξ· x)) refl β sym (β-assoc _ _ _) β©β‘ ap (Ξ» x β f (g x)) (sym p) β β ap f (Ξ· x) β β p β‘β¨ ap! (zig _) β©β‘ -- by the triangle identity ap (f β g) (sym p) β β Ξ΅ (f x) β p β β‘β¨ ap! (homotopy-natural Ξ΅ p) β©β‘ -- by naturality of Ξ΅
The calculation of path
factors as a bunch of
boring adjustments to paths using the groupoid structure of types, and
the two interesting steps above: The triangle identity says that
and naturality of
lets us βpush it past
β
to get something we can cancel:
ap (f β g) (sym p) β ap (f β g) p β Ξ΅ y β‘β¨ β-assoc _ _ _ β©β‘ β ap (f β g) (sym p) β ap (f β g) p β β Ξ΅ y β‘Λβ¨ apΒ‘ (ap-β (f β g) (sym p) p) β©β‘Λ ap (f β g) β sym p β p β β Ξ΅ y β‘β¨ ap! (β-invr _) β©β‘ ap (f β g) refl β Ξ΅ y β‘β¨β© refl β Ξ΅ y β‘β¨ β-idl (Ξ΅ y) β©β‘ Ξ΅ y β
Putting these together, we get an alternative definition of is-isoβis-equiv
:
is-isoβis-equiv' : β {ββ ββ} {A : Type ββ} {B : Type ββ} {f : A β B} β is-iso f β is-equiv f is-isoβis-equiv' = is-half-adjoint-equivβis-equiv β is-isoβis-half-adjoint-equiv