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
: ∀ {X} (m : Subobject X) → Hom X Ω
name
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
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
: Subobject Ω
true : is-generic-subobject true
generic 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
= done where
from-classification tru nm invl invr : 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) done
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
.generic .unique {m = m} {h'} p =
done let
: m ≡ h' ^* pt tru
rem₁ = Sub-is-category cat .to-path $
rem₁ {m = m} {n = pt tru} p
is-pullback-along→iso 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).
: ∀ {A : Set ℓ} (m : Subobject A) {x} → □ (fibre (m .map) x) → fibre (m .map) x
unbox = □-out (monic→is-embedding (hlevel 2) (λ {C} g h p → m .monic {C} g h p) _)
unbox m
: make-subobject-classifier _ _
mk .make-subobject-classifier.Ω = el! (Lift _ Ω)
mk .true _ = lift ⊤Ω
mk .name m x = lift (elΩ (fibre (m .map) x)) mk
Showing that this name
function
actually works takes a bit of fiddling, but it’s nothing outrageous.
.named-name m = Sub-antisym
mk 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 )}
.name-named h = ext λ a → Ω-ua
mk (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.