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
: Hom domain y
map : is-monic map
monic
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
: Hom (a .domain) (b .domain)
map : f ∘ Subobject.map a ≡ Subobject.map b ∘ map
sq
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, .
Setting up the displayed category is now nothing more than routine verification: the identity map satisfies , and commutative squares can be pasted together.
: Displayed B (o ⊔ ℓ) ℓ
Subobjects .Ob[_] y = Subobject y
Subobjects .Hom[_] = ≤-over
Subobjects .Hom[_]-set f a b = is-prop→is-set ≤-over-is-prop
Subobjects
.id' .map = id
Subobjects .id' .sq = id-comm-sym
Subobjects
._∘'_ α β .map = α .map ∘ β .map
Subobjects ._∘'_ α β .sq = pullr (β .sq) ∙ extendl (α .sq) Subobjects
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
.has-lift f y' = l where
Subobject-fibration pb : Pullback _ _ _
it = pb (y' .map) f
it : Cartesian-lift Subobjects f y'
l
-- The blue square:
.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)
l
-- The dashed red arrow:
.cartesian .universal {u' = u'} m h' = λ where
l .map → it .Pullback.universal (sym (h' .sq) ∙ sym (assoc f m (u' .map)))
.sq → sym (it .p₂∘universal)
.cartesian .commutes _ _ = ≤-over-is-prop _ _
l .cartesian .unique _ _ = ≤-over-is-prop _ _ l
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
.weak-lift f x' = l where
Subobject-weak-opfibration ims 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 diagramatically, 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 .
: 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' = is-prop→pathp (λ _ → hlevel 1) _ _
l .weak-cocartesian .unique _ _ = hlevel 1 _ _ l
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
= cartesian+weak-opfibration→opfibration _
Subobject-opfibration images pb (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.
: Ob → Precategory (o ⊔ ℓ) ℓ
Sub = Fibre' Subobjects y re coh where
Sub y : ∀ {a b} → ≤-over (id ∘ id) a b → ≤-over id a b
re .map = x .map
re x .sq = ap₂ _∘_ (introl refl) refl ∙ x .sq
re x
abstract
: ∀ {a b} (f : ≤-over (id ∘ id) a b) → re f ≡ transport (λ i → ≤-over (idl id i) a b) f
coh = hlevel 1 _ _
coh f
module Sub {y} = Cr (Sub y)
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)
{y} pb a b = prod where
Sub-products = pb (a .map) (b .map)
it
: Product (Sub y) a b
prod .Product.apex .domain = it .apex
prod .Product.apex .map = a .map ∘ it .p₁
prod .Product.apex .monic = monic-∘
prod (a .monic)
(is-monic→pullback-is-monic (b .monic) (rotate-pullback (it .has-is-pb)))
.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 =
prod .Pullback.universal {p₁' = q≤a .map} {p₂' = q≤b .map} (sym (q≤a .sq) ∙ q≤b .sq)
it .Product.has-is-product .is-product.⟨_,_⟩ q≤a q≤b .sq =
prod _ ∙ sym (pullr (it .p₁∘universal) ∙ sym (q≤a .sq) ∙ idl _)
idl .Product.has-is-product .is-product.π₁∘factor = hlevel 1 _ _
prod .Product.has-is-product .is-product.π₂∘factor = hlevel 1 _ _
prod .Product.has-is-product .is-product.unique _ _ _ = hlevel 1 _ _ prod
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.
: ∀ {y} → is-category B → is-category (Sub y)
Sub-is-category .to-path {a} {b} x =
Sub-is-category b-cat
Sub-path(b-cat .to-path i)
(Univalent.Hom-pathp-refll-iso b-cat (sym (x .Sub.from .sq) ∙ idl _))
where
: 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))
i .to-path-over p =
Sub-is-category b-cat .≅-pathp refl _ $ is-prop→pathp (λ _ → hlevel 1) _ _ Sub