module Cat.Diagram.Zero where
module _ {o h} (C : Precategory o h) where
open Cat.Reasoning C
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
: is-initial C ob
has-is-initial : is-terminal C ob
has-is-terminal
record Zero : Type (o ⊔ h) where
field
: Ob
∅ : is-zero ∅
has-is-zero
open is-zero has-is-zero public
: Terminal C
terminal = record { top = ∅ ; has⊤ = has-is-terminal }
terminal
: Initial C
initial = record { bot = ∅ ; has⊥ = has-is-initial }
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.
: ∀ {x y} → Hom x y
zero→ = ¡ ∘ !
zero→
: ∀ {x y z} → (f : Hom y z) → f ∘ zero→ {x} {y} ≡ zero→
zero-∘l = pulll (sym (¡-unique (f ∘ ¡)))
zero-∘l f
: ∀ {x y z} → (f : Hom x y) → zero→ {y} {z} ∘ f ≡ zero→
zero-∘r = pullr (sym (!-unique (! ∘ f)))
zero-∘r f
: ∀ {x y z} → (f : Hom y z) → (g : Hom x y) → f ∘ zero→ ≡ zero→ ∘ g
zero-comm = zero-∘l f ∙ sym (zero-∘r g)
zero-comm f g
: ∀ {x y z} → (f : Hom y z) → (g : Hom x y) → zero→ ∘ f ≡ g ∘ zero→
zero-comm-sym = zero-∘r f ∙ sym (zero-∘l g) zero-comm-sym f 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→
= sym (idr _) ∙ const _ zero→ ∙ zero-∘l _ zero-unique const
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)
: ∀ {x} → is-prop (is-zero C x)
is-zero-is-prop = Iso→is-hlevel 1 is-zero-eqv (hlevel 1)
is-zero-is-prop
instance
: ∀ {x} {n} → H-Level (is-zero C x) (1 + n)
HLevel-is-zero = prop-instance is-zero-is-prop
HLevel-is-zero
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