David Spivak · concept dictionary

Reading David Spivak in the original

17 terms, 6 of them Spivak’s own coinage. Every entry cites the work it is drawn from.

C D F H I L M O P T W

C

Categorical Schema central

a database layout is a category; a database is a functor

In the functorial data model a database schema is a small category: objects are tables, arrows are columns pointing at other tables (foreign keys and attributes), and imposed equations between paths are the integrity constraints. A database state — an instance — is then a functor from that category to Set, giving each table its set of rows and each arrow an actual function on rows. Keys, referential integrity and joins are consequences of the categorical structure rather than extra machinery bolted on afterwards.

In Spivak's work: this identification is the hinge for everything downstream. Because a schema is a category and an instance is a functor, all instances on a schema C form the functor category Set^C — a topos, so the database inherits limits, colimits and an internal logic for free. It is also exactly an olog with data in it: one diagram serves both the domain expert and the machine. He uses it as the entry point to category theory for scientists, and it is what turns a schema mapping into an ordinary functor, hence migration into an adjoint triple.

See also olog, functorial data migration, polynomial comonoid, compositionality

databasesformal theory

Spivak, "Category Theory for the Sciences" (MIT Press, 2014); free precursor "Category theory for scientists", arXiv:1302.6946
Written by Opus 5 gloss, grounded in cited sources

Composition Product central

p ◁ q — first p, then q; the operation that lets Poly hold time

The composition product p ◁ q is composition of the two functors, and the result is again polynomial: a position of p ◁ q is a position of p together with, for each of its directions, a position of q. It is one of four monoidal structures on Poly (alongside sum, product and the parallel product ⊗) and the only one that is not symmetric — order matters, because ◁ means "first p, then q". Iterating gives p ◁ p ◁ p: three successive rounds of interaction.

In Spivak's work: the whole second half of the Poly book turns on it, and his claim is that ◁ is how time enters a theory of interaction without a separate temporal apparatus. Powers of p are protocols of n exchanges; the cofree comonoid on p is the tree of all possible runs of a system with interface p; and comonoids for ◁ turn out to be categories. His outline states the division plainly — Part I gives interaction protocols, Part II adds the composition product so the theory "properly captures the time evolution of a dynamical system."

See also polynomial functor, polynomial comonoid, dynamical system, positions and directions

formal theorymonoidal structure

Niu & Spivak, "Polynomial Functors: A Mathematical Theory of Interaction" (2024 revision), Part II, arXiv:2312.00990
Written by Opus 5 gloss, grounded in cited sources

Compositionality central

the whole's behavior is determined by the parts' and the wiring — when it is

Compositionality is the property that the behavior of an assembled whole is determined by the behaviors of its parts together with the pattern connecting them. It is a claim, not a given: plenty of systems have properties no amount of information about the parts will yield. Establishing it for a given notion of system means exhibiting the assignment "system ↦ behavior" as a structure-preserving map — a functor, an operad algebra, or, when equality is too much to ask, a lax monoidal functor.

In Spivak's work: he treats compositionality as the actual subject matter of applied category theory rather than a slogan, and organises "Seven Sketches" (with Brendan Fong) around it — seven categorical structures, each reached through an application where composing is the difficulty: databases, circuits, resource theories, signal flow, dynamical systems. The functorial formulation is the working test he applies to his own results: if you cannot produce the map, you have not shown compositionality. Much of his systems work is exactly the search for that map, and the honest cases are lax.

See also operad, wiring diagram, hypergraph category, olog

core conceptmethodology

Fong & Spivak, "Seven Sketches in Compositionality: An Invitation to Applied Category Theory" (2018); published as "An Invitation to Applied Category Theory: Seven Sketches in Compositionality", Cambridge University Press, 2019. arXiv:1803.05316
Written by Opus 5 gloss, grounded in cited sources

D

Dependent Lens borrowed

a morphism in Poly: forward on positions, backward on directions

A lens is a pair of functions running in opposite directions: a forward map extracting a view from a state, and a backward map that takes a state plus an update to the view and returns a new state — the standard gadget of bidirectional programming. A dependent lens lets the backward map's type vary with the forward output. A morphism p → q in Poly is exactly a dependent lens: forward on positions, p(1) → q(1), and backward on directions, q[f(i)] → p[i], for each position.

