module Cat.Diagram.Zero where
Zero objectsπ
In some categories, Initial
and Terminal
objects coincide. When
this occurs, we call the object a zero object.
record is-zero (ob : Ob) : Type (o β h) where field has-is-initial : is-initial C ob has-is-terminal : is-terminal C ob record Zero : Type (o β h) where field β : Ob has-is-zero : is-zero β open is-zero has-is-zero public terminal : Terminal C terminal = record { top = β ; hasβ€ = has-is-terminal } initial : Initial C initial = record { bot = β ; hasβ₯ = has-is-initial } open Terminal terminal public hiding (top) open Initial initial public hiding (bot)
A curious fact about zero objects is that their existence implies that every hom set is inhabited! Between any objects and the morphism is called the zero morphism.
zeroβ : β {x y} β Hom x y zeroβ = Β‘ β ! zero-βl : β {x y z} β (f : Hom y z) β f β zeroβ {x} {y} β‘ zeroβ zero-βl f = pulll (sym (Β‘-unique (f β Β‘))) zero-βr : β {x y z} β (f : Hom x y) β zeroβ {y} {z} β f β‘ zeroβ zero-βr f = pullr (sym (!-unique (! β f))) zero-comm : β {x y z} β (f : Hom y z) β (g : Hom x y) β f β zeroβ β‘ zeroβ β g zero-comm f g = zero-βl f β sym (zero-βr g) zero-comm-sym : β {x y z} β (f : Hom y z) β (g : Hom x y) β zeroβ β f β‘ g β zeroβ zero-comm-sym f g = zero-βr f β sym (zero-βl g)
In the presence of a zero object, zero morphisms are unique with the property of being constant, in the sense that for any parallel pair (By duality, they are also unique with the property of being coconstant.)
zero-unique : β {x y} {z : Hom x y} β (β {w} (f g : Hom w x) β z β f β‘ z β g) β z β‘ zeroβ zero-unique const = sym (idr _) β const _ zeroβ β zero-βl _
Intuitionπ
Most categories that have zero objects have enough structure to rule out totally trivial structures like the empty set, but not enough structure to cause the initial and terminal objects to βseparateβ. The canonical example here is the category of groups: the unit rules out a completely trivial group, yet thereβs nothing else that would require the initial object to have any more structure.
Another point of interest is that any category with zero objects is
canonically enriched in pointed sets: the zeroβ
morphism from earlier
acts as the designated basepoint for each of the hom sets.
module _ {o h} {C : Precategory o h} where open Cat.Reasoning C private unquoteDecl is-zero-eqv = declare-record-iso is-zero-eqv (quote is-zero) private unquoteDecl zero-eqv = declare-record-iso zero-eqv (quote Zero) is-zero-is-prop : β {x} β is-prop (is-zero C x) is-zero-is-prop = Isoβis-hlevel 1 is-zero-eqv (hlevel 1) instance HLevel-is-zero : β {x} {n} β H-Level (is-zero C x) (1 + n) HLevel-is-zero = prop-instance is-zero-is-prop instance Extensional-Zero : β {βr} β β¦ sa : Extensional Ob βr β¦ β Extensional (Zero C) βr Extensional-Zero β¦ sa β¦ = embeddingβextensional (IsoβEmbedding zero-eqv βemb (fst , Subset-proj-embedding (Ξ» _ β hlevel 1))) sa