The Mathematics of Neo-Rationalism: Notes on Categorical Logic and Topos Theory

By Eric Schmid

Dedicated to Dieter Roth, Gerhard Rühm, and Oswald Wiener.

Kunstmusik record
Kunstmusik record by Dieter Roth, Gerhard Rühm, and Oswald Wiener

This book provides the maths behind the program initiated by Peter Wolfendale and Reza Negarestani called “Neo-Rationalism.” My aim is to extend their program through these self-contained lecture-style notes in two parts. Part I develops categorical logic along the following arc: from Lawvere’s functorial semantics of algebraic theories, through the doctrinal hierarchy of logical fragments (cartesian, regular, coherent, Heyting), to theleft unifying frameworks of doctrines and generalized sketches. Part II develops topos theory: the elementary topos axioms, the standard examples (sets, G-sets, presheaves, graphs, sheaves), the internal higher-order logic via the Mitchell–Bénabou language and Kripke–Joyal semantics, the bi-Heyting structure of presheaf toposes, geometric morphisms, and the view of toposes as custom-tailored universes for mathematics.

How to Read These Notes

Part I assumes basic category theory (categories, functors, natural transformations, limits, adjunctions)—Appendix C is a one-page refresher, and Awodey & Bauer’s own appendices [4] a fuller one. Part II assumes Part I through Section 10. Readers who want the shortest path to toposes can read §2, §7, skim §8, and jump to Part II; readers headed for type theory should take §11 seriously and continue with Shulman [5].

Part I. Categorical Logic

1. Introduction: Logic through the Lens of Categories

1.1 What the Subject Is

Categorical logic is the study of logical systems using the tools of category theory. The subject originated in F. W. Lawvere’s 1963 PhD thesis on the functorial semantics of algebraic theories, and it has since expanded to encompass a vast range of logical systems drawn from both mathematics and computer science.1 The basic point of view can be stated in two slogans.

Slogan 1.1. Theories are structured categories; models are structure-preserving functors; homomorphisms of models are natural transformations.

Slogan 1.2. The logical operations are adjoints.

The first slogan is Lawvere’s functorial semantics. Instead of treating a theory as a bundle of uninterpreted syntax and a model as a set-based structure satisfying axioms, one distills the theory into a category 𝒞𝕋 carrying exactly the categorical structure needed to interpret the theory’s logic (finite products for equational logic, finite limits for cartesian logic, and so on), and one recovers models as functors 𝒞𝕋𝒞 preserving that structure. Syntax and semantics become objects of the same kind, related by functors, and the classical metatheorems—soundness, completeness, the existence of free models—become statements about universal properties.

The second slogan, also due to Lawvere, identifies the quantifiers and connectives as adjoint functors: existential and universal quantification are the left and right adjoints to substitution, conjunction and implication are related by the adjunction defining Heyting algebras, and comprehension, equality, and even the powerset arise from adjunctions.

1.2 Two Traditions: Model Theory and Proof Theory

Following de Paiva and Rodin, it is useful to distinguish two grand strands within categorical logic:2

  • Categorical model theory. In the Lawvere tradition, one studies the correspondence between theories-as-categories and their categories of models. Provability is reflected in the ordering of subobjects; a formula is a subobject, and satisfaction is containment of subobjects. Part I of these notes lives mostly in this tradition.

  • Categorical proof theory. In the Curry–Howard–Lambek tradition, one identifies propositions with types (objects) and proofs—not merely provability—with terms (morphisms). The paradigmatic result is Lambek’s theorem that the simply typed λ-calculus is the internal language of cartesian closed categories, so that βη-equivalence classes of terms correspond to morphisms. Shulman’s lecture notes [5] develop categorical logic thoroughly from this side, using multicategories as an intermediate structure between type theories and monoidal or cartesian categories.3

The two strands meet in the higher reaches of the subject: an elementary topos is simultaneously the model-theoretic environment for higher-order theories (Part II) and, via its internal type theory, a proof-theoretic object.

1.3 How the Subject Is Organized: Fragments and Structures

A recurring theme is a dictionary between fragments of first-order and higher-order logic and classes of structured categories. Each row of the following table is a “doctrine” in the informal sense of Section 12; the table is the roadmap for all of Part I and the bridge to Part II.4

Fragment Logical operations Categorical structure Where treated
Algebraic = (equations only) finite products §3
Cartesian =,, finite limits §6.4
Regular =,,, regular categories §8
Coherent regular +, coherent categories §9
First-order coherent +,¬, Heyting categories §10
Higher-order first-order + powersets elementary toposes Part II

Reading the table downward, each fragment adds connectives, and each class of categories adds the corresponding structure. Reading a single row, one has three interlocking activities: a proof theory (the deductive calculus of the fragment), a categorical semantics (interpretation in any category of the given class), and a completeness theorem mediated by a syntactic classifying category.

1.4 Plan of Part I

Section 2 collects the categorical preliminaries on subobjects that the semantics requires. Sections 3 and 4 develop algebraic theories, functorial semantics, and Lawvere’s syntax–semantics duality in detail, following Awodey & Bauer [4]. Sections 610 climb the first-order hierarchy: cartesian, regular, coherent, and Heyting logic. Section 12 steps back to the organizing frameworks: doctrines as 2-monads, Makkai’s generalized sketches, and Fujii’s unified framework for algebraic notions.

2. Preliminaries: Subobjects, Predicates, and Stability

Throughout Part I, the semantic home of a predicate on an object A is the poset of subobjects of A. This section fixes the relevant machinery.5

2.1 Subobjects

Let A be an object of a category 𝒞. Given monomorphisms i:IA and j:JA, say ij when i factors through j, i.e. when there is k:IJ with jk=i. Such a k is automatically monic and unique. This makes the class of monos into A a preorder; its poset reflection is the poset Sub(A) of subobjects of A: elements are equivalence classes of monos, where ij iff iji (in which case IJ over A). One calls 𝒞 well-powered when each Sub(A) is (equivalent to) a small poset; all categories in these notes are well-powered.

When 𝒞 has pullbacks, Sub becomes a functor Sub:𝒞op𝐏𝐨𝐬, sending f:AB to the monotone map f*:Sub(B)Sub(A) given by pullback of monos along f (pullbacks of monos are monos, and the two-pullbacks lemma makes this functorial up to the identifications built into Sub).

Lemma 2.1 (Two-pullbacks lemma). If in a commuting diagram both inner squares are pullbacks, so is the outer rectangle; and if the outer rectangle and the right square are pullbacks, so is the left square.

2.2 Predicates, Meets, and the Top Element

If 𝒞 has pullbacks, each Sub(A) has finite meets: the top element is [idA], and the meet of [i:IA] and [j:JA] is the diagonal of the pullback square IJJjIiA Moreover these meets are stable: for any f:BA, f*(A)=B,f*(UV)=f*Uf*V. Stability is the categorical shadow of the syntactic fact that substitution commutes with the connectives, (φψ)[t/x]=φ[t/x]ψ[t/x]: since substitution will be interpreted as pullback, every operation used to interpret a connective must be preserved by pullback for the semantics to be well-defined. “Stable under pullback” is a hypothesis that will recur in every definition of Part I.

2.3 Generalized Elements

A generalized element of C is simply a morphism x:XC; one thinks of X as a stage or domain of variation of the element. Given a subobject SC, write xCS when x factors (necessarily uniquely) through S. The following rules let one reason about subobjects element-wise, and will reappear in Part II as the degenerate, “global” fragment of Kripke–Joyal semantics:

  1. xC always;

  2. ST iff for every stage X and every x:XC, xCS implies xCT;

  3. xCST iff xCS and xCT;

  4. for the diagonal Δ=[idC,idC]Sub(C×C): x,yΔ iff x=y;

  5. for an equalizer E(f,g)A of f,g:AB: xAE(f,g) iff fx=gx;

  6. for a pullback: xAf*S iff fxBS.

2.4 Adjoints Between Subobject Posets

A monotone map between posets is a functor; adjoint functors between posets are Galois connections: LR means L(x)yxR(y). All logical structure in Part I lives in this poset-level world. For f:AB in a category with pullbacks, one asks whether the pullback functor f*:Sub(B)Sub(A) has adjoints: ff*f. When they exist, the left adjoint f interprets existential quantification along f and the right adjoint f universal quantification. The adjunction laws fUVUf*V,f*VUVfU are precisely the two-way inference rules for the quantifiers, a point we take up in Section 7.

3. Algebraic Theories and Functorial Semantics

Algebraic theories describe structures determined by everywhere-defined operations and equational axioms: groups, rings, modules, lattices. The scope of the notion is wider than it first appears—many concepts without an obviously equational flavor admit algebraic formulations—while some familiar ones are genuinely excluded: fields (because 01 is undefined) and categories (because composition is only partially defined) are not algebraic.6

3.1 Signatures, Terms, and Theories

Definition 3.1. A signature Σ for an algebraic theory is a family of sets {Σk}k; elements of Σk are the k-ary operation symbols, and elements of Σ0 are constants. Terms are generated inductively: variables are terms, and if t1,,tk are terms and fΣk then f(t1,,tk) is a term. An algebraic theory (or equational theory) 𝕋=(Σ𝕋,A𝕋) consists of a signature together with a set of axioms, each an equation between terms.

Example 3.2 (Groups). The naive axioms for a group involve nested quantifiers (e.x.y.), but since units and inverses are unique one may instead add them to the signature: a constant e, a unary operation ()1, and a binary operation , subject to the purely equational axioms x(yz)=(xy)z,xe=x=ex,xx1=e=x1x. This is the standard way to put such a theory into algebraic form.

Example 3.3 (Further examples). Commutative unital rings form an algebraic theory (constants 0,1; unary ; binary +,; the usual twelve equations). For a fixed ring R, left R-modules form an algebraic theory with a unary operation of scalar multiplication for each aR—signatures may be infinite. The empty theory is the theory of a bare set; one constant and no equations gives pointed sets. Inductive datatypes in programming languages, such as binary trees with integer leaves, are algebraic theories with no equations, of which the datatype denotes the free model. By contrast, the theory of posets, axiomatized with a binary relation symbol , is not presented equationally—though the theory of -semilattices is, and it captures posets-with-meets by defining xyxy=x.7

3.2 Models in Any Category with Finite Products

The set-based notion of a group—a set G with functions e:1G, m:G×GG, i:GG satisfying equations between composites—transcribes verbatim into any category 𝒞 with finite products: the equations become commutative diagrams, e.g. associativity becomes G×G×Gm×idG×Gid×mmG×GmG This yields the category 𝐆𝐫𝐩(𝒞) of groups in 𝒞: topological groups when 𝒞=𝐓𝐨𝐩, Lie groups when 𝒞 is a category of manifolds, and so on.

In general, an interpretation I of a theory 𝕋 in a finite-product category 𝒞 assigns to the (single) sort an object I and to each fΣk a morphism fI:IkI. A term t is always interpreted in a context x1,,xnt listing (at least) its variables, as a morphism tI:InI: variables become product projections, and f(t1,,tk) becomes fIt1I,,tkI. The interpretation satisfies an equation u=v in context when uI=vI as morphisms InI, and it is a model when it satisfies all axioms. A homomorphism of models is a morphism of 𝒞 commuting with the interpretations of all basic operations. This defines the category Mod(𝕋,𝒞).

Example 3.4 (Variable models). A group in a functor category 𝐒𝐞𝐭𝒞 is the same thing as a functor 𝒞𝐆𝐫𝐩: products in 𝐒𝐞𝐭𝒞 are computed pointwise, so evaluation at each C𝒞 preserves them, and a group structure on a functor is exactly a pointwise group structure varying naturally. More generally Mod(𝕋,𝐒𝐞𝐭𝒞)Mod(𝕋,𝐒𝐞𝐭)𝒞, so a model in variable sets is a variable model.8

3.3 The Syntactic Category

A theory presented by operations and equations is like an algebra presented by generators and relations: useful, but presentation-bound. Group theory can equally be presented by a single binary “double division” operation and one exotic axiom; the concept presented is the same. The remedy is to package the theory itself as a category, remembering all derived operations and all provable equations while forgetting which were basic.9

Construction 3.5 (Syntactic category). Given an algebraic theory 𝕋, the syntactic category 𝒞𝕋 has:

  • objects: contexts [x1,,xn], i.e. finite lists of distinct variables, up to renaming;

  • morphisms [x1,,xm][x1,,xn]: n-tuples (t1,,tn) of terms in context x1,,xm, identified when 𝕋 proves them componentwise equal;

  • composition: simultaneous substitution, (si)(tj)=(si[t/x]); identities are tuples of variables.

The equational calculus guarantees these operations are well defined on provable-equality classes. 𝒞𝕋 has finite products: [x1,,xn]×[x1,,xm]=[x1,,xn+m], with terminal object the empty context [].

One may think of 𝒞𝕋 as the Lindenbaum–Tarski category of 𝕋: the syntax-invariant algebraic gadget presented by the theory. It carries a tautological model U: the underlying object is the singleton context [x1], and each fΣk is interpreted as the morphism [x1,,xkf(x1,,xk)]. Satisfaction in U is provability: Us=t𝕋s=t.

3.4 Models Are Functors; the Classifying Category

Theorem 3.6 (Functorial semantics). For any algebraic theory 𝕋 and any finite-product category 𝒞, evaluation at U gives an equivalence of categories, natural in 𝒞: HomFP(𝒞𝕋,𝒞)Mod(𝕋,𝒞), between finite-product-preserving functors 𝒞𝕋𝒞 (with natural transformations as morphisms) and models of 𝕋 in 𝒞 (with homomorphisms).10

A finite-product category equipped with a model U satisfying this universal property is called a classifying category for 𝕋; it is unique up to equivalence, and the theorem says the syntactic category is one. Two consequences follow.

First, the correspondence gives a principled answer to “what is a theory?”: the category 𝒞𝕋 with its universal property, not any particular presentation. Second, the universal model U is logically generic by (1): it satisfies all and only the provable equations. Classical, 𝐒𝐞𝐭-valued semantics almost never provides such a single generic model; allowing models in arbitrary finite-product categories does.

3.5 Completeness

Theorem 3.7 (Strong completeness for equational logic). Let 𝕋 be an algebraic theory and s=t an equation.

  1. 𝕋s=t iff every model of 𝕋 in every finite-product category satisfies s=t.

  2. There is a single model—the universal U in 𝒞𝕋—whose satisfaction relation coincides with provability.

Completeness with respect to restricted classes of models then follows from embedding theorems, in a pattern that will repeat for the richer fragments:

Proposition 3.8. The Yoneda embedding y:𝒞𝕋𝒞𝕋̂=𝐒𝐞𝐭𝒞𝕋op preserves finite products and is faithful, so y(U) is again a generic model, now in a presheaf category. Since the evaluation functors 𝒞𝕋̂𝐒𝐞𝐭 are jointly faithful and preserve finite products, equational logic is complete with respect to ordinary 𝐒𝐞𝐭-valued models as well.11

Example 3.9 (The universal group). For 𝕋 the theory of groups, the generic presheaf model y[x1]=𝒞𝕋(,[x1]) assigns to the context [x1,,xn] the set of terms in n variables modulo the equations of group theory—that is, the free group on n generators. The universal group is thus “the free group on n generators, with n a parameter,” with group structure given stagewise by the free-group operations.12

3.6 The Four-Part Scheme, Reorganized

Awodey and Bauer summarize the reorganization that functorial semantics effects on the traditional picture of logic.13 Traditionally a logical system comprises: a type theory (calculus of types and terms); a logic (here, equational reasoning); a notion of theory (basic types, terms, axioms); and interpretations and models (denotational assignment of objects and morphisms, with satisfaction of axioms). Functorial semantics repackages all four: theories are structured categories; models are structure-preserving functors; homomorphisms are natural transformations—obtained “for free” from the functorial setting; and universal models exist, are logically generic, and reduce completeness to embedding theorems for classifying categories. This scheme is not special to algebraic theories: it is the template applied to each fragment in the sections that follow, and to higher-order logic in Part II.

4. Lawvere Duality and Abstract Algebraic Theories

4.1 Syntax Is Dual to Semantics

There is a remarkable duality, going back to Lawvere’s thesis, of the schematic form 𝐒𝐲𝐧𝐭𝐚𝐱𝐒𝐞𝐦𝐚𝐧𝐭𝐢𝐜𝐬op, which is nearly invisible without categorical tools.14 Concretely:

Theorem 4.1 (Logical duality for algebraic theories). For any algebraic theory 𝕋, let Modfg(𝕋)Mod(𝕋)=Mod(𝕋,𝐒𝐞𝐭) be the full subcategory of finitely generated free models. Then there is an equivalence 𝒞𝕋Modfg(𝕋)op.