In Spivak's work: identifying Poly's morphisms with dependent lenses is what lets one category cover both machine dynamics and bidirectional data flow. "Learners' languages" shows the category of simple lenses embeds into Poly, so a supervised learner's forward pass and backward pass are the two halves of a single morphism, and parametrised lenses become generalised Moore machines. In the Poly book, dynamical systems are literally dependent lenses. The asymmetry he stresses is that inputs arrive in response to what was displayed, not pushed regardless.

See also polynomial functor, dynamical system, learner, positions and directions

formal theoryborrowed term

Spivak (2022) "Learners' languages." EPTCS 372 (Proceedings ACT 2021), pp. 14-28; preprint arXiv:2103.01189
Written by Opus 5 gloss, grounded in cited sources

Dynamical System central

a state set wired to an interface by a single lens

In the polynomial setting, a discrete-time dynamical system with state set S and interface p is one dependent lens Sy^S → p. Its forward part is the readout S → p(1), saying what the system displays in each state; its backward part is the update, taking a state together with an input direction available at the displayed position to the next state. This is a Moore machine with one addition that matters: the admissible inputs vary with the current output.

In Spivak's work: he insists the interface be a first-class object, held apart from the state. Systems are then composed by composing interfaces — wiring diagrams reappear as maps between polynomials — and any wired assembly is again a lens, so nesting closes without new machinery. The Poly book's chapter title is blunt about it: "Dynamical systems as dependent lenses." The standard coalgebraic account sits inside this one as the special case of a fixed interface; the continuous case is handled instead by his sheaf-theoretic systems theory.

See also dependent lens, polynomial functor, mode dependence, interval sheaf, composition product

systems theorycore concept

Spivak (2020) "Poly: An abundant categorical setting for mode-dependent dynamics." arXiv:2005.01894
Written by Opus 5 gloss, grounded in cited sources

F

Functorial Data Migration coined

one functor between schemas induces three canonical ways to move data

Given schemas C and D presented as categories, a functor F: C → D is a translation of one data layout into the other. It induces three ways to move data between them. The pullback Δ_F turns a D-instance into a C-instance by relabelling — a projection. Its left adjoint Σ_F pushes data the other way by gluing rows together (unions, quotients); its right adjoint Π_F does so by taking products (joins). The three always exist, and every ordinary query is assembled from them.

In Spivak's work: this is the operational payoff of the functorial data model, and his argument for it is economic as much as mathematical — a single schema mapping induces migrations acting on all tables simultaneously, rather than a per-query script written by hand, and Δ, Σ, Π between them cover conjunctive and disjunctive queries. It underwrites the categorical query language he developed with Ryan Wisnesky, and the same adjoint triple resurfaces in his later polynomial work, where comonoids are categories and bicomodules carry data migration.

See also categorical schema, olog, polynomial comonoid

databasescoinageadjunctions

Spivak (2012) "Functorial Data Migration." Information and Computation. DOI 10.1016/j.ic.2012.05.001; preprint arXiv:1009.1166
Written by Opus 5 gloss, grounded in cited sources

H

Hypergraph Category central

the setting where wires may branch, merge, appear and vanish

A hypergraph category is a symmetric monoidal category in which every object carries, coherently, the ability to split, merge, create and discard wires — formally, a special commutative Frobenius structure. That is precisely what is needed to interpret diagrams whose wires branch and join arbitrarily, rather than merely running side by side. Equivalently, they are cospan-algebras. The same structure has been rediscovered repeatedly under other names, including well-supported compact closed categories and dungeon categories.

In Spivak's work: the name is Brendan Fong's; with him Spivak gave the definition its workable form and proved the coherence theorem identifying hypergraph categories, up to equivalence, with algebras of cospans. The point is inventory: circuits, linear relations, databases, automata, graph rewriting and belief propagation all turn out to be hypergraph categories, so a single diagrammatic calculus governs all of them. It is the monoidal counterpart of his operadic systems theory — the semantics behind "wires can connect anywhere".

