module Cat.Displayed.Instances.Slice {o β„“} (B : Precategory o β„“) where

The canonical self-indexingπŸ”—

There is a canonical way of viewing any category as displayed over itself, given fibrewise by taking slice categories. Following (Sterling and Angiuli 2022), we refer to this construction as the canonical self-indexing of and denote it Recall that the objects in the slice over are pairs consisting of an object and a map The core idea is that any morphism lets us view an object as being β€œstructure over” an object the collection of all possible such structures, then, is the set of morphisms with domain allowed to vary.

Contrary to the maps in the slice category, the maps in the canonical self-indexing have an extra β€œadjustment” by a morphism of the base category. Where maps in the ordinary slice are given by commuting triangles, maps in the canonical self-indexing are given by commuting squares, of the form

where the primed objects and dotted arrows are displayed.

record
  Slice-hom
    {x y} (f : Hom x y)
    (px : /-Obj {C = B} x) (py : /-Obj {C = B} y)
    : Type β„“
  where
  constructor slice-hom
  field
    to      : Hom (px .domain) (py .domain)
    commute : f ∘ px .map ≑ py .map ∘ to

open Slice-hom

The intuitive idea for the canonical self-indexing is possibly best obtained by considering the canonical self-indexing of First, recall that an object is equivalently a family of sets, with the value of the family at each point being the fibre A function of sets then corresponds to a reindexing, which takes an of sets to a of sets (in a functorial way). A morphism in the canonical self-indexing of lying over a map is then a function between the families which commutes with the reindexing given by

It’s straightforward to piece together the objects of the (ordinary) slice category and our displayed maps Slice-hom into a category displayed over

Slices : Displayed B (o βŠ” β„“) β„“
Slices .Ob[_] = /-Obj {C = B}
Slices .Hom[_] = Slice-hom
Slices .Hom[_]-set _ _ _ = hlevel 2
Slices .id' = slice-hom id id-comm-sym
Slices ._∘'_ {x = x} {y = y} {z = z} {f = f} {g = g} px py =
  slice-hom (px .to ∘ py .to) $
    (f ∘ g) ∘ x .map           β‰‘βŸ¨ pullr (py .commute) βŸ©β‰‘
    f ∘ (y .map ∘ py .to)      β‰‘βŸ¨ extendl (px .commute) βŸ©β‰‘
    z .map ∘ (px .to ∘ py .to) ∎