The proof identifies the universal model inside Modfg(𝕋)op as U=F(1), the free model on one generator, with Un=F(n) (since free functors send coproducts of generating sets to coproducts of models, which become products in the opposite category). An n-ary term t corresponds to the element t(x1,,xn)F(n), hence—by freeness—to a homomorphism F(1)F(n), which read in the opposite category is a morphism UnU: exactly the interpretation of t. Provable equality of terms is equality of elements in the free model, so the syntactic category is faithfully reconstructed. An invariant copy of the syntax of 𝕋 sits inside the opposite of its category of models, as the finitely generated free algebras.

Example 4.2 (The empty theory and finite sets). For the empty theory 𝕋0 (pure equality on one sort), every model is free and the finitely generated ones are the finite sets, so 𝒞𝕋0𝐒𝐞𝐭finop: the opposite of finite sets is the free finite-product category on one object.

Example 4.3 (Abelian groups). For 𝕋 the theory of abelian groups, 𝒞𝕋𝐀𝐛fgfreeop: contexts [x1,,xn] become the groups n, the group operation U2U becomes the homomorphism 2, 1(1,1), and the laws of abelian groups hold because every abelian group’s structure is induced by precomposition with these co-operations.

Example 4.4 (Affine schemes). Algebraic geometry runs on the same duality: affine schemes are defined as the opposite of commutative rings, 𝐒𝐜𝐡𝐞𝐦𝐞aff=𝐑𝐢𝐧𝐠op, and the finitely generated free algebra [x] becomes a ring object in affine schemes—the affine line—whose co-operations [x][x,y], xx+y and xxy, induce addition and multiplication of functions.

4.2 Lawvere Algebraic Theories

Nothing in the duality depended on a syntactic presentation, which motivates the presentation-free notion:

Definition 4.5 (Lawvere theory). A Lawvere algebraic theory is a small category 𝐀 with finite products whose objects form a sequence A0,A1,A2, with Am×An=Am+n; thus every object is a finite power of the generating object A=A1. A model in a finite-product category 𝒞 is an FP-functor 𝐀𝒞; homomorphisms are natural transformations.

Every Lawvere theory determines a syntactic theory whose k-ary operations are all morphisms AkA, with an equation for every commuting diagram; and every syntactic theory determines a Lawvere theory, its syntactic category. The abstract notion covers examples where the operations come from mathematics rather than from a signature:15

Example 4.6 (C-rings). Let C be the category whose objects are the Euclidean spaces n and whose morphisms are all smooth maps. This is a Lawvere theory (generated by ), and a model C𝐒𝐞𝐭 is a set A equipped with an n-ary operation Af for every smooth f:n, compatibly with composition. Since + and are smooth, A is in particular a commutative ring; the extra structure makes it a C-ring. These are the building blocks of synthetic differential geometry and of the smooth toposes mentioned in Part II.

Example 4.7 (Computability as a theory). The category 𝐑𝐞𝐜 with objects k and morphisms the total recursive functions is a Lawvere theory; its models in a category 𝒞 give a notion of computability internal to 𝒞.

Example 4.8 (The total theory of an object). Any object A in a finite-product category 𝒞 spans a Lawvere theory: the full subcategory on 1,A,A2,. Models of this “total theory of A” are the avatars of A in other categories.

4.3 Algebraic Categories and Monadicity

Which categories are categories of models of an algebraic theory? The classical answer within a fixed signature is Birkhoff’s HSP theorem (closure under homomorphic images, subalgebras, products). The presentation-free answer characterizes the forgetful functor:

Theorem 4.9. For a category 𝐀 with a functor U:𝐀𝐒𝐞𝐭, the following are equivalent:16

  1. 𝐀 is a Lawvere algebraic category, i.e. equivalent to HomFP(𝐀,𝐒𝐞𝐭) for a Lawvere theory 𝐀, with U the evaluation at the generator;

  2. U has a left adjoint, preserves filtered colimits, and creates U-absolute coequalizers;

  3. 𝐀 is monadic over 𝐒𝐞𝐭 for a finitary monad.

The free model functor F:𝐒𝐞𝐭Mod(𝐀) is constructed on finite sets as F(n)=Hom𝐀(An,)—the representables are exactly the finitely generated free models, recovering Theorem 4.1 in the abstract setting—and extended to all sets by filtered colimits.

Example 4.10 (Fields are not algebraic). Every algebraic category has a terminal object (the constant functor Δ1 is a model). But 𝐅𝐢𝐞𝐥𝐝 has no terminal object: a terminal field T would admit homomorphisms from both /2 and /3, forcing 1+1=0 and 1+1+1=0 in T, hence 1=0, a contradiction. So no reformulation of the field axioms—however ingenious—can be purely equational.17 The field axiom x0y.xy=1 needs a richer fragment of logic.

4.4 Algebraic Functors: Translations and their Semantics

A syntactic translation of theories is an FP-functor T:𝐀𝐁; it induces a functor on semantics in the opposite direction by precomposition, T*(M)=MT:Mod(𝐁)Mod(𝐀). Forgetful functors arise this way: the underlying-group functor 𝐑𝐢𝐧𝐠𝐆𝐫𝐩 is T* for the translation classifying the underlying group of the universal ring. Conversely, a functor f:Mod(𝐁)Mod(𝐀) commuting with the forgetful functors is T* for an essentially unique generator-preserving translation T; and dropping generator-preservation, the semantic characterization of “definable” functors is: those preserving limits, filtered colimits, and regular epimorphisms (with theories taken Cauchy-complete). Every such T* has a left adjoint T!, generalizing free constructions such as the free ring on a group.18

5. Interlude: Proofs as Morphisms and the λ-Calculus

Before climbing the first-order hierarchy, we pause for the proof-theoretic strand promised in the introduction: the Curry–Howard–Lambek correspondence, in which morphisms interpret proofs rather than provable containments.19

5.1 Cartesian Closed Categories

Definition 5.1. A category 𝒞 is cartesian closed (a CCC) when it has finite products and, for every pair of objects A,B, an exponential: an object BA with evaluation ev:BA×AB such that every f:C×AB has a unique currying λf:CBA with ev(λf×idA)=f. Equivalently: ()×A()A for every A.

Example 5.2. 𝐒𝐞𝐭 is cartesian closed (BA the function set). Every presheaf category is cartesian closed (§16); so are 𝐂𝐚𝐭 (functor categories as exponentials), 𝐏𝐨𝐬, and the category of directed graphs. 𝐓𝐨𝐩 is not (no exponential YX exists for all X), which is one standard motivation for “convenient categories” of spaces. Every elementary topos is cartesian closed by definition.

Two consequences of the adjunction deserve note. First, exponentials are automatically functorial, contravariantly in the exponent and covariantly in the base, and satisfy the expected isomorphisms CA×B(CB)A and (B×C)ABA×CA, all by Yoneda-style uniqueness arguments. Second, in a CCC the name of a morphism f:AB is the point f=λ(fπ2):1BA: morphisms are internalized as elements of function objects.

5.2 Simply Typed λ-Calculus

The simply typed λ-calculus over a set of base types has types generated by 1,A×B,AB; terms generated by typed variables, pairing and projections, application st, the unit *, and abstraction λxA.t; and equations (λx.t)s=t[s/x](β),λx.(tx)=t(xt)(η), plus the analogous laws for products. It is simultaneously a pure functional programming language and, by Curry–Howard, a proof calculus for minimal propositional logic: types are propositions ( is implication, × conjunction, 1 truth), terms are proofs, and β-reduction is proof normalization (cut elimination).

Theorem 5.3 (Lambek). The simply typed λ-calculus is an internal language for cartesian closed categories. Precisely: every typed λ-theory 𝕋 (a set of base types, constants, and equations) presents a CCC 𝒞𝕋 whose objects are the types and whose morphisms AB are the terms x:At:B modulo provable βη-equality; and this construction is one half of an equivalence between λ-theories (with translations) and CCCs (with CC functors). Under the equivalence, categorical semantics of the calculus in a CCC 𝒞 is the same as a CC functor 𝒞𝕋𝒞.

This is the functorial-semantics template of §3 transposed to the proof-theoretic setting, with one important difference of grain: in Part I’s model-theoretic reading, a hom-poset records provability; here a hom-set records the proofs themselves, and equality of morphisms is the meaningful, decidable-by-normalization relation of βη-convertibility. The doctrinal tower of Part I has a parallel proof-relevant tower: monoidal categories interpret linear/ordered calculi, CCCs interpret the simply typed λ-calculus, locally cartesian closed categories interpret dependent type theory, and elementary toposes interpret full intuitionistic HOL.

5.3 Multicategories: Separating the Structural Rules

A sequent A1,,AnB has a list on the left. Interpreting the list as a product A1××An works, but silently imports the structural rules—weakening, contraction, exchange—as properties of the diagonal and projections. Shulman’s systematic development therefore interposes multicategories: structures whose morphisms (A1,,An)B have finite lists as domains, with multi-composition but no assumption that the domain list is a product. Type theories present multicategories; requiring representability of the domain list by an object (via or ×) then recovers monoidal or cartesian categories, and the choice of admissible structural rules—none, exchange only, all—selects the flavor of logic (linear, affine, ordered, intuitionistic).20

5.4 Functional Completeness

A final CCC fact with logical meaning: for any object A of a CCC 𝒞, the slice-like category obtained by freely adjoining a point x:1A (the polynomial category 𝒞[x]) is again a CCC, and morphisms BC in 𝒞[x] correspond to morphisms A×BC in 𝒞. This is functional completeness: a term with a free variable of type A is the same as a morphism from a product with A—the categorical justification for the deduction theorem, and the reason λ-abstraction is total.

6. First-Order Logic, Categorically

We now pass from equational logic to predicate logic, with connectives ,,,¬ and quantifiers ,. The strategy is fixed by the template of Section 3: identify the categorical structure that models each logical operation (adjoints will do most of the work), study categories with that structure and functors preserving it, construct classifying categories, and derive completeness from embeddings.21

6.1 Why Equations Are Not Enough

Consider the property of a group of having no nontrivial square roots of unity: x:G.(xx=ex=e). This is not equivalent to any system of equations. Yet its set-theoretic meaning suggests a categorical one: each of xx=e and x=e carves out a subset of G—an equalizer, hence available in any category with finite limits—and the implication asserts that the first subobject is contained in the second. Thus (2) can be interpreted in any finite-limit category as the requirement that one equalizer factor through another. The general scheme: formulas are interpreted as subobjects, and sequents φψ as containments [[φ]][[ψ]] in a subobject poset.22

6.2 The Shape of a First-Order Theory

A first-order theory 𝕋 has two layers. The type-theoretic layer supplies sorts, function symbols with signatures f:(A1,,An;B), typing judgments Γt:B for Γ=(x1:A1,,xn:An) a typing context, and equations between terms. The logical layer supplies relation symbols R with signatures (A1,,An), formula judgments Γφ𝗉𝗋𝖾𝖽, and axioms in the form of sequents in context Γφψ, read: in context Γ, hypothesis φ entails ψ. (With available, finite lists of hypotheses reduce to a single one.) A fragment is fixed by choosing which logical operations may appear; the fragments of interest were tabulated in the introduction. Languages and theories are best not separated too strictly: in rich systems, well-formedness of terms can depend on provability—as when 0f denotes a real number only if f is integrable—so types and logic may be defined by mutual recursion.23

6.3 Interpretation: The General Pattern

Fix a fragment and a category 𝒞 with the corresponding structure. An interpretation assigns: to each sort A an object [[A]]; to each context Γ=(x1:A1,,xn:An) the product [[Γ]]=[[A1]]××[[An]]; to each function symbol a morphism; to each relation symbol R of signature (A1,,An) a subobject [[R]][[A1]]××[[An]]; and then, by structural recursion:

  • terms Γt:B become morphisms [[t]]:[[Γ]][[B]] (variables are projections; application is composition);

  • formulas Γφ become subobjects [[Γφ]]Sub([[Γ]]), using the categorical operation matching each connective;

  • substitution into a term is composition; substitution of a term into a formula is pullback: [[Γφ[t/y]]]=[[t]]*[[y:Bφ]].

A model of 𝕋 is an interpretation validating every axiom Γφψ in the sense that [[Γφ]][[Γψ]] in Sub([[Γ]]).

6.4 Cartesian Logic

Cartesian logic is the fragment with =,, only, interpreted in cartesian categories: categories with all finite limits. Its deductive calculus consists of the structural rules (weakening, substitution, identity, cut), the truth rule ψ, the two-way conjunction rules, and the equality rules (reflexivity, and substitution of provably equal terms). The interpretation clauses: is the top subobject; R(t1,,tn) is the pullback of [[R]] along [[t1]],,[[tn]]; t=Au is the equalizer of [[t]],[[u]]; conjunction is meet; weakening a formula from Γ to Γ,x:A is pullback along the projection.

Theorem 6.1 (Soundness of cartesian logic). If 𝕋(Γψφ) in the cartesian calculus, then every model of 𝕋 in every cartesian category satisfies it.

The proof is induction on derivations; the only interesting cases are substitution—sound because pullback functors are monotone—and the equality rule, where the key computation shows [[t=Au]][[φ[t/z]]][[φ[u/z]]] using the fact that the equalizer of [[t]],[[u]] equalizes the graphs id,[[t]],id,[[u]] as well.24

6.5 The Cartesian Calculus, Displayed

For reference, the full deductive calculus of the fragment, as a table of rules on sequents-in-context (context annotations suppressed when unchanged):25 𝖶𝖾𝖺𝗄𝖾𝗇𝗂𝗇𝗀ΓψφΓ,x:Aψφ𝖲𝗎𝖻𝗌𝗍𝗂𝗍𝗎𝗍𝗂𝗈𝗇Γt:AΓ,x:AψφΓψ[t/x]φ[t/x]𝖨𝖽𝖾𝗇𝗍𝗂𝗍𝗒, 𝖢𝗎𝗍φφψθθφψφ𝖳𝗋𝗎𝗍𝗁ψ𝖢𝗈𝗇𝗃𝗎𝗇𝖼𝗍𝗂𝗈𝗇ϑφϑψϑφψϑφψϑφϑφψϑψ𝖤𝗊𝗎𝖺𝗅𝗂𝗍𝗒ψt=Atψt=Auψφ[t/z]ψφ[u/z] Symmetry and transitivity of equality are derivable from the last rule (substitute into z=At and z=Av respectively). Each subsequent fragment adds its rules on top: regular logic adds the two-way -rule and Frobenius (§8); coherent logic the -elimination and two-way -rules with distributivity; Heyting logic the two-way rules for and . In every case the “two-way” shape of a rule is the syntactic trace of an adjunction, per Section 7.

Example 6.2 (Posets, internally). The theory of posets—one sort P, one relation of signature (P,P), axioms of reflexivity, transitivity, antisymmetry—is cartesian. A poset in a cartesian category 𝒞 is thus an object P with a subobject r:RP×P validating the three sequents; e.g. reflexivity holds iff the diagonal Δ:PP×P factors through r. Since finite limits in 𝐒𝐞𝐭𝒞 are pointwise, a poset in 𝐒𝐞𝐭𝒞 is precisely a functor 𝒞𝐏𝐨𝐬: variable posets are posets in variable sets.26

Example 6.3 (Internal categories, and a limitation). A category internal to a cartesian category 𝒞 consists of objects C0,C1, morphisms dom,cod:C1C0, id:C0C1, and a composition c:C2C1 defined on the pullback C2=C1×C0C1 of composable pairs, subject to unit and associativity equations (the latter stated on the triple-composable object C3). Internal categories in 𝐒𝐞𝐭 are small categories; in 𝐒𝐞𝐭𝒞, functors 𝒞𝐂𝐚𝐭. But note a mismatch: this definition uses pullbacks directly, and cannot be transcribed as a multi-sorted cartesian theory as defined so far, because the signature of c would need the subtype C2C1×C1 of composable pairs, and simple sorts provide no such thing. One remedy is a subtype former {x:Aφ}; the systematic remedy is dependent type theory, where the sort of morphisms may depend on a pair of objects.27

6.6 Separating the Fragments

That the hierarchy is strict is witnessed by theories expressible at one level and provably not below:

Example 6.4 (Cartesian, not algebraic). Posets (Example 6.2): the relation symbol has no equational surrogate—Example 3.3 showed that any equational axiomatization would make the category of posets algebraic, but monotone maps do not commute with any candidate operations; more decisively, the category of posets and monotone maps fails the exactness properties of algebraic categories (Theorem 4.9): its forgetful functor to 𝐒𝐞𝐭 does not create the required coequalizers, as quotienting a poset by a congruence can collapse order non-freely.

Example 6.5 (Regular, not cartesian). “Every element has some inverse” for a monoid, xy.(xy=eyx=e): its models among monoids are the groups, but group homomorphisms = monoid homomorphisms between groups, and the resulting full subcategory is not closed in monoids under the constructions preserved by cartesian interpretations—concretely, a filtered colimit of monoids each of which is a group is a group, fine, but a submonoid of a group need not be a group, whereas cartesian (finite-limit) theories always have model classes closed under arbitrary submodels. Failure of closure under submodels convicts of essential use.

