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'
Cartesian-morphism-pathp : β {x y x' y'} {f g : Hom x y} β {f' : Cartesian-morphism f x' y'} {g' : Cartesian-morphism g x' y'} β {p : f β‘ g} β PathP (Ξ» i β Hom[ p i ] x' y') (Cartesian-morphism.hom' f') (Cartesian-morphism.hom' g') β PathP (Ξ» i β Cartesian-morphism (p i) x' y') f' g' Cartesian-morphism-pathp q i .Cartesian-morphism.hom' = q i Cartesian-morphism-pathp {f' = f'} {g' = g'} {p = p} q i .Cartesian-morphism.cartesian = is-propβpathp (Ξ» i β is-cartesian-is-prop {f = p i} {f' = q i}) (Cartesian-morphism.cartesian f') (Cartesian-morphism.cartesian g') i Cartesian-morphism-is-set : β {x y x' y'} {f : Hom x y} β is-set (Cartesian-morphism f x' y') Cartesian-morphism-is-set = Isoβis-hlevel 2 eqv $ Ξ£-is-hlevel 2 (Hom[ _ ]-set _ _) Ξ» _ β is-hlevel-suc 1 is-cartesian-is-prop where unquoteDecl eqv = declare-record-iso eqv (quote Cartesian-morphism)
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.
record Cartesian-fibration : Type (o β β β o' β β') where no-eta-equality field has-lift : β {x y} (f : Hom x y) (y' : Ob[ y ]) β Cartesian-lift f y' module has-lift {x y} (f : Hom x y) (y' : Ob[ y ]) = Cartesian-lift (has-lift f y')
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.