David I. Spivak
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Research Subjects
Research Interests
David I. Spivak has a total of 23 co-authors. Here are the top co-authors by number of shared publications:
- Joachim Kock
Departament de Matemàtiques Universitat Autònoma de Barcelona 08193 Bellaterra (Barcelona Spain
3 shared publications Patrick Schultz
Massachusetts Institute of Technology
3 shared publications- Ryan Wisnesky
Conexus AI, Inc. San Francisco CA USA
3 shared publications - Albert Jones
National Institute of Standards and Technology
1 shared publication Brandon T. Shapiro
Topos Institute
1 shared publication- C. B. Aberlé
Carnegie-Mellon University Pittsburgh USA
1 shared publication
Latest Publications
- Open Access
- 20 December 2025
- Published by Centre pour la Communication Scientifique Directe (CCSD) in Electronic Notes in Theoretical Informatics and Computer Science
- Vol. ume 5 - Pr
Polynomial Universes in Homotopy Type Theory
Awodey, later with Newstead, showed how polynomial functors with extra structure (termed ``natural models'') hold within them the categorical semantics for dependent type theory. Their work presented these ideas clearly but ultimately led them outside of the usual category of polynomial functors to a particular \emph{tricategory} of polynomials in order to explain all of the structure possessed by such models. This paper builds off that work -- explicating the categorical semantics of dependent type theory by axiomatizing them entirely in terms of the usual category of polynomial functors. In order to handle the higher-categorical coherences required for such an explanation, we work with polynomial functors in the language of Homotopy Type Theory (HoTT), which allows for higher-dimensional structures to be expressed purely within this category. The move to HoTT moreover enables us to express a key additional condition on polynomial functors -- \emph{univalence} -- which is sufficient to guarantee that models of type theory expressed as univalent polynomials satisfy all higher coherences of their corresponding algebraic structures, purely in virtue of being closed under the usual constructors of dependent type theory. We call polynomial functors satisfying this condition \emph{polynomial universes}. As an example of the simplification to the theory of natural models this enables, we highlight the fact that a polynomial universe being closed under dependent product types implies the existence of a distributive law of monads, which witnesses the usual distributivity of dependent products over dependent sums.
- 20 December 2025
- Published by Centre pour la Communication Scientifique Directe (CCSD) in Electronic Notes in Theoretical Informatics and Computer Science
- Vol. ume 5 - Pr
Open AccessPolynomial Universes in Homotopy Type Theory
Awodey, later with Newstead, showed how polynomial functors with extra structure (termed ``natural models'') hold within them the categorical semantics for dependent type theory. Their work presented these ideas clearly but ultimately led them outside of the usual category of polynomial functors to a particular \emph{tricategory} of polynomials in order to explain all of the structure possessed by such models. This paper builds off that work -- explicating the categorical semantics of dependent type theory by axiomatizing them entirely in terms of the usual category of polynomial functors. In order to handle the higher-categorical coherences required for such an explanation, we work with polynomial functors in the language of Homotopy Type Theory (HoTT), which allows for higher-dimensional structures to be expressed purely within this category. The move to HoTT moreover enables us to express a key additional condition on polynomial functors -- \emph{univalence} -- which is sufficient to guarantee that models of type theory expressed as univalent polynomials satisfy all higher coherences of their corresponding algebraic structures, purely in virtue of being closed under the usual constructors of dependent type theory. We call polynomial functors satisfying this condition \emph{polynomial universes}. As an example of the simplification to the theory of natural models this enables, we highlight the fact that a polynomial universe being closed under dependent product types implies the existence of a distributive law of monads, which witnesses the usual distributivity of dependent products over dependent sums.
- Open Access
- 25 September 2025
- Published by Open Publishing Association in Electronic Proceedings in Theoretical Computer Science
- Vol. 429, 287-301
Organizing Physics with Open Energy-Driven Systems
Organizing physics has been a long-standing preoccupation of applied category theory, going back at least to Lawvere. We contribute to this research thread by noticing that Hamiltonian mechanics and gradient descent depend crucially on a consistent choice of transformation-which we call a reaction structure-from the cotangent bundle to the tangent bundle. We then construct a compositional theory of reaction structures. Reaction-based systems offer a different perspective on composition in physics than port-Hamiltonian systems or open classical mechanics, in that reaction-based composition does not create any new constraints that must be solved for algebraically. The technical contributions of this paper are the development of symmetric monoidal categories of open energy-driven systems and open differential equations, and a functor between them, functioning as a "functorial semantics" for reaction structures. This approach echoes what has previously been done for open games and open gradient-based learners, and in fact subsumes the latter. We then illustrate our theory by constructing an n-fold pendulum as a composite of n-many pendula.
- 25 September 2025
- Published by Open Publishing Association in Electronic Proceedings in Theoretical Computer Science
- Vol. 429, 287-301
Open AccessOrganizing Physics with Open Energy-Driven Systems
Organizing physics has been a long-standing preoccupation of applied category theory, going back at least to Lawvere. We contribute to this research thread by noticing that Hamiltonian mechanics and gradient descent depend crucially on a consistent choice of transformation-which we call a reaction structure-from the cotangent bundle to the tangent bundle. We then construct a compositional theory of reaction structures. Reaction-based systems offer a different perspective on composition in physics than port-Hamiltonian systems or open classical mechanics, in that reaction-based composition does not create any new constraints that must be solved for algebraically. The technical contributions of this paper are the development of symmetric monoidal categories of open energy-driven systems and open differential equations, and a functor between them, functioning as a "functorial semantics" for reaction structures. This approach echoes what has previously been done for open games and open gradient-based learners, and in fact subsumes the latter. We then illustrate our theory by constructing an n-fold pendulum as a composite of n-many pendula.
- Open Access
- 23 September 2025
- Published by Open Publishing Association in Electronic Proceedings in Theoretical Computer Science
- Vol. 429, 1-28
Pattern Runs on Matter: The Free Monad Monad as a Module over the Cofree Comonad Comonad
Interviews run on people, programs run on operating systems, voting schemes run on voters, games run on players. Each of these is an example of the abstraction pattern runs on matter. Pattern determines the decision tree that governs how a situation can unfold, while matter responds with decisions at each juncture. In this article, we will give a straightforward and concrete construction of the free monad monad for (Poly, ⊳, y), the category of polynomial functors with the substitution monoidal product. Although the free monad has been well-studied in other contexts, the construction we give is streamlined and explicitly illustrates how the free monad represents terminating decision trees. We will also explore the naturally arising interaction between the free monad and cofree comonad. Again, while the interaction itself is known, the perspective we take is the free monad as a module over the cofree comonad. Lastly, we will give four applications of the module action to interviews, computer programs, voting, and games. In each example, we will see how the free monad represents pattern, the cofree comonad represents matter, and the module action represents runs on.
- 23 September 2025
- Published by Open Publishing Association in Electronic Proceedings in Theoretical Computer Science
- Vol. 429, 1-28
Open AccessPattern Runs on Matter: The Free Monad Monad as a Module over the Cofree Comonad Comonad
Interviews run on people, programs run on operating systems, voting schemes run on voters, games run on players. Each of these is an example of the abstraction pattern runs on matter. Pattern determines the decision tree that governs how a situation can unfold, while matter responds with decisions at each juncture. In this article, we will give a straightforward and concrete construction of the free monad monad for (Poly, ⊳, y), the category of polynomial functors with the substitution monoidal product. Although the free monad has been well-studied in other contexts, the construction we give is streamlined and explicitly illustrates how the free monad represents terminating decision trees. We will also explore the naturally arising interaction between the free monad and cofree comonad. Again, while the interaction itself is known, the perspective we take is the free monad as a module over the cofree comonad. Lastly, we will give four applications of the module action to interviews, computer programs, voting, and games. In each example, we will see how the free monad represents pattern, the cofree comonad represents matter, and the module action represents runs on.
- Open Access
Dynamic Operads, Dynamic Categories: From Deep Learning to Prediction Markets
Natural organized systems adapt to internal and external pressures and this happens at all levels of the abstraction hierarchy. Wanting to think clearly about this idea motivates our paper, and so the idea is elaborated extensively in the introduction, which should be broadly accessible to a philosophically-interested audience. In the remaining sections, we turn to more compressed category theory. We define the monoidal double category Org of dynamic organizations, we provide definitions of Org-enriched, or dynamic, categorical structures -- e.g. dynamic categories, operads, and monoidal categories -- and we show how they instantiate the motivating philosophical ideas. We give two examples of dynamic categorical structures: prediction markets as a dynamic operad and deep learning as a dynamic monoidal category.
Open AccessDynamic Operads, Dynamic Categories: From Deep Learning to Prediction Markets
Natural organized systems adapt to internal and external pressures and this happens at all levels of the abstraction hierarchy. Wanting to think clearly about this idea motivates our paper, and so the idea is elaborated extensively in the introduction, which should be broadly accessible to a philosophically-interested audience. In the remaining sections, we turn to more compressed category theory. We define the monoidal double category Org of dynamic organizations, we provide definitions of Org-enriched, or dynamic, categorical structures -- e.g. dynamic categories, operads, and monoidal categories -- and we show how they instantiate the motivating philosophical ideas. We give two examples of dynamic categorical structures: prediction markets as a dynamic operad and deep learning as a dynamic monoidal category.
- Open Access
Polynomial Functors and Shannon Entropy
Past work shows that one can associate a notion of Shannon entropy to a Dirichlet polynomial, regarded as an empirical distribution. Indeed, entropy can be extracted from any d:Dir by a two-step process, where the first step is a rig homomorphism out of Dir, the *set* of Dirichlet polynomials, with rig structure given by standard addition and multiplication. In this short note, we show that this rig homomorphism can be upgraded to a rig *functor*, when we replace the set of Dirichlet polynomials by the *category* of ordinary (Cartesian) polynomials. In the Cartesian case, the process has three steps. The first step is a rig functor PolyCart -> Poly sending a polynomial p to (dp)y, where dp is the derivative of p. The second is a rig functor Poly -> Set x Set^op, sending a polynomial q to the pair (q(1),Gamma(q)), where Gamma(q)=Poly(q,y) can be interpreted as the global sections of q viewed as a bundle, and q(1) as its base. To make this precise we define what appears to be a new distributive monoidal structure on Set x Set^op, which can be understood geometrically in terms of rectangles. The last step, as for Dirichlet polynomials, is simply to extract the entropy as a real number from a pair of sets (A,B); it is given by log A - log B^(1/A) and can be thought of as the log aspect ratio of the rectangle.
Open AccessPolynomial Functors and Shannon Entropy
Past work shows that one can associate a notion of Shannon entropy to a Dirichlet polynomial, regarded as an empirical distribution. Indeed, entropy can be extracted from any d:Dir by a two-step process, where the first step is a rig homomorphism out of Dir, the *set* of Dirichlet polynomials, with rig structure given by standard addition and multiplication. In this short note, we show that this rig homomorphism can be upgraded to a rig *functor*, when we replace the set of Dirichlet polynomials by the *category* of ordinary (Cartesian) polynomials. In the Cartesian case, the process has three steps. The first step is a rig functor PolyCart -> Poly sending a polynomial p to (dp)y, where dp is the derivative of p. The second is a rig functor Poly -> Set x Set^op, sending a polynomial q to the pair (q(1),Gamma(q)), where Gamma(q)=Poly(q,y) can be interpreted as the global sections of q viewed as a bundle, and q(1) as its base. To make this precise we define what appears to be a new distributive monoidal structure on Set x Set^op, which can be understood geometrically in terms of rectangles. The last step, as for Dirichlet polynomials, is simply to extract the entropy as a real number from a pair of sets (A,B); it is given by log A - log B^(1/A) and can be thought of as the log aspect ratio of the rectangle.
- Open Access
Fast Left Kan Extensions Using The Chase
We show how computation of left Kan extensions can be reduced to computation of free models of cartesian (finite-limit) theories. We discuss how the standard and parallel chase compute weakly free models of regular theories and free models of cartesian theories, and compare the concept of "free model" with a similar concept from database theory known as "universal model". We prove that, as algorithms for computing finite free models of cartesian theories, the standard and parallel chase are complete under fairness assumptions. Finally, we describe an optimized implementation of the parallel chase specialized to left Kan extensions that achieves an order of magnitude improvement in our performance benchmarks compared to the next fastest left Kan extension algorithm we are aware of.
Open AccessFast Left Kan Extensions Using The Chase
We show how computation of left Kan extensions can be reduced to computation of free models of cartesian (finite-limit) theories. We discuss how the standard and parallel chase compute weakly free models of regular theories and free models of cartesian theories, and compare the concept of "free model" with a similar concept from database theory known as "universal model". We prove that, as algorithms for computing finite free models of cartesian theories, the standard and parallel chase are complete under fairness assumptions. Finally, we describe an optimized implementation of the parallel chase specialized to left Kan extensions that achieves an order of magnitude improvement in our performance benchmarks compared to the next fastest left Kan extension algorithm we are aware of.
- Open Access
Dirichlet Polynomials and Entropy
A Dirichlet polynomial d in one variable is a function of the form for some . We will show how to think of a Dirichlet polynomial as a set-theoretic bundle, and thus as an empirical distribution. We can then consider the Shannon entropy of the corresponding probability distribution, and we define its length (or, classically, its perplexity) by . On the other hand, we will define a rig homomorphism from the rig of Dirichlet polynomials to the so-called rectangle rig, whose underlying set is and whose additive structure involves the weighted geometric mean; we write , and call the two components area and width (respectively). The main result of this paper is the following: the rectangle-area formula holds for any Dirichlet polynomial d. In other words, the entropy of an empirical distribution can be calculated entirely in terms of the homomorphism h applied to its corresponding Dirichlet polynomial. We also show that similar results hold for the cross entropy.Open AccessDirichlet Polynomials and Entropy
A Dirichlet polynomial d in one variable is a function of the form for some . We will show how to think of a Dirichlet polynomial as a set-theoretic bundle, and thus as an empirical distribution. We can then consider the Shannon entropy of the corresponding probability distribution, and we define its length (or, classically, its perplexity) by . On the other hand, we will define a rig homomorphism from the rig of Dirichlet polynomials to the so-called rectangle rig, whose underlying set is and whose additive structure involves the weighted geometric mean; we write , and call the two components area and width (respectively). The main result of this paper is the following: the rectangle-area formula holds for any Dirichlet polynomial d. In other words, the entropy of an empirical distribution can be calculated entirely in terms of the homomorphism h applied to its corresponding Dirichlet polynomial. We also show that similar results hold for the cross entropy. - Open Access
Monitoring and Diagnosability of Perception Systems
Perception is a critical component of high-integrity applications of robotics and autonomous systems, such as self-driving cars. In these applications, failure of perception systems may put human life at risk, and a broad adoption of these technologies relies on the development of methodologies to guarantee and monitor safe operation as well as detect and mitigate failures. Despite the paramount importance of perception systems, currently there is no formal approach for system-level monitoring. In this work, we propose a mathematical model for runtime monitoring and fault detection of perception systems. Towards this goal, we draw connections with the literature on self-diagnosability for multiprocessor systems, and generalize it to (i) account for modules with heterogeneous outputs, and (ii) add a temporal dimension to the problem, which is crucial to model realistic perception systems where modules interact over time. This contribution results in a graph-theoretic approach that, given a perception system, is able to detect faults at runtime and allows computing an upper-bound on the number of faulty modules that can be detected. Our second contribution is to show that the proposed monitoring approach can be elegantly described with the language of topos theory, which allows formulating diagnosability over arbitrary time intervals.
Open AccessMonitoring and Diagnosability of Perception Systems
Perception is a critical component of high-integrity applications of robotics and autonomous systems, such as self-driving cars. In these applications, failure of perception systems may put human life at risk, and a broad adoption of these technologies relies on the development of methodologies to guarantee and monitor safe operation as well as detect and mitigate failures. Despite the paramount importance of perception systems, currently there is no formal approach for system-level monitoring. In this work, we propose a mathematical model for runtime monitoring and fault detection of perception systems. Towards this goal, we draw connections with the literature on self-diagnosability for multiprocessor systems, and generalize it to (i) account for modules with heterogeneous outputs, and (ii) add a temporal dimension to the problem, which is crucial to model realistic perception systems where modules interact over time. This contribution results in a graph-theoretic approach that, given a perception system, is able to detect faults at runtime and allows computing an upper-bound on the number of faulty modules that can be detected. Our second contribution is to show that the proposed monitoring approach can be elegantly described with the language of topos theory, which allows formulating diagnosability over arbitrary time intervals.
- 23 June 2020
- Published by Springer Nature
- Vol. 12150, 57-74
A Categorical Semantics for Guarded Petri Nets
We build on the correspondence between Petri nets and free symmetric strict monoidal categories already investigated in the literature, and present a categorical semantics for Petri nets with guards. This comes in two flavors: Deterministic and with side-effects. Using the Grothendieck construction, we show how the guard semantics can be internalized in the net itself.
- 23 June 2020
- Published by Springer Nature
- Vol. 12150, 57-74
A Categorical Semantics for Guarded Petri Nets
We build on the correspondence between Petri nets and free symmetric strict monoidal categories already investigated in the literature, and present a categorical semantics for Petri nets with guards. This comes in two flavors: Deterministic and with side-effects. Using the Grothendieck construction, we show how the guard semantics can be internalized in the net itself.
- 12 March 2020
- Published by American Mathematical Society (AMS) in Proceedings of the American Mathematical Society
- Vol. 148 (6) , 2317-2329
Decomposition-space slices are toposes
We show that the category of decomposition spaces and CULF maps is locally a topos. Precisely, the slice category over any decomposition space D \mathcal {D} is a presheaf topos, namely D e c o m p / D ≃ P s h ( tw D ) \mathsf {Decomp}_{/\mathcal {D}}\simeq \mathsf {Psh}(\operatorname {tw} \mathcal {D}) .
- 12 March 2020
- Published by American Mathematical Society (AMS) in Proceedings of the American Mathematical Society
- Vol. 148 (6) , 2317-2329
Decomposition-space slices are toposes
We show that the category of decomposition spaces and CULF maps is locally a topos. Precisely, the slice category over any decomposition space D \mathcal {D} is a presheaf topos, namely D e c o m p / D ≃ P s h ( tw D ) \mathsf {Decomp}_{/\mathcal {D}}\simeq \mathsf {Psh}(\operatorname {tw} \mathcal {D}) .