Example 6.6 (Coherent, not regular). The theory of fields with the geometric axiom x(x=0y.xy=1): regular theories have model classes closed under products of models (finite limits and images pass through products), but a product of two fields is never a field ((1,0) is neither 0 nor invertible)—so disjunction is essential.

Example 6.7 (First-order, not coherent). Torsion-free abelian groups: nx=0xx=0 for all n, a family of Horn sequents, is in fact cartesian; but divisible torsion-free groups pattern with sentences whose model classes fail the preservation theorems (directed-colimit and homomorphism-preservation) enjoyed by coherent theories. The model-theoretic preservation theorems thus calibrate the hierarchy exactly: each fragment corresponds to a closure property of its classes of models, a correspondence made precise by the definability theorems of categorical model theory (Makkai–Reyes; cf. [16] and [23], Part D).

7. Quantifiers as Adjoints

7.1 The Fundamental Adjunctions

Let f:AB in a category with pullbacks. Lawvere’s second great observation is that quantification along f is adjoint to substitution along f: ff*ffUVUf*Vf*VUVfU For the projection π:[[Γ]]×[[A]][[Γ]], these adjunctions are exactly the natural-deduction rules for the quantifiers. The left adjunction, unwound, says: x.φ entails ψ (no x free in ψ) iff φ entails ψ; the right one similarly for . The eigenvariable side condition of traditional proof theory is absorbed into the statement that one is transposing across an adjunction.

Example 7.1 (In sets). For f:AB and UA: fU={baU.f(a)=b}=f[U],fU={ba.f(a)=baU}. Direct image and its dual.

7.2 Beck–Chevalley and Frobenius

Two coherence conditions make the adjoints fit the logic.

Beck–Chevalley. Substitution must commute with quantification: syntactically, (y.φ)[t/x]=y.(φ[t/x]) for y not in t. Categorically: for every pullback square AgAffBgB one requires g*f=fg* (and dually for ). This is the stability, under pullback, of the quantifiers.

Frobenius. The law x.(φψ)(x.φ)ψ (no x in ψ) corresponds to f(Uf*V)=fUV. In the presence of implication (right adjoints to ), Frobenius is automatic; in its absence it must be imposed.28

To summarize: interpreting a quantifier means having an adjoint to substitution, stable under pullback. The next two sections identify the categories in which the -adjoint exists for the right class of maps.

8. Regular Categories and Regular Logic

Regular logic is the fragment =,,,. It is the logic of images: the existential quantifier applied to a graph.

Definition 8.1 (Regular category). A category 𝒞 is regular if

  1. 𝒞 has finite limits;

  2. every kernel pair (the pullback of a morphism against itself) has a coequalizer;

  3. regular epimorphisms (coequalizers of some parallel pair) are stable under pullback.

Equivalently (and more transparently for logic): 𝒞 has finite limits and pullback-stable image factorizations, i.e. every f factors as a regular epi followed by a mono, f=me, and such factorizations are preserved by pullback.29

The mono part m:im(f)B of the factorization of f:AB is the least subobject of B through which f factors: the image. Existential quantification along f is then f(UA)=im(UAB), and one checks: ff* always; Beck–Chevalley holds because images are stable under pullback; Frobenius holds likewise. Thus a regular category interprets all of regular logic, soundly.

Example 8.2 (Regular categories are plentiful). 𝐒𝐞𝐭 is regular (images are set-theoretic images; regular epis are surjections, stable under pullback). Every presheaf category is regular (everything is computed pointwise). Every category of models of an algebraic theory—groups, rings, R-modules—is regular, as is every abelian category. Every topos is regular (Part II). By contrast 𝐓𝐨𝐩 and 𝐂𝐚𝐭 are not regular: in 𝐓𝐨𝐩, regular epis (quotient maps) are not stable under pullback; in 𝐂𝐚𝐭, not every kernel pair even coequalizes well.30

Example 8.3 (Projective planes: regular logic in action). Statements of the form “every two distinct points lie on some line”—universally quantified implications between regular formulas, i.e. regular sequents φxy.ψ —axiomatize a great deal of mathematics: divisibility in ordered groups, transitivity of actions, surjectivity of maps, existence of factorizations. Regular logic is precisely the fragment preserved and reflected in the calculus of relations: in a regular category, relations RA×B compose via pullback-then-image, and the associativity of this composition is equivalent to regularity.

8.1 The Calculus of Relations

Regular categories are exactly the environment for a well-behaved algebra of relations, and this gives an alternative, quantifier-free face to regular logic.31

A relation R:AB is a subobject r0,r1:RA×B. Given also S:BC, form the pullback of r1 against s0 to obtain the object of “composable pairs” R×BS, map it to A×C, and take the image: SR=im(R×BSA×C). In 𝐒𝐞𝐭 this is the familiar {(a,c)b.R(a,b)S(b,c)}: relational composition is an image, i.e. an existential quantifier, which is why regularity (stable images) is exactly what makes composition associative. One obtains a locally ordered 2-category (indeed an allegory in Freyd’s sense) Rel(𝒞) with: identities the diagonals; an order on parallel relations from Sub(A×B); an involution R by swapping components; and meets inherited from subobjects. Morphisms of 𝒞 embed as the relations whose graphs are single-valued and total: fid,f, and one recovers 𝒞 inside Rel(𝒞) as the relations R with RRid and idRR.

Proposition 8.4 (Modular law). In Rel(𝒞) for 𝒞 regular, all R,S,T of composable shape satisfy SRTS(RST).

The modular law is the relational avatar of Frobenius reciprocity, and in fact regular categories, unitary tabular allegories, and regular theories-as-syntax are three equivalent presentations of one subject: one can define a regular category as a category whose relations form an allegory with enough structure, and regular logic as the equational theory of that allegory. Statements provable in regular logic are exactly those stable under the relational translation—a quantifier-elimination phenomenon that partly explains the fragment’s tractability for automation (§9).

Example 8.5 (Groups: images do the work). In 𝐆𝐫𝐩, the image factorization of a homomorphism f:GH is the usual Gf[G]H, and stability under pullback along any KH is elementary. The regular sequent xy.x=yy (“every element is a square”) is satisfied by an internal group G in any regular category iff the squaring map’s image is all of G; Beck–Chevalley guarantees this reading is stable under change of parameters, e.g. under restriction along any map of parameter objects when G varies in a presheaf category (Example 3.4).

8.2 Regular Theories and their Classifying Categories

The functorial-semantics template runs as before. A regular theory is a set of regular sequents; a model in a regular category 𝒞 is an interpretation validating them; homomorphisms are as expected. The syntactic regular category 𝒞𝕋 has as objects the formulas-in-context [xφ] of the fragment, and as morphisms [xφ][yψ] the 𝕋-provably-functional relations: regular formulas θ(x,y) such that 𝕋 proves θ entails φψ, that θ is single-valued, and that φ entails y.θ. Then:

  • 𝒞𝕋 is a regular category;

  • there is a universal model U𝕋 in 𝒞𝕋, and for every regular 𝒞, evaluation at U𝕋 gives an equivalence Homreg(𝒞𝕋,𝒞)Mod(𝕋,𝒞) with regular (finite-limit- and regular-epi-preserving) functors on the left;

  • satisfaction in U𝕋 coincides with provability, so the calculus of regular logic is strongly complete for categorical semantics.32

Classical completeness—with respect to 𝐒𝐞𝐭-models—then follows from an embedding theorem: every small regular category admits a conservative regular embedding into a presheaf category (via a regular-logic refinement of Yoneda), and evaluations are jointly faithful. Deeper representation theorems (the Barr embedding, and Deligne’s theorem in Part II) refine this pattern.

8.3 Soundness for the Regular Fragment, in Detail

To display the mechanics once at full magnification, here is the soundness argument for the two quantifier rules in a regular category 𝒞, extending Theorem 6.1.33

Rule (-intro/elim as adjunction). The bidirectional rule Γ,y:BφψΓ(y.φ)ψ(y not free in ψ) is validated because, writing π:[[Γ]]×[[B]][[Γ]], [[y.φ]]=π[[φ]][[ψ]][[φ]]π*[[ψ]], and π*[[ψ]] is exactly the interpretation of ψ weakened into the extended context: the adjunction is the rule.

Frobenius, used tacitly. The entailment (y.φ)χy.(φχ) (no y in χ) requires π([[φ]])[[χ]]π([[φ]]π*[[χ]]), i.e. the Frobenius law. In a regular category, verify it on images: with [[φ]]=[m] and image factorizations as in Definition 8.1, both sides compute the image of the same composite, using stability of the factorization along the mono [[χ]][[Γ]].

Substitution stability. Finally the substitution rule needs Beck–Chevalley: for a term t, the square [[Γ]]×[[B]]id,[[t]]×id[[Γ]]×[[A]]×[[B]]ππid,[[t]][[Γ]]×[[A]] is a pullback, so id,[[t]]*π=π(id,[[t]]×id)*: substituting into an existential equals existentially quantifying the substitution. All three verifications are one-line diagram chases given the standing stability hypotheses: the definition of regular category is reverse-engineered from exactly these proof obligations.

8.4 The Calculus of Relations, Revisited

Regular categories are exactly the environments supporting a well-behaved algebra of binary relations, a point worth making explicit both because it explains the axioms and because it opens the door to relational and allegorical formulations of logic.34

A relation R:AB is a subobject RA×B. In a regular category, relations compose: given S:BC, form the pullback of RBS, obtaining an object of “matching pairs” mapping to A×C, and let SR be its image: SR=im(R×BSA×C). Existential quantification (the image) is exactly what the composite b.R(a,b)S(b,c) requires.

Proposition 8.6. In a regular category, composition of relations is associative, with the diagonals ΔA as identities; the resulting locally ordered category Rel(𝒞) has an involution RR (transposition) and meets in each hom-poset. Moreover associativity of relational composition fails in a merely finitely complete category with images that are not pullback-stable: stability is used exactly where a quantifier must be pulled through a substitution (Beck–Chevalley).

Morphisms embed into relations via graphs, fid,f, and are characterized inside Rel(𝒞) as the maps: relations F with FFΔ (totality) and FFΔ (single-valuedness). This is the semantic counterpart of the provably-functional-relations device used to build the syntactic regular category in §8: there, syntax manufactured maps from functional relations; here, semantics recognizes them.

Example 8.7 (Equivalence relations and exactness). An internal equivalence relation on A is R:AA with ΔR, R=R, RRR. Every kernel pair is one; a regular category is exact (Barr-exact) when, conversely, every equivalence relation is a kernel pair—i.e. every congruence has a quotient. 𝐒𝐞𝐭, every variety of algebras, and every topos are exact; the category of torsion-free abelian groups is regular but not exact (the congruence “differ by an element of 2” considered inside torsion-free groups has no quotient there). Exactness is invisible to the regular-logic fragment—it is a completeness property of the semantics, not an axiom of the syntax—which is why it appears in embedding theorems rather than in the deductive calculus.

9. Coherent Logic

Coherent logic extends regular logic by finite disjunction: =,,,,,. The corresponding categories:

Definition 9.1 (Coherent category). A regular category 𝒞 is coherent (older literature: a logos) if each Sub(A) has finite joins ,, and these are stable under pullback: f*(UV)=f*Uf*V and f*=.35

In a coherent category the interpretation extends by [[]]=, [[φψ]]=[[φ]][[ψ]], and distributivity of over —which follows from stability—keeps the calculus sound. Coherent sequents φxψ between coherent formulas axiomatize coherent theories.

Example 9.2 (Expressive power). Many central mathematical theories are coherent: nontrivial rings (1=0), local rings (xinv(x)inv(1x)), integral domains, fields in the “geometric” axiomatization (x=0y.xy=1), linear orders, dense orders without endpoints, and any algebraic theory whatsoever. Adding infinitary disjunctions iI (with contexts still finite) yields geometric logic, the logic whose formulas are preserved by the inverse-image parts of geometric morphisms between toposes; torsion abelian groups (xn1nx=0) and fields of finite characteristic are geometric but not coherent.

Remark 9.3 (Why “coherent”?). The name descends from algebraic geometry: the coherent objects of a coherent topos generalize coherent sheaves, and a Grothendieck topos is coherent iff it classifies a coherent theory. Reyes’s model-theoretic reading of Grothendieck topoi [16] was an early systematic development of this connection, and Makkai–Reyes proved the corresponding conceptual completeness theorems.

9.1 Metatheory: Undecidability and Automation

Coherent sequents have a distinctive proof theory: reading φy.(ψ1ψk) as a forward-chaining rule (“from facts matching φ, produce witnesses and case-split”), proof search becomes a breadth-first closure procedure requiring no clausification or Skolemization, and yielding proofs that are directly readable and directly formalizable. This makes the fragment well suited to automated reasoning—expressive, yet with transparent proofs:

  • Bezem proved that provability in coherent logic is undecidable [17], so the fragment is no toy;

  • Bezem & Coquand initiated its automation [18];

  • Stojanović et al. built a coherent-logic geometry theorem prover producing formal and human-readable proofs [19] and designed a vernacular for coherent proofs [20];

  • Avigad et al. gave a formal system for Euclid’s Elements whose inferences are essentially coherent [21];

  • Ganesalingam & Gowers’s problem solver with human-style write-ups works in a closely related forward-reasoning regime [22].

10. Heyting Categories and Full First-Order Logic

10.1 Implication and Universal Quantification

To interpret ,¬, we need right adjoints.

Definition 10.1 (Heyting category). A coherent category 𝒞 is a Heyting category if every pullback functor f*:Sub(B)Sub(A) has a right adjoint f. It follows that each Sub(A) is a Heyting algebra: a bounded lattice with an implication satisfying UVWU(VW), with negation defined as ¬U=(U); and that implication and are stable under pullback (Beck–Chevalley for the right adjoints).36

A Heyting category interprets full intuitionistic first-order logic soundly: all the rules of the intuitionistic sequent calculus are validated, but excluded middle φ¬φ and double-negation elimination generally fail, because subobject lattices are Heyting but rarely Boolean. First-order classical logic corresponds to Boolean categories: Heyting categories in which every subobject is complemented.

Example 10.2 (Presheaf categories are Heyting). Every presheaf category 𝐒𝐞𝐭𝒞op is a Heyting category (indeed a topos). On a presheaf X, subobjects are subfunctors, and (UV)(c)={xX(c)(f:dc).xfU(d)xfV(d)}, a first sighting of the Kripke clause for implication: membership at stage c requires the implication to persist along all transitions into c. Universal quantification carries the same relativization to later stages. We shall re-derive these formulas from the subobject classifier in Part II.

10.2 Kripke Semantics as Presheaf Semantics

The classical completeness theorem for intuitionistic logic—Kripke’s theorem that a sequent is provable iff it holds in all Kripke models over all posets—becomes, categorically, completeness with respect to models in presheaf categories over posets: a Kripke model on a poset P is exactly a model in 𝐒𝐞𝐭P (sets varying over stages, growing along P; the forcing clauses are the pointwise formulas of Example 10.2). The two-step completeness scheme—embed the syntactic Heyting category generically, then evaluate—delivers this: the classifying Heyting category of an intuitionistic first-order theory embeds conservatively into a presheaf category over a poset.37

10.3 The Hierarchy, Assembled

We may now read the table of §6 as a tower of forgetful/free relationships between 2-categories of structured categories: cartesian regular coherent Heyting, with structure-preserving functors and all natural transformations at each level, and with each fragment’s classifying category providing a left 2-adjoint to the inclusion of “semantics” into “syntax.” The hierarchy of logics is thus a hierarchy of doctrines—the subject of the next section.

11. Interlude: The Curry–Howard–Lambek Correspondence

Before ascending to doctrines, we pause for the proof-theoretic strand promised in §6, which runs parallel to the model-theoretic hierarchy and rejoins it inside the topos.38

11.1 Cartesian Closed Categories, Again

A category is cartesian closed (a CCC) when it has finite products and exponentials: Hom(C×A,B)Hom(C,BA), naturally in all variables. Transposition sends f:C×AB to its currying λf:CBA; the counit is evaluation ev:BA×AB; and the triangle identities say exactly that ev(λf×idA)=f,λ(ev(g×idA))=g, which the reader should recognize, ahead of the formal statement, as the β and η laws of the λ-calculus.

11.2 The Simply Typed λ-Calculus

The simply typed λ-calculus λ× over a set of base types has types generated by 1,A×B,AB; terms generated by variables, pairing s,t, projections, abstraction λx:A.t, and application st; typing judgments x1:A1,,xn:Ant:B derived by the evident rules; and the equational theory generated by (λx.t)s=t[s/x](β),λx.(tx)=t(xt)(η), together with the product laws. A λ-theory adds base constants and equational axioms.

Theorem 11.1 (Lambek, restated). The simply typed λ-calculus is the internal language of cartesian closed categories. Precisely: every λ-theory 𝕋 has a syntactic CCC 𝒞𝕋 (objects the types; morphisms AB the terms x:At:B modulo provable equality), which classifies 𝕋: CCC-functors 𝒞𝕋𝒞 correspond to models of 𝕋 in 𝒞. Conversely every CCC 𝒞 yields a λ-theory (its internal language) with types the objects and constants the morphisms, and the two constructions form an equivalence between λ-theories and CCCs.

