The Subobject Classifier of a Topos carries the logical connectives as morphisms and , each the characteristic map of a specific Subobject built from limits and colimits. Applied pointwise they make each poset of predicates a Heyting Algebra.
Sources: 7 Sketches §7.2.3 (“Logic in the topos Set”), Eq. (7.18), Exercises 7.19–7.21; §7.4.2 (“Logic in a sheaf topos”), Eqs. (7.56)–(7.57), Example 7.58, Exercises 7.59–7.60; §7.4.6.
In ()
- AND: the element is a mono; its characteristic map sends only to — the truth table of . So .
- OR classifies the subset , i.e. the union — a colimit of limits involving only and , hence available in every topos.
- NOT classifies the subobject (7S Exercise 7.19); IMPLIES classifies , the equalizer of and the first projection (7S Exercise 7.20).
In a sheaf topos (truth values are open sets)
For :
and (7S Exercise 7.60). Implication is the hardest to picture; negation is the interior of the complement. Example 7.58 on with , : , , , , , .
The logic is intuitionistic: always, but can fail — for , and (7S Exercise 7.59). Excluded middle fails for the same .
Quantifiers and modalities
and are described in Quantification; the “assuming ” operators in Modality. The formal language these connectives belong to, and its compilation into statements about sheaves, is the Internal Language of a Topos.
Docs: C-set morphisms · Graphs
using Catlab
# Sub(G) for a graph G is a Heyting algebra (not Boolean): ¬¬A ≠ A can happen
G = path_graph(Graph, 3) # 1 → 2 → 3
sh(s) = (c = components(s); (collect(c[:V]), collect(c[:E])))
A = Subobject(G, V=[1, 2], E=Int[]) # vertices 1, 2 without the edge between them
sh(¬A) # ([3], []): largest subgraph disjoint from A
sh(¬(¬A)) # ([1, 2], [1]) ≠ A: double negation adds the edge
sh(A ∨ ¬A) # ([1, 2, 3], []) ≠ top: excluded middle failsimport Mathlib
open TopologicalSpace
-- the opens of a space form a frame, hence a Heyting algebra with ⇨ and ᶜ
example (X : Type) [TopologicalSpace X] : Order.Frame (Opens X) := inferInstance
example (X : Type) [TopologicalSpace X] (U V : Opens X) : Opens X := U ⇨ V -- implication
#check @himp_eq -- in a Boolean algebra a ⇨ b = bᶜ ⊔ b; not in general
#check @le_compl_compl -- a ≤ ¬¬a holds in every Heyting algebra-- connectives as characteristic maps of subobjects of Bool × Bool
andChar, orChar, impChar :: (Bool, Bool) -> Bool
andChar = (`elem` [(True, True)])
orChar = (`elem` [(True, True), (True, False), (False, True)])
impChar = (`elem` [(True, True), (False, True), (False, False)])
notChar :: Bool -> Bool
notChar = (`elem` [False])