module Cat.Displayed.Cartesian.Weak
  {o β„“ o' β„“'}
  {ℬ : Precategory o β„“}
  (β„° : Displayed ℬ o' β„“')
  where

Weak cartesian morphismsπŸ”—

Some authors use a weaker notion of cartesian morphism when defining fibrations, referred to as a β€œweak cartesian” or β€œhypocartesian” morphism. Such morphisms only allow for the construction of universal maps when the morphism to be factored is displayed over the same morphism as the weak cartesian map. This situation is best understood graphically.

record is-weak-cartesian
  {a b a' b'} (f : Hom a b) (f' : Hom[ f ] a' b')
  : Type (o βŠ” β„“ βŠ” o' βŠ” β„“')
  where
  no-eta-equality
  field
    universal : βˆ€ {x'} β†’ (g' : Hom[ f ] x' b') β†’ Hom[ id ] x' a'
    commutes  : βˆ€ {x'} β†’ (g' : Hom[ f ] x' b') β†’ f' ∘' universal g' ≑[ idr _ ] g'
    unique    : βˆ€ {x'} {g' : Hom[ f ] x' b'}
                β†’ (h' : Hom[ id ] x' a')
                β†’ f' ∘' h' ≑[ idr _ ] g'
                β†’ h' ≑ universal g'

open is-weak-cartesian

Like their stronger counterparts, weak cartesian lifts are unique up to vertical isomorphism.

weak-cartesian-domain-unique
  : βˆ€ {x y} {f : Hom x y}
  β†’ βˆ€ {x' x'' y'} {f' : Hom[ f ] x' y'} {f'' : Hom[ f ] x'' y'}
  β†’ is-weak-cartesian f f'
  β†’ is-weak-cartesian f f''
  β†’ x' ≅↓ x''
weak-cartesian-domain-unique {f' = f'} {f'' = f''} f'-weak f''-weak =
  make-iso[ _ ] to* from*
    (to-pathp $ unique f''-weak _ invl* βˆ™ (sym $ unique f''-weak _ (idr' f'')))
    (to-pathp $ unique f'-weak _ invr* βˆ™ (sym $ unique f'-weak _ (idr' f')))
  where
    open is-weak-cartesian

    to* = universal f''-weak f'
    from* = universal f'-weak f''

    invl* : f'' ∘' hom[] (to* ∘' from*) ≑[ idr _ ] f''
    invl* = to-pathp $
      hom[] (f'' ∘' hom[] (to* ∘' from*)) β‰‘βŸ¨ smashr _ _ βŸ©β‰‘
      hom[] (f'' ∘' to* ∘' from*)         β‰‘βŸ¨ revive₁ {p = ap (_ ∘_) (idl _)} (pulll' (idr _) (f''-weak .commutes f')) βŸ©β‰‘
      hom[] (f' ∘' from*)                β‰‘βŸ¨ revive₁ (f'-weak .commutes f'') βŸ©β‰‘
      hom[] f''                           β‰‘βŸ¨ liberate _ βŸ©β‰‘
      f'' ∎

    invr* : f' ∘' hom[] (from* ∘' to*) ≑[ idr _ ] f'
    invr* = to-pathp $
      hom[] (f' ∘' hom[] (from* ∘' to*)) β‰‘βŸ¨ smashr _ _ βŸ©β‰‘
      hom[] (f' ∘' from* ∘' to*)         β‰‘βŸ¨ revive₁ {p = ap (_ ∘_) (idl _)} (pulll' (idr _) (f'-weak .commutes f'')) βŸ©β‰‘
      hom[] (f'' ∘' to*)                  β‰‘βŸ¨ revive₁ (f''-weak .commutes f') βŸ©β‰‘
      hom[] f'                           β‰‘βŸ¨ liberate _ βŸ©β‰‘
      f' ∎

As one would expect, cartesian maps are always weakly cartesian. Proving this does involve a bit of cubical yoga, as the maps we want to factorize aren’t definitionally composites, but we can use the generalized versions of the functions from Cartesian to get the job done.

cartesianβ†’weak-cartesian : βˆ€ {x y x' y'} {f : Hom x y} {f' : Hom[ f ] x' y'}
  β†’ is-cartesian f f'
  β†’ is-weak-cartesian f f'
cartesian→weak-cartesian {f = f} {f' = f'} cart = weak-cart where
  open is-cartesian cart

  weak-cart : is-weak-cartesian f f'
  weak-cart .universal g' = universalv g'
  weak-cart .commutes g' = commutesv g'
  weak-cart .unique h' p = uniquev h' p

Furthermore, if is a fibration, weakly cartesian morphisms are also cartesian. To see this, we note that the lift of is cartesian, and thus also a weak cartesian morphism. This implies that there is an isomorphism between their codomains, which allows us to invoke cartesian-vert-retraction-stable to show that must also be cartesian.

weak-cartesian→cartesian
  : βˆ€ {x y x' y'} {f : Hom x y} {f' : Hom[ f ] x' y'}
  β†’ (fib : Cartesian-fibration)
  β†’ is-weak-cartesian f f'
  β†’ is-cartesian f f'
weak-cartesian→cartesian {x = x} {y' = y'} {f = f} {f' = f'} fib f-weak = f-cart where
  open Cartesian-fibration fib
  module f-weak = is-weak-cartesian f-weak

  x* : Ob[ x ]
  x* = has-lift.x' f y'

  f* : Hom[ f ] x* y'
  f* = has-lift.lifting f y'

  f*-cart : is-cartesian f f*
  f*-cart = has-lift.cartesian f y'

  f*-weak : is-weak-cartesian f f*
  f*-weak = cartesian→weak-cartesian f*-cart

  f-cart : is-cartesian f f'
  f-cart =
    cartesian-vertical-retraction-stable f*-cart
      (iso[]β†’to-has-section[] (weak-cartesian-domain-unique f*-weak f-weak))
      (f-weak.commutes f*)

is a weak cartesian morphism if and only if postcomposition of onto vertical maps is an equivalence.

postcompose-equiv→weak-cartesian
  : βˆ€ {x y x' y'} {f : Hom x y}
  β†’ (f' : Hom[ f ] x' y')
  β†’ (βˆ€ {x''} β†’ is-equiv {A = Hom[ id ] x'' x'} (f' ∘'_))
  β†’ is-weak-cartesian f f'
postcompose-equiv→weak-cartesian f' eqv .universal h' =
  equivβ†’inverse eqv (hom[ idr _ ]⁻ h')
postcompose-equiv→weak-cartesian f' eqv .commutes h' =
  to-pathp⁻ (equivβ†’counit eqv (hom[ idr _ ]⁻ h'))
postcompose-equiv→weak-cartesian f' eqv .unique m' p =
  (sym $ equivβ†’unit eqv m') βˆ™ ap (equivβ†’inverse eqv) (from-pathp⁻ p)

weak-cartesian→postcompose-equiv
  : βˆ€ {x y x' x'' y'} {f : Hom x y} {f' : Hom[ f ] x' y'}
  β†’ is-weak-cartesian f f'
  β†’ is-equiv {A = Hom[ id ] x'' x'} (f' ∘'_)
weak-cartesian→postcompose-equiv wcart =
  is-iso→is-equiv $
    iso (Ξ» h' β†’ wcart .universal (hom[ idr _ ] h'))
        (Ξ» h' β†’ from-pathp⁻ (wcart .commutes _) Β·Β· hom[]-βˆ™ _ _ Β·Β· liberate _)
        (Ξ» h' β†’ sym $ wcart .unique _ (to-pathp refl))

Weak cartesian liftsπŸ”—

We can also define a notion of weak cartesian lifts, much like we can with their stronger cousins.

record Weak-cartesian-lift
  {x y} (f : Hom x y) (y' : Ob[ y ]) : Type (o βŠ” β„“ βŠ” o' βŠ” β„“')
  where
  no-eta-equality
  field
    {x'}    : Ob[ x ]
    lifting : Hom[ f ] x' y'
    weak-cartesian : is-weak-cartesian f lifting

  open is-weak-cartesian weak-cartesian public

A displayed category that has weak cartesian lifts for all morphisms in the base is called a weak cartesian fibration, though we will often use the term weak fibration. Other authors call weak fibrations prefibred categories, though we avoid this name as it conflicts with the precategory/category distinction.

record is-weak-cartesian-fibration : Type (o βŠ” β„“ βŠ” o' βŠ” β„“') where
  no-eta-equality
  field
    weak-lift : βˆ€ {x y} β†’ (f : Hom x y) β†’ (y' : Ob[ y ]) β†’ Weak-cartesian-lift f y'

  module weak-lift {x y} (f : Hom x y) (y' : Ob[ y ]) =
    Weak-cartesian-lift (weak-lift f y')

Note that if is a weak fibration, we can define an operation that allows us to move vertical morphisms between fibres. This is actually enough to define base change functors, though they are not well behaved unless is a fibration.

  rebase : βˆ€ {x y y' y''} β†’ (f : Hom x y)
           β†’ Hom[ id ] y' y''
           β†’ Hom[ id ] (weak-lift.x' f y') (weak-lift.x' f y'')
  rebase f vert =
    weak-lift.universal f _ (hom[ idl _ ] (vert ∘' weak-lift.lifting f _))

Every fibration is a weak fibration.

cartesian-lift→weak-cartesian-lift
  : βˆ€ {x y} {f : Hom x y} {y' : Ob[ y ]}
  β†’ Cartesian-lift f y'
  β†’ Weak-cartesian-lift f y'

fibration→weak-fibration
  : Cartesian-fibration
  β†’ is-weak-cartesian-fibration
The proofs of these facts are just shuffling around data, so we omit them.
cartesian-lift→weak-cartesian-lift cart .Weak-cartesian-lift.x' =
  Cartesian-lift.x' cart
cartesian-lift→weak-cartesian-lift cart .Weak-cartesian-lift.lifting =
  Cartesian-lift.lifting cart
cartesian-lift→weak-cartesian-lift cart .Weak-cartesian-lift.weak-cartesian =
  cartesian→weak-cartesian (Cartesian-lift.cartesian cart)

fibration→weak-fibration fib .is-weak-cartesian-fibration.weak-lift x y' =
  cartesian-lift→weak-cartesian-lift (Cartesian-fibration.has-lift fib x y')

Notably, weak fibrations are fibrations when weak cartesian morphisms are closed under composition.

module _ where
  open Cartesian-fibration
  open is-cartesian

  weak-fibration→fibration
    : is-weak-cartesian-fibration
    β†’ (βˆ€ {x y z x' y' z'} {f : Hom y z} {g : Hom x y}
       β†’ {f' : Hom[ f ] y' z'} {g' : Hom[ g ] x' y'}
       β†’ is-weak-cartesian f f' β†’ is-weak-cartesian g g'
       β†’ is-weak-cartesian (f ∘ g) (f' ∘' g'))
    β†’ Cartesian-fibration
  weak-fibrationβ†’fibration weak-fib weak-∘ .has-lift {x = x} f y' = f-lift where
    open is-weak-cartesian-fibration weak-fib

    module weak-∘ {x y z} (f : Hom y z) (g : Hom x y) (z' : Ob[ z ]) =
      is-weak-cartesian (weak-∘ (weak-lift.weak-cartesian f z')
                                (weak-lift.weak-cartesian g _))

To show that has a cartesian lift, we begin by taking the weak cartesian lift of

    x* : Ob[ x ]
    x* = weak-lift.x' f y'

    f* : Hom[ f ] x* y'
    f* = weak-lift.lifting f y'

    f*-weak-cartesian : is-weak-cartesian f f*
    f*-weak-cartesian = weak-lift.weak-cartesian f y'

    module f* = is-weak-cartesian (f*-weak-cartesian)

We must now show that the weak cartesian morphism is actually cartesian. To do this, we must construct the following unique universal map:

To do this, we shall first take the weak cartesian lift of Both and are weak cartesian, which means that their composite is also weak cartesian by our hypothesis. We can then factor through to obtain a vertical morphism which we can then compose with to obtain the requisite map.

    module Morphisms
      {u : Ob} {u' : Ob[ u ]} (m : Hom u x) (h' : Hom[ f ∘ m ] u' y')
      where
        u* : Ob[ u ]
        u* = weak-lift.x' m _

        m* : Hom[ m ] u* x*
        m* = weak-lift.lifting m _

        m*-weak-cartesian : is-weak-cartesian m m*
        m*-weak-cartesian = weak-lift.weak-cartesian m x*

        module m* = is-weak-cartesian m*-weak-cartesian
        module f*∘m* = is-weak-cartesian (weak-∘ f*-weak-cartesian m*-weak-cartesian)
    f*-cartesian : is-cartesian f f*
    f*-cartesian .universal {u = u} {u' = u'} m h' =
      hom[ idr m ] (m* ∘'  f*∘m*.universal h')
      where open Morphisms m h'
Showing that this commutes is mostly an exercise in cubical yoga; the only real mathematical content is that the factorisation of via commutes.
    f*-cartesian .commutes {u = u} {u' = u'} m h' = path
      where
        open Morphisms m h'

        abstract
          path : f* ∘' hom[ idr m ] (m* ∘' f*∘m*.universal h') ≑ h'
          path =
            f* ∘' hom[] (m* ∘' f*∘m*.universal h')   β‰‘βŸ¨ whisker-r _ βŸ©β‰‘
            hom[] (f* ∘' m* ∘' f*∘m*.universal h')   β‰‘βŸ¨ assoc[] {q = idr _} βŸ©β‰‘
            hom[] ((f* ∘' m*) ∘' f*∘m*.universal h') β‰‘βŸ¨ hom[]⟩⟨ from-pathp⁻ (f*∘m*.commutes h') βŸ©β‰‘
            hom[] (hom[] h')                         β‰‘βŸ¨ hom[]-βˆ™ _ _ βˆ™ liberate _ βŸ©β‰‘
            h'                                       ∎
Uniqueness follows similarly as some cubical yoga, followed by the fact that both and are weak cartesian maps.
    f*-cartesian .unique {u = u} {u' = u'} {m = m} {h' = h'} m' p = path
      where
        open Morphisms m h'

        abstract
          universal-path : (f* ∘' m*) ∘' m*.universal m' ≑[ idr (f ∘ m) ] h'
          universal-path = to-pathp $
            hom[] ((f* ∘' m*) ∘' m*.universal m') β‰‘Λ˜βŸ¨ assoc[] {p = ap (f ∘_) (idr m)} βŸ©β‰‘Λ˜
            hom[] (f* ∘' (m* ∘' m*.universal m')) β‰‘βŸ¨ hom[]⟩⟨ ap (f* ∘'_) (from-pathp⁻ (m*.commutes m')) βŸ©β‰‘
            hom[] (f* ∘' hom[] m')                β‰‘βŸ¨ smashr _ _ βˆ™ liberate _ βŸ©β‰‘
            f* ∘' m'                              β‰‘βŸ¨ p βŸ©β‰‘
            h' ∎

          path : m' ≑ hom[ idr m ] (m* ∘' f*∘m*.universal h')
          path =
            m'                               β‰‘Λ˜βŸ¨ from-pathp (m*.commutes m') βŸ©β‰‘Λ˜
            hom[] (m* ∘' m*.universal m')    β‰‘βŸ¨ reindex _ (idr m) βŸ©β‰‘
            hom[] (m* ∘' m*.universal m')    β‰‘βŸ¨ hom[]⟩⟨ ap (m* ∘'_) (f*∘m*.unique _ universal-path) βŸ©β‰‘
            hom[] (m* ∘' f*∘m*.universal h') ∎

Putting this all together, we can finally deduce that is a cartesian lift of

    f-lift : Cartesian-lift f y'
    f-lift .Cartesian-lift.x' = x*
    f-lift .Cartesian-lift.lifting = f*
    f-lift .Cartesian-lift.cartesian = f*-cartesian

Factorisations in weak fibrationsπŸ”—

If is a weak fibration, then every morphism factorizes into a vertical morphism followed by a weak cartesian morphism.

record weak-cartesian-factorisation
  {x y x' y'} {f : Hom x y}
  (f' : Hom[ f ] x' y')
  : Type (o βŠ” β„“ βŠ” o' βŠ” β„“')
  where
  no-eta-equality
  field
    {x''} : Ob[ x ]
    vertical : Hom[ id ] x' x''
    weak-cart : Hom[ f ] x'' y'
    has-weak-cartesian : is-weak-cartesian f weak-cart
    factors : f' ≑[ sym (idr _) ] weak-cart ∘' vertical

weak-fibration→weak-cartesian-factors
  : βˆ€ {x y x' y'} {f : Hom x y}
  β†’ is-weak-cartesian-fibration
  β†’ (f' : Hom[ f ] x' y')
  β†’ weak-cartesian-factorisation f'

Because is a weak fibration, every morphism in has a weak cartesian lift. This allows us to take the lift of which will form the weak cartesian component of the factorisation. The vertical component can be obtained by taking the universal factorisation of by the lift of

weak-fibration→weak-cartesian-factors {y' = y'} {f = f} wfib f' = weak-factor where
  open is-weak-cartesian-fibration wfib
  module f-lift = weak-lift f y'
  open weak-cartesian-factorisation

  weak-factor : weak-cartesian-factorisation f'
  weak-factor .x'' = f-lift.x'
  weak-factor .vertical = f-lift.universal f'
  weak-factor .weak-cart = f-lift.lifting
  weak-factor .has-weak-cartesian = f-lift.weak-cartesian
  weak-factor .factors = symP $ f-lift.commutes f'

Weak fibrations and equivalence of Hom setsπŸ”—

If is a weak fibration, then the hom sets and are equivalent, where is the domain of the lift of along To go from to we use the vertical component of the factorisation of this forms an equivalence, as this factorisation is unique.

module _ (wfib : is-weak-cartesian-fibration) where
  open is-weak-cartesian-fibration wfib

  weak-fibration→universal-is-equiv
    : βˆ€ {x y x' y'}
    β†’ (f : Hom x y)
    β†’ is-equiv (weak-lift.universal f y' {x'})
  weak-fibration→universal-is-equiv {y' = y'} f = is-iso→is-equiv $
    iso (Ξ» f' β†’ hom[ idr f ] (weak-lift.lifting f y' ∘' f') )
        (Ξ» f' β†’ sym $ weak-lift.unique f y' f' (to-pathp refl))
        (Ξ» f' β†’ cancel _ _ (weak-lift.commutes f y' f'))

  weak-fibration→vertical-equiv
    : βˆ€ {x y x' y'}
    β†’ (f : Hom x y)
    β†’ Hom[ f ] x' y' ≃ Hom[ id ] x' (weak-lift.x' f y')
  weak-fibration→vertical-equiv {y' = y'} f =
    weak-lift.universal f y' ,
    weak-fibration→universal-is-equiv f

Furthermore, this equivalence can be extended into a natural isomorphism between and

  weak-fibration→hom-iso-into
    : βˆ€ {x y y'} (u : Hom x y)
    β†’ Hom-over-into β„° u y' ≅ⁿ Hom-into (Fibre β„° x) (weak-lift.x' u y')
  weak-fibration→hom-iso-into {x} {y} {y'} u = to-natural-iso mi where
    open make-natural-iso

    u*y' : Ob[ x ]
    u*y' = weak-lift.x' u y'

    mi : make-natural-iso (Hom-over-into β„° u y') (Hom-into (Fibre β„° x) u*y')
    mi .eta x u' = weak-lift.universal u y' u'
    mi .inv x v' = hom[ idr u ] (weak-lift.lifting u y' ∘' v')
    mi .eta∘inv x = funext Ξ» v' β†’
      sym $ weak-lift.unique u _ _ (to-pathp refl)
    mi .inv∘eta x = funext Ξ» u' β†’
      from-pathp (weak-lift.commutes u _ _)
    mi .natural x y v' = funext Ξ» u' β†’
      weak-lift.unique u _ _ $ to-pathp $
        smashr _ _
        βˆ™ weave _ (ap (u ∘_) (idl id)) _ (pulll' _ (weak-lift.commutes _ _ _))

An extremely useful fact is that the converse is true: if there is some lifting of objects for every morphism in along with a natural equivalence of homs as above, then is a weak fibration.

This result is the primary reason to care about weak fibrations, as we already have a toolkit for constructing natural equivalences of hom sets! Most notably, this allows us to use the theory of adjuncts to construct weak fibrations.

module _ (_*β‚€_ : βˆ€ {x y} β†’ Hom x y β†’ Ob[ y ] β†’ Ob[ x ]) where
  open is-weak-cartesian-fibration
  open Weak-cartesian-lift
  open is-weak-cartesian

  private
    vertical-equiv-iso-natural
      : (βˆ€ {x y x' y'} {f : Hom x y} β†’ Hom[ f ] x' y' β†’ Hom[ id ] x' (f *β‚€ y'))
      β†’ Type _
    vertical-equiv-iso-natural to =
      βˆ€ {x y x' x'' y'} {f : Hom x y}
      β†’ (f' : Hom[ f ] x'' y') (g' : Hom[ id ] x' x'')
      β†’ to (hom[ idr _ ] (f' ∘' g')) ≑[ sym (idl id) ] to f' ∘' g'

  vertical-equiv→weak-fibration
    : (to* : βˆ€ {x y x' y'} {f : Hom x y} β†’ Hom[ f ] x' y' β†’ Hom[ id ] x' (f *β‚€ y'))
    β†’ (βˆ€ {x y x' y'} {f : Hom x y} β†’ is-equiv (to* {x} {y} {x'} {y'} {f}))
    β†’ vertical-equiv-iso-natural to*
    β†’ is-weak-cartesian-fibration
  vertical-equiv→weak-fibration to* to-eqv natural .weak-lift f y' = f-lift where

To start, we note that the inverse portion of the equivalence is also natural.

    from* : βˆ€ {x y x' y'} {f : Hom x y} β†’ Hom[ id ] x' (f *β‚€ y') β†’ Hom[ f ] x' y'
    from* = equiv→inverse to-eqv

    from*-natural
      : βˆ€ {x y} {f : Hom x y} {x' x'' : Ob[ x ]} {y' : Ob[ y ]}
      β†’ (f' : Hom[ id ] x'' (f *β‚€ y')) (g' : Hom[ id ] x' x'')
      β†’ from* (hom[ idl id ] (f' ∘' g')) ≑[ sym (idr f) ] from* f' ∘' g'
    from*-natural {f = f} f' g' =
      to-pathp⁻ $ ap fst $ is-contrβ†’is-prop (to-eqv .is-eqv (hom[ idl id ] (f' ∘' g')))
        (from* (hom[ idl id ] (f' ∘' g')) , equivβ†’counit to-eqv _)
        (hom[ idr f ] (from* f' ∘' g') , from-pathp⁻ (natural (from* f') g') βˆ™
                                        (hom[]⟩⟨ ap (_∘' g') (equivβ†’counit to-eqv _)))

We then proceed to construct a weak lift of We can use our object lifting function to construct the domain of the lift, apply the inverse direction of the equivalence to to obtain the required lifting

    f-lift : Weak-cartesian-lift f y'
    f-lift .x' = f *β‚€ y'
    f-lift .lifting = from* id'

Now, we must show that the constructed lifting is weakly cartesian. We can use the forward direction of the equivalence to construct the universal map; the remaining properties follow from the fact that the equivalence is natural.

    f-lift .weak-cartesian .universal g' = to* g'
    f-lift .weak-cartesian .commutes g' = to-pathp $
      hom[] (from* id' ∘' to* g')   β‰‘Λ˜βŸ¨ from-pathp⁻ (from*-natural id' (to* g')) ⟩
      from* (hom[] (id' ∘' to* g')) β‰‘βŸ¨ ap from* idl[] ⟩
      from* (to* g')                β‰‘βŸ¨ equivβ†’unit to-eqv g' ⟩
      g'                            ∎
    f-lift .weak-cartesian .unique {g' = g'} h' p =
      h'                            β‰‘Λ˜βŸ¨ idl[] {p = idl id} ⟩
      hom[] (id' ∘' h')             β‰‘Λ˜βŸ¨ hom[]⟩⟨ ap (_∘' h') (equivβ†’counit to-eqv id') ⟩
      hom[] (to* (from* id') ∘' h') β‰‘Λ˜βŸ¨ from-pathp⁻ (natural (from* id') h') ⟩
      to* (hom[] (from* id' ∘' h')) β‰‘βŸ¨ ap to* (from-pathp p) ⟩
      to* g'                        ∎

Note that this result does not extend to fibrations; the equivalence of homs can only get us weak cartesian lifts. To make the final step to a fibration, we need to use other means.

However, we do obtain a natural isomorphism between and

module _ (fib : Cartesian-fibration) where
  open Cartesian-fibration fib
  open Indexing β„° fib

  fibration→hom-iso-from
    : βˆ€ {x y x'} (u : Hom x y)
    β†’ Hom-over-from β„° u x' ≅ⁿ Hom-from (Fibre β„° x) x' F∘ base-change u
  fibration→hom-iso-from {x} {y} {x'} u = to-natural-iso mi where
    open make-natural-iso

    mi : make-natural-iso
          (Hom-over-from β„° u x')
          (Hom-from (Fibre β„° x) x' F∘ base-change u)
    mi .eta x u' = has-lift.universalv u x u'
    mi .inv x v' = hom[ idr u ] (has-lift.lifting u x ∘' v')
    mi .eta∘inv x = funext Ξ» v' β†’
      sym $ has-lift.uniquev u _ _ (to-pathp refl)
    mi .inv∘eta x = funext Ξ» u' β†’
      from-pathp (has-lift.commutesv u _ _)
    mi .natural _ _ v' = funext Ξ» u' β†’
      has-lift.uniquep u _ _ _ _ _ $
        Fib.pulllf (has-lift.commutesp u _ id-comm _)
        βˆ™[] pullr[] _ (has-lift.commutesv u _ _)
        βˆ™[] to-pathp refl

If we combine this with weak-fibration→hom-iso-into, we obtain a natural iso between and

  fibration→hom-iso
    : βˆ€ {x y} (u : Hom x y)
    β†’ Hom-over β„° u ≅ⁿ Hom[-,-] (Fibre β„° x) F∘ (Id FΓ— base-change u)
  fibration→hom-iso {x = x} u = to-natural-iso mi where
    open make-natural-iso
    open _=>_

    module into-iso {y'} = Isoⁿ (fibrationβ†’hom-iso-into {y' = y'} u)
    module from-iso {x'} = Isoⁿ (fibrationβ†’hom-iso-from {x' = x'} u)

    mi : make-natural-iso (Hom-over β„° u) (Hom[-,-] (Fibre β„° x) F∘ (Id FΓ— base-change u))
    mi .eta x u' = has-lift.universalv u _ u'
    mi .inv x v' = hom[ idr u ] (has-lift.lifting u _ ∘' v')
    mi .eta∘inv x = funext Ξ» v' β†’
      sym $ has-lift.uniquev u _ _ (to-pathp refl)
    mi .inv∘eta x = funext Ξ» u' β†’
      from-pathp (has-lift.commutesv u _ _)
    mi .natural _ _ (v₁' , vβ‚‚') = funext Ξ» u' β†’
      sym (apr' (happly (into-iso.to .is-natural _ _ v₁') u'))
      Β·Β· sym (happly (from-iso.to .is-natural _ _ vβ‚‚') (hom[ idr _ ] (u' ∘' v₁')))
      Β·Β· ap (into-iso.to .Ξ· _) (smashr _ _ βˆ™ reindex _ _ )