The correspondence is the categorical leg of the Curry–Howard triangle:

Logic (ND for ,) Type theory Category theory
proposition type object
proof of φ from Γ term Γt:A morphism
conjunction φψ product A×B product
implication φψ function type AB exponential
proof normalization β-reduction — (equality)
provability inhabitation existence of morphism 1A

Note the shift of dimension from Part I: there, a formula was a subobject and entailment a mere ordering; here, a proposition is an object and each proof is a distinct morphism. Categorical model theory truncates proofs to provability; categorical proof theory keeps them. The two reconcile in a topos, where a proposition may be regarded either as a subobject of 1 (truncated) or as an arbitrary object under the propositions-as-types reading (untruncated), and where the support factorization mediates between them.

Example 11.2 (Failure of naive quantifier reading). In a CCC, BA is a genuine object, so higher-order functionals (CBA), Church numerals Ch=(AA)(AA), and fixed-point-free combinatory algebra all make sense; what a bare CCC lacks is the subobject apparatus for ,,=. Full higher-order logic needs both halves—exponentials and classifier—which is precisely the topos axioms (Part II): a topos is a CCC whose proof-relevant and proof-irrelevant logics coexist.

11.3 Multicategories, Again

Shulman’s notes [5] refine the correspondence using multicategories: structures whose morphisms (A1,,An)B have finite lists of inputs, composed by grafting. A sequent with n hypotheses is interpreted as a multimorphism directly—no product needed—and the cartesian structure (the ability to duplicate and discard hypotheses, i.e. contraction and weakening) becomes a property of the multicategory rather than a consequence of re-encoding contexts as products. The payoff is modularity: dropping contraction and weakening yields linear logic and monoidal categories by the same machinery, and the two-step analysis (type theory multicategory representable structure) cleanly explains why the /× distinction tracks the structural rules. The syntax–structure correspondences of Part I are then two instances of a single pattern, one that covers substructural and higher-order logics as well.

12. Doctrines and Unifying Frameworks

12.1 Doctrines

The word doctrine, introduced in the wake of Lawvere’s work, names the organizing principle we have been using: a doctrine is a species of structured category, together with the functors preserving the structure—“categories with finite products,” “regular categories,” “Heyting categories,” “elementary toposes.” The term is old and useful but has never had a single fixed technical meaning.39 Several formalizations coexist:

  • Doctrines as 2-monads. Kelly & Street’s “Review of the elements of 2-categories” [7] develops monads in a 2-category; taking the 2-category to be 𝐂𝐚𝐭, a doctrine is a (nice) 2-monad D on 𝐂𝐚𝐭, its algebras are the theories of the doctrine, and lax/pseudo/strict morphisms of algebras give the appropriate translations. “Categories with finite products” is the paradigm: the 2-monad freely adjoins finite products.

  • Doctrines as indexed posets (Lawvere doctrines). A first-order doctrine in the sense that grew out of Lawvere’s “hyperdoctrines” is a functor P:𝒞op𝐏𝐨𝐬—think Sub𝒞—with adjoints to reindexing modeling the quantifiers, plus Beck–Chevalley and Frobenius. This viewpoint isolates the logical superstructure over a base of contexts, and supports modern developments: Dagnino & Rosolini [9] study modalities on doctrines and show how comonads on doctrines induce the box-like operators of modal logic, with quotients and comprehension treated uniformly.

  • Doctrines in the physics literature. Paugam’s book on the mathematics of quantum field theory [8], Sec. 2.1, uses higher categories, doctrines, and theories as the organizing frame for the functor-of-points approach to spaces of fields.

12.2 Generalized Sketches

Ehresmann’s sketches present theories by specifying a small category together with chosen cones and cocones to be sent to limits and colimits—a graphical, universal-property-first alternative to logical syntax. Makkai’s three-part “Generalized sketches as a framework for completeness theorems” [10] widens the notion so that sketches can specify categorical doctrines themselves, especially (but not only) those based on universal properties, and equips the framework with both a model theory and a proof theory, each categorical in nature and each supporting completeness theorems.40 The framework is a natural home for structures—like the internal categories of Example 6.3—that outrun simple multi-sorted signatures.

12.3 A Unified Framework for Algebraic Notions

Beyond Lawvere theories, twentieth-century algebra produced a zoo of “theory-like” gadgets: PROs and PROPs (product-and-permutation categories presenting operations with many inputs and outputs), symmetric and nonsymmetric operads, clones, monads. Fujii’s “A unified framework for notions of algebraic theory” [11] organizes the zoo: each notion of algebraic theory embeds into a single framework (via monoid objects in suitable monoidal categories indexed by a choice of “metatheory”), morphisms of metatheories transport theories and models, and the standard constructions—categories of models, free algebras, the passage to monads—become functorial in the metatheory.41

12.4 Bridge to Part II

The top row of our table remains: higher-order logic and elementary toposes. Everything in Part I concerned predicates over objects; nothing yet allows predicates to be collected into an object of predicates. The subobject classifier does exactly this, and a category with finite limits, exponentials, and a subobject classifier—an elementary topos—is a Heyting category with enough additional structure to interpret quantification over predicates, powersets, and hence intuitionistic higher-order logic in full.

Part II. Topos Theory

13. What Is a Topos?

13.1 The Slogan and its Limits

An elementary topos can be regarded as a category that is enough like the category of sets to interpret intuitionistic higher-order logic. In this sense topos theory is a branch of categorical logic. But that is only one of several ways of thinking about what a topos is.42 At least four complementary answers circulate:

  1. A topos is a generalized universe of sets: a place in which to do mathematics, where the ambient logic may be intuitionistic and the axiom of choice may fail.

  2. A topos is a generalized space: the category of sheaves on a site remembers the space (indeed improves on it), and geometric morphisms generalize continuous maps.

  3. A topos is a theory: a Grothendieck topos classifies a geometric theory, and the topos is the theory’s presentation-invariant incarnation—the higher-order analogue of the classifying categories of Part I.

  4. A topos is an algebraic object: a cartesian closed category with a subobject classifier, studied by universal-algebraic means, localizations, and 2-categorical structure.

13.2 A Capsule History

The concept has a double origin.43 Around 1963 Lawvere set out to found mathematics on category theory, asking what makes the category of sets special purely in terms of objects and morphisms—a radical inversion of the membership-based axiomatics of set theory. In 1966 he encountered Grothendieck’s notion of topos (Greek: place), invented for algebraic geometry, where one cares not only whether a statement is true but where it is true—on which open subset two functions agree, for example. Grothendieck’s toposes are categories of sheaves on sites, conceived as places in which to do mathematics; they were introduced as the environment for the cohomology theories needed for the Weil conjectures. By 1971 Lawvere and Tierney had distilled and generalized the notion to the elementary topos: a finitary, first-order axiomatization—finite limits, exponentials, subobject classifier—encompassing Grothendieck’s examples and many more, with a notion of truth that has a general concept of space built in. Baez points to Voevodsky’s proof of Milnor’s conjecture, which uses simplicial sheaves, as a recent product of the geometric line of development.

Remark 13.1 (Against the potted history). The capsule above, like most, risks suggesting that topos theory arose by generalizing set theory. McLarty’s corrective essay “The uses and abuses of the history of topos theory”—recommended by Baez as the big-picture companion to the textbooks—argues the reverse: category theory grew out of practical problems in topology, topos theory out of Grothendieck’s geometry, Tierney’s topology, and Lawvere’s interest in the foundations of physics; important concepts rarely arise by generalizing a single earlier concept, but rather by unifying and easing a mass of earlier problems, so that honest history starts at the hardest point. He concludes, wryly, that a “more broadly falsified” history may still be the best pedagogy.44

14. Elementary Toposes: Definition and First Consequences

14.1 The Definition

Definition 14.1 (Elementary topos). An elementary topos is a category with

  • (A) finite limits;

  • (B) exponentials: for all A,B an object BA with evaluation ev:BA×AB inducing natural bijections (C×A,B)(C,BA);

  • (C) a subobject classifier: an object Ω with a morphism 𝗍𝗋𝗎𝖾:1Ω such that for every mono m:SA there is a unique χm:AΩ making S1m𝗍𝗋𝗎𝖾AχmΩ a pullback.

Finite colimits need not be assumed: they follow from the axioms, by a theorem of Paré (the functor Ω() is monadic).45

14.2 Reading the Axioms in 𝐒𝐞𝐭

In 𝐒𝐞𝐭: (A) provides the empty set, singletons, products, disjoint unions, equalizers {xf(x)=g(x)}, and quotients; (B) provides function sets BA; and (C) is the two-element set: taking Ω={0,1} with 𝗍𝗋𝗎𝖾=1, functions A{0,1} are exactly the characteristic functions of subsets. The classifier axiom asserts, in an arbitrary , the natural correspondence Sub(A)(A,Ω),SχS,χχ*(𝗍𝗋𝗎𝖾), making Ω an object of truth values and making Sub representable.46

14.3 First Consequences

Proposition 14.2. Let be an elementary topos.

  1. Power objects. PA:=ΩA classifies relations: (B,ΩA)(B×A,Ω)Sub(B×A). The topos axioms can equivalently be phrased as: finite limits plus power objects.

  2. Epi–mono factorization. Every morphism factors as an epi followed by a mono, stably; hence is a regular category, and in fact every epi is regular (a coequalizer of its kernel pair): is exact.

  3. Balance. A morphism both monic and epic is an isomorphism.

  4. Heyting structure. Each Sub(A) is a Heyting algebra, and pullback f* has both adjoints ff*f; thus is a Heyting category and interprets first-order intuitionistic logic (Section 18).

  5. Slices. For every A, the slice /A is again a topos (“the fundamental theorem of topos theory”), with Ω/A=Ω×AA; pullback along any f induces a logical functor between slices. Working in /A is working “over a varying parameter aA”.

  6. Cartesian-closedness of slices. is locally cartesian closed; the right adjoints Πf to pullback interpret dependent products, so the internal type theory of a topos is a full dependent type theory.

We will not prove these here—the systematic development is Mac Lane & Moerdijk [33], Ch. IV, with the logic-first route in Goldblatt [32] and the encyclopedic treatment in Johnstone [23], Part A—but each will be used below.

Remark 14.3 (The internal Heyting algebra Ω). The Heyting operations on every Sub(A) assemble, via (3) and Yoneda, into morphisms ,,:Ω×ΩΩ,¬:ΩΩ,𝖿𝖺𝗅𝗌𝖾:1Ω, making Ω an internal Heyting algebra—the algebra of truth values. For instance =χ𝗍𝗋𝗎𝖾,𝗍𝗋𝗎𝖾. All propositional logic in is computed by composing with these maps.

The definition is best absorbed through examples. The following gallery is essentially Baez’s, down to his framing: different kinds of mathematicians will feel at home in different toposes.47

Example 15.1 (Sets). 𝐒𝐞𝐭 itself, with Ω={0,1}. Lawvere & Schanuel’s Conceptual Mathematics [29] is an elementary introduction to precisely this topos.

Example 15.2 (Finite sets). 𝐒𝐞𝐭fin is a topos: the topos axioms are finitary, so infinity is not built in—it is an optional extra (a natural numbers object, §21). A finitist can do mathematics here.

Example 15.3 (G-sets). For a group G, the category G𝐒𝐞𝐭 of G-actions and equivariant maps is a topos: if G is the symmetry group of one’s universe, one may work only with symmetric sets and symmetric functions. Here Ω={0,1} with trivial action; but exponentials are subtler: YX is the set of all functions XY with G acting by conjugation, (gf)(x)=gf(g1x), so that the fixed points of YX are the equivariant maps.

Example 15.4 (Presheaves). For any small category 𝒞, the functor category 𝒞̂=𝐒𝐞𝐭𝒞op is a topos (Section 16). Special cases: G-sets (𝒞=G a one-object groupoid); directed graphs (𝒞 generated by two parallel arrows); simplicial sets (𝒞=Δ the category of nonempty finite total orders), beloved of algebraic topologists and, increasingly, of physicists; and time-dependent sets, presheaves on a linear order of times, where an element’s set of avatars can grow and elements can become identified as time passes.

Example 15.5 (Sheaves). For a topological space X, the category Sh(X) of sheaves on X; more generally Sh(𝒞,J) for any site (Section 17). These are the Grothendieck toposes, the original examples, engineered for the Weil conjectures; simplicial sheaves powered Voevodsky’s proof of Milnor’s conjecture.

Example 15.6 (The effective topos). Hyland’s effective topos has as its ambient logic computable mathematics: crudely, everything in sight is effectively constructible and all functions are computable. It is an elementary topos that is not a Grothendieck topos—evidence that the Lawvere–Tierney axioms genuinely widen the field.

Example 15.7 (Smooth toposes). The smooth toposes of synthetic differential geometry (Lawvere, Kock; built from the C-rings of Example 4.6) contain a line object R with nonzero nilpotent infinitesimals: D={dRd2=0} is not {0}, and every function RR is smooth, with derivative defined by f(x+d)=f(x)+df(x) for dD. Infinitesimal calculations of the kind physicists do informally become literally correct here. The price is intuitionistic logic: D{0}, yet D has no element provably distinct from 0, which is only consistent because excluded middle fails.

Slogan 15.8. There are lots of toposes; one can hand-craft them to one’s specific needs.

The slogan is Baez’s; Blechschmidt’s “custom-tailored mathematical universes” [27], taken up in §21, develop it into a working method. One chooses the topos so that the mathematics of interest becomes native to it.

We tabulate Ω, and with it the flavor of truth, across the examples so far:

Topos Ω truth value of “xA
𝐒𝐞𝐭, 𝐒𝐞𝐭fin {0,1} yes/no
G𝐒𝐞𝐭 {0,1}, trivial action yes/no, invariantly
𝐒𝐞𝐭 (evolutive) {0,1,,} steps until membership
graphs 2 vertices, 5 edges how much of the figure is in
Sh(X) Ω(U)=𝒪(U) largest open where true
𝐒𝐞𝐭 (Sierpiński) 3 linear values now / later / never

Reading the table, the classifier is a precise record of what kind of partiality the topos tolerates: symmetry classes, time to arrival, incidence, locality. Baez’s dictum that there is a topos for one’s specific needs (§15) can be sharpened: choosing a topos is choosing an Ω, i.e. choosing what shall count as a degree of truth.

16. Presheaf Toposes and Generic Figures

Presheaf toposes deserve a section of their own: they are combinatorial, fully computable, and already exhibit almost every phenomenon that separates toposes from 𝐒𝐞𝐭. This is the pedagogical thesis of Reyes–Reyes–Zolfaghari’s Generic figures and their glueings [30], a book that bridges Conceptual Mathematics and Mac Lane–Moerdijk: it introduces topos theory through presheaf toposes, viewed as categories of objects glued from “generic figures,” with a running cast of easily visualized examples.48

16.1 𝒞-Sets and their Figures

Fix a small category 𝒞. A 𝒞-set (presheaf) is a functor X:𝒞op𝐒𝐞𝐭; write xfX(c) for the action of f:cc on xX(c). By Yoneda, X(c)𝒞̂(yc,X), so elements of X at stage c are the same as maps from the representable yc=𝒞(,c): the representables are the generic figures, and an arbitrary 𝒞-set is a colimit of representables—a glueing of figures along the incidence relations encoded by 𝒞. All limits and colimits are computed pointwise; exponentials are given by the Yoneda-forced formula YX(c)=𝒞̂(yc×X,Y), and the subobject classifier by sieves, as follows.

Definition 16.1 (Sieves). A sieve on c𝒞 is a set S of morphisms with codomain c closed under precomposition: fS and g composable imply fgS. The assignment Ω(c)={sieves on c},Sf={gfgS} is a presheaf, and 𝗍𝗋𝗎𝖾c=(maximal sieve on c) classifies subobjects: for AX a subfunctor, the characteristic map is χA(x)={f:ccxfA(c)}(xX(c)), the sieve of all transitions that carry x into A. A truth value at stage c thus records the ways an element can come to belong to A under restriction.

16.2 The Heyting Operations on Sieves

The internal propositional connectives of 𝒞̂ can be computed directly on sieves, and the formulas repay study: they are the Kripke clauses of §19 in embryo. For sieves S,T on c:49 ST=ST,ST=ST,=all maps into c,=,(ST)={f:ccg:cc.fgS implies fgT},¬S={f:ccno g has fgS}. Meets and joins are computed pointwise, but implication is not: a transition f belongs to ST only if the implication S-to-T persists under all further transitions g. The quantification over the future is forced by the requirement that ST be a sieve—closed under precomposition—and it is the exact algebraic reason presheaf logic is intuitionistic: S¬S need not contain idc even when computed with the displayed ¬.