See also operad, wiring diagram, compositionality

formal theorydiagrammatics

Fong & Spivak (2019) "Hypergraph categories." Journal of Pure and Applied Algebra 223(11): 4746-4777. DOI 10.1016/j.jpaa.2019.02.014; preprint arXiv:1806.08304
Written by Opus 5 gloss, grounded in cited sources

I

Interval Sheaf borrowed

behavior over a stretch of time, glued from overlapping stretches

Sheaves are the standard tool for data that is defined locally and glues: assignments over overlapping regions that agree on the overlaps combine into a single assignment over the union. Take the regions to be intervals of time, ordered by inclusion, and the assignment to be "the behaviors that can occur over an interval of this length", and you get an interval sheaf. Restriction is truncation of a behavior; gluing is concatenation of behaviors that match where they overlap. The choice of site decides discrete or continuous time.

In Spivak's work: with Patrick Schultz and Christina Vasilakopoulou he uses interval sheaves as the semantics of machine behavior, so a system is a box together with the sheaf of behaviors its wires can exhibit, and interconnection is a limit computed among sheaves. Compositionality is then stated as a lax monoidal functor out of the wiring-diagram operad, and the gluing condition is what guarantees a wired assembly stays total and deterministic when its parts are. The same interval domain underlies his temporal type theory.

See also temporal type theory, dynamical system, operad, wiring diagram

systems theorysheaf theoryborrowed term

Schultz, Spivak & Vasilakopoulou, "Dynamical Systems and Sheaves." Applied Categorical Structures (accepted 2019); preprint arXiv:1609.08086
Written by Opus 5 gloss, grounded in cited sources

L

Learner coined

a supervised-learning component: implement, update, request

A learner from A to B is a parameter set P together with three functions: an implementation I: P × A → B saying what the component computes at each parameter value, an update U: P × A × B → P adjusting the parameter given a desired input-output pair, and a request r: P × A × B → A saying which input the component would rather have received. Learners compose in series and in parallel, forming a symmetric monoidal category.

In Spivak's work: with Brendan Fong and Rémy Tuyéras he proved that gradient descent — at a fixed step size, with a suitable error function — is a monoidal functor from parametrised functions to learners. Backpropagation is then not an algorithm layered onto a network but the image of that network under a structure-preserving map, which is why it decomposes along the network's own structure. The request function is where the backward error signal lives; that observation is what later let him identify learners with lenses and place them inside Poly.

See also dependent lens, dynamical system, compositionality, polynomial functor

machine learningcoinage

Fong, Spivak & Tuyéras (2019) "Backprop as Functor: A compositional perspective on supervised learning." LICS 2019; preprint arXiv:1711.10455
Written by Opus 5 gloss, grounded in cited sources

M

Mode-Dependence coined

the wiring changes because the parts changed state

A system is mode-dependent when the interaction available to it changes with its own state. Their standing example is a phone in airplane mode: it stops talking to cell towers, so the network's connectivity is itself a function of the nodes' states. Formally this means the inputs a component accepts — and even which components are connected to which — cannot be fixed once at design time, because each module's dynamics include updating the mode in which it communicates.

In Spivak's work: he treats static interconnection as the assumption most systems formalisms quietly make and most real systems violate. With Joshua Tan he handled it operadically, so that a local network with mode-dependent wiring nests as a single module inside a larger network at any level. Poly then makes it automatic rather than engineered: since directions depend on positions, "what can be done to me now" is already state-dependent — which is his central argument that Poly is the right ambient setting for dynamics.

See also dynamical system, wiring diagram, polynomial functor, operad

systems theorycoinage

Spivak & Tan (2015) "Nesting of dynamic systems and mode-dependent networks." arXiv:1502.07380
Written by Opus 5 gloss, grounded in cited sources

O

Olog coined

an ontology written as a category, in readable English

An olog — short for "ontology log" — records a body of knowledge as a category. Boxes are types, labelled with English noun phrases ("a man", "a pair (x, y) where x is a man and y is a woman"). Arrows between boxes are aspects: functional relationships, labelled so the whole arrow reads as a sentence ("a man — has as birthplace → a place"). Commuting diagrams are facts: two routes between the same boxes that always agree. The discipline is strict — every label must read as grammatical English, and every arrow must be an honest function, total and single-valued.