Slices .idr' {f = f} f' = Slice-pathp (idr f) (idr (f' .to))
Slices .idl' {f = f} f' = Slice-pathp (idl f) (idl (f' .to))
Slices .assoc' {f = f} {g = g} {h = h} f' g' h' =
  Slice-pathp (assoc f g h) (assoc (f' .to) (g' .to) (h' .to))

It’s only slightly more annoying to show that a vertical map in the canonical self-indexing is a map in the ordinary slice category which, since the objects displayed over are defined to be those of the slice category gives an equivalence of categories between the fibre and the slice

Fibreβ†’slice : βˆ€ {x} β†’ Functor (Fibre Slices x) (Slice B x)
Fibre→slice .F₀ x = x
Fibreβ†’slice .F₁ f ./-Hom.map = f .to
Fibreβ†’slice .F₁ f ./-Hom.commutes = sym (f .commute) βˆ™ eliml refl
Fibre→slice .F-id = trivial!
Fibreβ†’slice .F-∘ f g = ext (transport-refl _)

Fibreβ†’slice-is-ff : βˆ€ {x} β†’ is-fully-faithful (Fibreβ†’slice {x = x})
Fibre→slice-is-ff {_} {x} {y} = is-iso→is-equiv isom where
  isom : is-iso (Fibreβ†’slice .F₁)
  isom .is-iso.inv hom =
    slice-hom (hom ./-Hom.map) (eliml refl βˆ™ sym (hom ./-Hom.commutes))
  isom .is-iso.rinv x = ext refl
  isom .is-iso.linv x = Slice-pathp refl refl

Fibreβ†’slice-is-equiv : βˆ€ {x} β†’ is-equivalence (Fibreβ†’slice {x})
Fibre→slice-is-equiv = is-precat-iso→is-equivalence $
  record { has-is-ff = Fibre→slice-is-ff
         ; has-is-iso = id-equiv
         }

Cartesian mapsπŸ”—

A map over in the codomain fibration is cartesian if and only if it forms a pullback square as below:

This follows by a series of relatively straightforward computations, so we do not comment too heavily on the proof.

cartesian→pullback
  : βˆ€ {x y x' y'} {f : Hom x y} {f' : Slice-hom f x' y'}
  β†’ is-cartesian Slices f f'
  β†’ is-pullback B (x' .map) f (f' .to) (y' .map)
cartesian→pullback {x} {y} {x'} {y'} {f} {f'} cart = pb where
  pb : is-pullback B (x' .map) f (f' .to) (y' .map)
  pb .is-pullback.square = f' .commute
  pb .is-pullback.universal p =
    cart .universal _ (slice-hom _ (idr _ βˆ™ p)) .to
  pb .is-pullback.pβ‚βˆ˜universal =
    sym (cart .universal _ _ .commute) βˆ™ idr _
  pb .is-pullback.pβ‚‚βˆ˜universal =
    ap Slice-hom.to (cart .commutes _ _)
  pb .is-pullback.unique p q =
    ap Slice-hom.to (cart .unique (slice-hom _ (idr _ βˆ™ sym p)) (Slice-pathp refl q))

pullback→cartesian
  : βˆ€ {x y x' y'} {f : Hom x y} {f' : Slice-hom f x' y'}
  β†’ is-pullback B (x' .map) f (f' .to) (y' .map)
  β†’ is-cartesian Slices f f'
pullback→cartesian {x} {y} {x'} {y'} {f} {f'} pb = cart where
  module pb = is-pullback pb

  cart : is-cartesian Slices f f'
  cart .universal m h' .to = pb.universal (assoc _ _ _ βˆ™ h' .commute)
  cart .universal m h' .commute = sym pb.pβ‚βˆ˜universal
  cart .commutes m h' = Slice-pathp refl pb.pβ‚‚βˆ˜universal
  cart .unique m' x = Slice-pathp refl $
    pb.unique (sym (m' .commute)) (ap to x)

We can actually weaken the hypothesis of cartesian→pullback so that pullback squares also exactly characterise weakly cartesian morphisms. While this is automatic if has all pullbacks (since then cartesian and weakly cartesian morphisms coincide), it is sometimes useful to have both characterisations if we do not want to make such an assumption.

weak-cartesian→pullback
  : βˆ€ {x y x' y'} {f : Hom x y} {f' : Slice-hom f x' y'}
  β†’ is-weak-cartesian Slices f f'
  β†’ is-pullback B (x' .map) f (f' .to) (y' .map)

pullback→weak-cartesian
  : βˆ€ {x y x' y'} {f : Hom x y} {f' : Slice-hom f x' y'}
  β†’ is-pullback B (x' .map) f (f' .to) (y' .map)
  β†’ is-weak-cartesian Slices f f'
The computation is essentially the same.
weak-cartesian→pullback {x} {y} {x'} {y'} {f} {f'} cart = pb where
  pb : is-pullback B (x' .map) f (f' .to) (y' .map)
  pb .is-pullback.square = f' .commute
  pb .is-pullback.universal p =
    cart .universal (slice-hom _ p) .to
  pb .is-pullback.pβ‚βˆ˜universal =
    sym (cart .universal _ .commute) βˆ™ idl _
  pb .is-pullback.pβ‚‚βˆ˜universal =
    apd (Ξ» _ β†’ Slice-hom.to) (cart .commutes _)
  pb .is-pullback.unique p q =
    ap Slice-hom.to (cart .unique (slice-hom _ (idl _ βˆ™ sym p)) (Slice-pathp (idr _) q))

pullback→weak-cartesian pb = cartesian→weak-cartesian _ (pullback→cartesian pb)

As a fibrationπŸ”—

If (and only if) has all pullbacks, then its self-indexing is a Cartesian fibration. This is almost by definition, and is in fact where the β€œCartesian” in β€œCartesian fibration” comes from (recall that another term for β€œpullback square” is β€œcartesian square”). Since the total space is equivalently the arrow category of with the projection functor corresponding under this equivalence to the codomain functor, we refer to regarded as a Cartesian fibration as the codomain fibration.

Codomain-fibration
  : (βˆ€ {x y z} (f : Hom x y) (g : Hom z y) β†’ Pullback B f g)
  β†’ Cartesian-fibration Slices
Codomain-fibration pullbacks .has-lift f y' = lift-f where
  module pb = Pullback (pullbacks f (y' .map))

  lift-f : Cartesian-lift Slices f y'
  lift-f .x' = cut pb.p₁
  lift-f .lifting .to = pb.pβ‚‚
  lift-f .lifting .commute = pb.square
  lift-f .cartesian = pullback→cartesian pb.has-is-pb

Since the proof that Slices is a cartesian fibration is given by essentially rearranging the data of pullbacks in we also have the converse implication: If is a Cartesian fibration, then has all pullbacks.

Codomain-fibration→pullbacks
  : βˆ€ {x y z} (f : Hom x y) (g : Hom z y)
  β†’ Cartesian-fibration Slices
  β†’ Pullback B f g
Codomain-fibration→pullbacks f g lifts = pb where
  open Pullback
  open is-pullback
  module the-lift = Cartesian-lift (lifts .has-lift f (cut g))

  pb : Pullback B f g
  pb .apex = the-lift.x' .domain
  pb .p₁ = the-lift.x' .map
  pb .pβ‚‚ = the-lift.lifting .to
  pb .has-is-pb .square = the-lift.lifting .commute
  pb .has-is-pb .universal {p₁' = p₁'} {pβ‚‚'} p =
    the-lift.cartesian .universal {u' = cut id}
      p₁' (slice-hom pβ‚‚' (pullr (idr _) βˆ™ p)) .to
  pb .has-is-pb .pβ‚βˆ˜universal =
    sym (the-lift.universal _ _ .commute) βˆ™ idr _
  pb .has-is-pb .pβ‚‚βˆ˜universal = ap to (the-lift.cartesian .commutes _ _)
  pb .has-is-pb .unique p q = ap to $ the-lift.cartesian .unique
    (slice-hom _ (idr _ βˆ™ sym p)) (Slice-pathp refl q)

Since the fibres of the codomain fibration are given by slice categories, then the interpretation of Cartesian fibrations as β€œdisplayed categories whose fibres vary functorially” leads us to reinterpret the above results as, essentially, giving the pullback functors between slice categories.

As an opfibrationπŸ”—

The canonical self-indexing is always an opfibration, where opreindexing is given by postcomposition. If we think about slices as families, then opreindexing along extends a family over to a family over by adding in empty fibres for all elements of that do not lie in the image of

Codomain-opfibration : Cocartesian-fibration Slices
Codomain-opfibration .Cocartesian-fibration.has-lift f x' = lift-f where

  lift-f : Cocartesian-lift Slices f x'
  lift-f .Cocartesian-lift.y' = cut (f ∘ x' .map)
  lift-f .Cocartesian-lift.lifting = slice-hom id (sym (idr _))
  lift-f .Cocartesian-lift.cocartesian .is-cocartesian.universal m h' =
    slice-hom (h' .to) (assoc _ _ _ βˆ™ h' .commute)
  lift-f .Cocartesian-lift.cocartesian .is-cocartesian.commutes m h' =
    Slice-pathp refl (idr _)
  lift-f .Cocartesian-lift.cocartesian .is-cocartesian.unique m' p =
    Slice-pathp refl (sym (idr _) βˆ™ ap to p)

References