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.