In Spivak's work: introduced with Robert Kent as an alternative to OWL-style ontologies, and deliberately dual-purpose: an olog is at once a concept map a domain expert can read aloud and a database schema that executes. Because ologs are categories, a functor between two ologs is a meaning-preserving translation, so incompatible world-views get compared by mapping both into common ground rather than merged by decree. He shows ologs can express primitive recursive functions. The English-readability requirement is not decoration — it is the constraint that keeps the author from writing an arrow they cannot justify.

See also categorical schema, functorial data migration, compositionality

core conceptknowledge representationcoinage

Spivak & Kent (2012) "Ologs: A Categorical Framework for Knowledge Representation." PLOS ONE. DOI 10.1371/journal.pone.0024274; preprint arXiv:1102.1889
Written by Opus 5 gloss, grounded in cited sources

Operad borrowed

the algebra of many-in, one-out composition

An operad specifies, for each list of input types and each output type, a set of operations combining those inputs into that output, plus an associative rule for substituting one operation into an input slot of another. Where a category has arrows with a single source, an operad has operations with many. An algebra over an operad interprets the abstract operations concretely, saying what actually fills the slots. Operads came out of 1970s algebraic topology, where they encoded the structure of iterated loop spaces.

In Spivak's work: operads are the syntax of architecture. The operations are ways of wiring smaller systems into a larger one; the algebra says what the boxes contain — relations, database queries, circuits, continuous dynamical systems, Moore machines. The substitution law is exactly the claim he needs: a wired-together assembly can be sealed up and reused as a single component one level higher, so nesting is free. He teaches operads to non-mathematicians as the mathematics of self-similarity, and built his pre-Poly systems theory on one particular operad, that of wiring diagrams.

See also wiring diagram, hypergraph category, mode dependence, interval sheaf

formal theoryborrowed term

Spivak (2013) "The operad of wiring diagrams: formalizing a graphical language for databases, recursion, and plug-and-play circuits." arXiv:1305.0297
Written by Opus 5 gloss, grounded in cited sources

P

Polynomial Comonoid central

a category, presented as a machine you can drive

A comonoid for the composition product is a polynomial c with a counit c → y and a comultiplication c → c ◁ c obeying the usual laws. The theorem, due to Ahman and Uustalu, is that such comonoids are exactly small categories: positions are objects, the directions at a position are the morphisms out of that object, comultiplication is composition, the counit picks identities. Their morphisms are not functors but retrofunctors, which carry objects forward and morphisms backward; these form the category Cat♯.

In Spivak's work: Niu and Spivak give Cat♯ the second half of their book and argue it is often a better home than Cat. The reading is dynamical: a category presented this way is something you drive — sit at an object, choose an outgoing arrow, arrive somewhere new — and retrofunctors are precisely the maps respecting that. It also closes a loop with his database work, where schemas are categories: with Garner and Fairbanks he uses polynomial comonads and bicomodules to recover data migration and, beyond it, aggregation.

See also composition product, polynomial functor, dependent lens, categorical schema

formal theorycategories

Niu & Spivak, "Polynomial Functors: A Mathematical Theory of Interaction" (2024 revision), Chapters 7-8, arXiv:2312.00990
Written by Opus 5 gloss, grounded in cited sources

Polynomial Functor borrowed

a set of positions, each carrying a set of directions

A polynomial functor on Set is a sum of representable functors: p = Σ_{i ∈ p(1)} y^{p[i]}. Concretely it is a set of positions p(1), each position i carrying a set of directions p[i] — a formal polynomial in one variable y whose coefficients and exponents are sets. Familiar functors are instances: the constant A, the power y^S, and any sum or product of these. Polynomial functors organise into a category, Poly, whose morphisms are dependent lenses.

