module Cat.Displayed.Instances.Subobjects {o β} (B : Precategory o β) where
The fibration of subobjectsπ
Given a base category we can define the displayed category of subobjects over This is, in essence, a restriction of the codomain fibration of but with our attention restricted to the monomorphisms rather than arbitrary maps
record Subobject (y : Ob) : Type (o β β) where no-eta-equality field {domain} : Ob map : Hom domain y monic : is-monic map open Subobject public
To make formalisation smoother, we define our own version of
displayed morphisms in the subobject fibration, rather than reusing
those of the fundamental self-indexing. The reason for this is quite
technical: the type of maps in the self-indexing is only dependent (the
domains and) the morphisms being considered, meaning nothing
constrains the proofs that these are monomorphisms, causing unification
to fail at the determining the full Subobject
s involved.
record β€-over {x y} (f : Hom x y) (a : Subobject x) (b : Subobject y) : Type β where no-eta-equality field map : Hom (a .domain) (b .domain) sq : f β Subobject.map a β‘ Subobject.map b β map open β€-over public
We will denote the type of maps in the subobject fibration by since there is at most one such map: if satisfy then, since is a mono,
β€-over-is-prop : β {x y} {f : Hom x y} {a : Subobject x} {b : Subobject y} β (p q : β€-over f a b) β p β‘ q β€-over-is-prop {f = f} {a} {b} p q = path where maps : p .map β‘ q .map maps = b .monic (p .map) (q .map) (sym (p .sq) β q .sq) path : p β‘ q path i .map = maps i path i .sq = is-propβpathp (Ξ» i β Hom-set _ _ (f β a .map) (b .map β maps i)) (p .sq) (q .sq) i instance H-Level-β€-over : β {x y} {f : Hom x y} {a : Subobject x} {b : Subobject y} {n} β H-Level (β€-over f a b) (suc n) H-Level-β€-over = prop-instance β€-over-is-prop
Setting up the displayed category is now nothing more than routine verification: the identity map satisfies and commutative squares can be pasted together.
Subobjects : Displayed B (o β β) β Subobjects .Ob[_] y = Subobject y Subobjects .Hom[_] = β€-over Subobjects .Hom[_]-set f a b = hlevel 2 Subobjects .id' .map = id Subobjects .id' .sq = id-comm-sym Subobjects ._β'_ Ξ± Ξ² .map = Ξ± .map β Ξ² .map Subobjects ._β'_ Ξ± Ξ² .sq = pullr (Ξ² .sq) β extendl (Ξ± .sq)
Subobjects .idr' _ = prop! Subobjects .idl' _ = prop! Subobjects .assoc' _ _ _ = prop! open is-weak-cocartesian-fibration open Weak-cocartesian-lift open Cartesian-fibration open is-weak-cocartesian open Cartesian-lift open is-cartesian open Pullback
As a fibrationπ
By exactly the same construction as for the fundamental self-indexing, if has pullbacks, the displayed category we have built is actually a fibration. The construction is slightly simpler now that we have no need to worry about uniqueness, but we can remind ourselves of the universal property:
On the first stage, we are given the data in black: we can complete an open span to a Cartesian square (in blue) by pulling back along this base change remains a monomorphism. Now given the data in red, we verify that the dashed arrow exists, which is enough for its uniqueness.
Subobject-fibration : has-pullbacks B β Cartesian-fibration Subobjects Subobject-fibration pb .has-lift f y' = l where it : Pullback _ _ _ it = pb (y' .map) f l : Cartesian-lift Subobjects f y' -- The blue square: l .x' .domain = it .apex l .x' .map = it .pβ l .x' .monic = is-monicβpullback-is-monic (y' .monic) (it .has-is-pb) l .lifting .map = it .pβ l .lifting .sq = sym (it .square) -- The dashed red arrow: l .cartesian .universal {u' = u'} m h' = Ξ» where .map β it .Pullback.universal (sym (h' .sq) β sym (assoc f m (u' .map))) .sq β sym (it .pββuniversal) l .cartesian .commutes _ _ = prop! l .cartesian .unique _ _ = prop!
As a (weak) cocartesian fibrationπ
If has an image factorisation for every morphism, then its fibration of subobjects is a weak cocartesian fibration. By a general fact, if also has pullbacks, then is a cocartesian fibration.
Subobject-weak-opfibration : (β {x y} (f : Hom x y) β Image B f) β is-weak-cocartesian-fibration Subobjects Subobject-weak-opfibration ims .weak-lift f x' = l where module im = Image B (ims (f β x' .map))
To understand this result, we remind ourselves of the universal property of an image factorisation for It is the initial subobject through with factors. That is to say, if is another subobject, and for some map then Summarised diagrammatically, the universal property of an image factorisation looks like a kite:
Now compare this with the universal property required of a weak co-cartesian lift:
By smooshing the corner together (i.e., composing and we see that this is exactly the kite-shaped universal property of
l : Weak-cocartesian-lift Subobjects f x' l .y' .domain = im.Im l .y' .map = im.Imβcodomain l .y' .monic = im.Imβcodomain-is-M l .lifting .map = im.corestrict l .lifting .sq = sym im.image-factors l .weak-cocartesian .universal {x' = y'} h .map = im.universal _ (y' .monic) (h .map) (sym (h .sq)) l .weak-cocartesian .universal h .sq = idl _ β sym im.universal-factors l .weak-cocartesian .commutes g' = prop! l .weak-cocartesian .unique _ _ = prop!
The aforementioned general fact says that any cartesian and weak cocartesian fibration must actually be a full opfibration.
Subobject-opfibration : (β {x y} (f : Hom x y) β Image B f) β (pb : has-pullbacks B) β Cocartesian-fibration Subobjects Subobject-opfibration images pb = cartesian+weak-opfibrationβopfibration _ (Subobject-fibration pb) (Subobject-weak-opfibration images)
Subobjects over a baseπ
We define the category of subobjects of as a fibre of the subobject fibration. However, we use a purpose-built transport function to cut down on the number of coherences required to work with at use-sites.
Sub : Ob β Precategory (o β β) β Sub y = Fibre' Subobjects y re coh where re : β {a b} β β€-over (id β id) a b β β€-over id a b re x .map = x .map re x .sq = apβ _β_ (introl refl) refl β x .sq abstract coh : β {a b} (f : β€-over (id β id) a b) β re f β‘ transport (Ξ» i β β€-over (idl id i) a b) f coh f = prop! module Sub {y} = Cr (Sub y)
_β€β_ : β {y} (a b : Subobject y) β Type _ _β€β_ = β€-over id β€ββmono : β {y} {a b : Subobject y} β a β€β b β a .domain βͺ b .domain β€ββmono x .mor = x .map β€ββmono {a = a} x .monic g h Ξ± = a .monic g h $ a .map β g β‘β¨ ap (_β g) (introl refl β x .sq) β pullr refl β©β‘ _ β x .map β g β‘β¨ apβ _β_ refl Ξ± β©β‘ _ β x .map β h β‘β¨ pulll (sym (x .sq) β idl _) β©β‘ a .map β h β cutβ : β {x y} {f : Hom x y} β is-monic f β Subobject y cutβ x .domain = _ cutβ x .map = _ cutβ x .monic = x Sub-antisym : β {y} {a b : Subobject y} β a β€β b β b β€β a β a Sub.β b Sub-antisym f g = Sub.make-iso f g prop! prop! Sub-path : β {y} {a b : Subobject y} β (p : a .domain β‘ b .domain) β PathP (Ξ» i β Hom (p i) y) (a .map) (b .map) β a β‘ b Sub-path p q i .domain = p i Sub-path p q i .map = q i Sub-path {a = a} {b = b} p q i .monic {c} = is-propβpathp (Ξ» i β Ξ -is-hlevelΒ³ 1 Ξ» (g h : Hom c (p i)) (_ : q i β g β‘ q i β h) β Hom-set _ _ g h) (a .monic) (b .monic) i
Fibrewise cartesian structureπ
Since products in slice categories are given by pullbacks, and pullbacks preserve monomorphisms, if has pullbacks, then has products, regardless of what is.
Sub-products : β {y} β has-pullbacks B β has-products (Sub y) Sub-products {y} pb a b = prod where it = pb (a .map) (b .map) prod : Product (Sub y) a b prod .Product.apex .domain = it .apex prod .Product.apex .map = a .map β it .pβ prod .Product.apex .monic = monic-β (a .monic) (is-monicβpullback-is-monic (b .monic) (rotate-pullback (it .has-is-pb))) prod .Product.Οβ .map = it .pβ prod .Product.Οβ .sq = idl _ prod .Product.Οβ .map = it .pβ prod .Product.Οβ .sq = idl _ β it .square prod .Product.has-is-product .is-product.β¨_,_β© qβ€a qβ€b .map = it .Pullback.universal {pβ' = qβ€a .map} {pβ' = qβ€b .map} (sym (qβ€a .sq) β qβ€b .sq) prod .Product.has-is-product .is-product.β¨_,_β© qβ€a qβ€b .sq = idl _ β sym (pullr (it .pββuniversal) β sym (qβ€a .sq) β idl _) prod .Product.has-is-product .is-product.Οβββ¨β© = prop! prod .Product.has-is-product .is-product.Οβββ¨β© = prop! prod .Product.has-is-product .is-product.unique _ _ = prop!
Univalenceπ
Since identity of is given by identity of they underlying objects and identity-over of the corresponding morphisms, if is univalent, we can conclude that is, too. Since is always thin, we can summarise the situation by saying that is a partial order if is univalent.
Sub-is-category : β {y} β is-category B β is-category (Sub y) Sub-is-category b-cat .to-path {a} {b} x = Sub-path (b-cat .to-path i) (Univalent.Hom-pathp-refll-iso b-cat (sym (x .Sub.from .sq) β idl _)) where i : a .domain β b .domain i = make-iso (x .Sub.to .map) (x .Sub.from .map) (ap map (Sub.invl x)) (ap map (Sub.invr x)) Sub-is-category b-cat .to-path-over p = Sub.β -pathp refl _ prop!