module Cat.Univalent.Rezk.Universal where

Universal property of the Rezk completionπŸ”—

With the Rezk completion, we defined, for any precategory a univalent category together with a weak equivalence functor We also stated, but did not in that module prove, the universal property of the Rezk completion: The functor is the universal map from to categories. This module actually proves it, but be warned: the proof is very technical, and is mostly a calculation.

In generic terms, universality of the Rezk completion follows from univalent categories being the class of local objects for the weak equivalences1: A category is univalent precisely if any weak equivalence induces2 a proper equivalence of categories

The high-level overview of the proof is as follows:

  • For any eso functor and for any all precategories, the functor is faithful. This is the least technical part of the proof, so we do it first.

  • If is additionally full, then is fully faithful.

  • If is a weak equivalence, and is univalent, then is essentially surjective. By the principle of unique choice, it is an equivalence, and thus3 an isomorphism.

FaithfulnessπŸ”—

The argument here is almost elementary: We’re given a witness that so all we have to do is manipulate the expression to something which has a subexpression. Since is eso, given we can find and an iso from which we can calculate:

eso→pre-faithful
  : (H : Functor A B) {F G : Functor B C}
  β†’ is-eso H β†’ (Ξ³ Ξ΄ : F => G)
  β†’ (βˆ€ b β†’ Ξ³ .Ξ· (H .Fβ‚€ b) ≑ Ξ΄ .Ξ· (H .Fβ‚€ b)) β†’ Ξ³ ≑ Ξ΄