Example 16.2 (Truth values of the graph classifier, revisited). For 𝒞 the graph base category and the five edge-stage truth values of the next subsection, the reader can check from the formulas above, e.g.: {s}{t}=; {s}{t}={s,t}; ¬{s}={t}; ¬{s,t}=; hence ¬¬{s,t}={s,t}, an edge-level double-negation gap that will reappear as the failure of decidability in §19.

16.3 The Topos of Graphs, Worked in Detail

Let 𝒞 be the category with two objects V,E and two nonidentity arrows s,t:VE.50 A presheaf X on 𝒞 is a pair of sets X(E),X(V) with two maps X(s),X(t):X(E)X(V): a directed multigraph, with X(V) the vertices, X(E) the edges, and the actions of s,t giving source and target. The generic figures are yV (a single vertex) and yE (a single edge with its two, possibly distinct, endpoints); every graph is a glueing of copies of these along incidence.

The classifier. Sieves on V: either all of {idV}’s sieve or empty—two truth values for vertices, Ω(V)={1V,0V}. Sieves on E: a sieve may contain idE (hence everything), or any subset of {s,t}; so Ω(E)={,{s,t},{s},{t},}, five truth values for edges. As a graph, Ω has two vertices (𝗂𝗇 and 𝗈𝗎𝗍) and five edges: the classifying graph :𝗂𝗇𝗂𝗇,{s,t}:𝗂𝗇𝗂𝗇,{s}:𝗂𝗇𝗈𝗎𝗍,{t}:𝗈𝗎𝗍𝗂𝗇,:𝗈𝗎𝗍𝗈𝗎𝗍. Given a subgraph AX, the classifying map sends a vertex to 𝗂𝗇 or 𝗈𝗎𝗍 according to membership, and an edge e to the record of how much of e lies in A: the edge itself (); both endpoints but not the edge ({s,t}); only its source ({s}); only its target ({t}); or nothing ().

Failure of classicality, concretely. Let X be a single edge e:vw and A the subgraph {v}. Then ¬A (the largest subgraph disjoint from A) is {w}: the edge e is excluded because its source lies in A. Hence ¬¬A={v}… but now take A={e’s two endpoints}: ¬A=, so ¬¬A=XA. Double negation is a closure operator, not the identity: the internal logic of graphs is non-Boolean, and the picture shows exactly why—an edge cannot be separated from its endpoints.

16.4 Bi-Heyting Structure: The Two Negations

In a presheaf topos every subobject lattice Sub(X) is not only a Heyting algebra but a co-Heyting algebra as well: joins have a left-adjoint-like “subtraction” \ with UVWU\VW, making Sub(X) bi-Heyting. Consequently there are two negations: ¬U=(U)=largest subobject disjoint from U,U=(X\U)=smallest subobject with UU=X. In 𝐒𝐞𝐭 the two coincide; in graphs they diverge. For the single-edge graph and A={v}: ¬A={w} as above, while A={e,v,w}=X minus nothing that can be removed—the edge must stay (to cover X) and drags both endpoints with it. In general ¬UU, the discrepancy measuring the boundary of U. Reyes and collaborators build modal operators by iterating combinations of the two negations, and argue in “The non-boolean logic of natural language negation” [31] that natural-language negation tracks the co-Heyting rather than the Heyting ¬: the negation of a predicate keeps its presuppositional boundary, as does and ¬ does not.51

16.5 Dynamical Systems and Other Small Presheaf Toposes

Two more base categories from the Reyes–Reyes–Zolfaghari cast—monoid actions and “bouquets”—show how much variety two or three arrows can generate.52

Example 16.3 (M-sets and evolutive sets). For a monoid M, presheaves on the one-object category M are right M-sets: a set X with an action xm satisfying the monoid laws. For M=(,+), an M-set is a set with a single self-map: a discrete-time dynamical system (“evolutive set”), morphisms being maps commuting with the dynamics. The subobject classifier of M-sets has as elements the right ideals of M (the sieves on the unique object); for these are and the up-sets {n,n+1,}, so Ω𝐒𝐞𝐭={0,1,2,,}(=, i.e. never), with the action kn=max(kn,0): the truth value of “x eventually enters A” is how many steps remain until it does. Unlike graphs, the topos of evolutive sets has a non-two-valued but linear Sub(1) only when the monoid forces it; for -sets Sub(1)={,} yet the topos is far from Boolean—the classifier above has infinitely many global truth values at the unique stage.

Example 16.4 (Reflexive graphs). Adding to the graph base category two arrows exhibiting a chosen loop-at-each-vertex (a section of both s and t) yields reflexive graphs. The change looks cosmetic but is not: the terminal reflexive graph’s loop is degenerate rather than structural, the classifier drops from five edge-truth-values to a different lattice, and homotopy-like behavior appears (the interval object becomes an edge with distinguished degeneracies)—a first step on the ladder toward simplicial sets, whose base Δ adds all finite ordered stages at once.

16.6 Points of a Presheaf Topos

A point of 𝒞̂ (geometric morphism from 𝐒𝐞𝐭; §20) corresponds, by Diaconescu’s other theorem, to a flat functor F:𝒞𝐒𝐞𝐭—one whose category of elements is cofiltered—with the inverse image given by the tensor XX𝒞F. For the graph base category, flatness works out to: a point is a choice of “way of looking at a graph through one figure at a time,” and the two obvious points are evaluation-at-V and evaluation-at-E; these are jointly faithful and jointly conservative, which is why graph-theoretic statements can be checked on vertices and edges separately. For M-sets the points are the flat M-sets; for evolutive sets, evaluation at the unique stage. Presheaf toposes thus have enough points, all of an essentially combinatorial nature.

16.7 Exponentials of Graphs, Computed

The exponential formula YX(c)=𝒞̂(yc×X,Y) becomes concrete, and instructive, for graphs. Vertices of YX are graph morphisms yV×XY. Now yV×X is the vertex part of X: all vertices, no edges. So a vertex of YX is any function from vertices of X to vertices of Y—no edge-preservation required. Edges of YX are morphisms yE×XY; unwinding, yE×X consists of two disjoint copies of the vertices of X (the source copy and target copy) together with, for every edge of X, an edge from its source in the source copy to its target in the target copy. An edge of YX from vertex-function g0 to vertex-function g1 is therefore an assignment sending each edge x:uv of X to an edge g(x):g0(u)g1(v) of Y.

Thus YX is a graph whose vertices are arbitrary vertex-maps and whose edges are “edge-maps between possibly different vertex-maps”: graph homomorphisms XY appear not as the vertices of YX but as its loops—an edge from g0 to g0 covering it. The global points 1YX, since 1 is the single loop, likewise pick out the honest homomorphisms. This generalizes the G-set phenomenon of Example 15.3: in a presheaf topos, the function object YX must contain enough “unnatural” would-be morphisms for the adjunction to hold, and the genuinely structure-preserving ones are recovered as the fixed or looped elements.53

16.8 Evolutive Sets: Presheaves as Time

A second running example of [30]: take 𝒞=(,), or any linear order of instants. A presheaf X on 𝒞op—equivalently a copresheaf, sets evolving forward—assigns to each instant n a set Xn and to each passage nm a transition XnXm: an evolutive set, in which elements may merge (transitions need not be injective) and may be born (need not be surjective). The truth values at instant n are the sieves on n, i.e. the up-closed sets of later instants: a truth value is a time of becoming true—true now, true from tomorrow, true eventually-at-k, never true. Negation reads “will never be true from any accessible future,” so ¬¬φ says that φ remains possible at every future instant—which is clearly weaker than φ being true now, and this is exactly how ¬¬φφ fails. The double-negation topology of §17 forces exactly the “eventually constant” sheaves, Kostecki [28] uses this example to motivate the stage-dependent reading of presheaf semantics; it is also the simplest nontrivial Kripke frame, making §19 computable by hand.

17. Sheaves and Grothendieck Toposes

17.1 From Spaces to Sites

Let X be a topological space. A presheaf on X is a presheaf on the poset 𝒪(X) of opens; a sheaf is a presheaf F satisfying the glueing condition: for every open cover U=iUi, a family of sections siF(Ui) agreeing on overlaps glues to a unique sF(U). Continuous functions, smooth functions, sections of a bundle: the fundamental objects of geometry are sheaves, and Sh(X) is a topos.

Grothendieck’s generalization replaces 𝒪(X) by any small category 𝒞 equipped with a Grothendieck topology J: an assignment to each object c of a collection J(c) of covering sieves, required to contain the maximal sieve, to be stable under pullback, and to satisfy a transitivity (local character) axiom. The pair (𝒞,J) is a site, and Sh(𝒞,J)𝒞̂ is the full subcategory of presheaves satisfying descent for covering sieves. A Grothendieck topos is a category equivalent to some Sh(𝒞,J).

Theorem 17.1 (Basic facts). Sh(𝒞,J) is an elementary topos, and the inclusion Sh(𝒞,J)𝒞̂ has a finite-limit-preserving left adjoint a (sheafification). Conversely (Giraud’s theorem), a category is a Grothendieck topos iff it is a cocomplete, well-powered exact category with disjoint stable coproducts and a small generating set.54

The subobject classifier of Sh(𝒞,J) refines the sieve formula: ΩJ(c) is the set of J-closed sieves on c, a sieve S being closed when any f that is “covered into” S already belongs to S. For Sh(X) this specializes to: Ω(U)={open subsets of U}, and the truth value of a statement is literally the largest open set on which it holds—Grothendieck’s “where is it true?” made formal.

Construction 17.2 (Sheafification via the plus construction). The reflector a admits a two-step description. For a presheaf P define P+(c)=colimSJ(c)Hom𝒞̂(S,P), the colimit over covering sieves (ordered by reverse inclusion) of compatible families indexed by the sieve: an element of P+(c) is a matching family on some cover, two being identified when they agree on a common refinement. Then P+ is separated for any P; P+ is a sheaf whenever P is separated; hence a(P)=P++, with the finite-limit-preservation of a visible because filtered colimits and limits of the relevant finite shapes commute in 𝐒𝐞𝐭. The construction is Grothendieck’s original one, and its two-step rhythm—first quotient away local disagreement, then adjoin local data—is the same rhythm as the – and -clauses of Kripke–Joyal semantics (§19): sheafification is the semantic closure of a presheaf under locally-true membership.

17.2 Lawvere–Tierney Topologies

The elementary-topos abstraction of a Grothendieck topology is internal: a Lawvere–Tierney topology on a topos is a morphism j:ΩΩ with j𝗍𝗋𝗎𝖾=𝗍𝗋𝗎𝖾,jj=j,j=(j×j): an internal closure/modal operator (“it is locally the case that”). Each j determines a closure of subobjects UU, a notion of j-dense mono, and a subtopos Shj() of j-sheaves, again with finite-limit-preserving reflector. On a presheaf topos, Lawvere–Tierney topologies correspond exactly to Grothendieck topologies on the base; but the notion applies to any topos, and two special cases matter for logic:

  • the double-negation topology j=¬¬, whose sheaves form the largest Boolean subtopos Sh¬¬(), which is where classical logic reappears; it is used in the topos-theoretic independence proofs (Cohen forcing = sheaves for a ¬¬-like topology on a poset of conditions);

  • open and closed topologies induced by a truth value uSub(1), giving the open and closed subtoposes into which decomposes.

Remark 17.3 (Modal reading). A Lawvere–Tierney j satisfies exactly the laws of a “lax” modality: φjφ is not required, but j is inflationary on the order, idempotent, and meet-preserving. The geometric reading “locally φ” and the logical reading “φ modulo j-negligible information” coincide; the co-Heyting boundary operators of §16.4 give a different, non-idempotent family of modalities, so any presheaf topos carries a large supply of modal operators of both kinds.

18. The Internal Logic I: The Mitchell–Bénabou Language

18.1 Formulas as Morphisms to Ω

Part I interpreted logic about a category from outside. A topos supports a slicker, self-contained idiom: since Sub(A)(A,Ω), predicates are morphisms into Ω, and the whole apparatus of Part I can be internalized as a typed language whose types and terms are the objects and morphisms of . This is the Mitchell–Bénabou language of .55

The language has:

  • types: the objects of , closed under ×, ()(), and P()=Ω();

  • terms: built from typed variables by pairing, projection, application, λ-abstraction, and the morphisms of as function symbols; a term σ of type B with free variables of types A1,,An denotes a morphism [[σ]]:A1××AnB;

  • formulas: terms of type Ω. Atomic formulas include σ=Bτ (denoting χΔ[[σ]],[[τ]]) and σBρ for ρ of type PB (denoting evaluation composed with the membership relation BB×PB); compound formulas are formed by composing with the internal Heyting operations on Ω; and quantified formulas x.φ, x.φ are formed by applying the adjoints π,π to the subobject denoted by φ and reconverting to characteristic morphisms.

Thus every formula φ(x1,,xn) has an extension {(x1,,xn)φ}A1××An, and a sequent φψ holds in when the extension of φ is contained in that of ψ. A formula is true when its extension is the whole product—equivalently, when [[φ]] factors through 𝗍𝗋𝗎𝖾.

18.2 What the Language Is for

The point is expressive economy: one reasons about the objects of an arbitrary topos as if they were sets, writing element-wise definitions and proofs, provided one reasons intuitionistically. Three illustrations:

Example 18.1 (Internal definitions). “The object A is inhabited” is the formula x:A.; its truth is a weaker condition than the existence of a global point 1A (in graphs: the single-edge graph with distinct endpoints has no global point—a global point is a loop— yet is internally inhabited). “f:AB is epi” is the truth of y.x.f(x)=y. “A is decidable” is the truth of x,x.(x=x¬x=x); in graphs, decidable objects are exactly the edgeless graphs—equality of edges cannot be decided at vertex stages.

Example 18.2 (Internal algebra). A group in (Part I) is the same as a model, in the Mitchell–Bénabou language, of the usual first-order group axioms; an internal ring, module, poset, or local ring likewise. Theorems of intuitionistic algebra then hold automatically for all such internal structures in all toposes at once; this is what drives the applications of §21.

Example 18.3 (Higher-order statements). Because PA is a type, induction (“every inhabited subobject of with 0 and closed under successor is all of ”), completeness of orders, and topological statements are all first-class formulas. The internal language of a topos is full intuitionistic higher-order logic (HOL), and conversely every HOL theory generates a syntactic topos—the higher-order classifying category, completing the tower of Part I.

19. The Internal Logic II: Kripke–Joyal Semantics

19.1 Forcing

The Mitchell–Bénabou language says what formulas denote; Kripke–Joyal semantics says how to compute whether they hold, by unwinding extensions stage by stage. For a formula φ(x) with x of type A, an object U, and a generalized element α:UA, define Uφ(α):αA{xφ}, i.e. α factors through the extension of φ. The forcing relation obeys two structural laws—monotonicity (if Uφ(α) and f:UU then Uφ(αf)) and local character (if {fi:UiU} is jointly epic and Uiφ(αfi) for all i, then Uφ(α))—and is computed by structural recursion:56 U(σ=τ)(α)[[σ]]α=[[τ]]α;U(φψ)(α)Uφ(α) and Uψ(α);U(φψ)(α)there is a jointly epic {fi:UiU} with each Ui forcing φ(αfi) or ψ(αfi);U(φψ)(α)for all f:UU:Uφ(αf) implies Uψ(αf);U¬φ(α)for all f:UU:Uφ(αf) implies U0;U(y.φ)(α)there is an epi p:UU and β:UB with Uφ(αp,β);U(y.φ)(α)for all f:UU and all β:UB:Uφ(αf,β). Truth of φ is 1φ with the generic (identity) element. Note where the intuitionism lives: disjunction and existence hold only locally—after passing to a cover—and implication and universal quantification must be stable—they quantify over all later stages.

19.2 Specializations

Example 19.1 (Presheaves: Kripke semantics recovered). In 𝒞̂ it suffices to force at representable stages U=yc, where by Yoneda a generalized element is just αA(c), and morphisms of stages are morphisms of 𝒞. The clauses become: cφψ(α) iff for all f:cc, cφ(αf) implies cψ(αf); and cy.φ(α) iff a witness exists at c itself (representables have no nontrivial epic covers by representables in general, but in presheaf toposes existence at a stage reduces to elementwise existence). Over a poset P this is verbatim Kripke’s semantics for intuitionistic predicate logic, with 𝐒𝐞𝐭P-models as the possible-worlds picture: Part I’s Example 10.2 and completeness discussion are the special case.57

Example 19.2 (Sheaves: local truth). In Sh(X), stages may be taken to be opens UX, jointly epic families are open covers, and the clauses read exactly as “locally on a cover”: Uy.φ iff some open cover of U admits local witnesses. This is why nontrivial sheaf toposes validate statements like “every locally constant function is constant” only locally, and why internal existence of, say, roots of polynomials can hold without global sections providing them.

