module Cat.Diagram.Subobject where

Subobject classifiers🔗

In an arbitrary category a subobject of is, colloquially speaking, given by a monomorphism Formally, though, we must consider the object to be part of this data, since we can only speak of morphisms if we already know their domain and codomain. The generality in the definition means that the notion of subobject applies to completely arbitrary but in completely arbitrary situations, the notion might be very badly behaved.

There are several observations we can make about that “tame” the behaviour of For example, if it has pullbacks, then is a fibration, so that there is a universal way of re-indexing a subobject along a morphism and if it has images, it’s even a bifibration, so that each of these reindexings has a left adjoint, giving an interpretation of existential quantifiers. If is a regular category, existential quantifiers and substitution commute, restricting the behaviour of subobjects even further.

However, there is one assumption we can make about that rules them all: it has a generic subobject, so that is equivalent to a given in A generic subobject is a morphism so that, for any a subobject there is a unique arrow making the square

into a pullback. We can investigate this definition by instantiating it in which does have a generic subobject. Given an embedding we have a family of propositions which maps to the fibre of over The square above also computes a fibre, this time of and saying that it is means that assigns to precisely those which are in

  record is-generic-subobject {Ω} (true : Subobject Ω) : Type (o ⊔ ℓ) where
    field
      name :  {X} (m : Subobject X)  Hom X Ω
      classifies
        :  {X} (m : Subobject X)
         is-pullback-along C (m .map) (name m) (true .map)
      unique
        :  {X} {m : Subobject X} {nm : Hom X Ω}
         is-pullback-along C (m .map) nm (true .map)
         nm ≡ name m
Terminology

We follow (Johnstone 2002, A1.6) for our terminology: the morphism is called the generic subobject, and is the subobject classifier. This differs from the terminology in the nLab, where the morphism is called the subobject classifier.

  record Subobject-classifier : Type (o ⊔ ℓ) where
    field
      {Ω}     : Ob
      true    : Subobject Ω
      generic : is-generic-subobject true
    open is-generic-subobject generic public

While the definition of is-generic-subobject can be stated without assuming that has any limits at all, we’ll need to assume that has pullbacks to get anything of value done. Before we get started, however, we’ll prove a helper theorem that serves as a “smart constructor” for Subobject-classifier, simplifying the verification of the universal property in case is univalent and has all finite limits (in particular, a terminal object).

Assuming that we have a terminal object, we no longer need to specify the arrow as an arbitrary element of — we can instead ask for a point instead. Since we have pullbacks, we also have the change-of-base operation for any which allows us to simplify the condition that “ is the pullback of along ”, which requires constructing a pullback square, to the simpler The theorem is that it suffices to ask for:

  • The point corresponding to the generic subobject,
  • An operation which maps subobjects to their names,
  • A witness that, for any we have and
  • A witness that, for any we have

These two conditions amount to saying that and form an equivalence between the sets and for all Note that we do not need to assume naturality for since it is an inverse equivalence to which is already natural.

  from-classification
    :  {Ω} (true : Hom top Ω)
     (name :  {A} (m : Subobject A)  Hom A Ω)
     (∀ {A} (m : Subobject A)  m ≅ₘ name m ^* pt true)
     (∀ {A} (h : Hom A Ω)  name (h ^* pt true) ≡ h)
     Subobject-classifier C
  from-classification tru nm invl invr = done where
    done : Subobject-classifier C
    done .Ω = _
    done .true = pt tru
    done .generic .name = nm
    done .generic .classifies m = iso→is-pullback-along {m = m} {n = pt tru} (invl m)

Note that the uniqueness part of the universal property is satisfied by the last constraint on the is-pullback-along assumption amounts to saying that by univalence of so we have

    done .generic .unique {m = m} {h'} p =
      let
        rem₁ : m ≡ h' ^* pt tru
        rem₁ = Sub-is-category cat .to-path $
          is-pullback-along→iso {m = m} {n = pt tru} p
      in sym (ap nm rem₁ ∙ invr _)

The prototypical category with a subobject classifier is the category of sets. Since it is finitely complete and univalent, our helper above will let us swiftly dispatch the construction. Our subobject classifier is given by the type of propositions, lifted to the right universe. The name of a subobject is the family of propositions Note that we must squash this fibre down so it fits in but this squashing is benign because is a monomorphism (hence, an embedding).

  unbox :  {A : Set} (m : Subobject A) {x} (fibre (m .map) x)  fibre (m .map) x
  unbox m = □-out (monic→is-embedding (hlevel 2)  {C} g h p  m .monic {C} g h p) _)

  mk : make-subobject-classifier _ _
  mk .make-subobject-classifier.Ω = el! (Lift _ Ω)
  mk .true _ = lift ⊤Ω
  mk .name m x = lift (elΩ (fibre (m .map) x))

Showing that this name function actually works takes a bit of fiddling, but it’s nothing outrageous.

  mk .named-name m = Sub-antisym
    record
      { map = λ w  m .map w , lift tt , ap lift (to-is-true (inc (w , refl)))
      ; sq  = refl
      }
    record { sq = ext λ x _ p  sym (unbox m (from-is-true p) .snd )}
  mk .name-named h = ext λ a  Ω-ua
    (rec! λ x _ p y=a  from-is-true (ap h (sym y=a) ∙ p))
     ha  inc ((a , lift tt , ap lift (to-is-true ha)) , refl))

References

  • Johnstone, Peter T. 2002. Sketches of an Elephant: a Topos Theory Compendium. Oxford Logic Guides. New York, NY: Oxford Univ. Press. https://cds.cern.ch/record/592033.