In Spivak's work: polynomial functors long predate him — they run through Joyal's species, Kock's trees, and the container/W-type literature in type theory. What he and Nelson Niu do is treat Poly as a standalone mathematical universe rather than a technical device inside something else, and read every polynomial as an interface: positions are what a system can display, directions are what the environment can do to it in that position. The book's whole apparatus — four interacting monoidal structures, the composition product, comonoids — is built to make that reading pay.

See also positions and directions, dependent lens, composition product, polynomial comonoid, dynamical system

core conceptformal theoryborrowed term

Niu & Spivak, "Polynomial Functors: A Mathematical Theory of Interaction" (2024 revision), arXiv:2312.00990
Written by Opus 5 gloss, grounded in cited sources

Positions and Directions coined

output goes out, input comes back — and what may come back depends on what went out

The two-part data of a polynomial functor, named for what they do rather than for their algebra. A polynomial p has a set of positions, p(1); each position carries a set of directions, p[i]. Read as an interface, a position is the configuration a system is currently in and shows to the outside world, and a direction is one of the moves the outside world may make given that configuration. A morphism sends positions forward and directions backward.

In Spivak's work: the naming is Niu and Spivak's, and it carries the interpretation. Their preface puts it directly: a polynomial functor is "a collection of elements we call positions and, for each position, a collection of elements we call directions", with morphisms that send "positions forward and directions backward, modeling two-way communication." Because directions depend on the position, what may be done to a system varies with its state — mode-dependence built into the objects rather than patched on. The container literature names the same data "shapes and positions", for different purposes.

See also polynomial functor, dependent lens, dynamical system, mode dependence

core conceptterminology

Niu & Spivak, "Polynomial Functors: A Mathematical Theory of Interaction" (2024 revision), Preface, arXiv:2312.00990
Written by Opus 5 gloss, grounded in cited sources

T

Temporal Type Theory coined

types whose elements are behaviors, in a topos where time is built in

A type theory whose types are behavior types — kinds of thing that happen over time — rather than sets of static values, and whose propositions are claims holding over stretches of time. Its models live in the topos of sheaves on a translation-invariant quotient of the interval domain, so the logic is intuitionistic and time-indexed by construction rather than by explicit quantification over instants. Established temporal logics, including Linear Temporal Logic and Metric Temporal Logic, embed into it.

In Spivak's work: written with Patrick Schultz, it is his most ambitious attempt to make correctness claims about hybrid systems — differential equations punctuated by discrete jumps — into ordinary mathematics. The gain he presses is that a topos has an internal language: you reason about behaviors as though they were plain sets and functions, and the sheaf semantics supplies the temporal bookkeeping. He shows how far this goes by defining the derivative of a continuous function internally. It is the logical face of his interval-sheaf systems theory.

See also interval sheaf, dynamical system, compositionality

logiccoinagesystems theory

Schultz & Spivak, "Temporal Type Theory: A Topos-Theoretic Approach to Systems and Behavior" (Birkhäuser, 2019); preprint arXiv:1710.10258
Written by Opus 5 gloss, grounded in cited sources

W

Wiring Diagram central

an interconnection pattern, promoted from picture to operation

A wiring diagram is a picture of an interconnection: an outer box, some inner boxes, and wires joining ports — inner outputs into inner inputs, outer inputs into inner inputs, inner outputs out to the outer boundary. What matters is the connection pattern, not the drawing. Such patterns are the operations of an operad: substituting one diagram into an inner box of another yields a diagram again, so an entire hierarchy of interconnection collapses to a single flat one whenever you want it to.

In Spivak's work: he turned the engineer's picture into mathematics, proving wiring diagrams are the morphisms of an operad and identifying algebras of that operad with relational database queries, circuit diagrams, and plug-and-play devices; the same operad later carries discrete and continuous dynamical systems. Two things are bought at once — interconnection becomes a formal operation you can compute with, and the behavior of an assembly becomes a function of the parts' behaviors plus the wiring. In the polynomial setting this reappears as maps between interfaces.

See also operad, hypergraph category, mode dependence, compositionality

systems theorydiagrammatics

Spivak (2013) "The operad of wiring diagrams: formalizing a graphical language for databases, recursion, and plug-and-play circuits." arXiv:1305.0297
Written by Opus 5 gloss, grounded in cited sources

← All AGI-26 speakers