Example 19.3 (Graphs, once more). In the topos of graphs, take X the single-edge graph with endpoints vw and φ(x)(x=xv¬x=xv) decidability-at-xv. At the vertex stage all is well; at the edge stage E, the generic edge e satisfies neither e=xv nor its negation after restriction, and no epic family of graph morphisms can separate the cases: fails, matching the failure of decidability computed via Ω in §16. The forcing calculus and the sieve calculus always agree—they are two notations for the same subobject.

Example 19.4 (G-sets: forcing is invariance). In G𝐒𝐞𝐭 the terminal object has no proper covers, and forcing at 1 with generalized elements from the regular representation recovers a classical-looking but symmetry-constrained logic: the topos is Boolean (Example 15.3), so the and ¬ clauses collapse to their pointwise readings, yet AC fails (§21) because the witnesses demanded by the -clause must be produced equivariantly: an epi XY of G-sets forces internal surjectivity, while a splitting would be a G-equivariant section, which the orbit structure may forbid.

Example 19.5 (Sheaves on Sierpiński space). Let X={o,m} with opens {o}X (Sierpiński space). A sheaf is a restriction map F(X)F({o}); the topos is equivalent to 𝐒𝐞𝐭, sets over a map. The truth values are Sub(1)={,{o},X}: three-valued logic, linearly ordered. For a mono AB of sheaves, XyB.φ(y) can hold with the witness existing only over {o} and merely locally over X; and X¬¬(bA) says b’s germ near the open point lies in A—double negation is “true on a dense open,” the ¬¬-topology of §17 in its smallest nontrivial instance.

19.3 Soundness, Completeness, and Use

Kripke–Joyal semantics is sound and complete for the internal logic: a sequent holds in iff it is forced at every stage—this is just the definition unwound—and the internal logic itself is sound for intuitionistic higher-order deduction. The working consequence:

Slogan 19.6. To prove that a statement holds in a topos, prove it constructively about elements; the forcing clauses then interpret the proof at every stage automatically.

This transfer principle is used constantly in the applications of §21.

19.4 Two Worked Applications of Forcing

Example 19.7 (Diaconescu: choice implies excluded middle). The internal language turns Diaconescu’s theorem into a short constructive argument, valid in any topos. Let φ be any proposition (truth value); consider the two subobjects of a two-element set {0,1}: A={xx=0φ},B={xx=1φ}. Both are inhabited (0A, 1B), so the evident epimorphism from A+B onto the (internal, two-element) set {A,B} of the pair admits, by AC, a section s choosing an element of each. Now s(A)A means s(A)=0φ, and s(B)B means s(B)=1φ; distributing, either φ holds, or s(A)=01=s(B)—in which case AB, hence ¬φ (for if φ held, A=B={0,1}; here decidable equality of {0,1} is used). So φ¬φ. Read through Kripke–Joyal, the argument shows: a topos in which every epi splits forces excluded middle at every stage, i.e. is Boolean—and contrapositively, the topos of graphs, being non-Boolean (§16), cannot satisfy choice, an instance of which is visible directly: the double-vertex edge admits an epi from two disjoint loops with no splitting. 58

Example 19.8 (Real numbers vary with the topos). Internal and are rigid: in Sh(X) they are the constant sheaves. The real numbers are not. Interpreting the Dedekind-cut construction in the internal language of Sh(X)—a real is a pair of inhabited, open, located subsets of —and computing with the forcing clauses, one finds that the sheaf of Dedekind reals is DedekindC(,):U{continuous f:U}, the sheaf of continuous real-valued functions: a “real number” in the universe of sheaves over X is a real number varying continuously over X. (The Cauchy construction, by contrast, yields only the locally constant functions: in intuitionistic logic the two constructions genuinely diverge, and the topos exhibits the divergence.) This single computation is the seed of the “custom-tailored universes” method of §21: internal theorems of constructive analysis, e.g. that every function with a certain modulus is integrable, externalize to uniform, parametrized statements about continuous families—with continuity obtained for free rather than proved by hand.59

20. Geometric Morphisms

20.1 Definition and Provenance

Toposes form a 2-category, in two inequivalent ways. Logical functors preserve all the elementary structure (finite limits, exponentials, Ω)—the right notion for the “topos as theory of sets” reading. Geometric morphisms track the geometry:

Definition 20.1. A geometric morphism f: is an adjoint pair f*f* with f*: (the inverse image) preserving finite limits; f* is the direct image. A point of is a geometric morphism 𝐒𝐞𝐭.

The paradigm: a continuous map g:XY of spaces induces g*g* between Sh(X) and Sh(Y), and for sober spaces every geometric morphism arises so; points of Sh(X) recover the points of X. Likewise sheafification exhibits Sh(𝒞,J)𝒞̂ as a geometric embedding, and every Grothendieck topos sits so inside a presheaf topos. Kostecki’s introduction emphasizes the resulting two-level variability: objects of a presheaf topos are structures varying over internal stages, and geometric morphisms let entire theories be transported between toposes, each topos giving the theory its own interpretation.60

20.2 Inverse Images Preserve Geometric Logic

Because f* preserves finite limits and (being a left adjoint) all colimits, it preserves exactly the ingredients of geometric logic: ,,=,,. It need not preserve ,,¬. This is the structural explanation of the privileged status of geometric theories announced in §9: models of a geometric theory transport along inverse images, so each geometric theory 𝕋 has a classifying topos 𝐒𝐞𝐭[𝕋] with Geom(,𝐒𝐞𝐭[𝕋])Mod(𝕋,) naturally—the higher-order terminus of the classifying-category tower of Part I. The object classifier 𝐒𝐞𝐭[𝕆] (presheaves on 𝐒𝐞𝐭fin), the ring classifier (presheaves on finitely presented rings), and the local-ring classifier (the Zariski topos) are the standard first examples; the last returns the story to Grothendieck’s algebraic geometry.

20.3 Classifying Toposes, Worked a Little

The correspondence Geom(,𝐒𝐞𝐭[𝕋])Mod(𝕋,) unwinds in two cases.

Example 20.2 (The object classifier). Take 𝕋 the empty (one-sort, no-axiom) theory. A model in any topos is an object, so 𝐒𝐞𝐭[𝕆] must satisfy Geom(,𝐒𝐞𝐭[𝕆]). The answer is presheaves on finite sets, 𝐒𝐞𝐭[𝕆]=𝐒𝐞𝐭𝐒𝐞𝐭fin: by Diaconescu’s correspondence plus the fact that finite-limit-preserving = flat here, geometric morphisms into it are filtered-colimit-friendly functors out of 𝐒𝐞𝐭finop—and 𝐒𝐞𝐭finop is the free finite-limit completion of a point, dual to the free finite-coproduct category on one object met in Part I as the syntactic category of the empty theory. The generic object is the inclusion 𝐒𝐞𝐭fin𝐒𝐞𝐭.

Example 20.3 (Rings and local rings). For 𝕋 the algebraic theory of commutative rings, models correspond to left-exact colimit-preserving functors out of presheaves on 𝐑𝐢𝐧𝐠fpop—so 𝐒𝐞𝐭[𝕋]=𝐒𝐞𝐭𝐑𝐢𝐧𝐠fp, with generic ring the forgetful functor. Imposing the local-ring axioms of Example 9.2—coherent sequents—corresponds to imposing a Grothendieck topology (the Zariski topology) on the same base: the classifying topos of local rings is the Zariski topos, and the generic local ring is the structure sheaf of the “big” Zariski site. Quotient theories = subtoposes = Lawvere–Tierney topologies, exactly as promised; and the internal-language method of §21 applied to the generic model proves theorems about all models at once, the topos-level restatement of the genericity (1) with which Part I began.

Remark 20.4 (Surjections, embeddings, and the two theorems). Every geometric morphism factors as a surjection followed by an embedding; embeddings correspond to Lawvere–Tierney topologies on the codomain, i.e. to quotient theories. Two classical depth results anchor the model theory: Deligne’s theorem (a coherent topos has enough points) is, in logical dress, Gödel’s completeness theorem for coherent logic; Barr’s theorem (every Grothendieck topos is covered by one satisfying choice, with Boolean logic) licenses the elimination of classical reasoning from proofs of geometric sequents. Both belong to the “toposes as theories” part of the Elephant [23], Part D.

Remark 20.5 (The shape of the 2-category). Two factorization systems organize 𝔗𝔬𝔭. Every geometric morphism factors as a surjection followed by an embedding (inclusion of a subtopos), as noted; independently, as a hyperconnected morphism followed by a localic one. A topos is localic (over 𝐒𝐞𝐭) when generated by subobjects of 1—equivalently, equivalent to sheaves on a locale, its frame of opens being Sub(1); localic toposes are the faithful categorical avatars of (point-free) spaces. Hyperconnected morphisms, at the other extreme, have inverse images that are full and faithful on subobjects: they change “stuff” but not “truth values.” The factorization says every topos over 𝐒𝐞𝐭 is a hyperconnected extension of an honest (point-free) space—a precise measure of how far toposes exceed topology, with G-sets (localic reflection trivial, all hyperconnected) and Sh(X) (all localic) as the two poles.

21. Toposes as Mathematical Universes

21.1 Set-Like Structure: NNO, Choice, Booleanness

How much of set theory does a topos support? The elementary axioms give pairing, powersets (PA=ΩA), function spaces, and comprehension (extensions of formulas). The remaining classical commitments become optional axioms, each with a clean categorical form:

  • Infinity. A natural numbers object is 0:1N, s:NN initial among such data: for any x:1X, f:XX there is a unique recursion map NX. 𝐒𝐞𝐭 and 𝒞̂ have NNOs (constant presheaf ); 𝐒𝐞𝐭fin does not—infinity is a feature one adds, not part of the notion of topos.

  • Excluded middle. is Boolean when Ω is an internal Boolean algebra (equivalently every subobject is complemented; equivalently ¬¬=id). 𝐒𝐞𝐭, 𝐒𝐞𝐭fin, G-sets are Boolean; graphs and almost all sheaf toposes are not.

  • Choice. satisfies AC when every epi splits. AC implies Booleanness (Diaconescu’s theorem: choice yields excluded middle), and fails already in G-sets for nontrivial G (the epi Gregular1 has no equivariant splitting) and in sheaves over most spaces (no continuous choice of local sections).

  • Two-valuedness and well-pointedness. Sub(1) may be large (Sub(1)𝒪(X) in Sh(X): the truth values are the opens); a topos is two-valued when Sub(1)={0,1} and well-pointed when 1 generates. Well-pointed toposes with NNO and AC are exactly the models of Lawvere’s Elementary Theory of the Category of Sets (ETCS), a structural set theory of strength just below ZF; adding replacement-style axioms calibrates the gap.61

21.2 Arithmetic from the NNO

The NNO’s universal property is precisely primitive recursion at higher types, and here is how ordinary arithmetic falls out. Given the data 0:1N, s:NN, define addition by recursion in the second argument: the maps idN:NN and s() exhibit NN as a recursion-algebra, and currying the unique mediating map NNN gives +:N×NN with x+0=x,x+s(y)=s(x+y), these equations holding as identities of morphisms, hence internally with full generality. Multiplication and exponentiation iterate the trick. Induction is then a theorem of the internal logic: for a subobject PN containing 0 and closed under s, the universal property applied to P’s own zero-and-successor data produces a section of the inclusion, forcing P=N. Peano arithmetic (in its higher-order, categorical form) thus holds in any topos with NNO—with the caveat that the ambient logic is intuitionistic, so e.g. trichotomy for the internal integers holds but analogous statements for the internal reals of the next subsection do not.

21.3 Diaconescu’s Argument, and Internal Number Systems

Theorem 21.1 (Diaconescu). A topos satisfying the axiom of choice is Boolean.

Proof sketch. Fix a truth value pSub(1); we produce its complement. Consider the two-element quotient: internally, form the set Q={x2x=0x=1p}/ where identifies 01 iff p holds. The evident surjection 2Q splits by AC; a splitting selects representatives r([0]),r([1])2, and equality in 2 is decidable, so internally either r([0])=r([1])—which forces p—or r([0])r([1])—which forces ¬p, since p would identify the classes. Hence p¬p holds; as p was arbitrary, Ω is Boolean. The argument is fully constructive in the metatheory and formalizes verbatim in the internal language; its moral is that choice smuggles in case-analysis.62

Internal number systems. With an NNO N, the internal integers and rationals are constructed as in constructive set theory (quotients of N×N, etc.), uniquely up to isomorphism. The reals bifurcate: Cauchy reals (equivalence classes of internal Cauchy sequences) and Dedekind reals (two-sided cuts in ) agree in 𝐒𝐞𝐭 but not in general—in Sh(X) the Dedekind reals are the sheaf of continuous real-valued functions on X: real analysis internal to Sh(X) is automatically parametrized real analysis, a first instance of the tailoring theme of the next subsection. Internal completeness, Heine–Borel, and the intermediate value theorem then hold or fail according to the constructive status of their proofs—IVT, whose usual proof uses undecidable case-splitting on the sign of f(m), fails sheaf-internally in general, while its approximate version survives.

21.4 Custom-Tailored Universes

Blechschmidt’s survey “Exploring mathematical objects from custom-tailored mathematical universes” [27] distills the working method that the internal language makes possible.63 Each topos is a universe with its own ambient assumptions: the effective topos, where all functions are computable; smooth toposes, where infinitesimals exist and all functions are smooth; sheaf toposes over a space, where everything varies continuously over that space. The method:

  1. choose or build a topos whose native objects are the structures of interest (e.g. Sh(X) for a scheme or space X, with the structure sheaf 𝒪X a native ring);

  2. prove theorems inside constructively, treating those objects as bare sets/rings/modules;

  3. translate outward through Kripke–Joyal (Slogan 19.6): a constructive theorem about the internal ring 𝒪X becomes, externally, a theorem about the sheaf, often one whose direct proof would require delicate glueing or finiteness bookkeeping. Blechschmidt’s flagship examples are of this shape: e.g. internal one-line arguments specializing to Grothendieck-style generic freeness over reduced schemes.

Two refinements complete the toolkit. First, the choice of topos can encode hypotheses: passing to Sh¬¬ or to Barr covers (§20) adjusts the ambient logic. Second, the failure of classical axioms is a feature: that the smooth topos refutes ¬(D{0})-style classicality is exactly what permits honest nilpotent infinitesimals; that the effective topos refutes “every function is dominated by a computable one”-negations is what makes it a universe of computability.

21.5 Forcing, Classically: Independence via ¬¬-Sheaves

The Lawvere–Tierney machinery reproduces Cohen’s independence proofs in a form that is one of the subject’s founding applications.64 To violate the continuum hypothesis: take the poset P of finite partial functions κ×2 (Cohen conditions) for κ a suitably large cardinal, form the presheaf topos 𝐒𝐞𝐭Pop, and pass to the Boolean subtopos Sh¬¬ of double-negation sheaves. The result is a Boolean topos with choice in which the generic function forces 20κ; cutting down to a well-pointed model (or reading the construction as Boolean-valued sets) yields the classical independence of CH from ZFC. The conceptual gain over the classical presentation: the “forcing language” is the internal language, the “forcing relation” is Kripke–Joyal, and the passage to ¬¬-sheaves is the standard subtopos machinery of §17—no new metamathematics, only a change of universe. Independence proofs thus join synthetic differential geometry and computability as instances of the single method of this section: choose the topos in which the desired phenomenon is generic.

21.6 The Higher-Order Classifying Correspondence

The two parts of these notes fit together as follows. Part I: a theory in a fragment of first-order logic generates a classifying category in the matching doctrine, and models are structure-preserving functors out of it. Part II: an intuitionistic higher-order theory generates a syntactic topos, its universal model living inside; conversely every topos is the classifying topos of its own internal theory. Sound and complete rules for the internal logic are those of intuitionistic HOL; Booleanness, choice, infinity are optional axioms locating 𝐒𝐞𝐭 within the space of all universes. Functorial semantics, which began with one-sorted equational logic, extends all the way up.65

22. A Guide to the Literature

22.1 Topos Theory, in Increasing Order of Difficulty

A rough order of increasing difficulty; the one-line characterizations follow Baez’s reading advice.66

  1. Lawvere & Schanuel [29]: elementary introduction to the topos of sets; deceptively gentle—Baez passes on Schanuel’s warning that skipping the exercises makes the later chapters impossible.

  2. Reyes, Reyes & Zolfaghari [30]: combinatorial (presheaf) toposes via generic figures and glueings; the missing link before the graduate texts; six running examples, including the graphs of §16; Sec. 9.1 for the two negations.

  3. Goldblatt [32]: same level, logic-first; starts from scratch with categories; criticized by experts as showing what toposes illuminate rather than what they can do, which is precisely what a beginner wants.

  4. Mac Lane & Moerdijk [33]: the standard graduate text, broad and deep, unifying the geometric and logical lineages; Secs. VI.5–VI.6 for the internal language and forcing.

  5. Johnstone [23]: the Elephant, “the bible of topos theory”—two of three projected volumes published, roughly 1200 pages, organized by the perspectives of §13; sequel to the 1977 Topos Theory [24], long the key text and famously unforgiving.

