module Cat.Displayed.Cartesian
  {o β„“ o' β„“'} {B : Precategory o β„“} (E : Displayed B o' β„“') where

open Cat.Reasoning B
open Displayed E
open Cat.Displayed.Morphism E
open DR E

Cartesian morphisms and fibrationsπŸ”—

While displayed categories give the essential framework we need to express the idea of families of categories indexed by a category, they do not quite capture the concept precisely. The problem is that while a category displayed over does indeed give a collection of fibre categories this assignment isn’t necessarily functorial!

More precisely, we should have that a collection of categories, indexed by a category, should be a pseudofunctor where is a bicategory of categories. It turns out that we can characterise this assignment entirely in terms of the displayed objects and morphisms in

Fix an arrow in the base category an object over (resp. over and an arrow over We say that is cartesian if, up to very strong handwaving, it fits into a β€œpullback diagram”. The barred arrows with triangle tips here indicate the β€œprojection” from a displayed object to its base, and so are implicit in the type dependency.

record
  is-cartesian {a b a' b'} (f : Hom a b) (f' : Hom[ f ] a' b') : Type (o βŠ” β„“ βŠ” o' βŠ” β„“')
  where
  no-eta-equality

More specifically, let and be over and suppose that we have a map (below, in violet), and a map lying over the composite (in red). The universal property of a Cartesian map says that we have a universal factorisation of through a map (in green, marked

  field
    universal : βˆ€ {u u'} (m : Hom u a) (h' : Hom[ f ∘ m ] u' b') β†’ Hom[ m ] u' a'
    commutes  : βˆ€ {u u'} (m : Hom u a) (h' : Hom[ f ∘ m ] u' b')
              β†’ f' ∘' universal m h' ≑ h'
    unique    : βˆ€ {u u'} {m : Hom u a} {h' : Hom[ f ∘ m ] u' b'}
              β†’ (m' : Hom[ m ] u' a') β†’ f' ∘' m' ≑ h' β†’ m' ≑ universal m h'

Given a β€œright corner” like that of the diagram below, and note that the input data consists of and over

We also provide some helper functions for working with morphisms that are displayed over something that is propositionally equal to a composite, rather than displayed directly over a composite.

  universal' : βˆ€ {u u'} {m : Hom u a} {k : Hom u b}
             β†’ (p : f ∘ m ≑ k) (h' : Hom[ k ] u' b')
             β†’ Hom[ m ] u' a'
  universal' {u' = u'} p h' =
    universal _ (coe1β†’0 (Ξ» i β†’ Hom[ p i ] u' b') h')

  commutesp : βˆ€ {u u'} {m : Hom u a} {k : Hom u b}
            β†’ (p : f ∘ m ≑ k) (h' : Hom[ k ] u' b')
            β†’ f' ∘' universal' p h' ≑[ p ] h'
  commutesp {u' = u'} p h' =
    to-pathp⁻ $ commutes _ (coe1β†’0 (Ξ» i β†’ Hom[ p i ] u' b') h')

  universalp : βˆ€ {u u'} {m₁ mβ‚‚ : Hom u a} {k : Hom u b}
          β†’ (p : f ∘ m₁ ≑ k) (q : m₁ ≑ mβ‚‚) (r : f ∘ mβ‚‚ ≑ k)
          β†’ (h' : Hom[ k ] u' b')
          β†’ universal' p h' ≑[ q ] universal' r h'
  universalp {u = u} p q r h' i =
    universal' (is-setβ†’squarep (Ξ» _ _ β†’ Hom-set u b) (ap (f ∘_) q) p r refl i) h'

  uniquep : βˆ€ {u u'} {m₁ mβ‚‚ : Hom u a} {k : Hom u b}
          β†’ (p : f ∘ m₁ ≑ k) (q : m₁ ≑ mβ‚‚) (r : f ∘ mβ‚‚ ≑ k)
          β†’ {h' : Hom[ k ] u' b'}
          β†’ (m' : Hom[ m₁ ] u' a')
          β†’ f' ∘' m' ≑[ p ] h' β†’ m' ≑[ q ] universal' r h'
  uniquep p q r {h' = h'} m' s =
    to-pathp⁻ (unique m' (from-pathp⁻ s) βˆ™ from-pathp⁻ (universalp p q r h'))

  uniquepβ‚‚
    : βˆ€ {u u'} {m₁ mβ‚‚ : Hom u a} {k : Hom u b}
    β†’ (p : f ∘ m₁ ≑ k) (q : m₁ ≑ mβ‚‚) (r : f ∘ mβ‚‚ ≑ k)
    β†’ {h' : Hom[ k ] u' b'} (m₁' : Hom[ m₁ ] u' a') (mβ‚‚' : Hom[ mβ‚‚ ] u' a')
    β†’ f' ∘' m₁' ≑[ p ] h'
    β†’ f' ∘' mβ‚‚' ≑[ r ] h'
    β†’ m₁' ≑[ q ] mβ‚‚'
  uniquepβ‚‚ {u' = u'} p q r m₁' mβ‚‚' Ξ± Ξ² = to-pathp⁻ $
       unique m₁' (from-pathp⁻ Ξ±)
    ·· from-pathp⁻ (universalp p q r _)
    Β·Β· ap (coe1β†’0 (Ξ» i β†’ Hom[ q i ] u' a')) (sym (unique mβ‚‚' (from-pathp⁻ Ξ²)))

Furthermore, if is also displayed over there’s a unique vertical map This witnesses the fact that every cartesian map is weakly cartesian.

  universalv : βˆ€ {a''} (f'' : Hom[ f ] a'' b') β†’ Hom[ id ] a'' a'
  universalv f'' = universal' (idr _) f''

  commutesv
    : βˆ€ {x'} β†’ (g' : Hom[ f ] x' b')
    β†’ f' ∘' universalv g' ≑[ idr _ ] g'
  commutesv = commutesp (idr _)

  uniquev
    : βˆ€ {x'} {g' : Hom[ f ] x' b'}
    β†’ (h' : Hom[ id ] x' a')
    β†’ f' ∘' h' ≑[ idr _ ] g'
    β†’ h' ≑ universalv g'
  uniquev h' p = uniquep (idr f) refl (idr f) h' p

  uniquevβ‚‚
    : βˆ€ {x'} {g' : Hom[ f ] x' b'}
    β†’ (h' h'' : Hom[ id ] x' a')
    β†’ f' ∘' h' ≑[ idr _ ] g'
    β†’ f' ∘' h'' ≑[ idr _ ] g'
    β†’ h' ≑ h''
  uniquevβ‚‚ h' h'' p q =
    uniquepβ‚‚ (idr f) refl (idr f) h' h'' p q

As the name suggests, being cartesian is a property of a morphism.

is-cartesian-is-prop
  : βˆ€ {x y x' y'} {f : Hom x y} {f' : Hom[ f ] x' y'}
  β†’ is-prop (is-cartesian f f')
The proof of this fact is a bunch of cubical nonsense.
is-cartesian-is-prop {f' = f'} cart cart' = worker where
  open is-cartesian

  worker : cart ≑ cart'
  worker i .universal m h' =
    cart' .unique (cart .universal m h') (cart .commutes _ _) i
  worker i .commutes m h' =
    is-set→squarep (λ _ _ → Hom[ _ ]-set _ _)
      (ap (f' ∘'_) (cart' .unique _ _))
      (cart .commutes m h')
      (cart' .commutes m h')
      refl i
  worker i .unique m' p =
    is-set→squarep (λ _ _ → Hom[ _ ]-set _ _)
      refl
      (cart .unique m' p)
      (cart' .unique m' p)
      (cart' .unique _ _) i

We also provide a bundled form of cartesian morphisms.

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

Properties of cartesian morphismsπŸ”—

The composite of 2 cartesian morphisms is in turn cartesian.

cartesian-∘
  : βˆ€ {x y z} {f : Hom y z} {g : Hom x y}
  β†’ βˆ€ {x' y' z'} {f' : Hom[ f ] y' z'} {g' : Hom[ g ] x' y'}
  β†’ is-cartesian f f' β†’ is-cartesian g g'
  β†’ is-cartesian (f ∘ g) (f' ∘' g')
cartesian-∘ {f = f} {g = g} {f' = f'} {g' = g'} f-cart g-cart = fg-cart where

  module f' = is-cartesian f-cart
  module g' = is-cartesian g-cart

  fg-cart : is-cartesian (f ∘ g) (f' ∘' g')
  fg-cart .is-cartesian.universal m h' =
    g'.universal m (f'.universal' (assoc f g m) h')
  fg-cart .is-cartesian.commutes m h' =
    (f' ∘' g') ∘' g'.universal m (f'.universal' (assoc f g m) h') β‰‘βŸ¨ shiftr (sym $ assoc _ _ _) (pullr' refl (g'.commutes m _)) βŸ©β‰‘
    hom[] (f' ∘' f'.universal' (assoc f g m) h')                  β‰‘βŸ¨ hom[]⟩⟨ f'.commutes _ _ βŸ©β‰‘
    hom[] (hom[] h')                                              β‰‘βŸ¨ hom[]-βˆ™ _ _ βˆ™ liberate _ βŸ©β‰‘
    h'                                                            ∎
  fg-cart .is-cartesian.unique {m = m} {h' = h'} m' p =
    g'.unique m' $ f'.unique (g' ∘' m') $
      f' ∘' g' ∘' m'           β‰‘βŸ¨ from-pathp⁻ (assoc' f' g' m') βŸ©β‰‘
      hom[] ((f' ∘' g') ∘' m') β‰‘βŸ¨ weave _ _ _ p βŸ©β‰‘
      hom[] h' ∎

_∘cart_
  : βˆ€ {x y z x' y' z'} {f : Hom y z} {g : Hom x y}
  β†’ Cartesian-morphism f y' z' β†’ Cartesian-morphism g x' y'
  β†’ Cartesian-morphism (f ∘ g) x' z'
f' ∘cart g' = fg' where
  open Cartesian-morphism

  fg' : Cartesian-morphism _ _ _
  fg' .hom' = f' .hom' ∘' g' .hom'
  fg' .cartesian = cartesian-∘ (f' .cartesian) (g' .cartesian)

Furthermore, the identity morphism is cartesian.

cartesian-id : βˆ€ {x x'} β†’ is-cartesian id (id' {x} {x'})
cartesian-id .is-cartesian.universal m h' = hom[ idl m ] h'
cartesian-id .is-cartesian.commutes m h' =
  from-pathp⁻ (idl' _) βˆ™ hom[]-βˆ™ _ _ βˆ™ liberate _
cartesian-id .is-cartesian.unique m' p =
  from-pathp⁻ (symP $ idl' _) βˆ™ weave _ _ _ p

idcart : βˆ€ {x} {x' : Ob[ x ]} β†’ Cartesian-morphism id x' x'
idcart .Cartesian-morphism.hom' = id'
idcart .Cartesian-morphism.cartesian = cartesian-id

In fact, every invertible map is also cartesian, as we can use the inverse to construct the requisite factorisation.

invertible→cartesian
  : βˆ€ {x y} {f : Hom x y} {x' y'} {f' : Hom[ f ] x' y'}
  β†’ (f-inv : is-invertible f)
  β†’ is-invertible[ f-inv ] f'
  β†’ is-cartesian f f'
invertible→cartesian
 {f = f} {f' = f'} f-inv f'-inv = f-cart where
  module f-inv = is-invertible f-inv
  module f'-inv = is-invertible[_] f'-inv

  f-cart : is-cartesian f f'
  f-cart .is-cartesian.universal m h' =
    hom[ cancell f-inv.invr ] (f'-inv.inv' ∘' h')
  f-cart .is-cartesian.commutes m h' =
    f' ∘' hom[ cancell f-inv.invr ] (f'-inv.inv' ∘' h') β‰‘βŸ¨ whisker-r _ βŸ©β‰‘
    hom[] (f' ∘' f'-inv.inv' ∘' h') β‰‘βŸ¨ revive₁ (cancell' f-inv.invl f'-inv.invl' {q = cancell f-inv.invl}) βŸ©β‰‘
    hom[] h'                        β‰‘βŸ¨ liberate _ βŸ©β‰‘
    h' ∎
  f-cart .is-cartesian.unique {h' = h'} m' p =
    m'                              β‰‘Λ˜βŸ¨ liberate _ βŸ©β‰‘Λ˜
    hom[] m'                        β‰‘βŸ¨ weave refl (insertl f-inv.invr) (cancell f-inv.invr) (insertl' _ f'-inv.invr') βŸ©β‰‘
    hom[] (f'-inv.inv' ∘' f' ∘' m') β‰‘βŸ¨ apr' p βŸ©β‰‘
    hom[] (f'-inv.inv' ∘' h')       ∎

If is cartesian, it’s also a weak monomorphism.

cartesian→weak-monic
  : βˆ€ {x y} {f : Hom x y}
  β†’ βˆ€ {x' y'} {f' : Hom[ f ] x' y'}
  β†’ is-cartesian f f'
  β†’ is-weak-monic f'
cartesian→weak-monic {f' = f'} f-cart g' g'' p =
  g'                     β‰‘βŸ¨ unique g' p βŸ©β‰‘
  universal _ (f' ∘' g'') β‰‘Λ˜βŸ¨ unique g'' refl βŸ©β‰‘Λ˜
  g''                     ∎
  where
    open is-cartesian f-cart

We can use this fact to show that 2 cartesian lifts over the same morphisms must have their domains related by a vertical isomorphism. Suppose they’re called and and fit into a diagram like the one below.

Since and are both Cartesian morphisms, we can factor through by a map and conversely, through by

Since we’re trying to prove that is an isomorphism, we want to show that We know that factors through its own domain, via the identity map. We will show that it also factors through to show that the two are equal, by the universal property of being Cartesian. Consider the following diagram:

We have A symmetric argument shows that is also the identity, so

cartesian-domain-unique
  : βˆ€ {x y} {f : Hom x y}
  β†’ βˆ€ {x' x'' y'} {f' : Hom[ f ] x' y'} {f'' : Hom[ f ] x'' y'}
  β†’ is-cartesian f f'
  β†’ is-cartesian f f''
  β†’ x' ≅↓ x''
cartesian-domain-unique {f' = f'} {f'' = f''} f'-cart f''-cart =
  make-iso[ id-iso ] to* from* invl* invr*
  where
    open is-cartesian

    to* = universal' f''-cart (B .Precategory.idr _) f'
    from* = universal' f'-cart (B .Precategory.idr _) f''

    invl* : to* ∘' from* ≑[ idl id ] id'
    invl* = to-pathp⁻ $ cartesianβ†’weak-monic f''-cart _ _ $
      f'' ∘' to* ∘' from*        β‰‘βŸ¨ shiftr (assoc _ _ _) (pulll' _ (f''-cart .commutes _ _)) βŸ©β‰‘
      hom[] (hom[] f' ∘' from*) β‰‘βŸ¨ smashl _ _ βŸ©β‰‘
      hom[] (f' ∘' from*)       β‰‘βŸ¨ (hom[]⟩⟨ f'-cart .commutes _ _) βˆ™ hom[]-βˆ™ _ _ βŸ©β‰‘
      hom[] f''                  β‰‘βŸ¨ weave _ (sym $ idr _) (ap (_ ∘_) (sym $ idl _)) (symP $ idr' f'') βŸ©β‰‘
      hom[] (f'' ∘' id')         β‰‘Λ˜βŸ¨ whisker-r _ βŸ©β‰‘Λ˜
      f'' ∘' hom[] id' ∎

    invr* : from* ∘' to* ≑[ idl id ] id'
    invr* = to-pathp⁻ $ cartesianβ†’weak-monic f'-cart _ _ $
      f' ∘' from* ∘' to*      β‰‘βŸ¨ shiftr (assoc _ _ _) (pulll' _ (f'-cart .commutes _ _)) βŸ©β‰‘
      hom[] (hom[] f'' ∘' to*) β‰‘βŸ¨ smashl _ _ βŸ©β‰‘
      hom[] (f'' ∘' to*)       β‰‘βŸ¨ (hom[]⟩⟨ f''-cart .commutes _ _) βˆ™ hom[]-βˆ™ _ _ βŸ©β‰‘
      hom[] f'                β‰‘βŸ¨ weave _ (sym $ idr _) (ap (_ ∘_) (sym $ idl _)) (symP $ idr' f') βŸ©β‰‘
      hom[] (f' ∘' id')       β‰‘Λ˜βŸ¨ whisker-r _ βŸ©β‰‘Λ˜
      f' ∘' hom[] id' ∎

Cartesian morphisms are also stable under vertical retractions.

cartesian-vertical-retraction-stable
  : βˆ€ {x y} {f : Hom x y}
  β†’ βˆ€ {x' x'' y'} {f' : Hom[ f ] x' y'} {f'' : Hom[ f ] x'' y'} {Ο• : Hom[ id ] x' x''}
  β†’ is-cartesian f f'
  β†’ has-section↓ Ο•
  β†’ f'' ∘' Ο• ≑[ idr _ ] f'
  β†’ is-cartesian f f''
cartesian-vertical-retraction-stable {f' = f'} {f''} {Ο•} f-cart Ο•-sect factor = f''-cart where
  open is-cartesian f-cart
  module Ο•-sect = has-section[_] Ο•-sect

  f''-cart : is-cartesian _ f''
  f''-cart .is-cartesian.universal m h' =
    hom[ idl m ] (Ο• ∘' universal m h')
  f''-cart .is-cartesian.commutes m h' =
    f'' ∘' hom[] (Ο• ∘' universal m h') β‰‘βŸ¨ whisker-r _ βŸ©β‰‘
    hom[] (f'' ∘' Ο• ∘' universal m h') β‰‘βŸ¨ revive₁ {p = ap (_ ∘_) (idl m)} (pulll' (idr _) factor) βŸ©β‰‘
    hom[] (f' ∘' universal m h')      β‰‘βŸ¨ (hom[]⟩⟨ commutes m h') βˆ™ liberate _ βŸ©β‰‘
    h' ∎
  f''-cart .is-cartesian.unique {m = m} {h' = h'} m' p =
    m'                                   β‰‘βŸ¨ shiftr (sym (eliml (idl _))) (introl' (idl _) Ο•-sect.is-section') βŸ©β‰‘
    hom[] ((Ο• ∘' Ο•-sect.section') ∘' m') β‰‘βŸ¨ weave _ (pullr (idl _)) _ (pullr' (idl _) (to-pathp (unique _ unique-path))) βŸ©β‰‘
    hom[] (Ο• ∘' universal m h')          ∎
    where
      sect-commute : f' ∘' Ο•-sect.section' ≑[ idr _ ] f''
      sect-commute = to-pathp⁻ $
        f' ∘' Ο•-sect.section'                β‰‘βŸ¨ shiftr _ (Ξ» i β†’ factor (~ i) ∘' Ο•-sect.section') βŸ©β‰‘
        hom[] ((f'' ∘' Ο•) ∘' Ο•-sect.section') β‰‘βŸ¨ weave _ (idr _ βˆ™ idr _) _ (cancelr' (idl _) Ο•-sect.is-section') βŸ©β‰‘
        hom[] f'' ∎

      unique-path : f' ∘' hom[ idl m ] (Ο•-sect.section' ∘' m') ≑ h'
      unique-path =
        f' ∘' hom[ idl m ] (Ο•-sect.section' ∘' m') β‰‘βŸ¨ whisker-r _ βŸ©β‰‘
        hom[] (f' ∘' Ο•-sect.section' ∘' m')        β‰‘βŸ¨ shiftl _ (pulll' (idr _) sect-commute) βŸ©β‰‘
        f'' ∘' m' β‰‘βŸ¨ p βŸ©β‰‘
        h' ∎

We also have the following extremely useful pasting lemma, which generalizes the pasting law for pullbacks.

cartesian-pasting
  : βˆ€ {x y z} {f : Hom y z} {g : Hom x y}
  β†’ βˆ€ {x' y' z'} {f' : Hom[ f ] y' z'} {g' : Hom[ g ] x' y'}
  β†’ is-cartesian f f'
  β†’ is-cartesian (f ∘ g) (f' ∘' g')
  β†’ is-cartesian g g'
cartesian-pasting {f = f} {g = g} {f' = f'} {g' = g'} f-cart fg-cart = g-cart where
  open is-cartesian

  g-cart : is-cartesian g g'
  g-cart .universal m h' =
    universal' fg-cart (sym (assoc _ _ _)) (f' ∘' h')
  g-cart .commutes m h' =
    g' ∘' universal' fg-cart (sym (assoc _ _ _)) (f' ∘' h')  β‰‘βŸ¨ f-cart .unique _ (from-pathp⁻ (assoc' _ _ _) βˆ™ from-pathp (commutesp fg-cart _ _)) βŸ©β‰‘
    f-cart .universal _ (f' ∘' h')                           β‰‘Λ˜βŸ¨ f-cart .unique h' refl βŸ©β‰‘Λ˜
    h'                                                       ∎
  g-cart .unique {m = m} {h' = h'} m' p =
    uniquep fg-cart (sym (assoc _ _ _)) refl (sym (assoc _ _ _)) m' (pullr' refl p)

We can prove a similar fact for bundled cartesian morphisms.

cart-paste
  : βˆ€ {x y z x' y' z'} {f : Hom y z} {g : Hom x y}
  β†’ Cartesian-morphism f y' z'
  β†’ Cartesian-morphism (f ∘ g) x' z'
  β†’ Cartesian-morphism g x' y'
cart-paste {x' = x'} {y' = y'} {f = f} {g = g} f' fg' = g' where
  open Cartesian-morphism
  open is-cartesian
  module f' = is-cartesian (f' .cartesian)
  module fg' = is-cartesian (fg' .cartesian)

  g' : Cartesian-morphism g x' y'
  g' .hom' = f'.universal g (fg' .hom')
  g' .cartesian .universal m h' =
    fg'.universal' (sym (assoc _ _ _)) (f' .hom' ∘' h')
  g' .cartesian .commutes m h' =
    f'.uniquepβ‚‚ _ _ (assoc _ _ _) _ _
      (pulll[] _ (f'.commutes _ _) βˆ™[] fg'.commutes _ _)
      (to-pathp refl)
  g' .cartesian .unique m' p =
    fg'.uniquep _ refl (sym (assoc _ _ _)) m'
      (ap (_∘' m') (symP (f'.commutes _ _)) βˆ™[] pullr[] _ p)

If a morphism is both vertical and cartesian, then it must be an isomorphism. We can construct the inverse by factorizing the identity morphism, which is possible due to the fact that is vertical.

vertical+cartesian→invertible
  : βˆ€ {x} {x' x'' : Ob[ x ]} {f' : Hom[ id ] x' x''}
  β†’ is-cartesian id f'
  β†’ is-invertible↓ f'
vertical+cartesian→invertible {x' = x'} {x'' = x''} {f' = f'} f-cart =
  make-invertible↓ f⁻¹'  f'-invl f'-invr where
    open is-cartesian f-cart

    f⁻¹' : Hom[ id ] x'' x'
    f⁻¹' = universal' (idl _) id'

    f'-invl : f' ∘' f⁻¹' ≑[ idl _ ] id'
    f'-invl = commutesp _ id'

    path : f' ∘' f⁻¹' ∘' f' ≑[ elimr (idl _) ] f'
    path = cancell' (idl _) (commutesp (idl _) id')

    f'-invr : f⁻¹' ∘' f' ≑[ idl _ ] id'
    f'-invr = to-pathp⁻ $
      f⁻¹' ∘' f'                    β‰‘βŸ¨ shiftr _ (uniquep _ (idl _) (idl _) (f⁻¹' ∘' f') path) βŸ©β‰‘
      hom[] (universal' (idl _) f') β‰‘βŸ¨ weave _ _ _ (symP $ uniquep (idr _) refl (idl _) id' (idr' _)) βŸ©β‰‘
      hom[] id' ∎

Furthermore, is cartesian if and only if the function is an equivalence.

postcompose-equiv→cartesian
  : βˆ€ {x y x' y'} {f : Hom x y}
  β†’ (f' : Hom[ f ] x' y')
  β†’ (βˆ€ {w w'} {g : Hom w x} β†’ is-equiv {A = Hom[ g ] w' x'} (f' ∘'_))
  β†’ is-cartesian f f'
postcompose-equiv→cartesian f' eqv .is-cartesian.universal m h' =
  equiv→inverse eqv h'
postcompose-equiv→cartesian f' eqv .is-cartesian.commutes m h' =
  equiv→counit eqv h'
postcompose-equiv→cartesian f' eqv .is-cartesian.unique m' p =
  sym (equivβ†’unit eqv m') βˆ™ ap (equivβ†’inverse eqv) p

cartesian→postcompose-equiv
  : βˆ€ {x y z x' y' z'} {f : Hom y z} {g : Hom x y} {f' : Hom[ f ] y' z'}
  β†’ is-cartesian f f'
  β†’ is-equiv {A = Hom[ g ] x' y'} (f' ∘'_)
cartesian→postcompose-equiv cart =
  is-iso→is-equiv $
    iso (universal _)
        (commutes _)
        (Ξ» g' β†’ sym (unique g' refl))
  where open is-cartesian cart

Cartesian liftsπŸ”—

We call an object over together with a Cartesian arrow a Cartesian lift of Cartesian lifts, defined by universal property as they are, are unique when they exist, so that β€œhaving Cartesian lifts” is a property, not a structure.

record
  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'
    cartesian : is-cartesian f lifting
  open is-cartesian cartesian public

We note that the classical literature often differentiates between fibrations β€” those displayed categories for which there exist Cartesian lifts for every right corner β€” and cloven fibrations, those for which the Cartesian lifts are β€œalgebraic” in a sense. This is because, classically, essentially unique means that there are still some choices to be made, and invoking the axiom of choice makes an β€œarbitrary” set of such choices. But, in the presence of univalence, there is exactly one choice to be made, that is, no choice at all. Thus, we do not dwell on the distinction.

Note that if is a fibration, we can define an operation that allows us to move vertical morphisms between fibres. This actually extends to a collection of functors, called base change functors. This operation is also definable for weak fibrations, as it only uses the universal property that yields a vertical morphism.

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

A Cartesian fibration is a displayed category having Cartesian lifts for every right corner.

Why?πŸ”—

Admittedly, the notion of Cartesian morphism is slightly artificial. It arises from studying the specific properties of the pullback functors which exist in a category of pullbacks, hence the similarity in universal property!

In fact, the quintessential example of a Cartesian fibration is the codomain fibration, which is a category displayed over where the fibre over is the slice category We may investigate further (to uncover the name β€œcodomain”): the total space of this fibration is the arrow category and the projection functor is the codomain functor

This displayed category extends to a pseudofunctor exactly when has all pullbacks, because in a world where the vertical arrows are β€œjust” arrows, a Cartesian morphism is exactly a pullback square.

Other examples exist:

  • The family fibration exhibits any category as displayed over The fibres are functor categories (with discrete domains), reindexing is given by composition.
  • The category of modules is fibred over the category of rings. The fibre over a ring is the category of Cartesian lifts are given by restriction of scalars.