definition example theorem

Let be a category with finite limits (pullbacks and a Terminal Object ). A subobject classifier is an object together with a Monomorphism such that for every mono there is a unique morphism , the characteristic map of , making the left square a pullback. Conversely every — a Predicate on — determines the Subobject by pulling back (right square).

X1fYjpg1Y¬Y¬!mytrue!ytruepmqpX1fYjpg1Y¬Y¬!mytrue!ytruepmqp

Slogan: subobjects of are classified by predicates on : , naturally in . Equivalently, represents the subobject functor.

Sources: 7 Sketches §7.2.2, Definition 7.12, Eq. (7.13)–(7.15), Exercises 7.16–7.17, §7.4.1 (“The subobject classifier in a sheaf topos”), Eq. (7.50)–(7.51), Example 7.54; Kittenlab Lecture 14 (subsets as maps to Bool); CTfS §2.7.4.8 (Definition 2.7.4.9, Proposition 2.7.4.10, Definition 2.7.4.11, Exercise 2.7.4.12, Corollary 2.7.5.8, Exercise 2.7.5.9), §5.2.1 (Set vs -Set dictionary)

Examples

  • : (Booleans), picks . For , iff ; conversely (Eq. 7.15). Compare Upper Sets Classified by Maps to Bool for preorders.
  • In ologs (CTfS Exercise 2.7.5.9): label “a truth value”, “the truth value True”, and a subobject pulled back along “an for which is True” — e.g. for = “is an even number”, = “a natural number which is even”. The complement of a subset has characteristic map (CTfS Exercise 2.7.4.12).
  • Sheaves on a space : with restriction for (Eqs. 7.50–7.51). It is a Sheaf: a matching family glues to , since . The map sends the unique section over to itself. Upshot: truth values are open sets — “property is true on the open subset “. On the one-point space this recovers (7S Exercise 7.52).
  • Graphs (Topos of Graphs): has two vertices and five arrows; sends the loop of the terminal graph to .
  • Presheaves on : is the set of sieves on (found via the Yoneda Lemma).

Logic from

The logical connectives are characteristic maps of specific subobjects of or (Internal Logic of a Topos): , , etc. Modalities are certain maps .

Docs: C-set morphisms · Graphs — Kittenlab Lecture 14

using Catlab
# Set: characteristic function of N ⊆ Z restricted to a finite window
Y = -5:5
χ = [y >= 0 for y in Y]                       # ⌜m⌝ : Y → Bool
Y[χ]                                          # {Y | χ} = 0:5, the subobject back again
 
# Grph: Catlab computes the subobject classifier of any C-set category
Ω, subobjs = subobject_classifier(Graph)
Ω                                             # Graph with V = 2, E = 5  (Example 7.54)
# classify the subgraph H ⊆ G by the unique hom G → Ω whose pullback along true is H
import Mathlib
open CategoryTheory
#check @CategoryTheory.Classifier              -- structure: Ω, truth : ⊤_ C ⟶ Ω, unique χ with pullback
#check @CategoryTheory.HasClassifier
#check @CategoryTheory.HasClassifier.χ         -- the characteristic map ⌜m⌝
-- in Type, Prop is the subobject classifier: subsets ↔ predicates
example (Y : Type) : Set Y ≃ (Y → Prop) := Equiv.refl _
-- in finite Hask, Bool classifies subobjects: a mono X ↣ Y ⇝ its characteristic map
classify :: Eq y => [y] -> (y -> Bool)           -- ⌜m⌝ for the image of a mono
classify img = (`elem` img)
pullbackTrue :: [y] -> (y -> Bool) -> [y]          -- {Y | p}
pullbackTrue ys p = filter p ys
-- classify . pullbackTrue ys  ≡ id on predicates over ys; the other way gives back the subset