Shorter on-ramps: Baez’s nutshell [25] and eight Azimuth lectures [26]; Kostecki’s guided tour [28]; Blechschmidt’s survey [27] for the universes-and-applications viewpoint.

22.2 Categorical Logic

Start with Awodey & Bauer [4] (algebraic theories and first-order fragments, the backbone of Part I), then Shulman [5] for the type-theoretic, multicategorical development; Abramsky & Tzevelekos [2] for a compact introduction from the computer-science side; Bell [1] for history; and Johnstone [23], Parts A and D, as the reference of record. For the regular and coherent fragments specifically: van Oosten [12], Butz [13], Gran [14], Borceux [15], and Reyes [16]. For the organizing frameworks: Kock & Reyes [6], Kelly & Street [7], Dagnino & Rosolini [9], Paugam [8], Makkai [10], and Fujii [11].

23. Exercises

The following exercises track the text; those marked * require material from the cited sources beyond what is developed here.

23.1 Part I

  1. Verify that the two-pullbacks lemma (Lemma 2.1) makes Sub a functor 𝒞op𝐏𝐨𝐬, checking independence of the choice of pullbacks.

  2. Show that in 𝐒𝐞𝐭, ff*f with the formulas of §7, and verify Beck–Chevalley and Frobenius by direct computation.

  3. Write out the theory of a single idempotent endomorphism (ee=e) and describe its syntactic category and its category of 𝐒𝐞𝐭-models. What are the finitely generated free models?

  4. Prove that the category of fields has neither products nor a terminal object, and locate exactly which limits exist. Conclude again (Example 4.10) that fields are not algebraic, and determine which fragment of §6’s table first suffices to axiomatize them.

  5. Show that a poset in the topos of graphs is a graph whose vertex-set and edge-set each carry a poset structure compatibly with source and target, and characterize reflexivity internally.

  6. In a regular category, prove that the composition of relations (§8.1) is associative, indicating precisely where pullback-stability of images is used.

  7. (*) Following [4], Sec. 2.5, construct the classifying regular category of the theory of a surjection between two sorts, and identify its universal model.

  8. Show that in any coherent category, distributes over in every Sub(A), using stability of joins.

  9. Verify the Kripke clause for in Example 10.2 directly from the adjunction ()UU() computed pointwise-with-restrictions.

  10. (*) Using [5], formulate the theory of a monoid in a symmetric monoidal multicategory and identify the extra structural rules needed to specialize it to the cartesian theory of monoids of §3.

23.2 Part II

  1. Verify in detail that the five sieves on E listed in §16 exhaust the sieves, that the stated graph structure on Ω is forced by the presheaf action, and that χA as defined is a graph morphism.

  2. Compute Ω for the topos of reflexive graphs (add an arrow e:EV with se=te=idV to the base category—note the direction) and compare: how many truth values do edges have?

  3. Determine the truth values of the evolutive-set topos over (,)16.8) at each instant, verify the reading of ¬ given there, and identify the ¬¬-sheaves.

  4. For G-sets, show Ω={0,1} with trivial action, and conclude that G𝐒𝐞𝐭 is Boolean; then exhibit the failure of AC for G=/2 by finding a non-split equivariant epi.

  5. Complete the computation of YX for graphs (§16.7) by describing the source and target maps of YX explicitly, and verify the exponential adjunction on a small example (X=Y= the single edge).

  6. Show that the global points of Ω in the topos of graphs are exactly and (the two loops), so that “external” truth values number two while internal ones number five at edge stage: internal and external logic diverge.

  7. Prove monotonicity and local character of the forcing relation directly from the definition in §19.

  8. Using the forcing clauses, verify that in the single-edge graph the formula x,y.(x=y¬x=y) fails at stage E, and that its double negation also fails, but that ¬¬(x=y¬x=y) holds—as it must, in any topos.

  9. (*) Following [33], Ch. VI.8, carry out the identification of the Dedekind reals of Sh(X) with the sheaf of continuous functions for X=[0,1], at least at the level of the forcing clause for locatedness.

  10. (*) Read the statement of Barr’s theorem in [23], Part D, and use it to justify the following practice: to prove a geometric sequent in all Grothendieck toposes, it suffices to prove it with classical logic and choice.

A. Summary Tables and Glossary

A.1 Fragments and Structures

Structure New operations interpreted Key stability requirement
finite products terms, equations
finite limits ,,= meets, equalizers stable
regular (images) regular epis pullback-stable
coherent , joins pullback-stable
Heyting ,¬, Beck–Chevalley for
topos , P(), HOL classifier: Sub(,Ω)

A.2 Glossary

Beck–Chevalley condition

Commutation of quantifier-adjoints with pullback functors over pullback squares; the semantic form of “substitution commutes with quantification.”

Classifying category/topos

The structured category representing the models-functor of a theory; carries the universal (generic) model.

Doctrine

A species of structured category serving as the environment for a fragment of logic; formalizable as a 2-monad on 𝐂𝐚𝐭, among other ways.

Frobenius law

f(Uf*V)=fUV; automatic in the presence of implication.

Generic figure

A representable presheaf; arbitrary presheaves are glueings of generic figures.

Geometric morphism

Adjunction f*f* with left-exact inverse image; the topos-level continuous map.

Kripke–Joyal semantics

The stagewise forcing computation of the internal language; specializes to Kripke and Beth semantics.

Lawvere–Tierney topology

Internal closure operator j:ΩΩ; determines a subtopos of j-sheaves.

Mitchell–Bénabou language

The typed higher-order internal language of a topos; formulas are morphisms to Ω.

Natural numbers object

Initial “zero-and-successor” object; the optional axiom of infinity.

Regular category

Finite limits plus pullback-stable image factorizations; the environment for .

Sieve

A precomposition-closed set of morphisms into an object; sieves are the truth values in presheaf toposes.

Subobject classifier

𝗍𝗋𝗎𝖾:1Ω representing Sub; the object of truth values.

B. Further Exercises

The following exercises track the text; several are adapted from the exercise streams of the sources.67

  1. (AB) Formulate the notion of a left G-set, for a fixed group G, as an algebraic theory. What are the models in an arbitrary finite-product category?

  2. (AB) Determine what a group is in: 𝐒𝐞𝐭fin; 𝐓𝐨𝐩; the category of graphs; and 𝐆𝐫𝐩 itself. (For the last: show first that two commuting monoid structures with a common unit coincide and are commutative—the Eckmann–Hilton argument—and conclude that groups in 𝐆𝐫𝐩 are abelian groups.)

  3. (AB) Show that the syntactic category 𝒞𝕋 of an algebraic theory has all finite products, and that the universal model U satisfies exactly the provable equations.

  4. (AB) Describe the action on morphisms of the universal group U:𝐆op𝐒𝐞𝐭 of Example 3.9, and verify that terms s,t have equal interpretations UnU iff s=t in the free group on n generators.

  5. Prove the two-pullbacks lemma (Lemma 2.1), and deduce that pullback along gf agrees with pullback along f after pullback along g on subobject posets.

  6. (AB) Show that a category with finite products and pullbacks of monos along monos has all finite limits, by constructing equalizers from the pullback of id,f against id,g.

  7. Verify the six generalized-element rules of §2, and use them to give element-style proofs that meets of subobjects are pullback-stable.

  8. Show that in 𝐒𝐞𝐭, fU={bf1(b)U} is right adjoint to f1, and verify Beck–Chevalley for an explicit non-square pullback of your choosing.

  9. Show that 𝐓𝐨𝐩 is not regular: exhibit a quotient map whose pullback fails to be a quotient map.

  10. Prove the modular law of §8.1 in 𝐒𝐞𝐭 by element chasing, then in a general regular category using stable images.

  11. Show that the category of fields has neither a terminal nor an initial object, and locate exactly which steps of Theorem 4.9 fail.

  12. (RRZ) In the topos of graphs: compute ΩyV and ΩyE explicitly; verify the five-element edge stage of Ω; and check the bi-Heyting inequality ¬AA on three subgraphs of the single-edge graph.

  13. (RRZ) In evolutive sets (-sets): verify that the right ideals of form the classifier described in Example 16.3, compute ¬ on it, and determine for which k the truth value k satisfies k=¬¬k.

  14. Show that in G𝐒𝐞𝐭 for nontrivial finite G, the object G with left translation has no global points, yet the unique map G1 is epi; conclude internal inhabitation without global inhabitation, and reconcile with the Kripke–Joyal -clause.

  15. Verify the forcing computation for graphs in §19: no jointly epic family of graph maps can decide x=xv at the edge stage.

  16. Prove from the universal property of the NNO that + as defined in §21 is associative and commutative. (Hint: uniqueness of recursion maps.)

  17. Work out the Sierpiński-topos truth-value computation: exhibit Sub(1){,{o},X}, compute the Heyting implication table, and find a sheaf B and formula witnessing local but not global existence.

  18. Show that a Lawvere–Tierney topology j gives a closure operator UU on each Sub(A) commuting with pullback, and that ¬¬ satisfies the three axioms.

  19. (AB) Derive symmetry and transitivity of equality in the cartesian calculus from the substitution-of-equals rule.

  20. Complete the proof sketch of Diaconescu’s theorem (Theorem 21.1) in the internal language, marking exactly where decidable equality of 2 and the splitting are used.

C. Category-Theoretic Background in One Page

For reference we recall the notions used throughout; any of [4] (Appendix A), [2], or [29] supplies the details at increasing leisure.

Categories, functors, naturality. A category has objects, morphisms, associative composition, identities. A functor preserves all of it. A natural transformation ϑ:FG assigns components ϑA:FAGA commuting with every Ff,Gf. Functor categories 𝒟𝒞 collect functors and natural transformations; presheaves are the case 𝒟=𝐒𝐞𝐭, 𝒞op in the exponent.

Yoneda. y:𝒞𝒞̂, yc=𝒞(,c), is full and faithful, and 𝒞̂(yc,X)X(c) naturally. Consequences used above: representables generate; y preserves limits; an object is determined by its generalized elements.

Limits and colimits. Products, equalizers, pullbacks; their duals. A category with binary products, a terminal object, and equalizers has all finite limits; a pullback of a mono is a mono. Filtered colimits commute with finite limits in 𝐒𝐞𝐭.

Adjunctions. FU means 𝒟(FA,B)𝒞(A,UB) naturally; unit η:idUF and counit ε:FUid satisfy the triangle identities. Left adjoints preserve colimits; right adjoints preserve limits. Poset case: Galois connections. Examples on which Part I runs: free forgetful; ff*f; ()×A()A; sheafification inclusion.

Monads. An adjunction generates a monad T=UF with unit and multiplication; algebras for T reconstruct (Beck) the “algebraic” part of the adjunction. Finitary monads on 𝐒𝐞𝐭 = Lawvere theories (Theorem 4.9).

2-categorical language. 𝐂𝐚𝐭 has categories, functors, and natural transformations; doctrines live here as 2-monads (§12); toposes form 2-categories under either logical functors or geometric morphisms (§20).

D. Background in Detail: Categories, Functors, Adjoints

For self-containedness we collect the background notions used throughout; any introductory text (e.g. the opening chapters of [2], [29], or [32]) covers them fully.

D.1 Categories and Functors

A category 𝒞 consists of objects, morphisms with assigned domain and codomain, identities, and an associative, unital composition. A functor F:𝒞𝒟 assigns objects to objects and morphisms to morphisms preserving all the structure; a natural transformation η:FG assigns to each object c a component ηc:FcGc with Gfηc=ηcFf for every f:cc. Functors 𝒞𝒟 and natural transformations form the functor category 𝒟𝒞. A functor is faithful/full when injective/surjective on each hom-set; an equivalence when full, faithful, and essentially surjective.

D.2 Limits and Colimits

A cone over a diagram D:𝒥𝒞 is an object c with compatible morphisms to every D(j); a limit is a universal cone. Special cases: terminal object (𝒥 empty), binary products, equalizers, pullbacks. Colimits are the dual: initial object, coproducts, coequalizers, pushouts. A category with finite products and equalizers has all finite limits; a functor preserves a limit when it sends universal cones to universal cones. Monomorphisms are the morphisms m with mx=myx=y; equivalently, such that AidAidmAmB is a pullback. Epimorphisms are dual; regular epi/mono means “a coequalizer/equalizer of some pair.”

D.3 Adjunctions

An adjunction FG between F:𝒞𝒟 and G:𝒟𝒞 is a natural bijection 𝒟(Fc,d)𝒞(c,Gd); equivalently unit and counit η:IdGF, ϵ:FGId satisfying the triangle identities. Left adjoints preserve colimits; right adjoints preserve limits. Between posets, an adjunction is a Galois connection, the form in which most of Part I’s logic lives. Examples used in the text: free forgetful (free groups, free models of any algebraic theory); ()×A()A (exponentials, currying); ff*f (quantifiers); sheafification inclusion; f*f* (geometric morphisms).

D.4 Yoneda

