module Cat.Diagram.Initial where

Initial objectsπŸ”—

An object of a category is said to be initial if there exists a unique map to any other object:

  is-initial : Ob β†’ Type _
  is-initial ob = βˆ€ x β†’ is-contr (Hom ob x)
  record Initial : Type (o βŠ” h) where
      bot  : Ob
      hasβŠ₯ : is-initial bot

We refer to the centre of contraction as Β‘. Since it inhabits a contractible type, it is unique.

    Β‘ : βˆ€ {x} β†’ Hom bot x
    Β‘ = hasβŠ₯ _ .centre
    Β‘-unique : βˆ€ {x} (h : Hom bot x) β†’ Β‘ ≑ h
    Β‘-unique = hasβŠ₯ _ .paths
    Β‘-uniqueβ‚‚ : βˆ€ {x} (f g : Hom bot x) β†’ f ≑ g
    Β‘-uniqueβ‚‚ = is-contrβ†’is-prop (hasβŠ₯ _)
  open Initial


The intuition here is that we ought to think about an initial object as having β€œthe least amount of structure possible”, insofar that it can be mapped into any other object. For the category of Sets, this is the empty set; there is no required structure beyond β€œbeing a set”, so the empty set sufficies.

In more structured categories, the situation becomes a bit more interesting. Once our category has enough structure that we can’t build maps from a totally trivial thing, the initial object begins to behave like a notion of Syntax for our category. The idea here is that we have a unique means of interpreting our syntax into any other object, which is exhibited by the universal map Β‘


One important fact about initial objects is that they are unique up to isomorphism:

  βŠ₯-unique : (i i' : Initial) β†’ bot i β‰… bot i'
  βŠ₯-unique i i' = make-iso (Β‘ i) (Β‘ i') (Β‘-uniqueβ‚‚ i' _ _) (Β‘-uniqueβ‚‚ i _ _)

Additionally, if is a category, then the space of initial objects is a proposition:

  βŠ₯-is-prop : is-category C β†’ is-prop Initial
  βŠ₯-is-prop ccat x1 x2 i .bot =
    Univalent.isoβ†’path ccat (βŠ₯-unique x1 x2) i
  βŠ₯-is-prop ccat x1 x2 i .hasβŠ₯ ob =
      (Ξ» i β†’ is-contr-is-prop
        {A = Hom (Univalent.isoβ†’path ccat (βŠ₯-unique x1 x2) i) _})
      (x1 .hasβŠ₯ ob) (x2 .hasβŠ₯ ob) i


An initial object is said to be strict if every morphism into it is an isomorphism. This is a categorical generalization of the fact that if one can write a function then must itself be empty.

This is an instance of the more general notion of van Kampen colimits.

  is-strict-initial : Initial β†’ Type _
  is-strict-initial i = βˆ€ x β†’ (f : Hom x (i .bot)) β†’ is-invertible f
  record Strict-initial : Type (o βŠ” h) where
      initial : Initial
      has-is-strict : is-strict-initial initial

Strictness is a property of, not structure on, an initial object.

  is-strict-initial-is-prop : βˆ€ i β†’ is-prop (is-strict-initial i)
  is-strict-initial-is-prop i = hlevel 1