eso→pre-faithful {A = A} {B = B} {C = C} H {F} {G} h-eso γ δ p = ext λ b →
  βˆ₯-βˆ₯-out (C.Hom-set _ _ _ _) do
  (b' , m) ← h-eso b
  βˆ₯_βˆ₯.inc $
    Ξ³ .Ξ· b                                      β‰‘βŸ¨ C.intror (F-map-iso F m .invl) βŸ©β‰‘
    Ξ³ .Ξ· b C.∘ F.₁ (m .to) C.∘ F.₁ (m .from)    β‰‘βŸ¨ C.extendl (Ξ³ .is-natural _ _ _) βŸ©β‰‘
    G.₁ (m .to) C.∘ Ξ³ .Ξ· _ C.∘ F.₁ (m .from)    β‰‘βŸ¨ apβ‚‚ C._∘_ refl (apβ‚‚ C._∘_ (p b') refl) βŸ©β‰‘
    G.₁ (m .to) C.∘ Ξ΄ .Ξ· _ C.∘ F.₁ (m .from)    β‰‘βŸ¨ C.extendl (sym (Ξ΄ .is-natural _ _ _)) βŸ©β‰‘
    Ξ΄ .Ξ· b C.∘ F.₁ (m .to) C.∘ F.₁ (m .from)    β‰‘βŸ¨ C.elimr (F-map-iso F m .invl) βŸ©β‰‘
    δ .η b                                      ∎
  where module C = Cat.Reasoning C
        module F = Functor F
        module G = Functor G

The above is, unfortunately, the simplest result in this module. The next two proofs are both quite technical: that’s because we’re given some mere4 data, from the assumption that is a weak equivalence, so to use it as proper data, we need to show that whatever we want lives in a contractible space, after which we are free to project only the data we are interested in, and forget about the coherences.

It will turn out, however, that the coherence data necessary to make these types contractible is exactly the coherence data we need to show that we are indeed building functors, natural transformations, etc. So, not only do we need it to use unique choice, we also need it to show we’re doing category theory.

Full-faithfulnessπŸ”—

Let and be as before, except now assume that is full (in addition to eso).

eso-full→pre-ff
  : (H : Functor A B)
  β†’ is-eso H β†’ is-full H
  β†’ is-fully-faithful {C = Cat[ B , C ]} (precompose H)
eso-full→pre-ff {A = A} {B = B} {C = C} H H-eso H-full = res where

We will show that, for every natural transformation and each there is a contractible type of β€œcomponent data” over These data consist of morphisms each equipped with a witness that acts naturally when faced with isomorphisms

In more detail, if we’re given an essential fibre of over we can use to β€œmatch up” our component with the components of the natural transformation since we’ve claimed to have a and someone has just handed us a then it darn well better be the case that is

    T : B.Ob β†’ Type _
    T b = Ξ£ (C.Hom (F.β‚€ b) (G.β‚€ b)) Ξ» g β†’
      (a : A.Ob) (f : H.β‚€ a B.β‰… b) β†’
      Ξ³.Ξ· a ≑ G.₁ (f .from) C.∘ g C.∘ F.₁ (f .to)

We’ll first show that components exist at all. Assume that we have some and an essential fibre of over it5. In this situation, guided by the compatibility condition (and isomorphisms being just the best), we can actually define the component to be β€œwhatever satisfies compatibility at ” and a short calculation establishes that defining

      g = G.₁ h.to C.∘ Ξ³.Ξ· aβ‚€ C.∘ F.₁ h.from

is indeed a possible choice. We present the formalisation below, but do not comment on the calculation, leaving it to the curious reader to load this file in Agda and poke around the proof.

      lemma : (a : A.Ob) (f : H.β‚€ a B.β‰… b)
            β†’ Ξ³.Ξ· a ≑ G.₁ (f .from) C.∘ g C.∘ F.₁ (f .to)
      lemma a f = βˆ₯-βˆ₯-out (C.Hom-set _ _ _ _) do
        (k , p)   ← H-full (h.from B.∘ B.to f)
        (k⁻¹ , q) ← H-full (B.from f B.∘ h.to)
        βˆ₯_βˆ₯.inc $
             C.intror (F.annihilate
               (apβ‚‚ B._∘_ q p Β·Β· B.cancel-inner h.invl Β·Β· f .invr))
          Β·Β· C.extendl (Ξ³.is-natural _ _ _)
          Β·Β· apβ‚‚ (Ξ» e e' β†’ G.₁ e C.∘ Ξ³.Ξ· aβ‚€ C.∘ F.₁ e') q p
          Β·Β· apβ‚‚ (Ξ» e e' β†’ e C.∘ Ξ³.Ξ· aβ‚€ C.∘ e') (G.F-∘ _ _) (F.F-∘ _ _)
          Β·Β· C.pullr (ap (G.₁ h.to C.∘_) (C.pulll refl) βˆ™ C.pulll refl)

Anyway, because of how we’ve phrased the coherence condition, if both satisfy it, then we have equal to both and 6 Since isomorphisms are both monic and epic, we can cancel and from these equations to conclude Since the coherence condition is a proposition, the type of component data over is a proposition.

    T-prop : βˆ€ b β†’ is-prop (T b)
    T-prop b (g , coh) (g' , coh') = Ξ£-prop-path! $ βˆ₯-βˆ₯-out! do
      (aβ‚€ , h) ← H-eso b
      pure $ C.iso→epic (F-map-iso F h) _ _
        (C.isoβ†’monic (F-map-iso G (h B.Iso⁻¹)) _ _
          (sym (coh aβ‚€ h) βˆ™ coh' aβ‚€ h))

Given any being eso means that we merely have an essential fibre of over But since the type of components over is a proposition, if we’re going to use it to construct a component over then we are granted the honour of actually getting hold of an pair.

    mkT' : βˆ€ b β†’ βˆ₯ Essential-fibre H b βˆ₯ β†’ βˆ₯ T b βˆ₯
    mkT' b he = do
      (aβ‚€ , h) ← he
      βˆ₯_βˆ₯.inc (Mk.g b aβ‚€ h , Mk.lemma b aβ‚€ h)

    mkT : βˆ€ b β†’ T b
    mkT b = βˆ₯-βˆ₯-out (T-prop b) (mkT' b (H-eso b))

Another calculation shows that, since is full, given any pair of essential fibres over and over with a mediating map we can choose a map satisfying and since both the components at and β€œcome from ” (which is natural), we get a naturality result for the transformation we’re defining, too.

That computation is a bit weirder, so it’s hidden in this <details> tag.
    module
      _ {b b'} (f : B.Hom b b') (a a' : A.Ob)
        (h : H.β‚€ a B.β‰… b) (h' : H.β‚€ a' B.β‰… b')
      where
      private
        module h' = B._β‰…_ h'
        module h = B._β‰…_ h

      naturality : _
      naturality = βˆ₯-βˆ₯-out (C.Hom-set _ _ _ _) do
        (k , p) ← H-full (h'.from B.∘ f B.∘ h.to)
        pure $ C.pullr (C.pullr (F.weave (sym
                  (B.pushl p βˆ™ apβ‚‚ B._∘_ refl (B.cancelr h.invl)))))
            Β·Β· apβ‚‚ C._∘_ refl (C.extendl (Ξ³.is-natural _ _ _))
            Β·Β· C.extendl (G.weave (B.lswizzle p h'.invl))

Because of this naturality result, all the components we’ve chosen piece together into a natural transformation. And since we defined parametrically over the choice of essential fibre, if we’re looking at some then we can choose the identity isomorphism, from which it falls out that Since we had already established that is faithful, and now we’ve shown it is full, it is fully faithful.

    Ξ΄ : F => G
    Ξ΄ .Ξ· b = mkT b .fst
    Ξ΄ .is-natural b b' f = βˆ₯-βˆ₯-elimβ‚‚
      {P = Ξ» Ξ± Ξ² β†’ βˆ₯-βˆ₯-out (T-prop b') (mkT' b' Ξ±) .fst C.∘ F.₁ f
                 ≑ G.₁ f C.∘ βˆ₯-βˆ₯-out (T-prop b) (mkT' b Ξ²) .fst}
      (Ξ» _ _ β†’ C.Hom-set _ _ _ _)
      (Ξ» (a' , h') (a , h) β†’ naturality f a a' h h') (H-eso b') (H-eso b)

  full : is-full (precompose H)
  full {x = x} {y = y} Ξ³ = pure (Ξ΄ _ _ Ξ³ , ext p) where
    p : βˆ€ b β†’ Ξ΄ _ _ Ξ³ .Ξ· (H.β‚€ b) ≑ Ξ³ .Ξ· b
    p b = subst
      (Ξ» e β†’ βˆ₯-βˆ₯-out (T-prop _ _ Ξ³ (H.β‚€ b)) (mkT' _ _ Ξ³ (H.β‚€ b) e) .fst
           ≑ Ξ³ .Ξ· b)
      (squash (inc (b , B.id-iso)) (H-eso (H.β‚€ b)))
      (C.eliml (y .F-id) βˆ™ C.elimr (x .F-id))

  res : is-fully-faithful (precompose H)
  res = full+faithful→ff (precompose H) full λ {F} {G} {γ} {δ} p →
    esoβ†’pre-faithful H H-eso Ξ³ Ξ΄ Ξ» b β†’ p Ξ·β‚š b

Essential surjectivityπŸ”—

The rest of the proof proceeds in this same way: Define a type which characterises, up to a compatible space of choices, first the action on morphisms of a functor which inverts and in terms of this type, the action on morphisms. It’s mostly the same trick as above, but a lot wilder. We do not comment on it too extensively: the curious reader, again, can load this file in Agda and play around.

The type of object-candidates Obs is indexed by a and any object candidate must come with a family of isomorphisms giving, for every way of expressing as coming from a way of coming from To show this type is a proposition, we additionally require a naturality condition for these isomorphisms.

  private module _ (F : Functor A C) where
    private module F = FR F

    Obs : B.Ob β†’ Type _
    Obs b =
      Ξ£ C.Ob Ξ» c β†’
      Ξ£ ((a : A.Ob) (h : H.β‚€ a B.β‰… b) β†’ F.β‚€ a C.β‰… c) Ξ» k β†’
      ((a , h) (a' , h') : Essential-fibre H b) (f : A.Hom a a') β†’
      h' .to B.∘ H.₁ f ≑ h .to β†’
      k a' h' .to C.∘ F.₁ f ≑ k a h .to

Note that we can derive an object candidate over from a fibre of over Moreover, this choice is a center of contraction, so we can once more apply unique choice and the assumption that is eso to conclude that every has an object candidate over it.

    obj' : βˆ€ {b} β†’ Essential-fibre H b β†’ Obs b
    obj' (aβ‚€ , hβ‚€) .fst = F.β‚€ aβ‚€
    obj' (aβ‚€ , hβ‚€) .snd .fst a h = F-map-iso F (H.iso.from (h B.∘Iso (hβ‚€ B.Iso⁻¹)))
    obj' (aβ‚€ , hβ‚€) .snd .snd (a , h) (a' , h') f p = F.collapse (H.ipushr p)

    Obs-is-prop : βˆ€ {b} (f : Essential-fibre H b) (c : Obs b) β†’ obj' f ≑ c
    Obs-is-prop (aβ‚€ , hβ‚€) (c' , k' , Ξ²) =
      Σ-pathp (Univalent.iso→path c-cat c≅c') $
      Ξ£-prop-pathp! $
        funextP Ξ» a β†’ funextP Ξ» h β†’ C.β‰…-pathp _ _ $
          Univalent.Hom-pathp-reflr-iso c-cat {q = c≅c'}
            ( C.pullr (F.eliml (H.from-id (hβ‚€ .invr)))
            βˆ™ Ξ² _ _ _ (H.Ξ΅-lswizzle (hβ‚€ .invl)))
      where
        ckΞ± = obj' (aβ‚€ , hβ‚€)
        c = ckΞ± .fst
        k = ckΞ± .snd .fst
        Ξ± = ckΞ± .snd .snd
        cβ‰…c' = (k aβ‚€ hβ‚€ C.Iso⁻¹) C.∘Iso k' aβ‚€ hβ‚€

We will write Gβ‚€ for the canonical choice of object candidate, and k for the associated family of isomorphisms. The type of morphism candidates over consists of maps which are compatible with the reindexing isomorphisms for any essential fibre over over and map satisfying

    compat : βˆ€ {b b'} (f : B.Hom b b') β†’ C.Hom (Gβ‚€ b) (Gβ‚€ b') β†’ Type _
    compat {b} {b'} f g =
      βˆ€ a (h : H.β‚€ a B.β‰… b) a' (h' : H.β‚€ a' B.β‰… b') (l : A.Hom a a')
      β†’ h' .to B.∘ H.₁ l ≑ f B.∘ h .to
      β†’ k a' h' .to C.∘ F.₁ l ≑ g C.∘ k a h .to

    Homs : βˆ€ {b b'} (f : B.Hom b b') β†’ Type _
    Homs {b = b} {b'} f = Ξ£ (C.Hom (Gβ‚€ b) (Gβ‚€ b')) (compat f)
It will again turn out that any initial choice of fibre over and gives a morphism candidate over and the compatibility data is exactly what we need to show the type of morphism candidates is a proposition.

This proof really isn’t commented. I’m sorry.

    module _ {b b'} (f : B.Hom b b')
             aβ‚€ (hβ‚€ : H.β‚€ aβ‚€ B.β‰… b)
             aβ‚€' (hβ‚€' : H.β‚€ aβ‚€' B.β‰… b') where
      lβ‚€ : A.Hom aβ‚€ aβ‚€'
      lβ‚€ = H.from (hβ‚€' .from B.∘ f B.∘ hβ‚€ .to)

      p : hβ‚€' .to B.∘ H.₁ lβ‚€ ≑ (f B.∘ hβ‚€ .to)
      p = H.Ξ΅-lswizzle (hβ‚€' .invl)

      gβ‚€ : C.Hom (Gβ‚€ b) (Gβ‚€ b')
      gβ‚€ = k aβ‚€' hβ‚€' .to C.∘ F.₁ lβ‚€ C.∘ k aβ‚€ hβ‚€ .from

      module _ a (h : H.β‚€ a B.β‰… b) a' (h' : H.β‚€ a' B.β‰… b')
                (l : A.Hom a a') (w : h' .to B.∘ H.₁ l ≑ f B.∘ h .to) where
        m : aβ‚€ A.β‰… a
        m = H.iso.from (hβ‚€ B.∘Iso (h B.Iso⁻¹))

        m' : aβ‚€' A.β‰… a'
        m' = H.iso.from (hβ‚€' B.∘Iso (h' B.Iso⁻¹))

        Ξ± : k aβ‚€ hβ‚€ .from ≑ F.₁ (m .from) C.∘ k a h .from
        Ξ± = C.inverse-unique _ _ (k aβ‚€ hβ‚€) (F-map-iso F m C.∘Iso k a h) $
          sym (kcomm _ _ _ (H.Ξ΅-lswizzle (h .invl)))

        Ξ³ : H.₁ (m' .to) B.∘ H.₁ lβ‚€ ≑ H.₁ l B.∘ H.₁ (m .to)
        Ξ³ =  B.pushl (H.Ξ΅ _)
          Β·Β· apβ‚‚ B._∘_ refl (p βˆ™
              B.pushl (B.insertr (h .invl) βˆ™ apβ‚‚ B._∘_ (sym w) refl))
          Β·Β· B.deletel (h' .invr)
          βˆ™ apβ‚‚ B._∘_ refl (sym (H.Ξ΅ _))

        Ξ³' : lβ‚€ A.∘ m .from ≑ m' .from A.∘ l
        γ' = A.iso→monic m' _ _ $ A.extendl (H.injective (H.swap γ))
                               Β·Β· A.elimr (m .invl)
                               Β·Β· A.insertl (m' .invl)

        Ξ΄ : gβ‚€ C.∘ k a h .to ≑ k a' h' .to C.∘ F.₁ l
        Ξ΄ = C.pullr ( C.pullr refl Β·Β· apβ‚‚ C._∘_ refl (C.pushl Ξ±)
                   Β·Β· C.pulll refl βˆ™ C.elimr (k a h .invr))
          Β·Β· apβ‚‚ C._∘_ refl (F.weave Ξ³')
          Β·Β· C.pulll (C.pushl (sym (kcomm _ _ _ (H.Ξ΅-lswizzle (h' .invl))))
              βˆ™ C.elimr (F.annihilate (m' .invl)))

      Homs-pt : Homs f
      Homs-pt = gβ‚€ , Ξ» a h a' h' l w β†’ sym (Ξ΄ a h a' h' l w)

      Homs-prop' : (h' : Homs f) β†’ h' .fst ≑ gβ‚€
      Homs-prop' (g₁ , w) = C.isoβ†’epic (k aβ‚€ hβ‚€) _ _
        (sym (Ξ΄ aβ‚€ hβ‚€ aβ‚€' hβ‚€' lβ‚€ p βˆ™ w aβ‚€ hβ‚€ aβ‚€' hβ‚€' lβ‚€ p))

    Homs-contr' : βˆ€ {b b'} (f : B.Hom b b') β†’ βˆ₯ is-contr (Homs f) βˆ₯
    Homs-contr' {b = b} {b'} f = do
      (aβ‚€ , h)   ← H-eso b
      (aβ‚€' , h') ← H-eso b'
      inc (contr (Homs-pt f aβ‚€ h aβ‚€' h') Ξ» h' β†’ Ξ£-prop-path!
        (sym (Homs-prop' f _ _ _ _ h')))

    Homs-contr : βˆ€ {b b'} (f : B.Hom b b') β†’ is-contr (Homs f)
    Homs-contr f = βˆ₯-βˆ₯-out! (Homs-contr' f)

    G₁ : βˆ€ {b b'} β†’ B.Hom b b' β†’ C.Hom (Gβ‚€ b) (Gβ‚€ b')
    G₁ f = Homs-contr f .centre .fst
Using the compatibility condition, and choices of we can show that the assignment of morphism candidates does assemble into a functor.
    module G∘ {x y z} (f : B.Hom y z) (g : B.Hom x y)
              {ax ay az} (hx : H.β‚€ ax B.β‰… x) (hy : H.β‚€ ay B.β‰… y)
              (hz : H.β‚€ az B.β‰… z) where

      af : A.Hom ay az
      af = H.from (hz .from B.∘ f B.∘ hy .to)

      ag : A.Hom ax ay
      ag = H.from (hy .from B.∘ g B.∘ hx .to)

      h' : H.₁ (af A.∘ ag) ≑ hz .from B.∘ f B.∘ g B.∘ hx .to
      h' = H.Ξ΅-expand refl βˆ™ B.pullr (B.cancel-inner (hy .invl))

      commutes : G₁ (f B.∘ g) ≑ G₁ f C.∘ G₁ g
      commutes = C.iso→epic (k ax hx) _ _ $
          sym (Homs-contr (f B.∘ g) .centre .snd ax hx az hz (af A.∘ ag)
                (apβ‚‚ B._∘_ refl h' Β·Β· B.cancell (hz .invl) Β·Β· B.pulll refl))
        βˆ™ sym ( C.pullr (sym (Homs-contr g .centre .snd ax hx ay hy ag
                  (H.Ξ΅-lswizzle (hy .invl))))
              βˆ™ C.pulll (sym (Homs-contr f .centre .snd ay hy az hz af
                  (H.Ξ΅-lswizzle (hz .invl))))
              βˆ™ F.pullr refl)

In this manner, the assignment of object candidates and morphism candidates fits together into a functor After finishing this, we have to show that But the compatibility data which we have used to uniquely characterise uniquely characterises after all, and it does so as composing with to give .

    G : Functor B C
    G .Fβ‚€ b = Gβ‚€ b
    G .F₁ f = G₁ f

    G .F-id = ap fst $ Homs-contr B.id .paths $ C.id , Ξ» a h a' h' l w β†’
      sym (C.idl _ βˆ™ sym (kcomm (a , h) (a' , h') l (w βˆ™ B.idl _)))

Note that we proved7 that is functorial given choices of essential fibres of all three objects involved in the composition. Since we’re showing an equality in a set β€” a proposition β€” these choices don’t matter, so we can use essential surjectivity of

    G .F-∘ {x} {y} {z} f g = βˆ₯-βˆ₯-out! do
      (ax , hx) ← H-eso x
      (ay , hy) ← H-eso y
      (az , hz) ← H-eso z
      inc (G∘.commutes f g hx hy hz)

To use the unique charactersation of as β€œthe functor satisfying ”, observe: for any the object can be made into an object candidate over and since the type of object candidates is a proposition, our candidate is identical to the value of That’s half of established right off the bat!

    module _ (x : A.Ob) where
      hf-obs : Obs (H.β‚€ x)
      hf-obs .fst = F.Fβ‚€ x
      hf-obs .snd .fst a h = F-map-iso F (H.iso.from h)
      hf-obs .snd .snd (a , h) (a' , h') f α = F.collapse (H.inv∘l α)

      abstract
        objp : Gβ‚€ (H.β‚€ x) ≑ F.β‚€ x
        objp = ap fst $ summon {H.β‚€ x} (H-eso _) .paths hf-obs

Over that identification, we can show that, for any in the value is also a candidate for the morphism so these are also identical. This proof is a bit hairier, because only has the right type if we adjust it by the proof that we have to transport and then as punishment for our hubris, invoke a lot of technical lemmas about the characterisation of PathP in the morphism spaces of (pre)categories.

    module _ {x y} (f : A.Hom x y) where
      hom' : Homs (H.₁ f)
      hom' .fst = transport (Ξ» i β†’ C.Hom (objp x (~ i)) (objp y (~ i))) (F.₁ f)
      hom' .snd a h a' h' l w = sym $
        C.pushl (Hom-transport C (sym (objp x)) (sym (objp y)) (F.₁ f))
        Β·Β· apβ‚‚ C._∘_ refl
          ( C.pullr (from-pathp-from C (objp x) (Ξ» i β†’ kp x a h i .to))
          βˆ™ F.weave (H.Ξ΅-twist (sym w)))
        Β·Β· C.pulll (from-pathp-to C (sym (objp y)) Ξ» i β†’ kp y a' h' (~ i) .to)

      homp : transport (Ξ» i β†’ C.Hom (objp x (~ i)) (objp y (~ i))) (F.₁ f)
           ≑ Homs-contr (H.₁ f) .centre .fst
      homp = ap fst $ sym $ Homs-contr (H.₁ f) .paths hom'

    correct : G F∘ H ≑ F
    correct = Functor-path objp Ξ» {x} {y} f β†’ symP
      {A = Ξ» i β†’ C.Hom (objp x (~ i)) (objp y (~ i))} $
      to-pathp (homp f)

Since we’ve shown that so in particular we’ve now put together proofs that is fully faithful and, since the construction above works for any essentially surjective. Even better, since we’ve actually constructed a functor we’ve shown that is split essentially surjective! Since is univalent whenever is, the splitting would be automatic, but this is a nice strengthening.

  weak-equiv→pre-equiv : is-equivalence {C = Cat[ B , C ]} (precompose H)
  weak-equiv→pre-equiv = ff+split-eso→is-equivalence {F = precompose H}
    (eso-full→pre-ff H H-eso λ g → inc (H.from g , H.Ρ g))
    λ F → G F , path→iso (correct F)

And since a functor is an equivalence of categories iff. it is an isomorphism of categories, we also have that the rule sending to its is an equivalence of types.

  weak-equiv→pre-iso : is-precat-iso {C = Cat[ B , C ]} (precompose H)
  weak-equiv→pre-iso = is-equivalence→is-precat-iso (precompose H) weak-equiv→pre-equiv
    (Functor-is-category c-cat)
    (Functor-is-category c-cat)

Restating the result that acts on objects as an equivalence of types, we have the following result: If is a weak equivalence (a fully faithful and essentially surjective functor), then for any category and functor there is a contractible space(!) of extensions which factor through

weak-equiv→reflection
  : (F : Functor C C⁺) β†’ is-eso F β†’ is-fully-faithful F
  β†’ {D : Precategory o β„“} β†’ is-category D
  β†’ (G : Functor C D)
  β†’ is-contr (Ξ£ (Functor C⁺ D) Ξ» H β†’ H F∘ F ≑ G)
weak-equiv→reflection F F-eso F-ff D-cat G =
  weak-equiv→pre-iso F F-eso F-ff D-cat
    .is-precat-iso.has-is-iso .is-eqv G

Note that this is only half of the point of the Rezk completion: we would also like for to be univalent, but that is not necessary for to think that precomposition with is an isomorphism.


  1. a weak equivalence is a fully faithful, essentially surjective functorβ†©οΈŽ

  2. by precompositionβ†©οΈŽ

  3. since both its domain and codomain are univalentβ†©οΈŽ

  4. truncatedβ†©οΈŽ

  5. Don’t worry about actually getting your hands on an β†©οΈŽ

  6. I’ve implicitly used that is eso to cough up an over since we’re proving a propositionβ†©οΈŽ

  7. in the second <details> tag aboveβ†©οΈŽ