For a small category 𝒞, the Yoneda embedding y:𝒞𝒞̂=𝐒𝐞𝐭𝒞op sends c to 𝒞(,c). The Yoneda lemma states 𝒞̂(yc,X)X(c) naturally; consequences used above: y is full and faithful; it preserves all limits that exist; every presheaf is a colimit of representables; and universal properties determine objects up to isomorphism. The completeness proofs of §3, the generic figures of §16, and the classifier of §17 all rest on it.

  1. J. L. Bell, 2005. The development of categorical logic. In Handbook of Philosophical Logic. doi:10.1007/1-4020-3092-4.

  2. S. Abramsky and N. Tzevelekos, 2011. Introduction to categories and categorical logic. doi:10.1007/978-3-642-12821-9_1; arXiv:1102.1313.

  3. V. de Paiva and A. Rodin, 2013. Elements of categorical logic: Fifty years later. doi:10.1007/s11787-013-0086-9.

  4. S. Awodey and A. Bauer, 2019. Introduction to Categorical Logic. Lecture notes. https://awodey.github.io/catlog/.

  5. M. Shulman, 2016. Categorical Logic from a Categorical Point of View. Lecture notes. https://mikeshulman.github.io/catlog/catlog.pdf.

  6. A. Kock and G. E. Reyes, 1977. Doctrines in categorical logic. In Handbook of Mathematical Logic. doi:10.1016/S0049-237X(08)71104-2.

  7. G. M. Kelly and R. Street, 1974. Review of the elements of 2-categories (Sec. 3: Monads in a 2-category). doi:10.1007/BFb0063101.

  8. F. Paugam, 2014. Towards the Mathematics of Quantum Field Theory, Sec. 2.1: Higher categories, doctrines, and theories. Springer.

  9. F. Dagnino and G. Rosolini, 2021. Doctrines, modalities and comonads. arXiv:2107.14031.

  10. M. Makkai, 1997. Generalized sketches as a framework for completeness theorems, Parts I–III. doi:10.1016/S0022-4049(96)00007-2; doi:10.1016/S0022-4049(96)00008-4; doi:10.1016/S0022-4049(96)00009-6.

  11. S. Fujii, 2019. A unified framework for notions of algebraic theory. Theory and Applications of Categories. arXiv:1904.08541.

  12. J. van Oosten, 1995. Basic Category Theory, Sec. 4.2: The logic of regular categories. Lecture notes. https://www.staff.science.uu.nl/~ooste110/syllabi/catsmoeder.pdf.

  13. C. Butz, 1998. Regular categories and regular logic. BRICS Lecture Series LS-98-2. https://www.brics.dk/LS/98/2/BRICS-LS-98-2.pdf.

  14. M. Gran, 2021. An introduction to regular categories. doi:10.1007/978-3-030-84319-9_4; arXiv:2004.08964.

  15. F. Borceux, 1994. Handbook of Categorical Algebra, Vol. 2, Ch. 2: Regular categories. Cambridge University Press.

  16. G. E. Reyes, 1977. Sheaves and Concepts: A Model-Theoretic Interpretation of Grothendieck Topoi, Ch. II: Coherent logic. Cahiers de topologie et géométrie différentielle. https://www.numdam.org/article/CTGDC_1977__18_2_105_0.pdf.

  17. M. Bezem, 2005. On the undecidability of coherent logic. doi:10.1007/11601548_2.

  18. M. Bezem and T. Coquand, 2005. Automating coherent logic. doi:10.1007/11591191_18.

  19. S. Stojanović et al., 2010. A coherent logic based geometry theorem prover capable of producing formal and readable proofs. doi:10.1007/978-3-642-25070-5_12.

  20. S. Stojanović et al., 2014. A vernacular for coherent logic. doi:10.1007/978-3-319-08434-3_28; arXiv:1405.3391.

  21. J. Avigad et al., 2009. A formal system for Euclid’s Elements. doi:10.1017/S1755020309990098; arXiv:0810.4315.

  22. M. Ganesalingam and W. T. Gowers, 2013. A fully automatic problem solver with human-style output. Preprint; a revised version appeared as “A fully automatic theorem prover with human-style output,” J. Automated Reasoning 58(2):253–291, 2017. arXiv:1309.4501.

  23. P. T. Johnstone, 2002. Sketches of an Elephant: A Topos Theory Compendium. Oxford University Press.

  24. P. T. Johnstone, 1977. Topos Theory. Academic Press.

  25. J. Baez, 2021. Topos theory in a nutshell. https://math.ucr.edu/home/baez/topos.html.

  26. J. Baez, 2020. Lecture notes on topos theory, Parts 1–8. Azimuth blog. https://johncarlosbaez.wordpress.com/2020/01/05/topos-theory-part-1/.

  27. I. Blechschmidt, 2022. Exploring mathematical objects from custom-tailored mathematical universes. doi:10.1007/978-3-030-84706-7_4; arXiv:2204.00948.

  28. R. P. Kostecki, 2011. An introduction to topos theory. Lecture notes. https://web.archive.org/web/20220823182043/https://www.fuw.edu.pl/~kostecki/ittt.pdf.

  29. F. W. Lawvere and S. H. Schanuel, 2009. Conceptual Mathematics, 2nd ed. Cambridge University Press. doi:10.1017/CBO9780511804199.

  30. M. La Palme Reyes, G. E. Reyes, and H. Zolfaghari, 2004. Generic Figures and Their Glueings: A Constructive Approach to Functor Categories. Polimetrica, Monza. https://marieetgonzalo.files.wordpress.com/2004/06/generic-figures.pdf.

  31. M. La Palme Reyes et al., 1994. The non-boolean logic of natural language negation. Philosophia Mathematica. doi:10.1093/philmat/2.1.45.

  32. R. Goldblatt, 1984. Topoi: The Categorial Analysis of Logic. North-Holland. https://projecteuclid.org/euclid.bia/1403013939.

  33. S. Mac Lane and I. Moerdijk, 1992. Sheaves in Geometry and Logic: A First Introduction to Topos Theory. Springer. doi:10.1007/978-1-4612-0927-0.


  1. The standard historical survey is Bell [1].↩︎

  2. The distinction is drawn from de Paiva & Rodin [3], a short introduction to a special issue of Logica Universalis on categorical logic, who separate categorical model theory, based on functorial semantics, from categorical proof theory, based on the Curry–Howard–Lambek correspondence between types and terms, propositions and proofs, and objects and morphisms.↩︎

  3. Following Shulman [5]. The idea is that a sequent A1,,AnB with several hypotheses is most naturally interpreted as a multimorphism (A1,,An)B in a multicategory; representing the domain as a single object via or × is a separate, second step. This decomposition cleanly separates the structural rules of the logic from the connectives.↩︎

  4. The fragment names and their connective-sets follow Awodey & Bauer [4], Sec. 2.1, which lists cartesian, regular, coherent, and geometric fragments of first-order logic and notes that the names for these fragments come from the names of various categorical structures in which they are interpreted. The correspondence table itself is standard; see also Johnstone [23], Part D.↩︎

  5. This section closely follows Awodey & Bauer [4], Sec. 2.2 (“Predicates as subobjects”), including the poset reflection of monos, the subobject functor, the interpretation of substitution as pullback, the notion of stability, and the calculus of generalized elements; all statements are rephrased and reorganized.↩︎

  6. This section is a condensed paraphrase of Awodey & Bauer [4], Ch. 1, whose opening observes that the scope of algebraic theories is actually much greater than first appears, and which develops the syntax, semantics, syntactic category, completeness theorems, and functorial-semantics summary reproduced (in compressed form) below.↩︎

  7. All of these examples appear in [4], Sec. 1.1, including the observation about inductive datatypes denoting free models and the semilattice trick for posets with meets.↩︎

  8. Example and isomorphism from [4], Example 1.1.11 and Exercise 1.1.12.↩︎

  9. The double-division presentation, the generators-and-relations analogy, and the construction below follow [4], Sec. 1.1.2.↩︎

  10. Theorem, proof strategy, and the universal property below follow [4], Prop. 1.1.16 and Def. 1.1.18: given a model M, the classifying functor M sends [x1,,xk] to Mk and a tuple of terms to the tuple of their interpretations; conversely an FP-functor F yields the model F(U), and natural transformations correspond to homomorphisms.↩︎

  11. Following [4], Prop. 1.1.24 and Prop. 1.1.27. The same two-step scheme—generic model by Yoneda, then classical completeness by evaluating pointwise—is the template for the Kripke-style completeness theorems of richer fragments.↩︎

  12. Paraphrasing [4], Example 1.1.25.↩︎

  13. The two four-part lists paraphrase the summary in [4], Sec. 1.1.5.↩︎

  14. This subsection compresses [4], Sec. 1.2.1, including the theorem, the reconstruction of syntax inside semantics, and the three worked examples below.↩︎

  15. Examples from [4], Sec. 1.2.2: the theory C of smooth maps and its models the C-rings; the theory 𝐑𝐞𝐜 of recursive functions; and the total theory of an object.↩︎

  16. Statement following [4], Thm. 1.2.18; the equivalence with (3) is via Beck’s monadicity theorem, and [4] also records Borceux’s variant characterization [15] (coequalizers and kernel pairs; U with a left adjoint, preserving filtered colimits and regular epimorphisms, reflecting isomorphisms).↩︎

  17. Argument from [4], Example 1.2.22 and Exercise 1.2.23.↩︎

  18. Following [4], Sec. 1.2.4, Prop. 1.2.24, Cor. 1.2.25, and Remark 1.2.29, which credits the full syntax–semantics duality for algebraic categories to the literature on Cauchy-complete theories.↩︎

  19. This section draws on two introductions to this material: Abramsky & Tzevelekos [2], whose Sec. 1.5 develops cartesian closed categories and the λ-calculus for a computer-science audience, and Shulman [5], Chs. 1–2, for the unary/simple type theories and the multicategorical refinement sketched at the end. The presentation here is compressed and rearranged.↩︎

  20. Following the design rationale of [5]; the identification of structural rules with properties of the cartesian product is made explicit there in the comparison of cartesian with symmetric monoidal multicategories.↩︎

  21. This section and the next three follow Awodey & Bauer [4], Ch. 2, supplemented for the regular and coherent fragments by van Oosten [12], Sec. 4.2, Butz [13], Gran [14], Borceux [15], Ch. 2, and Johnstone [23], Secs. A1.3–A1.4 and D1.1.↩︎

  22. The square-roots-of-unity example, and the observation that this special / pattern needs only finite limits, open [4], Ch. 2.↩︎

  23. The judgment notation, the reduction to binary sequents, the fragment list, and the integrability example all follow [4], Sec. 2.1.↩︎

  24. Rules, semantics, and the proof of soundness follow [4], Sec. 2.3, including this equality computation (their Thm. 2.3.10).↩︎

  25. Transcribing the rule list of [4], Sec. 2.3 (“Inference rules for cartesian logic”), in a two-column layout.↩︎

  26. Following [4], Examples 2.3.2 and 2.3.11.↩︎

  27. The internal-category example and the diagnosis that composition’s signature requires subtypes—with dependent type theory as the systematic solution—follow [4], Sec. 2.3.1. The theory of categories is cartesian in the more generous sense of essentially algebraic or finite-limit theories; see the discussion of doctrines in §12.↩︎

  28. The treatment of quantifiers as adjoints together with Beck–Chevalley follows [4], Secs. 2.4–2.4.1; the role of Frobenius in the regular fragment is standard, cf. Butz [13] and Johnstone [23], A1.3.↩︎

  29. Definition and equivalence as in Gran [14] and Borceux [15], Ch. 2; the logical reading via stable images follows [4], Secs. 2.5.1–2.5.2, van Oosten [12], Sec. 4.2, and Butz [13].↩︎

  30. Standard example list, cf. Gran [14] and Borceux [15].↩︎

  31. The relational calculus in a regular category is classical; see Butz [13], Sec. 1, Gran [14], and Borceux [15], Ch. 2. The Frobenius/modular-law computation below is a standard exercise in those sources, redone here in our notation.↩︎

  32. The classifying-category construction for regular theories is [4], Secs. 2.5.3–2.5.4; the functional-relations device is standard and is developed in full generality in Johnstone [23], Sec. D1.4.↩︎

  33. Expanding the proofs of [4], Sec. 2.5.2, and Butz [13], Sec. 2, in our notation.↩︎

  34. The relational calculus in a regular category is classical; concise treatments occur in the standard regular-category sources, e.g. Butz [13], Sec. 1, and Borceux [15], Ch. 2. Freyd–Scedrov’s allegories axiomatize the resulting structure directly; Johnstone [23], A3, gives the topos-theoretic development.↩︎

  35. As in Johnstone [23], Sec. A1.4, and [4], Sec. 2.5.5. Reyes’s monograph [16], Ch. II, develops coherent logic as the model theory of Grothendieck topoi.↩︎

  36. As in [4], Sec. 2.6 and Johnstone [23], A1.4; the construction of from is VW=m(m*W) for m:VA.↩︎

  37. Following the arc of [4], Sec. 2.7 (“Kripke–Joyal semantics,” with Kripke models and completeness as Secs. 2.7.1–2.7.2). We take up the topos-theoretic Kripke–Joyal semantics in full in Part II.↩︎

  38. This section draws on two type-theoretic introductions: Abramsky & Tzevelekos [2], whose final sections introduce cartesian closed categories and the simply typed λ-calculus, and Shulman [5], whose multicategorical development is sketched at the end. The material is classical (Lambek); our exposition is a compressed paraphrase.↩︎

  39. For the classical survey see Kock & Reyes [6]; John Baez gives an introduction at the n-Category Café.↩︎

  40. Following Makkai [10].↩︎

  41. Following Fujii [11], whose framework encompasses not just algebraic theories in the strict sense but PROs, PROPs, symmetric and nonsymmetric operads, and so on.↩︎

  42. The nLab catalogues the many perspectives on toposes; the multiplicity of viewpoints is a theme of Baez’s “Topos theory in a nutshell” [25] and of the historiographic literature Baez cites there; Johnstone’s Sketches of an Elephant [23] is organized around it, with parts titled “Toposes as Categories,” “Toposes as Spaces,” “Toposes as Theories,” and (projected) “Toposes as Mathematical Universes.”↩︎

  43. This capsule history follows Baez [25] (Sec. 1, “Hand-wavy vague explanation”) and the first of his Azimuth lectures [26]: Lawvere’s 1963 search for categorical foundations, his 1966 encounter with Grothendieck’s toposes, the meaning of “topos” as place and Grothendieck’s interest in where statements hold, and the Lawvere–Tierney distillation of the elementary axioms by 1971. Baez’s Azimuth lecture adds that Grothendieck’s motivation lay in algebraic geometry—associating to a space its ring of functions and, for the Weil conjectures, needing cohomology theories attached to sites—and that the logical approach is more self-contained though drier, with Mac Lane & Moerdijk’s title Sheaves in Geometry and Logic [33] flagging the intended synthesis.↩︎

  44. Paraphrasing the passage of McLarty’s essay quoted at length in Baez [25], Sec. 5, where Baez also endorses McLarty’s Elementary Categories, Elementary Toposes as the laconic, logic-focused alternative to [33].↩︎

  45. Definition and the remark that colimits are derivable follow Baez [25], Sec. 2, who gives the “rather inefficient” definition with colimits included and immediately notes the list could be made even shorter, since colimits follow from the rest. The full development is Mac Lane & Moerdijk [33], Ch. IV.↩︎

  46. The paraphrase of the axioms in terms of familiar set-theoretic constructions follows Baez [25], Sec. 3, who suggests that mastering these concepts (limits, exponentials, classifiers) is the most valuable first step in learning topos theory.↩︎

  47. The gallery, including the G-sets, presheaves, simplicial sets, finitist, effective-topos, smooth-topos, and time-dependent examples and the closing moral that toposes can be tailored to specific needs, paraphrases Baez [25], Sec. 4. The effective topos is due to Hyland; the smooth toposes to Lawvere and Kock; the quip about working in 𝐒𝐞𝐭 is Baez’s.↩︎

  48. The bridge-between-textbooks framing and the generic-figures pedagogy are from the book’s own description and front matter [30].↩︎

  49. These formulas are standard presheaf-topos computations; cf. [33], Sec. I.8 and III.8, and the “logical operations” entries in the index of [30], which computes them for each of its running examples.↩︎

  50. This subsection works out, in our own notation, the running example of [30] (their “irreflexive graphs”); the book’s index of notions—bouquets, evolutive sets, the graphic topos examples, the computation of Ω, bi-Heyting algebras—documents the same program carried much further. Directed graphs as a functor category also appear in [4], Sec. A.4.1.↩︎

  51. See [30], Sec. 9.1, for the interpretation of the two negation operations in categories of presheaves, developed linguistically in Reyes et al. [31]. The bi-Heyting algebra and modal-operators-from-two-negations program appears in the related literature by the same authors.↩︎

  52. The running examples of [30] include, besides irreflexive and reflexive graphs, the categories of M-sets for a monoid M (their “evolutive sets” when M=(,+)) and of bouquets; this subsection paraphrases the shape of those examples.↩︎

  53. This computation is a standard exercise in the sources for this section; it appears among the worked examples of generic-figure methods in [30] (whose Ch. 5 treats exponentials in presheaf toposes) and as an exercise in [4]. The presentation here is our own.↩︎

  54. Mac Lane & Moerdijk [33], Ch. III (sites and sheafification) and the appendix (Giraud); Baez’s Azimuth lectures [26] develop presheaves and sheaves on spaces at a gentler pace over lectures 1–8.↩︎

  55. This section follows Mac Lane & Moerdijk [33], Sec. VI.5 for the Mitchell–Bénabou language and Sec. VI.6 for Kripke–Joyal semantics; the compressed presentation and examples here are our own paraphrase, with the graphs examples continuing §16. Goldblatt [32] develops the same material with the logic foregrounded at an introductory level.↩︎

  56. The clause list paraphrases Mac Lane & Moerdijk [33], Sec. VI.6, stated there for generalized elements in an arbitrary topos with epimorphic families; the specializations below are standard.↩︎

  57. The recovery of Kripke (and, over spaces, Beth) semantics is the point of the name; cf. [33], Sec. VI.7 and [4], Sec. 2.7.↩︎

  58. Diaconescu’s theorem is standard; the internal argument above follows the usual constructive presentation, cf. [33], Ch. VI, and Goldblatt [32] for the logical reading.↩︎

  59. The identification of the Dedekind reals in Sh(X) with the sheaf of continuous functions is classical (Mac Lane & Moerdijk [33], Ch. VI.8); Blechschmidt [27], Sec. 3, uses it as a flagship example of the internal-to-external dictionary.↩︎

  60. This emphasis paraphrases the overview portion of Kostecki [28], which presents 𝐒𝐞𝐭𝒞op as enabling evaluation of a theory at different “stages” or contexts, and geometric morphisms as the vehicle for moving between toposes; the guided tour there runs from categories to the Lawvere–Tierney axioms.↩︎

  61. The axiom-by-axiom comparison of toposes with set theory is the program of Goldblatt [32] at the introductory level and of Part F of the projected third volume of [23]; the independence-proof connection (forcing as sheaves, double-negation topology) is classical Lawvere–Tierney, exposited in [33], Ch. VI.↩︎

  62. Diaconescu’s theorem is standard; the internal-language proof sketched here follows the usual presentations (e.g. [33], Ch. VI exercises; [23], D4.5). Goldblatt [32] discusses the axis classical-vs-intuitionistic at length at the introductory level.↩︎

  63. This subsection paraphrases the program of [27] (per its abstract and introduction): toposes as alternative mathematical universes tailored to specific objects; the dictionary between internal and external statements provided by the internal language; the sheaf-topos example in which internal reasoning about a ring specializes to statements about a sheaf of rings; and the survey’s advertised applications to algebraic geometry, where a generic-freeness style theorem admits a short internal proof. The synthetic-differential-geometry and effective-topos illustrations continue Baez’s gallery [25].↩︎

  64. The topos-theoretic form of Cohen forcing is due to Lawvere and Tierney and is exposited in [33], Ch. VI; Goldblatt [32] gives an introductory account. The two-line summary here is our paraphrase.↩︎

  65. For the full development of the topos–theory correspondence see Johnstone [23], Part D, and Mac Lane & Moerdijk [33], Ch. VI; Bell’s survey [1] narrates the same arc historically.↩︎

  66. The study advice about exercises and the warnings about the harder books paraphrase Baez [25], Sec. 5, who reports Schanuel’s dictum that the exercises in [29] are mandatory, describes Goldblatt [32] as beginner-friendly though “toposophers” find it light, calls Mac Lane–Moerdijk broad and deep, and relays the referee’s verdict that Johnstone’s 1977 book was far too hard for the faint-hearted while the Elephant explains more but overwhelms beginners with detail.↩︎

  67. Exercises marked (AB) adapt exercises in Awodey & Bauer [4]; those marked (RRZ) adapt the computational program of Reyes–Reyes–Zolfaghari [30]; unmarked exercises are ours.↩︎

Leave a comment