<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Topos Institute</title>
<link>https://topos.institute/blog/</link>
<atom:link href="https://topos.institute/blog/index.xml" rel="self" type="application/rss+xml"/>
<description></description>
<generator>quarto-1.8.26</generator>
<lastBuildDate>Fri, 30 Jan 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Composition of attractor lattices</title>
  <dc:creator>Tony Wehbe</dc:creator>
  <link>https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/</link>
  <description><![CDATA[ 




<section id="motivation" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Motivation</h1>
<p>Order shows up everywhere in our daily lives — in how we arrange objects, make decisions, or observe patterns. Mathematically, order is expressed as a relation on a set of objects, and I am particularly fascinated by how order reveals itself in the study of dynamical systems.</p>
<p>A dynamical system describes how a system evolves over time. Dynamical systems theory uses invariant sets to understand the system’s long-term behavior—patterns that persist as time goes on. A cornerstone of this perspective is Conley’s fundamental decomposition theorem, which shows that the global asymptotic dynamics of any system can be described entirely in terms of its attractors. This perspective leads to a beautiful algebraic insight: the collection of all attractors in a system naturally forms a bounded distributive lattice. Before defining attractors and exploring this lattice structure, we first need to set the stage by introducing what do we mean by a dynamical system.</p>
</section>
<section id="attractors-in-dynamical-systems" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Attractors in dynamical systems</h1>
<p>We begin by recalling the definition of a dynamical system. A <em>dynamical system</em> on topological space <img src="https://latex.codecogs.com/png.latex?X"> is a continuous map <img src="https://latex.codecogs.com/png.latex?%5Cphi%20:%20%5Cmathbb%7BT%7D%20%5Ctimes%20X%20%5Cto%20X"> that satisfies</p>
<ol type="1">
<li><p><img src="https://latex.codecogs.com/png.latex?%5Cphi(0,x)%20=%20x"> for all <img src="https://latex.codecogs.com/png.latex?x%20%5Cin%20X">,</p></li>
<li><p><img src="https://latex.codecogs.com/png.latex?%5Cphi(t,%5Cphi(s,x))%20=%20%5Cphi(t+s,x)"> for all <img src="https://latex.codecogs.com/png.latex?s,t%20%5Cin%20%5Cmathbb%7BT%7D"> and <img src="https://latex.codecogs.com/png.latex?x%20%5Cin%20X">,</p></li>
</ol>
<p>where <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> is the time domain, either <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BZ%7D"> or <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BR%7D">. Next, we recall the definition of attractors and show how they form a bounded distributive lattice. We then illustrate this with a concrete example.</p>
<p>Let <img src="https://latex.codecogs.com/png.latex?X"> be a compact Hausdorff space. For a point <img src="https://latex.codecogs.com/png.latex?x%20%5Cin%20X">, the <em>orbit</em> of <img src="https://latex.codecogs.com/png.latex?x"> describes how the system evolves in time starting from <img src="https://latex.codecogs.com/png.latex?x"> is <img src="https://latex.codecogs.com/png.latex?%5Cgamma_x(t)%20:=%20%5Cphi(t,x),%20%5Ctext%7Bwhere%20%7D%20t%20%5Cin%20%5Cmathbb%7BT%7D."> In applications, differential equations yield examples of dynamical systems with continuous time <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D%20=%20%5Cmathbb%7BR%7D">. These continuous-time dynamical systems are called flows. We illustrate this correspondence with an example later on. Throughout this post, we focus on continuous-time dynamical systems, though many results extend to discrete-time systems. A subset <img src="https://latex.codecogs.com/png.latex?S%20%5Csubseteq%20X"> is called <em>invariant</em> if it contains its whole orbit. Formally, <img src="https://latex.codecogs.com/png.latex?S"> is invariant if <img src="https://latex.codecogs.com/png.latex?%5Cbigcup_%7Bt%20%5Cin%20%5Cmathbb%7BR%7D%7D%20%5Cphi(t,S)%20=%20S%20."> The collection of all invariant sets of <img src="https://latex.codecogs.com/png.latex?%5Cphi"> is denoted by <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BInvset%7D(%5Cphi)">. Given a set <img src="https://latex.codecogs.com/png.latex?U%20%5Csubseteq%20X">, the <em>maximal invariant set in <img src="https://latex.codecogs.com/png.latex?U"></em> is the union of all of the invariant sets that it contains. Formally, <img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7BInv%7D_%5Cphi(U)%20:=%20%5Cbigcup_%7BS%20%5Csubseteq%20U%20%5Cmid%20S%20%5Cin%20%5Ctext%7BInvset%7D(%5Cphi)%20%7D%20S."> A subset <img src="https://latex.codecogs.com/png.latex?U%20%5Csubseteq%20X"> is called an <em>attracting neighborhood</em> if eventually the orbit of every state in the closure of <img src="https://latex.codecogs.com/png.latex?U"> ends up in its interior. In other words, if there exists <img src="https://latex.codecogs.com/png.latex?%5Ctau%20%3E%200"> such that for all <img src="https://latex.codecogs.com/png.latex?t%20%5Cgeq%20%5Ctau"> <img src="https://latex.codecogs.com/png.latex?%5Cphi(t,%20%5Coperatorname%7Bcl%7D(U))%20%5Csubseteq%20%5Coperatorname%7Bint%7D(U)."> Now, <img src="https://latex.codecogs.com/png.latex?A%20%5Csubseteq%20X"> is an <em>attractor</em> if it is the maximal invariant set of an attracting neighborhood. Formally, <img src="https://latex.codecogs.com/png.latex?A"> is an attractor if there exists a compact <img src="https://latex.codecogs.com/png.latex?U%20%5Csubseteq%20X"> such that <img src="https://latex.codecogs.com/png.latex?A%20=%20%5Coperatorname%7BInv%7D_%5Cphi(U)."> The collection of all attractors of a dynamical system, denoted <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D(%5Cphi)">, forms a bounded, distributive lattice with order given by subset inclusion, see <span class="citation" data-cites="Kalies2014">[@Kalies2014]</span>. The lattice operations are given by <img src="https://latex.codecogs.com/png.latex?A%20%5Cvee%20B%20:=%20A%20%5Ccup%20B,%0A%5Cqquad%0AA%20%5Cwedge%20B%20:=%20%5Coperatorname%7BInv%7D_%5Cphi(A%20%5Ccap%20B)."></p>
<section id="example-the-flow-dotx-x---x3" class="level2" data-number="2.1">
<h2 data-number="2.1" data-anchor-id="example-the-flow-dotx-x---x3"><span class="header-section-number">2.1</span> Example: The flow <img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bx%7D%20=%20x%20-%20x%5E3"></h2>
<p>Consider the flow on <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BR%7D"> generated by <img src="https://latex.codecogs.com/png.latex?%5Cdot%20x%20=%20x%20-%20x%5E3">. Its phase portrait is shown in Figure&nbsp;1.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="figure-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="Figure 1. Phase space for the system \dot{x}=x-x^3. The systems has attracting equilibria at x=-1 and x=1, and a repelling equilibrium at x=0. The vectors indicate the direction of the flow."><img src="https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/figure-1.png" class="img-fluid figure-img" width="500" alt="Figure 1. Phase space for the system \dot{x}=x-x^3. The systems has attracting equilibria at x=-1 and x=1, and a repelling equilibrium at x=0. The vectors indicate the direction of the flow."></a></p>
<figcaption><em>Figure 1.</em> Phase space for the system <img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bx%7D=x-x%5E3">. The systems has attracting equilibria at <img src="https://latex.codecogs.com/png.latex?x=-1"> and <img src="https://latex.codecogs.com/png.latex?x=1">, and a repelling equilibrium at <img src="https://latex.codecogs.com/png.latex?x=0">. The vectors indicate the direction of the flow.</figcaption>
</figure>
</div>
<p>Consider the following maximal invariant sets: <img src="https://latex.codecogs.com/png.latex?%5C%7B0%5C%7D%20=%20%5Crm%7BInv%7D(%5B-0.1,0.1%5D),%20%5Cquad%0A%5C%7B-1%5C%7D%20=%20%5Crm%7BInv%7D(%5B-1.1,-0.9%5D),%20%5Cquad%0A%5C%7B1%5C%7D%20=%20%5Crm%7BInv%7D(%5B0.9,1.1%5D),"> <img src="https://latex.codecogs.com/png.latex?%5B-1,0%5D%20=%20%5Crm%7BInv%7D(%5B-1.1,0.1%5D),%20%5Cquad%0A%5B0,1%5D%20=%20%5Crm%7BInv%7D(%5B-0.1,1.1%5D),%20%5Cquad%0A%5B-1,1%5D%20=%20%5Crm%7BInv%7D(%5B-1.1,1.1%5D)."> Since the compact neighborhoods <img src="https://latex.codecogs.com/png.latex?%5B-1.1,-0.9%5D,%20%5Cquad%20%5B0.9,1.1%5D,%20%5Cquad%20%5B-1.1,-0.9%5D%5Ccup%5B0.9,1.1%5D,%20%5Cquad%20%5B-1.1,1.1%5D"> are attracting neighborhoods the following sets are attractors. <img src="https://latex.codecogs.com/png.latex?%5C%7B-1%5C%7D,%20%5Cquad%20%5C%7B1%5C%7D,%20%5Cquad%20%5C%7B-1,1%5C%7D,%20%5Cquad%20%5B-1,1%5D."> As in any dynamical system, the empty set <img src="https://latex.codecogs.com/png.latex?%5Cvarnothing"> is always an attractor and a bottom element of the attractor lattice, ordered by inclusion. Thus, the attractor lattice for this system is shown in Figure&nbsp;2.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="figure-2.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Figure 2. The attractor lattice of the system \dot{x}=x-x^3."><img src="https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/figure-2.png" class="img-fluid figure-img" width="200" alt="Figure 2. The attractor lattice of the system \dot{x}=x-x^3."></a></p>
<figcaption><em>Figure 2</em>. The attractor lattice of the system <img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bx%7D=x-x%5E3">.</figcaption>
</figure>
</div>
<p>Even though <img src="https://latex.codecogs.com/png.latex?%5B-1,0%5D"> and <img src="https://latex.codecogs.com/png.latex?%5B0,1%5D"> are maximal invariant sets they <em>not</em> attractors. Note that <img src="https://latex.codecogs.com/png.latex?%5B-1.1,0.1%5D"> and <img src="https://latex.codecogs.com/png.latex?%5B-0.1,1.1%5D"> are compact neighborhoods but they are not attracting. This one-dimensional system illustrates attractors and their lattice structure.</p>
</section>
</section>
<section id="attractor-lattices-in-decoupled-product-systems" class="level1" data-number="3">
<h1 data-number="3"><span class="header-section-number">3</span> Attractor lattices in decoupled product systems</h1>
<p>Let <img src="https://latex.codecogs.com/png.latex?%5Cphi_1%5Ccolon%20%5Cmathbb%7BT%7D%5Ctimes%20X_1%5Cto%20X_1"> and <img src="https://latex.codecogs.com/png.latex?%5Cphi_2%5Ccolon%20%5Cmathbb%7BT%7D%5Ctimes%20X_2%5Cto%20X_2"> be two dynamical systems on compact, Hausdorff spaces. The <em>product system</em> <img src="https://latex.codecogs.com/png.latex?%5CPhi%5Ccolon%20%5Cmathbb%7BT%7D%5Ctimes%20(X_1%5Ctimes%20X_2)%5Cto%20X_1%5Ctimes%20X_2"> is defined by <img src="https://latex.codecogs.com/png.latex?%5CPhi((x,y),t)=(%5Cphi_1(x,t),%5Cphi_2(y,t))">.</p>
<section id="decoupled-case-mathsfatt_phi-vs.-mathsfatt_phi_1-times-mathsfatt_phi_2" class="level2" data-number="3.1">
<h2 data-number="3.1" data-anchor-id="decoupled-case-mathsfatt_phi-vs.-mathsfatt_phi_1-times-mathsfatt_phi_2"><span class="header-section-number">3.1</span> Decoupled case: <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D"> vs.&nbsp;<img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_1%7D%20%5Ctimes%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_2%7D"></h2>
<p>To study the relationship between the attractor lattice of a product system and the attractor lattices of its components, we begin with the following decoupled system <img src="https://latex.codecogs.com/png.latex?%5Cdot%20x_1%20=%20x_1%20-%20x_1%5E3,%0A%5Cqquad%0A%5Cdot%20x_2%20=%20-x_2."></p>
<p>Their attractor lattices are shown in Figure&nbsp;3.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="figure-3.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="Figure 3. Attractor lattices of the individual systems."><img src="https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/figure-3.png" class="img-fluid figure-img" width="550" alt="Figure 3. Attractor lattices of the individual systems."></a></p>
<figcaption><em>Figure 3</em>. Attractor lattices of the individual systems.</figcaption>
</figure>
</div>
<p>A natural question is how the cartesian product <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_1%7D%20%5Ctimes%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_2%7D"> compares to the attractor lattice <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D"> of the product system. The comparison is shown in Figure&nbsp;4.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="figure-4.png" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="Figure 4. Comparison between \mathsf{Att}_{\phi_1}\times\mathsf{Att}_{\phi_2} and \mathsf{Att}_\Phi."><img src="https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/figure-4.png" class="no-border img-fluid figure-img" alt="Figure 4. Comparison between \mathsf{Att}_{\phi_1}\times\mathsf{Att}_{\phi_2} and \mathsf{Att}_\Phi."></a></p>
<figcaption><em>Figure 4</em>. Comparison between <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BAtt%7D_%7B%5Cphi_1%7D%5Ctimes%5Cmathsf%7BAtt%7D_%7B%5Cphi_2%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BAtt%7D_%5CPhi">.</figcaption>
</figure>
</div>
<p>Notice that <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_1%7D%20%5Ctimes%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_2%7D"> contains strictly more elements than <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D">. To connect the two lattices we just compared, it helps to introduce the idea of <em>realization maps</em>. Our goal is therefore to construct a suitable realization map that connects the two lattices. For instance, pairs involving the empty set such as <img src="https://latex.codecogs.com/png.latex?(%7B1%7D,%5Cvarnothing)"> or <img src="https://latex.codecogs.com/png.latex?(%5Cvarnothing,%7B0%7D)"> are both realized as the empty set in <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D">. On the other hand, pairs not involving the empty set are faithfully realized; for example, <img src="https://latex.codecogs.com/png.latex?(%5B-1,1%5D,%5C%7B0%5C%7D)%20%5C;%5Cmapsto%5C;%20%5B-1,1%5D%5Ctimes%5C%7B0%5C%7D."> This discrepancy motivates the introduction of the realization map <img src="https://latex.codecogs.com/png.latex?%5Chat%7B%5Crho%7D"> next. Given two attractors <img src="https://latex.codecogs.com/png.latex?A%20%5Cin%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_1%7D"> and <img src="https://latex.codecogs.com/png.latex?B%20%5Cin%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_2%7D">, we can form their Cartesian product <img src="https://latex.codecogs.com/png.latex?A%20%5Ctimes%20B">. This motivates the map <img src="https://latex.codecogs.com/png.latex?%5Crho:%5C%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_1%7D%5Ctimes%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_2%7D%20%5C;%5Clongrightarrow%5C;%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D,%0A%5Cqquad%0A%5Crho(A,B)%20=%20A%20%5Ctimes%20B."></p>
<p>The map <img src="https://latex.codecogs.com/png.latex?%5Crho"> is a meet–semilattice homomorphism. However, it is not injective because of pairs that include the empty set. To fix this, we identify all such pairs using <img src="https://latex.codecogs.com/png.latex?%5Cker%7B%5Crho%7D">. After this identification, we obtain the induced map <img src="https://latex.codecogs.com/png.latex?%5Chat%7B%5Crho%7D:%5C%0A%7B(%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_1%7D%5Ctimes%7B%5Cmathsf%7BAtt%7D%7D_%7B%5Cphi_2%7D)%7D%20/%7B%5Cker(%5Crho)%7D%0A%5C;%5Clongrightarrow%5C;%0A%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D,%0A%5Cqquad%0A%5Chat%7B%5Crho%7D(A,B)%20=%20A%20%5Ctimes%20B,"> which is now injective.</p>
<p>One important result here is that this map is not always <em>surjective</em>. This means that there are emergent attractors in the product system that cannot be written as a direct product of attractors from the two subsystems. We will next look at an explicit example of this.</p>
</section>
<section id="corners-the-product-forgot" class="level2" data-number="3.2">
<h2 data-number="3.2" data-anchor-id="corners-the-product-forgot"><span class="header-section-number">3.2</span> Corners the product forgot</h2>
<p>To see why surjectivity fails, consider the following decoupled system <img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bx_1%7D%20=%20x_1(1-x_1),%20%5Cqquad%20%5Cdot%7Bx_2%7D%20=%20x_2(1-x_2),"> with phase space <img src="https://latex.codecogs.com/png.latex?%5B0,1%5D%5Ctimes%5B0,1%5D">. Its phase portrait is shown in Figure&nbsp;5. Each subsystem has the attractors <img src="https://latex.codecogs.com/png.latex?%5Cvarnothing">, <img src="https://latex.codecogs.com/png.latex?%5C%7B1%5C%7D">, and <img src="https://latex.codecogs.com/png.latex?%5B0,1%5D">.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="figure-5.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5" title="Figure 5. Phase space of \dot{x}_1=x_1(1-x_1), \dot{x}_2=x_2(1-x_2)."><img src="https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/figure-5.png" class="img-fluid figure-img" width="250" alt="Figure 5. Phase space of \dot{x}_1=x_1(1-x_1), \dot{x}_2=x_2(1-x_2)."></a></p>
<figcaption><em>Figure 5</em>. Phase space of <img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bx%7D_1=x_1(1-x_1)">, <img src="https://latex.codecogs.com/png.latex?%5Cdot%7Bx%7D_2=x_2(1-x_2)">.</figcaption>
</figure>
</div>
<p>Now, the realization map <img src="https://latex.codecogs.com/png.latex?%5Chat%7B%5Crho%7D"> of this example is shown in Figure&nbsp;6.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="figure-6.png" class="lightbox" data-gallery="quarto-lightbox-gallery-6" title="Figure 6. Realization map from (\mathsf{Att}_{\phi_1}\times\mathsf{Att}_{\phi_2})/\mathrm{ker}(\rho) to \mathsf{Att}_\Phi. Note the presence of new “corner” attractor on the right which is not a result of any realization map."><img src="https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/figure-6.png" class="img-fluid figure-img" width="600" alt="Figure 6. Realization map from (\mathsf{Att}_{\phi_1}\times\mathsf{Att}_{\phi_2})/\mathrm{ker}(\rho) to \mathsf{Att}_\Phi. Note the presence of new “corner” attractor on the right which is not a result of any realization map."></a></p>
<figcaption><em>Figure 6</em>. Realization map from <img src="https://latex.codecogs.com/png.latex?(%5Cmathsf%7BAtt%7D_%7B%5Cphi_1%7D%5Ctimes%5Cmathsf%7BAtt%7D_%7B%5Cphi_2%7D)/%5Cmathrm%7Bker%7D(%5Crho)"> to <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BAtt%7D_%5CPhi">. Note the presence of new “corner” attractor on the right which is not a result of any realization map.</figcaption>
</figure>
</div>
<p>However, the product system <img src="https://latex.codecogs.com/png.latex?%5CPhi"> admits additional attractors that do not arise as simple Cartesian products. In particular, there is a “corner” attractor <img src="https://latex.codecogs.com/png.latex?(%5B0,1%5D%20%5Ctimes%20%5C%7B1%5C%7D)%20%5Ccup%20(%5C%7B1%5C%7D%20%5Ctimes%20%5B0,1%5D)"> which is a result of the interaction of both systems. It belongs to <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D"> but is not in an image of <img src="https://latex.codecogs.com/png.latex?%5Chat%7B%5Crho%7D">. Interestingly, the missing attractor can be recovered algebraically: If we close the image of <img src="https://latex.codecogs.com/png.latex?%5Chat%7B%5Crho%7D"> under joins, we obtain the full lattice <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D"> in the continuous case. One of my projects was to investigate whether the following equivalence holds: <img src="https://latex.codecogs.com/png.latex?C%5E%7B%5Cvee%7D%5Cbig(%5Cmathrm%7BIm%7D(%5Chat%7B%5Crho%7D)%5Cbig)%20%5Ccong%20%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D,"> where <img src="https://latex.codecogs.com/png.latex?C%5E%7B%5Cvee%7D"> denotes join-closure. However, for discrete maps, this remains only a sublattice of <img src="https://latex.codecogs.com/png.latex?%7B%5Cmathsf%7BAtt%7D%7D_%7B%5CPhi%7D">.</p>
<hr>
<p>This shows that while the map <img src="https://latex.codecogs.com/png.latex?%5Chat%7B%5Crho%7D"> provides a faithful embedding of the product of lattices into the combined system lattice, it does not capture all attractors of the product system in general: new attractors may appear that are not simple products.</p>
</section>
</section>
<section id="conclusion" class="level1" data-number="4">
<h1 data-number="4"><span class="header-section-number">4</span> Conclusion</h1>
<p>In this post, we studied how attractor lattices behave when combining systems. The decoupled case highlights both the algebraic structure that persists and the limitations of product constructions. Moving forward, the coupled setting requires richer tools: cascade products and, more generally, sheaf-theoretic frameworks offer a natural way to extend these ideas to more general dynamical interactions. This next question will be my focus for the next couple of months.</p>
<p>Lastly, I would like to thank Sophie for her guidance and the entire Topos team for making my time there fulfilling and deeply inspiring. I learned a lot from everyone and look forward to building on these ideas in the months ahead. I would also like to thank my advisor, Dr.&nbsp;William Kalies, for suggesting this project and for his guidance, ideas, and numerous discussions that were instrumental in shaping this draft.</p>


</section>

<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <guid>https://topos.institute/blog/2026-01-30-composition-of-attractor-lattices/</guid>
  <pubDate>Fri, 30 Jan 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>CatColab v0.4: Robin</title>
  <dc:creator>Tim Hosgood</dc:creator>
  <link>https://topos.institute/blog/2026-01-08-catcolab-0-4-robin/</link>
  <description><![CDATA[ 




<p>Continuing our theme of naming CatColab releases after increasingly larger (yet still very tiny) birds, we’ve recently released <strong>v0.4: Robin</strong>. There are quite a few new features to showcase: some big and some small, some visible and some hidden. For those interested in implementation details, you can view the non-curated list of <a href="https://github.com/ToposInstitute/CatColab/releases">release notes on GitHub</a>. Note that this blog post also talks about features from the previous release (v0.3) since we missed doing a blog post for that one — we were just over-excited adding features and polishing bits.</p>
<section id="new-features-and-updates" class="level2">
<h2 data-anchor-id="new-features-and-updates">New features and updates</h2>
<section id="petri-nets" class="level3">
<h3 data-anchor-id="petri-nets">Petri nets</h3>
<p>Petri nets are important and widely used graphical formalism for modeling processes that can consume and emit typed tokens, from concurrent computer systems to biochemical reaction networks. To quote from <a href="https://catcolab.org/help/logics/petri-net">catcolab.org/help/logics/petri-net</a>:</p>
<blockquote class="blockquote">
<p><strong>Petri nets</strong> were invented to express discrete-event dynamical systems with concurrency, or networks of resources and processes, describing how various states (called <strong>places</strong>) relate to one another in terms of <strong>transitions</strong>. Each transition has incoming and outgoing arrows (called <strong>arcs</strong>) connected to places, which describe the <strong>input</strong> and <strong>output</strong> places of the transition (respectively).</p>
<p>One way of understanding Petri nets is through their <strong>token semantics</strong>. We place a number of “tokens” in each place and then check all the transitions to see if all their input places have a token: if so, then we can “fire” the transition, moving the tokens from the input places to the output places; if not, then nothing happens. In many classical references the token semantics are built directly in to the definition of Petri nets (often called a <strong>marking</strong> or <strong>tokening</strong>), but an unmarked Petri net is already itself a useful formal gadget, analogous to how can be useful to consider an ordinary differential equation without giving its initial conditions.</p>
</blockquote>
<p>Quite a few category theorists have written about Petri nets; some of John Baez’s <a href="https://johncarlosbaez.wordpress.com/?s=petri">blog posts</a> give a pretty comprehensive overview. There is a plethora of literature concerning <strong>Petri nets</strong> in all their various flavours and guises, and it’s a non-trivial task to try to figure out where different sources actually agree or disagree. The version that we currently have implemented in CatColab is that of <em>free presentations of symmetric monoidal categories</em>, though you don’t need to actually care about this in order to be able to use them.</p>
<p>For an example, below is a screenshot (and a link to the CatColab notebook) of a Petri net describing the pathway by which a certain bacteria breaks glucose down into lactate, taken from an introductory book on systems biology.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/l-lactis-glycolysis-petri-net.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="A Petri net modelling the (partial) glycolysis pathway of Lactococcus lactis, taken from E.O. Voit’s Systems Biology: A Very Short Introduction (Oxford University Press, 2020). Model available directly on CatColab."><img src="https://topos.institute/blog/2026-01-08-catcolab-0-4-robin/images/l-lactis-glycolysis-petri-net.png" class="border img-fluid figure-img" alt="A Petri net modelling the (partial) glycolysis pathway of Lactococcus lactis, taken from E.O. Voit’s Systems Biology: A Very Short Introduction (Oxford University Press, 2020). Model available directly on CatColab."></a></p>
<figcaption>A Petri net modelling the (partial) glycolysis pathway of <em>Lactococcus lactis</em>, taken from E.O. Voit’s <em>Systems Biology: A Very Short Introduction</em> (Oxford University Press, 2020). Model available directly <a href="https://catcolab.org/model/019bb3e0-0cf3-7290-8ec8-2ee9e3b420a6/analysis/019bb3e2-1880-7fe3-8759-2172a8d074d4">on CatColab</a>.</figcaption>
</figure>
</div>
<p>With this new logic there come also three new analyses, thanks to some grand efforts:</p>
<ol type="1">
<li>ODE simulation based on population-level mass-action dynamics</li>
<li>Stochastic simulation based on individual-level mass-action dynamics (thanks to Matt Cuffaro!)</li>
<li>Model checking of sub-reachability from initial state (thanks to Kris Brown!)</li>
</ol>
<p>For full details, you can read the <a href="https://catcolab.org/help/logics/petri-net">Petri nets documentation</a>, but in brief the first analysis checks whether or not certain tokening states can be reached from a given initial state, and the second and third analysis simulate so-called mass-action dynamics, which envisions Petri nets as describing concentrations of quantities and the reactions that can take place between them. The third analysis, in particular, in particularly exciting, since it is the first instance of a <em>stochastic</em> analysis inside CatColab.</p>
</section>
<section id="compositional-models-of-discrete-theories" class="level3">
<h3 data-anchor-id="compositional-models-of-discrete-theories">Compositional models (of discrete theories)</h3>
<p>Something that we at Topos have been talking about for a while as a fundamental capability of a categorical approach to modelling (far from just in conversations about CatColab) is the ability to <em>compose</em> models. If somebody has made a model describing some system, which I then want to view as a component of my other system, I would like to able to <strong>instantiate</strong> it and use it within my model. This is now possible <em>for certain theories</em><sup>1</sup> in CatColab!</p>
<p>As a small example, we can create a causal loop diagram with two variables, one positive link, and one negative link: <img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0A%20%20%5Ctexttt%7BPrey%7D%20&amp;%5Cxrightarrow%7B%5Ctexttt%7Bfeeds%7D%7D%5E+%20%5Ctexttt%7BPredator%7D%0A%5C%5C%5Ctexttt%7BPredator%7D%20&amp;%5Cxrightarrow%7B%5Ctexttt%7Beats%7D%7D%5E-%20%5Ctexttt%7BPrey%7D%0A%5Cend%7Baligned%7D%0A"> This is a “toy model” (or, more properly, a <strong>motif</strong>) for a general predator–prey scenario, where an increase in the population of prey can cause an increase in the population of predators (more food for them to eat), but such an increase can cause a decrease in the population of prey (more predators to eat them).</p>
<p>Now say we want to actually build a two-level model, where we have foxes, rabbits, and grass. Here the foxes and rabbits form a predator–prey relationship, as do the rabbits and grass, so we would like our model to reflect this symmetry. In CatColab, we have a new cell type: <strong>Instantiate</strong>. This lets us import an existing model and bind its exposed variables to those in our larger model, as we show in the screenshot below.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fox-rabbit-grass-compositional.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="A two-level predator–prey causal loop diagram, where we have two instantiations of the predator–prey causal loop diagram and assign them to our three variables."><img src="https://topos.institute/blog/2026-01-08-catcolab-0-4-robin/images/fox-rabbit-grass-compositional.png" class="border img-fluid figure-img" alt="A two-level predator–prey causal loop diagram, where we have two instantiations of the predator–prey causal loop diagram and assign them to our three variables."></a></p>
<figcaption>A two-level predator–prey causal loop diagram, where we have two instantiations of the predator–prey causal loop diagram and assign them to our three variables.</figcaption>
</figure>
</div>
<p>Even this relatively simple example illustrates the idea that many complex models are built out of a library of such “standard components”.</p>
<p>Those of you familiar with object-oriented programming, or <code>struct</code>s in languages like C or Rust, might find the notation rather suggestive, where we write <code>Rabbit–Grass.feeds</code> to refer to the <code>feeds</code> arrow in the <code>Rabbit–Grass</code> instantiation. This blog post isn’t the place to delve properly into this analogy, but we will at least mention some of the mathematics here.</p>
<p>Under the hood, the compositional models feature of CatColab is based on recent work by Owen Lynch on <code>DoubleTT</code> (where the TT stands for type theory), which is what allows for our implementation of instantiation. The <a href="https://github.com/ToposInstitute/CatColab/blob/main/packages/catlog/examples/test.dbltt.snapshot"><code>test.dbltt.snapshot</code></a> example showcases some of the functionality of <code>DoubleTT</code>. For example, we can define a type called <code>Graph</code> as</p>
<pre><code>type Graph := [
  V : Entity,
  E : Entity,
  src : (Id Entity)[E, V],
  tgt : (Id Entity)[E, V]
]</code></pre>
<p>and we are then able to define a type called <code>Graph2</code> as</p>
<pre><code>type Graph2 := [
  V : Entity,
  g1 : Graph &amp; [ .V := V],
  g2 : Graph &amp; [ .V := V]
]</code></pre>
<p>which results in the type that we get from taking two copies of <code>Graph</code> and “gluing them along their vertex object”, i.e.&nbsp;the type of a graph with two colours of edges.</p>
</section>
<section id="documents-and-landing-page" class="level3">
<h3 data-anchor-id="documents-and-landing-page">Documents and landing page</h3>
<p>Since joining our team not so long ago, Kaspar Bumke has been hard at work in overhauling the user experience. One of my personal biggest complaints was that every time I opened up CatColab it created a new blank document, which was compounded by the fact that there was no ability to delete documents. Both of these usability problems, amongst others, have now been solved!</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/landing-page.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="The landing page for both catcolab.org and next.catcolab.org."><img src="https://topos.institute/blog/2026-01-08-catcolab-0-4-robin/images/landing-page.png" class="border img-fluid figure-img" style="width:80.0%" alt="The landing page for both catcolab.org and next.catcolab.org."></a></p>
<figcaption>The landing page for both <a href="https://catcolab.org">catcolab.org</a> and <a href="next.catcolab.org">next.catcolab.org</a>.</figcaption>
</figure>
</div>
<p>The landing page for CatColab is now a nice splash page with all the useful links, including one to “My documents”, and when viewing your documents you can soft delete them (i.e.&nbsp;move them to a recycling bin and recover them at a future date). This is just the start of a much larger project focussed on improving UI/UX around documents.</p>
</section>
<section id="rich-text-and-ui-refresh" class="level3">
<h3 data-anchor-id="rich-text-and-ui-refresh">Rich text and UI refresh</h3>
<p>As in the screenshot of the <em>L. lactis</em> glycolysis Petri net model above, analyses open in a side-pane as opposed to a whole new page, making it much easier to understand how analyses change as you modify the underlying model. With v0.4, this panel-based navigation is now present throughout all of CatColab! Not only that, but analysis documents are now first-class, in the sense that they can be named, permissioned, and shared just like any model document can.</p>
<p>Another thing from the Petri net screenshot that’s a bit more subtle, but just as useful, is the capability to have <em>rich-text</em> cells within a model. This means that we can support not just formatting like bold and italic, but also links and mathematics (rendered with KaTeX). Getting this to work has been remarkably subtle, and it’s really thanks to Jason Moggridge for fixing the myriad of little frustrating bugs that blocked us from releasing this for so long. The basic issue is that our rich-text support is based on <a href="https://github.com/automerge/automerge-prosemirror"><code>automerge-prosemirror</code></a>, which uses features of the Automerge document format going beyond standard JSON. So we had to re-architect our backend to make Automerge docs, rather JSON objects, the source of truth. This was supported by our friends over at <a href="https://www.inkandswitch.com">Ink &amp; Switch</a>, who are the lovely people behind <a href="https://automerge.org">Automerge</a> itself.</p>
</section>
</section>
<section id="what-next" class="level2">
<h2 data-anchor-id="what-next">What next?</h2>
<p>CatColab is now at the stage where we can start having serious conversations with experts from different disciplines and try to understand what they want and need from software. We have some exciting conversations planned already (for example, the AIM workshop on <a href="https://aimath.org/workshops/upcoming/formalmodel/">Formal scientific modeling: a case study in global health</a>), but we’re entering into 2026 with more ideas and possibilities than we will ever possibly have time to work on to completeness.</p>
<p>But this is good news! Not only is it exciting for <em>us</em> to have a wide choice of possible projects, but it can also be exciting for <em>you</em> to be involved in helping steer the direction. If you’re interested in the software, the underlying mathematics, the ways in which it could fit into existing (or possible) real-world contexts, or have questions or desiderata, then we’d love to hear from you and chat about it all. The easiest way to join in the conversation is in our Zulip:</p>
<div class="text-center">
<p><a href="https://catcolab.zulipchat.com" class="btn btn-outline-secondary"> CatColab Zulip</a></p>
</div>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>At the moment, only <strong>discrete</strong> theories support this compositionality, but we are working on implementing this for more complex theories for a future release.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>CatColab</category>
  <guid>https://topos.institute/blog/2026-01-08-catcolab-0-4-robin/</guid>
  <pubDate>Thu, 08 Jan 2026 00:00:00 GMT</pubDate>
  <media:content url="https://topos.institute/blog/2026-01-08-catcolab-0-4-robin/robin.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Call for 2026 Summer Research Associates</title>
  <dc:creator>Kris Brown</dc:creator>
  <link>https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/</link>
  <description><![CDATA[ 




<p>For early-career researchers, we’re excited to open up applications for our Summer Research Associate (RA) program. These positions require collaboration within a multi-disciplinary research environment consisting of mathematicians, computational and computer scientists, and domain scientists (both theoretical and experimental) conducting basic and applied research in support of Topos’ mission. Each Summer RA will complete a specific Topos project, and will write a blog post by the last week of their employment. These projects may include an internal talk, software contribution, or paper. Please visit <a href="https://topos.site/summer">here</a> to see the accomplishments of the previous cohorts.</p>
<div class="text-center">
<p><a href="../../community/jobs/summer-ra-2026" class="btn btn-outline-secondary">Call for applications</a></p>
</div>
<p>This year there are two tracks for Summer RAs: a <strong>research</strong> track and an <strong>engineering</strong> track.</p>
<p>Topics for <strong>research</strong>-track RAs may include:</p>
<ul>
<li>Computational category theory using <a href="https://catcolab.org">CatColab</a> (Rust/Typescript skills recommended)</li>
<li>Double category theory</li>
<li>Categorical statistics</li>
<li>Polynomial functors</li>
<li>Interacting dynamical systems</li>
<li>Hybrid dynamical systems, attractor theory and fast-slow dynamics</li>
<li>Proof assistants and structure editors</li>
<li>Philosophical and ethical aspects of applied category theory</li>
</ul>
<p>For <strong>engineering</strong>-track RAs, we have projects related to CatColab, which is our first step at Topos toward building production-grade software intended for users without specialized mathematical training. CatColab is a web application with a novel category-theoretic core written in Rust, backed by a server also written in Rust. Its frontend, written in TypeScript/SolidJS, features real-time collaborative editing within a notebook-style interface. This is a unique opportunity to contribute to an open source software system that draws on cutting-edge research to support collective inquiry for the public benefit. <strong>Engineering</strong>-track RAs do not need to know any category theory to be a good fit for this role (though an ideal candidate would have some familiarity with the subject). If you’ve worked on a technical, production-quality web app, ideally using Rust or TypeScript, and you’re excited about CatColab, then we’d like to hear from you.</p>
<p>You can read more about all the past RAs and their projects on the <a href="../../summer/">Summer RA page</a>, or read about each year’s cohort by following the links in the captions below.</p>
<div class="quarto-layout-panel" data-layout-ncol="2">
<div class="quarto-layout-row">
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: flex-start;">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="2025-group.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="The 2025 group"><img src="https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/2025-group.jpg" class="img-fluid figure-img" alt="The 2025 group"></a></p>
<figcaption>The <a href="../../blog/2021-07-19-summer-research-associates/">2025 group</a></figcaption>
</figure>
</div>
</div>
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: flex-start;">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="2024-group.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="The 2024 group"><img src="https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/2024-group.jpg" class="img-fluid figure-img" alt="The 2024 group"></a></p>
<figcaption>The <a href="../../blog/2024-07-29-summer-research-associates-2024/">2024 group</a></figcaption>
</figure>
</div>
</div>
</div>
<div class="quarto-layout-row">
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: flex-start;">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="2023-group.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="The 2023 group"><img src="https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/2023-group.jpg" class="img-fluid figure-img" alt="The 2023 group"></a></p>
<figcaption>The <a href="../../blog/2023-10-09-summer-research-assistants-2023/">2023 group</a></figcaption>
</figure>
</div>
</div>
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: flex-start;">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="2022-group.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="The 2022 group"><img src="https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/2022-group.jpg" class="img-fluid figure-img" alt="The 2022 group"></a></p>
<figcaption>The <a href="../../blog/2022-07-14-summer-research-associates-2022/">2022 group</a></figcaption>
</figure>
</div>
</div>
</div>
</div>
<p>Applications are now open. The position is full-time (~40 hours per week) and paid at a rate between 30 and 50 USD per hour, depending on experience.</p>
<p>For full details on how to apply, see the call for applications below. Note that the deadline for applications is <strong>January 16th, 2026</strong>.</p>
<div class="text-center">
<p><a href="../../community/jobs/summer-ra-2026" class="btn btn-outline-secondary">Call for applications</a></p>
</div>



<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>hiring</category>
  <category>personnel</category>
  <guid>https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/</guid>
  <pubDate>Mon, 24 Nov 2025 00:00:00 GMT</pubDate>
  <media:content url="https://topos.institute/blog/2025-11-24-summer-ra-announcement-2026/all-past-groups.png" medium="image" type="image/png" height="103" width="144"/>
</item>
<item>
  <title>Set-sets</title>
  <dc:creator>Aaron Fairbanks</dc:creator>
  <link>https://topos.institute/blog/2025-11-21-set-sets/</link>
  <description><![CDATA[ 




<p>Background assumed: categories, functors, (pre)sheaves, monads, algebraic theories, topological spaces.</p>
<section id="algebra-vs.-coalgebra" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="algebra-vs.-coalgebra"><span class="header-section-number">1</span> Algebra vs.&nbsp;coalgebra</h2>
<p>Algebra is about operations that take multiple inputs and yield one output. For example, the usual addition operation <img src="https://latex.codecogs.com/png.latex?+"> takes two inputs (say <img src="https://latex.codecogs.com/png.latex?3"> and <img src="https://latex.codecogs.com/png.latex?5">) and produces one output (say <img src="https://latex.codecogs.com/png.latex?8">).</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/9851892c422810a7614442db59cb3cff959b56e5.svg" class="img-fluid">
</div>
<p>Dually, coalgebra is about <em>co-operations</em>, which take one input and yield multiple outputs. These multiple outputs are produced in a bunch, possibly without order. For example, in an undirected graph, each edge is assigned an unordered pair of vertices.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/35038c5113c3c0da8bf2218f543c8f63b1b69043.svg" class="img-fluid">
</div>
<p>To put it another way: in algebra, a unique <em>element</em> is assigned to each <em>operation filled with elements</em>, whereas in coalgebra, a unique <em>co-operation filled with elements</em> is assigned to each <em>element</em>.</p>
<div id="fig-co" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-co-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="tikz">
<a href="_svgs/ae7beae5d9b45aa667769fe1834772cec5c8ba1e.svg" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="Figure&nbsp;1: The difference between algebra and coalgebra."><img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/ae7beae5d9b45aa667769fe1834772cec5c8ba1e.svg" class="img-fluid figure-img"></a>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-co-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: The difference between algebra and coalgebra.
</figcaption>
</figure>
</div>
<p>Before giving some examples of coalgebraic structures in more detail, first let’s discuss what “(co)operation” means.</p>
</section>
<section id="encoding-cooperations" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="encoding-cooperations"><span class="header-section-number">2</span> Encoding (co)operations</h2>
<p>Both operations and co-operations are <em>expressions with slots capable of being filled with elements</em>. This will be made precise by the concept of a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D">. It may not be obvious at first, but such a functor is essentially equivalent to some expressions that can be filled with elements, subject to equations.</p>
<p>This is easiest to illustrate with an example. Suppose we are interested in a binary expression <img src="https://latex.codecogs.com/png.latex?x%20+%20y">, subject to the equation <img src="https://latex.codecogs.com/png.latex?x%20+%20y%20=%20y%20+%20x">.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/0bf249fcc442844dd0be881bb482065f48811625.svg" class="img-fluid">
</div>
<p>This determines a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D%20%5Ccolon%20%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> as follows. Given any set <img src="https://latex.codecogs.com/png.latex?S">, we obtain a set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)"> of <em>expressions filled with elements of <img src="https://latex.codecogs.com/png.latex?S"></em> (modulo equations obtained from the given one by substitution). In this example, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)"> amounts to unordered pairs of elements in <img src="https://latex.codecogs.com/png.latex?S">.</p>
<div id="fig-plus" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-plus-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<p><img src="https://latex.codecogs.com/png.latex?%5Cbegin%7Balign*%7D%0A%5Cmathcal%7BX%7D(%5Cemptyset)%20&amp;=%20%5Cemptyset%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7Bx%20+%20x%7D%5Cright%5C%7D%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7Bx%20+%20x%7D,%5C,%20%5Csubstack%7B%5Cboxed%7Bx%20+%20y%7D%5C%5C%20=%5C%5C%20%5Cboxed%7By%20+%20x%7D%7D,%5C,%20%5Cboxed%7By%20+%20y%7D%5Cright%5C%7D%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx,%20y,%20z%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7Bx%20+%20x%7D,%5C,%20%5Csubstack%7B%5Cboxed%7Bx%20+%20y%7D%5C%5C%20=%5C%5C%20%5Cboxed%7By%20+%20x%7D%7D,%5C,%20%5Cboxed%7By%20+%20y%7D,%5C,%20%5Csubstack%7B%5Cboxed%7By%20+%20z%7D%5C%5C%20=%5C%5C%20%5Cboxed%7Bz%20+%20y%7D%7D,%5C,%20%5Cboxed%7Bz%20+%20z%7D,%5C,%20%5Csubstack%7B%5Cboxed%7Bx%20+%20z%7D%5C%5C%20=%5C%5C%20%5Cboxed%7Bz%20+%20x%7D%7D%5Cright%5C%7D%0A%5Cend%7Balign*%7D"></p>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-plus-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;2: Some values of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D">.
</figcaption>
</figure>
</div>
<p>Expressions can be re-filled: given any <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20%5Cmathcal%7BX%7D(S)"> (an expression filled with elements of <img src="https://latex.codecogs.com/png.latex?S">) and a map of sets <img src="https://latex.codecogs.com/png.latex?f%20%5Ccolon%20S%20%5Cto%20T">, define <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(f)(%5Cphi)%20%5Cin%20%5Cmathcal%7BX%7D(T)"> (an expression filled with elements of <img src="https://latex.codecogs.com/png.latex?T">) by relabeling/substitution.</p>
<div id="fig-relabel" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-relabel-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="tikz">
<a href="_svgs/d4aead4a8a592beda627b703f14fab83da44d845.svg" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Figure&nbsp;3: Re-filling of expressions with respect to a map of sets f."><img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/d4aead4a8a592beda627b703f14fab83da44d845.svg" class="img-fluid figure-img"></a>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-relabel-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;3: Re-filling of expressions with respect to a map of sets <img src="https://latex.codecogs.com/png.latex?f">.
</figcaption>
</figure>
</div>
<p>This indeed amounts to a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D%20%5Ccolon%20%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D">. Formally,</p>
<div class="text-center">
<p>a binary expression <img src="https://latex.codecogs.com/png.latex?x%20+%20y">, subject to the equation <img src="https://latex.codecogs.com/png.latex?x%20+%20y%20=%20y%20+%20x"></p>
</div>
<p>translates to a <em>presentation</em> of this functor by <em>generators and relations</em>. That is, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is the functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> presented by</p>
<div class="text-center">
<p>a generator <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20y%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,y%5C%7D)"> and a relation <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20y%7D%20=%20%5Cboxed%7By%20+%20x%7D"></p>
</div>
<p>where <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7By%20+%20x%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,y%5C%7D)"> denotes the term derived from <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20y%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,y%5C%7D)"> by applying the function <img src="https://latex.codecogs.com/png.latex?f"> sending <img src="https://latex.codecogs.com/png.latex?x%20%5Cmapsto%20y">, <img src="https://latex.codecogs.com/png.latex?y%20%5Cmapsto%20x">, that is, <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7By%20+%20x%7D%20%5Ccoloneqq%20%5Cmathcal%7BX%7D(f)(%5Cboxed%7Bx%20+%20y%7D)">.</p>
<p>Just like any other kind of algebraic structure, all functors <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> may similarly be presented by generators and relations. (In more jargon, this is the “co-Yoneda lemma”: every <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-valued functor is a colimit of functors free on one generator.) That means any functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> may be viewed in this way as some expressions subject to some equations.</p>
<p>A functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> is sometimes called a <em><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-set</em> for short. From here on, a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> will be called a <em><img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set</em> for short.</p>
<section id="example-polynomial-functors" class="level3" data-number="2.1">
<h3 data-number="2.1" data-anchor-id="example-polynomial-functors"><span class="header-section-number">2.1</span> Example: polynomial functors</h3>
<p>Especially simple are expressions subject to no equations, which correspond to freely generated <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-sets (presented by generators and no relations).</p>
<p>For instance, suppose we are interested in a binary expression <img src="https://latex.codecogs.com/png.latex?x%20+%20y">, a binary expression <img src="https://latex.codecogs.com/png.latex?x%20%5Ctimes%20y">, a binary expression <img src="https://latex.codecogs.com/png.latex?x%20%5Cdiv%20y">, and a unary expression <img src="https://latex.codecogs.com/png.latex?-x">, together satisfying no equations.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/673706e11a5e2c96206a2a17013ebd062f78ea7b.svg" class="img-fluid">
</div>
<p>This corresponds to a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D%20%5Ccolon%20%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> where, as always, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)"> is the set of <em>expressions filled with elements of <img src="https://latex.codecogs.com/png.latex?S"></em>.</p>
<div id="fig-poly" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-poly-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Balign*%7D%0A%5Cmathcal%7BX%7D(%5Cemptyset)%20&amp;=%20%5Cemptyset%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7Bx%20+%20x%7D,%5C,%20%5Cboxed%7Bx%20%5Ctimes%20x%7D,%5C,%20%5Cboxed%7Bx%20%5Cdiv%20x%7D,%5C,%20%5Cboxed%7B-x%7D%5Cright%5C%7D%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7Bx%20+%20x%7D,%5C,%20%5Cboxed%7Bx%20+%20y%7D,%5C,%20%5Cboxed%7By%20+%20x%7D,%5C,%20%5Cboxed%7By%20+%20y%7D,%5Cright.%5C%5C%0A&amp;%20%5Cqquad%5Cleft.%5Cboxed%7Bx%20%5Ctimes%20x%7D,%5C,%20%5Cboxed%7Bx%20%5Ctimes%20y%7D,%5C,%20%5Cboxed%7By%20%5Ctimes%20x%7D,%5C,%20%5Cboxed%7By%20%5Ctimes%20y%7D,%5Cright.%5C%5C%5B.25em%5D%0A&amp;%20%5Cqquad%5Cleft.%5Cboxed%7Bx%20%5Cdiv%20x%7D,%5C,%20%5Cboxed%7Bx%20%5Cdiv%20y%7D,%5C,%20%5Cboxed%7By%20%5Cdiv%20x%7D,%5C,%20%5Cboxed%7By%20%5Cdiv%20y%7D,%5Cright.%5C%5C%0A&amp;%20%5Cqquad%5Cleft.%5Cboxed%7B-x%7D,%5C,%20%5Cboxed%7B-y%7D%5C,%5Cright%5C%7D%0A%5Cend%7Balign*%7D%0A"></p>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-poly-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;4: Some values of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D">.
</figcaption>
</figure>
</div>
<p>In this example, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> may be described by the formula <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20=%20S%5E2%20+%20S%5E2%20+%20S%5E2%20+%20S%5E1%20=%203S%5E2%20+%20S."> Here <img src="https://latex.codecogs.com/png.latex?S%5EN"> is the set of <img src="https://latex.codecogs.com/png.latex?N">-tuples of elements of <img src="https://latex.codecogs.com/png.latex?S">, that is, the set of functions <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D(N,%20S)">, counting the possible ways of filling an <img src="https://latex.codecogs.com/png.latex?N">-ary expression with <img src="https://latex.codecogs.com/png.latex?S"> elements. The functor with formula <img src="https://latex.codecogs.com/png.latex?S%5EN"> itself is the <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set presented by a single <img src="https://latex.codecogs.com/png.latex?N">-ary generator and no relations.</p>
<p>(This is the Yoneda lemma: representable <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-valued functors are free on one generator.)</p>
<p>In general, such freely generated <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-sets are called <em>polynomials</em>, since they are described by formulas <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20=%20%5Csum_%7Bi%20%5Cin%20I%7D%20S%5E%7BN_i%7D."></p>
</section>
<section id="technical-aside-support" class="level3" data-number="2.2">
<h3 data-number="2.2" data-anchor-id="technical-aside-support"><span class="header-section-number">2.2</span> Technical aside: support</h3>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>This section discusses a more subtle and technical aspect of <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-sets that is not central. It can be skipped.</p>
</div>
</div>
<p>Suppose <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set and <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20%5Cmathcal%7BX%7D(S)">. If as usual we interpret <img src="https://latex.codecogs.com/png.latex?%5Cphi"> as an <em>expression filled with elements of <img src="https://latex.codecogs.com/png.latex?S"></em>, a simple question to ask is: which elements of <img src="https://latex.codecogs.com/png.latex?S"> appear in <img src="https://latex.codecogs.com/png.latex?%5Cphi">?</p>
<p>For instance, in either of the earlier examples, the expression <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20x%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)"> features only the element <img src="https://latex.codecogs.com/png.latex?x">. The expression <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7By%20+%20y%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)"> on the other hand features only the element <img src="https://latex.codecogs.com/png.latex?y">, and the expression <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20y%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)"> features both elements <img src="https://latex.codecogs.com/png.latex?x"> and <img src="https://latex.codecogs.com/png.latex?y">. This seems to be a simple idea, but it is actually subtle.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Definition
</div>
</div>
<div class="callout-body-container callout-body">
<p>A subset <img src="https://latex.codecogs.com/png.latex?u%20%5Ccolon%20U%20%5Chookrightarrow%20S"> is a <em>strong support</em> of <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20%5Cmathcal%7BX%7D(S)"> if <img src="https://latex.codecogs.com/png.latex?%5Cphi"> is in the image of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(u)%20%5Ccolon%20%5Cmathcal%7BX%7D(U)%20%5Cto%20%5Cmathcal%7BX%7D(S)">.</p>
</div>
</div>
<p>This means that <img src="https://latex.codecogs.com/png.latex?%5Cphi"> can be expressed such that it only features elements of <img src="https://latex.codecogs.com/png.latex?U">. Above, <img src="https://latex.codecogs.com/png.latex?%5C%7Bx%5C%7D%20%5Csubseteq%20%5C%7Bx,%20y%5C%7D"> is a strong support of <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20x%7D"> but neither <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7By%20+%20y%7D"> nor <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7Bx%20+%20y%7D">.</p>
<p>Perhaps counterintuitively, it is not necessary for <img src="https://latex.codecogs.com/png.latex?%5Cphi"> to have a <em>smallest</em> strong support. In fact, strong supports are not in general even closed under finite intersections. Consider a unary expression <img src="https://latex.codecogs.com/png.latex?%5Cphi(x)"> subject to the equation <img src="https://latex.codecogs.com/png.latex?%5Cphi(x)%20=%20%5Cphi(y)">, effectively eliminating the dependence of the expression on <img src="https://latex.codecogs.com/png.latex?x">. This corresponds to a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> such that <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)"> is empty if <img src="https://latex.codecogs.com/png.latex?S"> is empty and otherwise has one element.</p>
<div id="fig-const" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-const-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<p><img src="https://latex.codecogs.com/png.latex?%5Cbegin%7Balign*%7D%0A%5Cmathcal%7BX%7D(%5Cemptyset)%20&amp;=%20%5Cemptyset%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7B%5Cphi(x)%7D%5Cright%5C%7D%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7B%5Cphi(x)%7D%20=%20%5Cboxed%7B%5Cphi(y)%7D%5Cright%5C%7D%20%5C%5C%5B.5em%5D%0A%5Cmathcal%7BX%7D(%5C%7Bx,%20y,%20z%5C%7D)%20&amp;=%20%5Cleft%5C%7B%5Cboxed%7B%5Cphi(x)%7D%20=%20%5Cboxed%7B%5Cphi(y)%7D%20=%20%5Cboxed%7B%5Cphi(z)%7D%5Cright%5C%7D%0A%5Cend%7Balign*%7D"></p>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-const-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;5: Some values of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D">.
</figcaption>
</figure>
</div>
<p>Although the subsets <img src="https://latex.codecogs.com/png.latex?%5C%7Bx%5C%7D"> and <img src="https://latex.codecogs.com/png.latex?%5C%7By%5C%7D"> of <img src="https://latex.codecogs.com/png.latex?%5C%7Bx,%20y%5C%7D"> are both strong supports of the expression <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Cphi(x)%7D%20=%20%5Cboxed%7B%5Cphi(y)%7D%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bx,%20y%5C%7D)">, their intersection, the empty subset, is not.</p>
<p>A slightly different definition can partially resolve this defect. To aid readability we use the “action” notation <img src="https://latex.codecogs.com/png.latex?f%20%5Ccdot%20%5Cphi"> to denote <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(f)(%5Cphi)"> where <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20%5Cmathcal%7BX%7D(S)"> and <img src="https://latex.codecogs.com/png.latex?f%20%5Ccolon%20S%20%5Cto%20T">.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Definition
</div>
</div>
<div class="callout-body-container callout-body">
<p>A subset <img src="https://latex.codecogs.com/png.latex?u%20%5Ccolon%20U%20%5Chookrightarrow%20S"> is a <em>support</em> of <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20%5Cmathcal%7BX%7D(S)"> if for any maps <img src="https://latex.codecogs.com/png.latex?f,%20g%20%5Ccolon%20S%20%5Cto%20T"> such that <img src="https://latex.codecogs.com/png.latex?f%20%5Ccirc%20u%20=%20g%20%5Ccirc%20u">, we have <img src="https://latex.codecogs.com/png.latex?f%20%5Ccdot%20%5Cphi%20=%20g%20%5Ccdot%20%5Cphi">.</p>
</div>
</div>
<p>This means whenever <img src="https://latex.codecogs.com/png.latex?f"> and <img src="https://latex.codecogs.com/png.latex?g"> agree on <img src="https://latex.codecogs.com/png.latex?U">, their relabeling actions agree on <img src="https://latex.codecogs.com/png.latex?%5Cphi">, i.e.&nbsp;<img src="https://latex.codecogs.com/png.latex?%5Cphi"> only “depends on” elements in <img src="https://latex.codecogs.com/png.latex?U">. With this definition, one can show that any finite intersection of supports of <img src="https://latex.codecogs.com/png.latex?%5Cphi"> is again a support of <img src="https://latex.codecogs.com/png.latex?%5Cphi">.</p>
<p>(The two definitions are extremely close: strong support implies support, and conversely support implies strong support for all subsets <img src="https://latex.codecogs.com/png.latex?U"> that are nonempty.)</p>
<p>However, it is still not necessary for <img src="https://latex.codecogs.com/png.latex?%5Cphi"> to have a <em>smallest</em> support, if we consider infinite expressions. Consider an expression <img src="https://latex.codecogs.com/png.latex?%5Cphi(x_0,%20x_1,%20x_2,%20%5Cldots)"> involving a sequence of infinitely many elements, subject to the infinitely many equations <img src="https://latex.codecogs.com/png.latex?%5Cphi(x_0,%20x_1,%20x_2,%20%5Cldots)%20=%20%5Cphi(y,%20x_1,%20x_2,%20%5Cldots)%20=%20%5Cphi(x_0,%20y,%20x_2,%20%5Cldots)%20=%20%5Cphi(x_0,%20x_1,%20y,%20%5Cldots)%20=%20%5C;%5Ccdots"></p>
<p>effectively eliminating the dependence of the expression on any single <img src="https://latex.codecogs.com/png.latex?x_i">. In the corresponding <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D">, the set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)"> consists of “sequences in <img src="https://latex.codecogs.com/png.latex?S"> modulo eventual agreement”: two sequences <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BN%7D%20%5Cto%20S"> are equivalent if they agree on all but finitely many indices. Here a sequence with infinitely many distinct elements has no smallest support, because a support is a subset including all but finitely many of the elements in the sequence, and there is no smallest such subset.</p>
<p>Although <img src="https://latex.codecogs.com/png.latex?%5Cphi"> may not have a smallest support, it does have a <em>filter</em> of supports. That is, supports are closed under supersets and finite intersections, analogous to the neighborhoods of a point in a topological space. (Conversely, for any filter <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D"> on a set <img src="https://latex.codecogs.com/png.latex?N">, one can construct a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set on an <img src="https://latex.codecogs.com/png.latex?N">-ary generator whose supports are the subsets of <img src="https://latex.codecogs.com/png.latex?N"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D">, via appropriate relations.)</p>
<p>In summary, an infinite expression (modulo equality) may have no particular smallest set of elements it depends on. Thus an operation may only depend on ever-shrinkingly small subsets of its inputs. Dually, a co-operation might output an “infinitesimal neighborhood”, in the sense that only elements within ever-shrinkingly small subsets of its outputs have assigned values. For this reason there is a close relationship between topological spaces and coalgebraic structures.</p>
</section>
</section>
<section id="examples-of-coalgebras" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="examples-of-coalgebras"><span class="header-section-number">3</span> Examples of (co)algebras</h2>
<p>The following seems a reasonable way of making precise the previously informal terms “operation” and “co-operation”: a <em>(co)operation</em> is a <em>generator for a presentation of a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set</em>. (It is an expression <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20%5Cmathcal%7BX%7D(S)"> with <img src="https://latex.codecogs.com/png.latex?S"> many slots that can be filled with elements.) Whether we call this an operation or a co-operation depends on whether we are interested in algebra or coalgebra.</p>
<p>Given a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D">, an <em>algebra</em> is a map <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20%5Cto%20S"> (assigning to each <em>operation filled with elements</em> a unique <em>element</em>). A <em>coalgebra</em> is a map <img src="https://latex.codecogs.com/png.latex?S%20%5Cto%20%5Cmathcal%7BX%7D(S)"> (assigning to each <em>element</em> a unique <em>co-operation filled with elements</em>). In the context of an algebra, the elements that fill the expressions act as inputs, whereas in the context of a coalgebra, the elements that fill the expressions act as outputs.</p>
<p>For example, an algebra <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20%5Cto%20S"> for the <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> described earlier presented by an <img src="https://latex.codecogs.com/png.latex?x%20+%20y"> subject to the equation <img src="https://latex.codecogs.com/png.latex?x%20+%20y%20=%20y%20+%20x"> is a set with a commutative binary operation, whereas a coalgebra <img src="https://latex.codecogs.com/png.latex?S%20%5Cto%20%5Cmathcal%7BX%7D(S)"> is a set with a “commutative binary co-operation”, assigning each element an unordered pair of elements.</p>
<p>Likely most readers are more familiar with algebra/operations than coalgebra/co-operations, so here are some examples of the latter.</p>
<section id="directed-multigraphs" class="level3" data-number="3.1">
<h3 data-number="3.1" data-anchor-id="directed-multigraphs"><span class="header-section-number">3.1</span> Directed multigraphs</h3>
<p>Directed multigraphs (a.k.a. <em>quivers</em>) can be modeled as coalgebras, using an <em>edge</em> co-operation and a <em>vertex</em> co-operation.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/d70538270fc8c363b82b4cecce280cafbd8e2e7c.svg" class="img-fluid">
</div>
<p>The edge co-operation <img src="https://latex.codecogs.com/png.latex?e"> has two outputs (<img src="https://latex.codecogs.com/png.latex?s"> and <img src="https://latex.codecogs.com/png.latex?t">), and the vertex co-operation <img src="https://latex.codecogs.com/png.latex?v"> has zero outputs. Together these two expressions <img src="https://latex.codecogs.com/png.latex?e(s,%20t)%20%5Cin%20%5Cmathcal%7BX%7D(%5C%7Bs,%20t%5C%7D)"> and <img src="https://latex.codecogs.com/png.latex?v()%20%5Cin%20%5Cmathcal%7BX%7D(%5Cemptyset)"> generate a polynomial (i.e.&nbsp;freely generated) <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set:</p>
<p><img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20=%20S%5E2%20+%20S%5E0%20=%20S%5E2%20+%201."> Pictured below is a directed multigraph with four edges and four vertices, providing an example of a coalgebra <img src="https://latex.codecogs.com/png.latex?S%20%5Cto%20%5Cmathcal%7BX%7D(S)">. In this case the set <img src="https://latex.codecogs.com/png.latex?S"> has ten elements, four of which are assigned the <em>edge</em> co-operation, each thus outputting two elements, and six of which are assigned the <em>vertex</em> co-operation, each thus outputting no elements.</p>
<div id="fig-dir" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-dir-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="tikz">
<a href="_svgs/c556842db5249cffcf3687a4005e751fed5b2235.svg" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="Figure&nbsp;6: A directed multigraph."><img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/c556842db5249cffcf3687a4005e751fed5b2235.svg" class="img-fluid figure-img"></a>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-dir-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;6: A directed multigraph.
</figcaption>
</figure>
</div>
<p>Not all coalgebras of this <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> cohere as directed multigraphs: it is necessary to impose the additional condition that the two outputs of each edge are vertices, not edges. The the ability to specify such conditions on coalgebras is provided by the concept of a <em>comonad</em>.</p>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Further reading
</div>
</div>
<div class="callout-body-container callout-body">
<p>So far we have seen that the structure of a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%20%5Cto%20%5Cmathbf%7BSet%7D"> encodes expressions related by equations. A key aspect of universal (co)algebra is missing: relations between <em>nested</em> expressions. For example, in the structure of a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set generated by an operation <img src="https://latex.codecogs.com/png.latex?x%20+%20y">, we cannot express the associativity equation <img src="https://latex.codecogs.com/png.latex?(x%20+%20y)%20+%20z%20=%20x%20+%20(y%20+%20z)">, which we may wish to impose on algebras. Likewise, in the structure of a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set generated by “edge” and “vertex” co-operations <img src="https://latex.codecogs.com/png.latex?e(x,%20y)"> and <img src="https://latex.codecogs.com/png.latex?v()"> as above, we cannot express that the outputs of an edge are both vertices.</p>
<p>The additional structure of a monad or comonad expresses relationships between expressions <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)"> and nested expressions <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(%5Cmathcal%7BX%7D(S))"> (“<em>expressions filled with expressions filled with elements of <img src="https://latex.codecogs.com/png.latex?S"></em>”). Details are outside the scope of this post, but we refer the interested reader to <span class="citation" data-cites="maclane">(Mac Lane 1998)</span> or <span class="citation" data-cites="riehl">(Riehl 2017)</span> for prerequisite material on monads, then to <span class="citation" data-cites="adamek-porst">(Adamek and Porst 2003)</span> where it is shown that just as monads may be presented by operations and equations, comonads may be presented by co-operations and “co-equations”.</p>
<p>In particular, there is a comonad on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> for which coalgebras are directed multigraphs.</p>
</div>
</div>
<p>Note that a directed multigraph may be equivalently described as a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-set (a functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D%20%5Cto%20%5Cmathbf%7BSet%7D">) where <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D"> is the category:</p>
<div class="text-center">
<!-- https://q.uiver.app/#q=WzAsMixbMCwwLCJlIl0sWzEsMCwidiJdLFswLDEsInQiLDIseyJvZmZzZXQiOjJ9XSxbMCwxLCJzIiwwLHsib2Zmc2V0IjotMX1dXQ== -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsMixbMCwwLCJlIl0sWzEsMCwidiJdLFswLDEsInQiLDIseyJvZmZzZXQiOjJ9XSxbMCwxLCJzIiwwLHsib2Zmc2V0IjotMX1dXQ==&amp;embed" width="304" height="176" style="border-radius: 8px; border: none;">
</iframe>
</div>
<p>In general, <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-sets for any category <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D"> can be modeled as coalgebras of a polynomial <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set. Namely, there is a co-operation for each object, whose outputs are all the arrows out of the object.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/aa7f7cda4d87d24ceb7a820868772545e703f289.svg" class="img-fluid">
</div>
<p>(In the directed graph example above, the identity arrows were omitted from the co-operations for simplicity. If they were included, then <img src="https://latex.codecogs.com/png.latex?e"> would become an operation with three outputs <img src="https://latex.codecogs.com/png.latex?s">, <img src="https://latex.codecogs.com/png.latex?t">, and <img src="https://latex.codecogs.com/png.latex?%5Cmathrm%7Bid%7D_e">, and <img src="https://latex.codecogs.com/png.latex?v"> would become an operation with one output <img src="https://latex.codecogs.com/png.latex?%5Cmathrm%7Bid%7D_v">. The corresponding polynomial <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set has formula <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20=%20S%5E3%20+%20S%5E1">.)</p>
<p>Additional associativity and unit constraints are needed to ensure the elements and assigned co-operations cohere as a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-set. For any category <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">, there is a comonad on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> whose coalgebras are <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-sets. In fact, it was noticed only relatively recently <span class="citation" data-cites="ahman-uustalu">(Ahman and Uustalu 2016)</span> that comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> given by polynomial formulas are precisely the same as (small) categories.</p>
<p>Viewing a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-set as a coalgebra, the co-operation assigned to an element specifies the type of the element and produces at once all elements derived from that type. The same intuition may be applied to more general coalgebras of <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-sets.</p>
</section>
<section id="undirected-multigraphs" class="level3" data-number="3.2">
<h3 data-number="3.2" data-anchor-id="undirected-multigraphs"><span class="header-section-number">3.2</span> Undirected multigraphs</h3>
<p>There are coalgebraic structures besides <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-sets, for example <em>undirected</em> multigraphs.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/25f0a0b1d888811d6e2d09ee465365c7e18a29e8.svg" class="img-fluid">
</div>
<p>In this case the two vertices output by the edge co-operation are <em>unordered</em> pair instead of an ordered pair. The generating co-operations <img src="https://latex.codecogs.com/png.latex?e(s,t)"> and <img src="https://latex.codecogs.com/png.latex?v()"> are as before, but this time with the relation <img src="https://latex.codecogs.com/png.latex?e(s,t)%20=%20e(t,s)">. The undirected multigraph below is an example of a coalgebra for the presented endofunctor.</p>
<div id="fig-undir" class="quarto-float quarto-figure quarto-figure-center">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-undir-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="tikz">
<a href="_svgs/a87a94effc52f4fde06e08ba21ce63ce1acb6648.svg" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="Figure&nbsp;7: An undirected multigraph."><img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/a87a94effc52f4fde06e08ba21ce63ce1acb6648.svg" class="img-fluid figure-img"></a>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-undir-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;7: An undirected multigraph.
</figcaption>
</figure>
</div>
<p>As in the case of directed multigraphs, there is a comonad on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> whose coalgebras are undirected multigraphs. Perhaps it is reasonable to call this a “generalized category” <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">, for which “<img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BC%7D">-sets” are undirected multigraphs.</p>
</section>
<section id="sheaves" class="level3" data-number="3.3">
<h3 data-number="3.3" data-anchor-id="sheaves"><span class="header-section-number">3.3</span> Sheaves</h3>
<p>This final example is intended to whet your appetite, so do not be disturbed if some aspects remain puzzling.</p>
<p>A sheaf is a way of gluing regions of a topological space <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D"> together into a larger space that locally resembles the original space. It can be modeled as a coalgebra, using a co-operation for each point of <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D">, outputting the points in its “infinitesimal neighborhood”.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-11-21-set-sets/_svgs/ee0575c23b97b22eff48473cf05e2ee7557cc0b3.svg" class="img-fluid">
</div>
<p>That is, sheaves over <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D"> are coalgebras for a <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> generated by a co-operation in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(%7C%5Cmathbf%7BX%7D%7C)"> for each point <img src="https://latex.codecogs.com/png.latex?x%5Cin%20%5Cmathbf%7BX%7D"> whose <em>supports</em> (see earlier section) are exactly the neighborhoods of <img src="https://latex.codecogs.com/png.latex?x">. More specifically,</p>
<p><img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D(S)%20%5C;%20=%20%5C;%5Csum_%7Bx%20%5Cin%20%5Cmathbf%7BX%7D%7D%5C;%20%5Cmathop%7B%5Cmathrm%7Bcolim%7D%7D_%7BU%20%5Cin%20%5Cmathcal%7BN%7D_x%7D%20%5C;%20S%5EU"> where <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BN%7D_x"> is the neighborhood filter of <img src="https://latex.codecogs.com/png.latex?x">. In terms of generators and relations, this <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">-set is defined as follows: for each point <img src="https://latex.codecogs.com/png.latex?x">, there is a <img src="https://latex.codecogs.com/png.latex?U">-ary generator for each neighborhood <img src="https://latex.codecogs.com/png.latex?U">, all of which are identified so as to only retain dependence on the elements that are within arbitrarily small neighborhoods of <img src="https://latex.codecogs.com/png.latex?x">. This determines a co-operation that essentially outputs an infinitesimal neighborhood’s worth of elements.</p>
<p>Again, additional associativity and unit constraints on a coalgebra are needed to ensure that the coalgebra coheres as a sheaf, and again this is captured via comonad structure. For any topological space <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D">, there is a comonad on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">, with the above formula, whose coalgebras are sheaves over <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BX%7D">, and the topological space can be recovered from the comonad. In this way, like categories, topological spaces are identified with a certain class of comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">.</p>
<p>In fact, topological spaces play the same role in relation to general comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> as preorders do to categories. To learn about this analogy and related curiosities, stay tuned for the upcoming paper</p>
<div class="text-center">
<p><strong>COMONADS ON SET</strong></p>
<p>by Kevin Carlson, Aaron David Fairbanks, and David Spivak</p>
</div>
<p>where we will push as far as we can the perspective that comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> are a common generalization of both categories and topological spaces.</p>



</section>
</section>

<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-adamek-porst" class="csl-entry">
Adamek, Jiri, and Hans-E. Porst. 2003. <span>“On Varieties and Covarieties in a Category.”</span> <em>Mathematical Structures in Computer Science</em> 13 (2): 201–32. <a href="https://doi.org/10.1017/S0960129502003882">https://doi.org/10.1017/S0960129502003882</a>.
</div>
<div id="ref-ahman-uustalu" class="csl-entry">
Ahman, Danel, and Tarmo Uustalu. 2016. <span>“Directed Containers as Categories.”</span> <em>EPTCS 207, 2016, Pp. 89-98</em>.
</div>
<div id="ref-maclane" class="csl-entry">
Mac Lane, Saunders. 1998. <em>Categories for the Working Mathematician</em>. 2nd ed. Graduate Texts in Mathematics 5. New York: Springer-Verlag.
</div>
<div id="ref-riehl" class="csl-entry">
Riehl, Emily. 2017. <em>Category Theory in Context</em>. Courier Dover Publications.
</div>
</div></section></div> ]]></description>
  <guid>https://topos.institute/blog/2025-11-21-set-sets/</guid>
  <pubDate>Fri, 21 Nov 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>DOTS from double theories</title>
  <dc:creator>Tim Hosgood</dc:creator>
  <link>https://topos.institute/blog/2025-11-07-dots-from-double-theories/</link>
  <description><![CDATA[ 




<p>I am a triangles guy.</p>
<p>As my friends and family know, my maths research has always been “just about <a href="https://mathscinet.ams.org/mathscinet/msc/msc2020.html?s=18N50">triangles</a>”. When I was in Stockholm I made friends with some people who really liked cubes and squares. Around the same time, a coauthor told me that all my simplicial work was secretly cubical. I also ended up helping to organise two online workshops on double categories. Now I work full-time at Topos, where I hear about double categories multiple times a day.</p>
<p>I cannot escape the squares.</p>
<p>DOTS stands for <em>double operadic theory of systems</em>, and Sophie and David Jaz recently wrote a paper on it <span class="citation" data-cites="LM2025">(Libkind and Myers 2025)</span>. Their paper works through a <em>lot</em> of examples (and they draw a <em>lot</em> of diagrams), which I’m not going to do today. I’m also not going to attempt to summarise the whole paper here, nor am I going to be particularly detailed or careful about proving things. Instead, I just want to tie this into the work that Evan and many others have been working on surrounding double theories and their use for <a href="../../work/catcolab/">CatColab</a> <span class="citation" data-cites="LP2023 CP2025">(Lambert and Patterson 2023; Carlson and Patterson 2025)</span>. To give some very small historical context, DOTS can be seen as a continuation of previous work on operadic composition for systems theories, such as <span class="citation" data-cites="LBPF2021">(Libkind et al. 2021)</span>.</p>
<section id="dots-is-do-ts" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="dots-is-do-ts"><span class="header-section-number">1</span> DOTS is DO ⦚ TS</h2>
<p>There are two things to say before trying to explain what DOTS is.</p>
<ol type="1">
<li><p>It’s easier to explain what <em>a</em> DOTS is, and then say that DOTS is the study of DOTSs. This is entirely analogous to the ambiguity in the phrase “type theory”: we can define what <em>a</em> type theory is, and then say that type theory is the study of type theories. This means I get to write fun-to-say sentences like “Graphs is a DOTS”.</p></li>
<li><p>DOTS should be read as a definition with an attitude all in one, split very neatly down the middle: DO ⦚ TS. That is, the <em>definition</em> part is (an algebra over) a <strong>d</strong>ouble <strong>o</strong>perad, and the attitude with which to interpret this definition is as a <strong>t</strong>heory of <strong>s</strong>ystems.</p></li>
</ol>
<p>So the rest of this post will be split following this idea. First we’ll look at the <strong>DO</strong> part, and then the <strong>TS</strong> part, and finally we’ll explain one way that double theories can fit into the story. But here’s the brief takeaway from all that follows:</p>
<blockquote class="blockquote">
<p>A DOTS is the data of three 1-categories, along with instructions for how to fit them together in such a way that we can think of them as “things”, “sub-things”, and “ways to glue things along their sub-things”. Furthermore, we can really say the word “system” instead of “thing”.</p>
</blockquote>
<p>This means that you can come along with your favourite systems theory — say, Petri nets, or undirected wiring diagrams with little systems of ODES inside of them, or … — and ask “do I have a DOTS?”. But just like how you might come along with your favourite category and ask “do I have a symmetric monoidal category?”, the answer might be “I can’t really tell you unless you’re a bit more specific about some of your extra structure”.</p>
</section>
<section id="what-is-a-do" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="what-is-a-do"><span class="header-section-number">2</span> What is a DO?</h2>
<p>The definition of an algebra over a double operad is a categorification of that of an algebra over an operad: if we take the definition of the former (that we are still yet to give) and replace every category in sight by a set then we will recover the classical definition of the latter. For now we’ll just give a definition of the <strong>DO</strong> part with seemingly arbitrary notation and conditions, but these will be explained once we look at the <strong>TS</strong> part.</p>
<p>Here <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BBag%7D(%5Cmathcal%7BC%7D)"> is the category of <strong>bags</strong> of objects in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D">, defined as the lax slice <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BFinSet%7D%5E%5Cmathrm%7Bbij%7D%5Cdownarrow_%5Cmathrm%7Blax%7D%5Cmathcal%7BC%7D"> of the core of finite sets over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D">. This is essentially a categorification of the notion of multisets of objects, <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BN%7D%5B%5Cmathcal%7BC%7D%5D%5Csimeq%5Cmathbb%7BN%7D%5E%5Cmathcal%7BC%7D">. Then an <strong>algebra over a double operad</strong> consists of</p>
<ol type="1">
<li>1-categories <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BS%7D">, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D">, and <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BA%7D"></li>
<li>a functor <img src="https://latex.codecogs.com/png.latex?%5Cpartial%5Ccolon%5Cmathcal%7BS%7D%5Cto%5Cmathcal%7BF%7D"></li>
<li>a span <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BBag%7D(%5Cmathcal%7BF%7D)%5Cxleftarrow%7B%5Csigma%7D%20%5Cmathcal%7BA%7D%5Cxrightarrow%7B%5Ctau%7D%20%5Cmathcal%7BF%7D"></li>
<li>a functor <img src="https://latex.codecogs.com/png.latex?c%5Ccolon%5Cmathcal%7BP%7D%5Cto%5Cmathcal%7BS%7D">, where <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BP%7D"> is the pullback of the cospan <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BBag%7D(%5Cmathcal%7BS%7D)%5Cxrightarrow%7B%5Cmathsf%7BBag%7D(%5Cpartial)%7D%5Cmathsf%7BBag%7D(%5Cmathcal%7BF%7D)%5Cxleftarrow%7B%5Csigma%7D%5Cmathcal%7BA%7D"></li>
<li>(some coherence data that I’m not going to describe)</li>
</ol>
<p><em>such that</em> the following diagram commutes:</p>
<p><img src="https://topos.institute/blog/2025-11-07-dots-from-double-theories/diagram-1.png" class="img-fluid" style="width:60.0%"> <!-- \begin{tikzcd}[sep=large]
  & & \mathcal{S}
    \ar[d,"\partial"]
\\\mathcal{P}
    \ar[urr,bend left=10,"c"]
    \ar[dr,phantom,near start,"\lrcorner"]
    \ar[r] \ar[d]
  & \mathcal{A}
    \ar[r,swap,"\tau"] \ar[d,"\sigma"]
  & \mathcal{F}
\\\mathsf{Bag}(\mathcal{S})
    \ar[r,swap,"\mathsf{Bag}(\partial)"]
  & \mathsf{Bag}(\mathcal{F})
\end{tikzcd} --></p>
</section>
<section id="what-is-a-ts-or-why-is-a-do" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="what-is-a-ts-or-why-is-a-do"><span class="header-section-number">3</span> What is a TS? (or: <em>Why</em> is a DO?)</h2>
<p>So we’ve given a pretty unintuitive definition of an algebra over a double operad, but why? This is where the attitude comes in, by defining some terminology.</p>
<ul>
<li><p>Objects in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BS%7D"> are called <strong>systems</strong>, and the morphisms are called <strong>morphisms of systems</strong>. Don’t worry too much about what the word “system” means here. Think of this as a classic nLab-style definition: a system is just an object in the category of systems.</p></li>
<li><p>Objects in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D"> are called <strong>interfaces</strong>; the functor <img src="https://latex.codecogs.com/png.latex?%5Cpartial"> takes a system to its interface, which can be thought of as its “boundary”, or as the part of the system that other systems can see and interact with.</p></li>
<li><p>Objects in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BA%7D"> are called <strong>interactions</strong>, which take a whole bag<sup>1</sup> of interfaces as an input and a single interface as an output and tell us what the composition should be. (This part is just like how an algebra for an operad tells me about composition.)</p></li>
<li><p>The functor <img src="https://latex.codecogs.com/png.latex?c%5Ccolon%5Cmathcal%7BP%7D%5Cto%5Cmathcal%7BS%7D"> is called the <strong>composition map</strong>. It takes a bag of systems and an interaction that can take their interfaces as input (i.e.&nbsp;the pullback <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BP%7D">) and returns a system; the diagram commuting tells us that the system it returns has precisely the interface specified by the interaction pattern.</p></li>
</ul>
</section>
<section id="double-theories-give-dots" class="level2" data-number="4">
<h2 data-number="4" data-anchor-id="double-theories-give-dots"><span class="header-section-number">4</span> Double theories give DOTS</h2>
<p>Recall <span class="citation" data-cites="LP2023">(Lambert and Patterson 2023)</span> that a <strong>double theory</strong> <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> is simply a double category “with an attitude”, where that attitude is that we should be interested in its <strong>models</strong>, i.e.&nbsp;(lax) double functors <img src="https://latex.codecogs.com/png.latex?M%5Ccolon%5Cmathbb%7BT%7D%5Cto%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D(%5Cmathsf%7BSet%7D)">.</p>
<p>It turns out that any double theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> gives rise to a DOTS by looking at its models, in the following way:</p>
<ol type="1">
<li>The three categories:
<ul>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BS%7D"> is the category of pairs of models of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"></li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D"> is the category of models of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"></li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BA%7D"> is the category of <strong>multi-cospans in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D"></strong>, i.e.&nbsp;an object is of the form <img src="https://latex.codecogs.com/png.latex?%0A%20%20%20%20(M_i%20%5Crightarrow%20N%20%5Cleftarrow%20L)_%7Bi=1,%5Cldots,n%7D%0A%20%20"> for some <img src="https://latex.codecogs.com/png.latex?n%5Cin%5Cmathbb%7BN%7D">.</li>
</ul></li>
<li>The functor <img src="https://latex.codecogs.com/png.latex?%5Cpartial%5Ccolon%5Cmathcal%7BS%7D%5Cto%5Cmathcal%7BF%7D"> is given by projection onto the second component. This means that we might as well write the objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BS%7D"> as <img src="https://latex.codecogs.com/png.latex?(M,%5Cpartial%20M)">.</li>
<li>The left leg (resp. right leg) of the span <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BBag%7D(%5Cmathcal%7BF%7D)%5Cleftarrow%5Cmathcal%7BA%7D%5Crightarrow%5Cmathcal%7BF%7D"> is given by the source map (resp. target map) of the multi-cospans.</li>
<li>The functor <img src="https://latex.codecogs.com/png.latex?c%5Ccolon%5Cmathcal%7BP%7D%5Cto%5Cmathcal%7BS%7D"> is given by taking the colimit.</li>
<li>Everything just works I promise.<sup>2</sup></li>
</ol>
<p>This is a very particular kind of DOTS, known as a <strong>colimit</strong> DOTS (because <img src="https://latex.codecogs.com/png.latex?c=%5Coperatorname%7Bcolim%7D">).</p>
</section>
<section id="so-which-for-what" class="level2" data-number="5">
<h2 data-number="5" data-anchor-id="so-which-for-what"><span class="header-section-number">5</span> So which for what?</h2>
<p>Although double theories give specific examples of DOTS<sup>3</sup>, studying them in their own right is still interesting. One thing that is particularly powerful about double theories and their models is that we can cleanly peel apart “shape” and “meaning” (syntax and semantics). For example, a really nice thing about basing CatColab to on the language of models of double theories is that we get this separation: I can build a causal loop diagram, and then <em>afterwards</em> decide if I want to interpret the objects and arrows as defining some linear system of ODEs.<sup>4</sup></p>
<p>However, DOTS lets us specify interaction patterns (and thus compositions) much more flexibly, and talk about systems that don’t “look like categories”. This is something that double theories struggle with, since the simplest double theory — the point — already has categories as its models.</p>



</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-CP2025" class="csl-entry">
Carlson, Kevin, and Evan Patterson. 2025. <span>“Instances of Models of Double-Categorical Theories.”</span> <a href="https://arxiv.org/abs/2510.08861">https://arxiv.org/abs/2510.08861</a>.
</div>
<div id="ref-LP2023" class="csl-entry">
Lambert, Michael, and Evan Patterson. 2023. <span>“Cartesian Double Theories: A Double-Categorical Framework for Categorical Doctrines.”</span> <a href="https://arxiv.org/abs/2310.05384">https://arxiv.org/abs/2310.05384</a>.
</div>
<div id="ref-LBPF2021" class="csl-entry">
Libkind, Sophie, Andrew Baas, Evan Patterson, and James Fairbanks. 2021. <span>“Operadic Modeling of Dynamical Systems: Mathematics and Computation.”</span> <a href="https://arxiv.org/abs/2105.12282">https://arxiv.org/abs/2105.12282</a>.
</div>
<div id="ref-LM2025" class="csl-entry">
Libkind, Sophie, and David Jaz Myers. 2025. <span>“Towards a Double Operadic Theory of Systems.”</span> <a href="https://arxiv.org/abs/2505.18329">https://arxiv.org/abs/2505.18329</a>.
</div>
</div></section><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>Instead of talking about bags we could just say that everything is symmetric monoidal, and that the <img src="https://latex.codecogs.com/png.latex?n">-ary interactions come from the monoidal structure. But bags are neat because they’re the free symmetric monoidal widget, and then we don’t have to worry about all our functors being monoidal or anything like that.↩︎</p></li>
<li id="fn2"><p>This is my attempt at a more honest “this proof is left as an exercise for the reader”. Also, I never told you what the coherences we had to check were anyway. Really, the answer is “refer to <span class="citation" data-cites="LM2025">(Libkind and Myers 2025)</span>”.↩︎</p></li>
<li id="fn3"><p>In fact, what I’ve sketched out here is just one way of many (i.e.&nbsp;at least two) that they can do so.↩︎</p></li>
<li id="fn4"><p>See e.g.&nbsp;the <a href="https://catcolab.org/help/logics/causal-loop">CatColab causal loop diagram documentation</a>, which describes two different ODE semantics: linear and Lotka–Volterra.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>double categories</category>
  <category>category theory</category>
  <category>systems theory</category>
  <guid>https://topos.institute/blog/2025-11-07-dots-from-double-theories/</guid>
  <pubDate>Fri, 07 Nov 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Open position: Director of UK Operations</title>
  <dc:creator>Tim Hosgood</dc:creator>
  <link>https://topos.institute/blog/2025-10-07-director-of-uk-operations/</link>
  <description><![CDATA[ 




<p>Like an aspiring <a href="https://www.youtube.com/watch?v=mSB71jNq-yQ">superb lyrebird</a> who’s just a bit slow, I find myself echoing the call of Brendan <a href="../../blog/2022-05-20-operations-job-advert">almost three and a half years ago</a>:</p>
<blockquote class="blockquote">
<p>In a research-focussed organisation, researchers often emerge as the stars. After all, they develop the breakthrough ideas, write the papers, prototype the technologies — and they are the most visible, meeting other experts and giving public talks. Topos, however, is more than just a collection of researchers: we are a community pioneering a new, international, and interdisciplinary tech organisation. We do this to help create a future where the systems around us, large and small, allow every member of society to flourish.</p>
<p>As we explore in our research, healthy systems require careful balancing of each part and the ways they fit together, communicate, and evolve. While our researchers study the fundamental nature of these ideas and how they inform construction of powerful and prosocial technologies, it’s our operations team that embodies this work day-in-day-out at Topos.</p>
</blockquote>
<p>I’ve been working for the past two years on setting up an office based in Oxford, UK. This has been made possible, of course, only by the help of an incredible research team here — <a href="../../people/david-jaz">David Jaz</a>, <a href="../../people/owen-lynch">Owen Lynch</a>, <a href="../../people/xiaoyan-li">Xiaoyan Li</a>, <a href="../../people/jason-brown">Jason Brown</a>, and <a href="../../people/jose-siqueira">José Siqueira</a> — but importantly also by our wonderful operations and administration group: <a href="../../people/beth-williams">Beth Williams</a>, <a href="../../people/molly-white">Molly White</a>, <a href="../../people/tish-tanski">Tish Tanski</a> (and external help from the team at <a href="https://impact-ops.org">Impact Ops</a>); all supported by <a href="../../people/brendan-fong">Brendan Fong</a>. I’m incredibly grateful to all these people (and more) for trusting me with this role, but now we’ve reached a point where operations, finance, systems, strategy, culture need a dedicated senior UK lead, so we’re launching a call for a <strong>Director of UK Operations</strong>.</p>
<p><a href="../../community/jobs/uk-2025-ops" class="btn btn-outline-secondary">Call for applications: Director of UK Operations</a></p>
<p><strong>Applications close on the 20th of October</strong>. You can find all the information in the call for applications, as well as details on how to apply. If you know anybody who might be interested, then please do forward on the link!</p>
<p><em>p.s. I’m not leaving Topos, just partially sidestepping into some different responsibilities here. #newyearnewyou</em></p>



<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>Topos</category>
  <category>hiring</category>
  <guid>https://topos.institute/blog/2025-10-07-director-of-uk-operations/</guid>
  <pubDate>Tue, 07 Oct 2025 00:00:00 GMT</pubDate>
  <media:content url="https://topos.institute/blog/2025-10-07-director-of-uk-operations/menura-superba.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Free PLTL algebras and a coalgebraic extension of hyperdoctrines</title>
  <dc:creator>Q Le</dc:creator>
  <link>https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/</link>
  <description><![CDATA[ 




<div class="callout callout-style-simple callout-none no-icon">
<div class="callout-body d-flex">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-body-container">
<p><em>Communicated by <a href="../../people/jose-siqueira">José Siqueira</a>.</em></p>
<p>This summer, Q joined us as a summer research intern as part of a joint project with the Mathematics Department at the University of Oxford, co-supervised by Kobi Kremnizer. This blog post is a brief summary of some of the work that they did with us.</p>
</div>
</div>
</div>
<section id="introduction" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="introduction"><span class="header-section-number">1</span> Introduction</h2>
<p>Time was. Time is. Time will be.</p>
<p>Time is a concept embedded in our reality. Yet, when we consider the truth of statements, the logics we conceive might not have temporal aspects. Whether in propositional logic, predicate logic or epistemic logic, once a statement holds, it holds <em>forever</em>, no matter the time or the place.</p>
<p>But there are times and places when and where this is not true. Though the statement “it is raining” might not be true now, it might be true the <em>next</em> day. And if you are outside tomorrow, soaking in the rain, the statement “Rain is hitting you” might only hold <em>until</em> you arrive home.</p>
<p>Though many logics do not have the ability to describe these time-dependent statements, a family of modal logics do, known as <strong>temporal logics</strong>. There are many types of temporal logic: interval temporal logic <span class="citation" data-cites="DellaMonicaDario2011ITLA MoszkowskiBen2012ACAS">(see Della Monica et al. 2011; also Moszkowski 2012)</span>, Lamport’s temporal logic of actions <span class="citation" data-cites="LamportLeslie1994Ttlo RabinovichA.1998Otot">(see Lamport 1994; also Rabinovich 1998)</span>, computation tree logic <span class="citation" data-cites="reynolds2001">(see Reynolds 2001)</span>, and other possibilities. Each temporal logic is grounded in a specific (philosophical) interpretation of time, contains differing modalities for time, and has numerous applications beyond mathematics and philosophy, such as in the formal verification of computational systems.</p>
<p>As with any logic, a natural question arises: is there a corresponding algebra to it? This question comes from mathematical logic, whereby given a logical theory <img src="https://latex.codecogs.com/png.latex?T">, one asks whether one can construct the Lindenbaum-Tarski algebra <img src="https://latex.codecogs.com/png.latex?A"> induced by <img src="https://latex.codecogs.com/png.latex?T">. When <img src="https://latex.codecogs.com/png.latex?T"> consists of propositional tautologies and the logic is classical, one finds that the Lindenbaum-Tarski algebra is the Boolean algebra. Likewise, if <img src="https://latex.codecogs.com/png.latex?T"> is the theory of intuitionistic logic, then the Lindenbaum-Tarski algebra is the Heyting algebra. We therefore ask: for which temporal logics can we apply Tarski’s method<sup>1</sup> and develop <em>temporal</em> algebras?</p>
<p>In this post, we’ll be focusing on a form of temporal logic called propositional linear temporal logic (PLTL), with the hopes of upgrading statements (that is, predicates) on interfaces that use classical logic into statements on systems that are time-dependent. To do this, we will work through four key parts:</p>
<ol type="1">
<li><p>We describe the axioms and rules of PLTL. From this, we can develop its theory.</p></li>
<li><p>We develop the category of PLTL algebras, describe the free PLTL algebra of a poset (such as a Boolean or Heyting algebra), and consider the PLTL algebras induced by a monad from this free-forgetful adjunction.</p></li>
<li><p>We tie this into José Siqueira’s recent work <span class="citation" data-cites="SiqueiraJosé2025Dror">(see Siqueira 2025)</span> on hyperdoctrines (which describe underlying logics such as classical or intuitionistic propositional logic), and how to temporalise them using PLTL.</p></li>
<li><p>We give the example of the stream comonad, which describes <img src="https://latex.codecogs.com/png.latex?%5Comega">-sequences, and how to temporalise statements about these sequences.</p></li>
</ol>
</section>
<section id="pltl" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="pltl"><span class="header-section-number">2</span> PLTL</h2>
<p>Let us introduce PLTL, as described in <span class="citation" data-cites="reynolds2001">Reynolds (2001)</span>.</p>
<section id="axioms-and-rules-of-pltl" class="level3" data-number="2.1">
<h3 data-number="2.1" data-anchor-id="axioms-and-rules-of-pltl"><span class="header-section-number">2.1</span> Axioms and Rules of PLTL</h3>
<p>Suppose we have a countable set of atomic propositions, denoted <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BL%7D">. We can then consider all the well-formed formulae constructed from <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BL%7D"> using <img src="https://latex.codecogs.com/png.latex?%5Ctop,%20%5Cneg,%20%5Cland"> (assuming a classical logic), which achieves the propositional part of PLTL.</p>
<p>Suppose we wish to consider how the truth value of propositions may change over time. How should we interpret time?</p>
<p>One way to view time is as a linear timeline in countably many discrete steps, starting from the present and heading to the future. We observe this as a <img src="https://latex.codecogs.com/png.latex?%5Comega">-sequence <img src="https://latex.codecogs.com/png.latex?w"> of time instants <img src="https://latex.codecogs.com/png.latex?w_i"> for <img src="https://latex.codecogs.com/png.latex?i%20%5Cin%20%5Cmathbb%7BN%7D">, where <img src="https://latex.codecogs.com/png.latex?w_0"> marks the present moment.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="image1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="Linear time frame of w = \langle w_0, w_1, w_2, w_3, \dots\rangle."><img src="https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/image1.png" height="80" alt="Linear time frame of w = \langle w_0, w_1, w_2, w_3, \dots\rangle." class="figure-img"></a></p>
<figcaption>Linear time frame of <img src="https://latex.codecogs.com/png.latex?w%20=%20%5Clangle%20w_0,%20w_1,%20w_2,%20w_3,%20%5Cdots%5Crangle">.</figcaption>
</figure>
</div>
<p>At each time instant <img src="https://latex.codecogs.com/png.latex?w_i">, we evaluate whether a proposition is true or not at that instant. We also consider how the future looks <em>from</em> <img src="https://latex.codecogs.com/png.latex?w_i">: this leads to defining the notation <img src="https://latex.codecogs.com/png.latex?w_%7B%5Cgeq%20i%7D%20=%20%5Clangle%20w_i,%20w_%7Bi+1%7D,%20w_%7Bi+2%7D,%20%5Cdots%20%5Crangle">, which is simply the linear timeline <img src="https://latex.codecogs.com/png.latex?w"> starting from time instant <img src="https://latex.codecogs.com/png.latex?w_i">. Thus, we formally view <img src="https://latex.codecogs.com/png.latex?w_i"> as the subset of well-formed PLTL formulae which are true at that time instant.</p>
<p>We introduce two temporal connectives alongside the two classical connectives <img src="https://latex.codecogs.com/png.latex?%5Cneg"> and <img src="https://latex.codecogs.com/png.latex?%5Cland">: <img src="https://latex.codecogs.com/png.latex?X">, a unary operator denoting the <em>neXt</em> time instant, and <img src="https://latex.codecogs.com/png.latex?U">, a binary operator where <img src="https://latex.codecogs.com/png.latex?%5Calpha%20U%20%5Cbeta"> denotes <img src="https://latex.codecogs.com/png.latex?%5Calpha"> holding <img src="https://latex.codecogs.com/png.latex?%5Cbeta">, from which we can recursively build well-formed formulae of PLTL from <img src="https://latex.codecogs.com/png.latex?%5Ctop"> and the atomic propositions in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BL%7D">.</p>
<p>The truth of a PLTL formula is evaluated at these <img src="https://latex.codecogs.com/png.latex?%5Comega">-sequences. We define <img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Calpha"> if and only if the formula <img src="https://latex.codecogs.com/png.latex?%5Calpha"> is true of the sequence <img src="https://latex.codecogs.com/png.latex?w"> by recursion:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Ctop">,</li>
<li><img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20p"> if and only if <img src="https://latex.codecogs.com/png.latex?p%20%5Cin%20w_0">, for any atomic <img src="https://latex.codecogs.com/png.latex?p%20%5Cin%20%5Cmathcal%7BL%7D">,</li>
<li><img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Cneg%20%5Calpha"> if and only if <img src="https://latex.codecogs.com/png.latex?w%20%5Cnot%20%5CvDash%20%5Calpha">,</li>
<li><img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Calpha%20%5Cland%20%5Cbeta"> if and only if <img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Calpha"> and <img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Cbeta">,</li>
<li><img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20X%5Calpha"> if and only if <img src="https://latex.codecogs.com/png.latex?w_%7B%5Cgeq%201%7D%20%5CvDash%20%5Calpha">,</li>
<li><img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Calpha%20U%20%5Cbeta"> if and only if there is some <img src="https://latex.codecogs.com/png.latex?i%20%5Cgeq%200"> such that <img src="https://latex.codecogs.com/png.latex?w_%7B%5Cgeq%20i%7D%20%5CvDash%20%5Cbeta"> and for each <img src="https://latex.codecogs.com/png.latex?0%20%5Cleq%20j%20%3C%20i">, <img src="https://latex.codecogs.com/png.latex?w_%7B%5Cgeq%20j%7D%20%5CvDash%20%5Calpha">.</li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="image2.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="A linear time frame w in which w \vDash \alpha, w \vDash X \alpha and w \vDash \alpha U \beta."><img src="https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/image2.png" height="100" alt="A linear time frame w in which w \vDash \alpha, w \vDash X \alpha and w \vDash \alpha U \beta." class="figure-img"></a></p>
<figcaption>A linear time frame <img src="https://latex.codecogs.com/png.latex?w"> in which <img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Calpha">, <img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20X%20%5Calpha"> and <img src="https://latex.codecogs.com/png.latex?w%20%5CvDash%20%5Calpha%20U%20%5Cbeta">.</figcaption>
</figure>
</div>
<p>We then define satisfiablity and logical validity, <img src="https://latex.codecogs.com/png.latex?%5CvDash_%7BPL%7D%20%5Calpha">, as usual. We also define two derived temporal connectives: <img src="https://latex.codecogs.com/png.latex?F%20%5Calpha%20=%20%5Ctop%20U%20%5Calpha"> for a future operator and <img src="https://latex.codecogs.com/png.latex?G%20%5Calpha%20=%20%5Cneg%20F%20%5Cneg%20%5Calpha"> for a guarantee/global operator.</p>
<p>There is also, of course, a syntactic side to this story<sup>2</sup>; what we just described is a sound and complete semantics for the associated notion of proof (<span class="citation" data-cites="reynolds2001">Reynolds (2001)</span>). We use this deductive system to define a notion of derivability <img src="https://latex.codecogs.com/png.latex?%5Cvdash_%7BPL%7D"> in the usual manner.</p>
</section>
<section id="free-forgetful-adjunctions-of-algebras-and-posets" class="level3" data-number="2.2">
<h3 data-number="2.2" data-anchor-id="free-forgetful-adjunctions-of-algebras-and-posets"><span class="header-section-number">2.2</span> Free-Forgetful Adjunctions of Algebras and (Po)Sets</h3>
<p>Let us observe the following adjunctions and the fact that Boolean algebras and Heyting algebras may be seen as the respective algebras for classical and intuitionistic logic:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="image3.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="The free-forgetful adjunctions between \textbf{Set}, \textbf{BoolAlg}, and \textbf{HeyAlg}."><img src="https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/image3.png" height="100" alt="The free-forgetful adjunctions between \textbf{Set}, \textbf{BoolAlg}, and \textbf{HeyAlg}." class="figure-img"></a></p>
<figcaption>The free-forgetful adjunctions between <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BSet%7D">, <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BBoolAlg%7D">, and <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BHeyAlg%7D">.</figcaption>
</figure>
</div>
<p>One may ask for an analogy with PLTL. To this aim, we must answer what a PLTL algebra is, what the morphisms between PLTL algebras are, and what the free construction of a PLTL algebra looks like on a poset. This will allow us to consider PLTL algebras as a category, which we can use to temporalise statements later!</p>
<section id="what-is-a-pltl-algebra" class="level4" data-number="2.2.1">
<h4 data-number="2.2.1" data-anchor-id="what-is-a-pltl-algebra"><span class="header-section-number">2.2.1</span> What is a PLTL Algebra?</h4>
<p>We fix a signature <img src="https://latex.codecogs.com/png.latex?%5CSigma_%7BPL%7D"> with constants <img src="https://latex.codecogs.com/png.latex?%5Cbot,%20%5Ctop">, unary operators <img src="https://latex.codecogs.com/png.latex?%5Cneg,%20X">, and binary operators <img src="https://latex.codecogs.com/png.latex?%5Cland,%20U">. We can then define a theory <img src="https://latex.codecogs.com/png.latex?T_P"> for PLTL as consisting of a bounded distributive lattice with complements with imposed inequalities corresponding to our axiom schema for PLTL<sup>3</sup>.</p>
<p>With this theory <img src="https://latex.codecogs.com/png.latex?T_P">, we can then define the category of PLTL algebras, <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPLTL-Alg%7D">, as the category with:</p>
<ul>
<li>Objects as tuples <img src="https://latex.codecogs.com/png.latex?A%20=%20(%7CA%7C,%20%5Cleq_A;%20%5Cbot%5EA,%20%5Ctop%5EA,%20%5Cneg%5EA,%20X%5EA,%20%5Cland%5EA,%20U%5EA)">, where <img src="https://latex.codecogs.com/png.latex?%7CA%7C"> is a set, <img src="https://latex.codecogs.com/png.latex?(%7CA%7C,%20%5Cleq_A)"> is a poset, and the operators of <img src="https://latex.codecogs.com/png.latex?A"> (including the derived operators <img src="https://latex.codecogs.com/png.latex?F%5EA"> and <img src="https://latex.codecogs.com/png.latex?G%5EA">) satisfy the axioms of <img src="https://latex.codecogs.com/png.latex?T_%7BPL%7D">, and</li>
<li>Morphisms as monotone homomorphisms <img src="https://latex.codecogs.com/png.latex?h:%20A%20%5Crightarrow%20B"> preserving all the symbols, including the derived classical and temporal connectives.</li>
</ul>
<p>It is worth noting a free-forgetful adjunction between <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BBoolAlg%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPLTL-Alg%7D">, but we relegate this as an interesting observation.</p>
</section>
<section id="what-is-the-free-pltl-algebra-of-a-poset" class="level4" data-number="2.2.2">
<h4 data-number="2.2.2" data-anchor-id="what-is-the-free-pltl-algebra-of-a-poset"><span class="header-section-number">2.2.2</span> What is the free PLTL algebra of a poset?</h4>
<p>Given a poset <img src="https://latex.codecogs.com/png.latex?(P,%20%5Cleq_1)">, we may view inequalities <img src="https://latex.codecogs.com/png.latex?p%20%5Cleq_1%20q"> as axioms stemming from <img src="https://latex.codecogs.com/png.latex?P">, and so encode the order of <img src="https://latex.codecogs.com/png.latex?P"> by setting <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BTh%7D_P%20%5Ccoloneqq%20%5C%7Bp%20%5Crightarrow%5EP%20q%20:%20p%20%5Cleq_1%20q%20%5C%7D">.</p>
<p>To construct the free PLTL algebra of <img src="https://latex.codecogs.com/png.latex?P">, we perform the Lindenbaum-Tarski method. We first recursively build a set <img src="https://latex.codecogs.com/png.latex?F(P)"> as follows:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?P%20%5Csubseteq%20F(P)">,</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cland%5EP%20%5Cpsi,%20%5Cphi%20U%5EP%20%5Cpsi%20%5Cin%20F(P)"> for <img src="https://latex.codecogs.com/png.latex?%5Cphi,%20%5Cpsi%20%5Cin%20F(P)">,</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cbot%5EP,%20%5Ctop%5EP%20%5Cin%20F(P)">, and</li>
<li><img src="https://latex.codecogs.com/png.latex?%5Cneg%5EP%20%5Cphi,%20X%5EP%5Cphi%20%5Cin%20F(P)"> for <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Cin%20F(P)">.</li>
</ul>
<p>We can then define a new theory <img src="https://latex.codecogs.com/png.latex?T_%7BP%7D%20%5Ccoloneqq%20T_%7BPL%7D%20%5Ccup%20%5Ctext%7BTh%7D_P">, which can be seen as the theory of PLTL combined with the imposed theory from the poset <img src="https://latex.codecogs.com/png.latex?P">.</p>
<p>We can also define an equivalence relation<sup>4</sup> on <img src="https://latex.codecogs.com/png.latex?F(P)"> via <img src="https://latex.codecogs.com/png.latex?%5Cphi%20%5Csim_%7BT_P%7D%20%5Cpsi"> if and only if <img src="https://latex.codecogs.com/png.latex?T_P%20%5Cvdash%20%5Cphi%20%5Cleftrightarrow%5EP%20%5Cpsi"> (that is, if <img src="https://latex.codecogs.com/png.latex?%5Cphi"> and <img src="https://latex.codecogs.com/png.latex?%5Cpsi"> are equivalent in the theory of <img src="https://latex.codecogs.com/png.latex?T_P">).</p>
<p>We thus obtain the Lindenbaum-Tarski algebra of <img src="https://latex.codecogs.com/png.latex?T_P">, denoted by <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D_%7BPL%7D(P)%20%5Ccoloneqq%20F(P)/%5Csim_%7BT_P%7D">. We can also define an ordering <img src="https://latex.codecogs.com/png.latex?%5Cleq_2"> on <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D_%7BPL%7D(P)"> via <img src="https://latex.codecogs.com/png.latex?%5B%5Cphi%5D%20%5Cleq_2%20%5B%5Cpsi%5D"> if and only if <img src="https://latex.codecogs.com/png.latex?T_%7BP%7D%20%5Cvdash%20%5Cphi%20%5Crightarrow%5EP%20%5Cpsi">. This makes <img src="https://latex.codecogs.com/png.latex?(%5Cmathcal%7BF%7D_%7BPL%7D(P),%20%5Cleq_2)"> into a poset, and in fact a PLTL-Algebra.</p>
<p>Intuitively, this poset is simply all the well-formed PLTL formulae from a beginning poset of propositions <img src="https://latex.codecogs.com/png.latex?P"> (think classical or intuitionistic propositional logic), quotiented by logical equivalence.</p>
</section>
</section>
<section id="the-eilenberg-moore-category-of-pltl-algebras" class="level3" data-number="2.3">
<h3 data-number="2.3" data-anchor-id="the-eilenberg-moore-category-of-pltl-algebras"><span class="header-section-number">2.3</span> The Eilenberg-Moore Category of PLTL Algebras</h3>
<p>Of course<sup>5</sup>, this construction <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D_%7BPL%7D:%5Ctextbf%7BPos%7D%20%5Crightarrow%20%5Ctextbf%7BPLTL-Alg%7D"> is functorial, and we may observe the following free-forgetful adjunction:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="image4.png" class="lightbox" data-gallery="quarto-lightbox-gallery-4" title="The free-forgetful adjunctions between \textbf{Pos} and \textbf{PLTL-Alg}."><img src="https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/image4.png" height="100" alt="The free-forgetful adjunctions between \textbf{Pos} and \textbf{PLTL-Alg}." class="figure-img"></a></p>
<figcaption>The free-forgetful adjunctions between <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPLTL-Alg%7D">.</figcaption>
</figure>
</div>
<p>From this adjunction, we obtain a monad <img src="https://latex.codecogs.com/png.latex?(M,%20%5Ceta%5EM,%20%5Cmu%5EM)">, where: * <img src="https://latex.codecogs.com/png.latex?M%20%5Ccoloneq%20%5Cmathcal%7BU%7D_%7BPL%7D%5Cmathcal%7BF%7D_%7BPL%7D"> sends a poset <img src="https://latex.codecogs.com/png.latex?P"> to a poset corresponding to the free PLTL algebra of <img src="https://latex.codecogs.com/png.latex?P">; * <img src="https://latex.codecogs.com/png.latex?%5Ceta%5EM"> is the unit that sends <img src="https://latex.codecogs.com/png.latex?p"> to <img src="https://latex.codecogs.com/png.latex?%5Bp%5D">; and, * <img src="https://latex.codecogs.com/png.latex?%5Cmu%5EM"> is the multiplication that maps a formula-of-formulae to a formula.</p>
<p>It is worth explaining <img src="https://latex.codecogs.com/png.latex?%5Cmu%5EM"> further with some examples. First, observe that elements of <img src="https://latex.codecogs.com/png.latex?M%5E2(P)"> are equivalence classes of PLTL formulae, generated by elements of <img src="https://latex.codecogs.com/png.latex?M(P)">, which are themselves equivalence classes <img src="https://latex.codecogs.com/png.latex?%5B%5Cphi%5D"> of PLTL formulae over <img src="https://latex.codecogs.com/png.latex?P">. Examples include:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?%5B(%5BX%5Cphi%5D%20%5Cland%20%5B%5Cpsi%5D)%20U%20%5BX%5Cchi%5D%5D"></li>
<li><img src="https://latex.codecogs.com/png.latex?%5B%5B%5Calpha%5D%20%5Clor%20%5BG%5Cbeta%5D%20%5Clor%20%5B%5Cgamma%5D%5D"></li>
<li><img src="https://latex.codecogs.com/png.latex?%5BG(%5B%5CvarPhi%5D%20U%20%5BG%5CvarPsi%5D)%20%5Crightarrow%20%5Cneg%20X%20%5B%5CvarXi%5D%5D">.</li>
</ul>
<p>Intuitively, <img src="https://latex.codecogs.com/png.latex?%5Cmu%5EM"> collapses a formula-of-formulae into a formula by interpreting each inner equivalence class <img src="https://latex.codecogs.com/png.latex?%5B%5Cvarphi%5D"> as any element of <img src="https://latex.codecogs.com/png.latex?%5B%5Cvarphi%5D">, such as <img src="https://latex.codecogs.com/png.latex?%5Cvarphi">, in <img src="https://latex.codecogs.com/png.latex?M(P)">, then evaluating the formula as an equivalence class. For example, with the first example above:</p>
<ul>
<li>The constants are <img src="https://latex.codecogs.com/png.latex?%5BX%20%5Cphi%5D,%20%5B%5Cpsi%5D,%20%5BX%5Cchi%5D%20%5Cin%20M(P)">.</li>
<li>Applying <img src="https://latex.codecogs.com/png.latex?%5Cmu_P%5EM">, we map each inner equivalence class <img src="https://latex.codecogs.com/png.latex?%5B%5Cvarphi%5D"> to an element of <img src="https://latex.codecogs.com/png.latex?%5B%5Cvarphi%5D">, such as <img src="https://latex.codecogs.com/png.latex?%5Cvarphi">. Thus, <img src="https://latex.codecogs.com/png.latex?%5BX%20%5Cphi%5D%20%5Cmapsto%20X%5Cphi,%20%5B%5Cpsi%5D%20%5Cmapsto%20%5Cpsi,%20%5BX%5Cchi%5D%20%5Cmapsto%20X%5Cchi">.</li>
<li>Then, we evaluate this as an equivalence class, so:</li>
</ul>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cmu_P%5EM%5Cbig(%5B(%5BX%5Cphi%5D%20%5Cland%20%5B%5Cpsi%5D)%20U%20%5BX%5Cchi%5D%5D%5Cbig)%20=%20%20%5B(X%5Cphi%20%5Cland%20%5Cpsi)%20U%20(X%5Cchi)%5D%20%5Cin%20M(P).%0A"></p>
<p>Similarly, <img src="https://latex.codecogs.com/png.latex?%0A%5Cmu_P%5EM%5Cbig(%5B%5B%5Calpha%5D%20%5Clor%20%5BG%5Cbeta%5D%20%5Clor%20%5B%5Cgamma%5D%5D%5Cbig)%20=%20%5B%5Calpha%20%5Clor%20G%5Cbeta%20%5Clor%20%5Cgamma%5D%0A"> and <img src="https://latex.codecogs.com/png.latex?%0A%5Cmu_P%5EM%5Cbig(%5BG(%5B%5CvarPhi%5D%20U%20%5BG%5CvarPsi%5D)%20%5Crightarrow%20%5Cneg%20X%20%5B%5CvarXi%5D%5D%5Cbig)%20=%20%5BG(%5CvarPhi%20U%20(G%20%5CvarPsi))%20%5Crightarrow%20%5Cneg%20X%5CvarXi%5D.%0A"></p>
<p>That this works is because the equivalence class of a formula-of-formulae in <img src="https://latex.codecogs.com/png.latex?M%5E2(P)"> does not depend on the choice of representatives of the inner equivalence classes.</p>
<p>As with any free-forgetful adjunction, we may now consider the Eilenberg-Moore category <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D%5EM"> induced by this monad <img src="https://latex.codecogs.com/png.latex?(M,%20%5Ceta%5EM,%20%5Cmu%5EM)">, whose objects are <img src="https://latex.codecogs.com/png.latex?M">-algebras <img src="https://latex.codecogs.com/png.latex?(P,%20v%5EP:MP%20%5Crightarrow%20P)">.</p>
<p>One may understand an object <img src="https://latex.codecogs.com/png.latex?(P,%20v%5EP)"> of <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D%5EM"> as a poset equipped with an interpretation map, where the generators of <img src="https://latex.codecogs.com/png.latex?MP"> (so the elements of <img src="https://latex.codecogs.com/png.latex?P">) are interpretated as themselves and a consistent interpretation is chosen for formulae, subject to the requirement that evaluating these formulae respects substitution.</p>
<p>One can then prove an equivalence between <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPLTL-Alg%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D%5EM">, thus showing a PLTL algebra is practically the same as an <img src="https://latex.codecogs.com/png.latex?M">-algebra.</p>
</section>
<section id="hyperdoctrines-and-temporalisation" class="level3" data-number="2.4">
<h3 data-number="2.4" data-anchor-id="hyperdoctrines-and-temporalisation"><span class="header-section-number">2.4</span> Hyperdoctrines and Temporalisation</h3>
<p>Here is how everything relates to José’s work <span class="citation" data-cites="SiqueiraJosé2025Dror">(see Siqueira 2025)</span>!</p>
<p>Suppose the following set-up:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?I"> is a comonad on <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D">, so <img src="https://latex.codecogs.com/png.latex?I%5E%7B%5Ctext%7Bop%7D%7D"> is a monad on <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D%5E%7B%5Ctext%7Bop%7D%7D">,</li>
<li><img src="https://latex.codecogs.com/png.latex?L"> is a monad on <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D">, which represents a modality acting on <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D"> such as <img src="https://latex.codecogs.com/png.latex?M">, and</li>
<li><img src="https://latex.codecogs.com/png.latex?P:%5Cmathcal%7BC%7D%5E%5Ctext%7Bop%7D%20%5Crightarrow%20%5Ctextbf%7BPos%7D"> is a hyperdoctrine. That is, a functor to <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D"> that encodes a flavour of logic, such as classical or intuitionistic propositional logic.</li>
</ul>
<p>In his recent work, José Siqueira proved that (regular) hyperdoctrines are the same as symmetric monoidal double functors <img src="https://latex.codecogs.com/png.latex?%0A%5Cmathbf%7B%5Cmathbb%7BS%7Dpan%7D(%5Cmathcal%7BC%7D)%5E%7B%5Ctext%7Bop%7D%7D%20%5Crightarrow%20%5Cmathbb%7BQ%7D%5Cmathbf%7Bt%7D(%5Ctextbf%7BPos%7D)%0A"> with a companion commuter property. Further, we know that the 2-category <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D"> admits the construction of algebras; i.e, the inclusion <img src="https://latex.codecogs.com/png.latex?%0A%5Ciota:%20%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D%20%5Chookrightarrow%20%5Ctext%7BMnd%7D(%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D)%0A"> has a right adjoint <img src="https://latex.codecogs.com/png.latex?%0A%5Ctextbf%7B$%5Cmathbb%7BA%7D$lg%7D(-)%20:%5Ctext%7BMnd%7D(%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D)%20%5Crightarrow%20%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D%0A"> where <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BMnd%7D(%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D)"> is the 2-category whose:</p>
<ul>
<li>objects are monads in the 2-category <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D">, i.e monads on double categories with respect to pseudo double functors and tight transformations;</li>
<li>1-cells are lax morphisms of such monads;</li>
<li>2-cells are 2-morphisms of monads.</li>
</ul>
<p>Now, if <img src="https://latex.codecogs.com/png.latex?I"> preserves pullbacks, then <img src="https://latex.codecogs.com/png.latex?I%5E%7B%5Ctext%7Bop%7D%7D"> induces a monad on the double category of spans over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D"> via the span construction: <img src="https://latex.codecogs.com/png.latex?%0AI%5E%5Cbullet:%5Cmathbb%7BS%7D%5Ctextbf%7Bpan%7D(%5Cmathcal%7BC%7D)%5E%7B%5Ctext%7Bop%7D%7D%20%5Chookrightarrow%20%5Cmathbb%7BS%7D%5Ctextbf%7Bpan%7D(%5Cmathcal%7BC%7D)%5E%7B%5Ctext%7Bop%7D%7D.%0A"></p>
<p>Similarly, we get an induced monad <img src="https://latex.codecogs.com/png.latex?L%5E%5Cbullet:%5Cmathbf%7B%5Cmathbb%7BQ%7Dt%7D(%5Ctextbf%7BPos%7D)%20%5Crightarrow%20%5Cmathbf%7B%5Cmathbb%7BQ%7Dt%7D(%5Ctextbf%7BPos%7D)"> in <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BDbl%7D%5E%7B%5Ctext%7Bps%7D%7D">. Then, we get a pseudo double functor <img src="https://latex.codecogs.com/png.latex?%0A%5Ctextbf%7B$%5Cmathbb%7BA%7D$lg%7D(I%5E%5Cbullet)%20%5Crightarrow%20%5Ctextbf%7B$%5Cmathbb%7BA%7D$lg%7D(L%5E%5Cbullet)%0A"> whenever we have a map of monads from <img src="https://latex.codecogs.com/png.latex?I%5E%7Bop%7D"> to <img src="https://latex.codecogs.com/png.latex?L"> by the 2-functoriality of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BA%7Dlg(-)">.</p>
<p>It is also known that <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BS%7D%5Ctextbf%7Bpan%7D(%5Ctext%7BCoalg%7D(I))%5E%7B%5Ctext%7Bop%7D%7D%20%5Csimeq%20%5Cmathbb%7BA%7D%5Ctextbf%7Blg%7D(I%5E%5Cbullet)">. Therefore, a map of monads <img src="https://latex.codecogs.com/png.latex?P"> from <img src="https://latex.codecogs.com/png.latex?I%5E%7B%5Ctext%7Bop%7D%7D"> on <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D%5E%7B%5Ctext%7Bop%7D%7D"> to <img src="https://latex.codecogs.com/png.latex?L"> on <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D"> induces a symmetric monoidal double functor from <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BS%7D%5Cmathbf%7Bpan%7D(%5Cmathcal%7BC%7D)%5E%7B%5Ctext%7Bop%7D%7D"> to <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BQ%7D%5Cmathbf%7Bt%7D(%5Ctextbf%7BPos%7D)">, which is the same as an existential hyperdoctrine. This therefore allows us to consider coalgebras of <img src="https://latex.codecogs.com/png.latex?I"> as contexts for a hyperdoctrine with semantics in <img src="https://latex.codecogs.com/png.latex?L">-algebras.</p>
<p>With this result in mind, let us apply this to our situation, in which <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D%20=%20%5Ctextbf%7BSet%7D">, <img src="https://latex.codecogs.com/png.latex?P%20=%20%5Ctext%7BSub%7D"> is the functor that sends an object to its collection of subobjects in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D"> and a morphism <img src="https://latex.codecogs.com/png.latex?f:a%20%5Cto%20b"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D"> to <img src="https://latex.codecogs.com/png.latex?f%5E%7B-1%7D:%5Ctext%7BSub%7D(B)%20%5Cto%20%5Ctext%7BSub%7D(A)">, and <img src="https://latex.codecogs.com/png.latex?L"> is the monad <img src="https://latex.codecogs.com/png.latex?M"> induced by the free-forgetful adjunction between <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPLTL-Alg%7D">, with unit <img src="https://latex.codecogs.com/png.latex?%5Ceta%5EM"> and multiplication <img src="https://latex.codecogs.com/png.latex?%5Cmu%5EM"> as before.</p>
<p>The key intuition is to view the comonad <img src="https://latex.codecogs.com/png.latex?I"> on <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D"> as providing an interface, so that <img src="https://latex.codecogs.com/png.latex?P"> provides a notion of a predicate on this interface. With the result described before, we may then upgrade this predicate to a temporal predicate on systems.</p>
<p>Thus, we ask for which <sup>6</sup> comonads <img src="https://latex.codecogs.com/png.latex?I"> (so interfaces) we can upgrade, given our <img src="https://latex.codecogs.com/png.latex?P"> which provides a notion of predicate (in classical propositional logic). That is, for which <img src="https://latex.codecogs.com/png.latex?I"> is such that there exists a natural transformation <img src="https://latex.codecogs.com/png.latex?%5Clambda:%20MP%20%5Crightarrow%20PI%5E%7B%5Ctext%7Bop%7D%7D"> such that the following diagrams commute:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="image6.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5" title="The unity law on the left, and the multiplication law on the right"><img src="https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/image6.png" height="140" alt="The unity law on the left, and the multiplication law on the right" class="figure-img"></a></p>
<figcaption>The unity law on the left, and the multiplication law on the right</figcaption>
</figure>
</div>
<p>For us, important examples may come from considering the cofree comonad on various polynomial functors, denoted <img src="https://latex.codecogs.com/png.latex?p"> as defined in <span class="citation" data-cites="LibkindSophie2024Prom">Libkind and Spivak (2024)</span>. Let us consider such an example below.</p>
<section id="the-stream-comonad" class="level4" data-number="2.4.1">
<h4 data-number="2.4.1" data-anchor-id="the-stream-comonad"><span class="header-section-number">2.4.1</span> The Stream Comonad</h4>
<p>Consider the polynomial functor <img src="https://latex.codecogs.com/png.latex?p(X)%20=%20X">, which is the identity functor. The cofree comonad of <img src="https://latex.codecogs.com/png.latex?X"> is the stream comonad <img src="https://latex.codecogs.com/png.latex?I">, where <img src="https://latex.codecogs.com/png.latex?I(A)%20=%20A%5E%5Cmathbb%7BN%7D">, <img src="https://latex.codecogs.com/png.latex?%5Cvarepsilon_A(%5Calpha)%20=%20%5Calpha(0)">, and <img src="https://latex.codecogs.com/png.latex?%5Cdelta_A(%5Calpha)%20=%20(%5Calpha%5E%7B(k)%7D)_%7Bk%20%5Cin%20%5Cmathbb%7BN%7D%7D">, where <img src="https://latex.codecogs.com/png.latex?%5Calpha%5E%7B(k)%7D(n)%20=%20%5Calpha(n+k)"> for <img src="https://latex.codecogs.com/png.latex?%5Calpha%20%5Cin%20A%5E%5Cmathbb%7BN%7D">. Then, <img src="https://latex.codecogs.com/png.latex?I%5E%7B%5Ctext%7Bop%7D%7D"> becomes a monad on <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BSet%7D%5E%7B%5Ctext%7Bop%7D%7D"> with unit <img src="https://latex.codecogs.com/png.latex?%5Ceta_A%5E%7BI%5E%7B%5Ctext%7Bop%7D%7D%7D%20=%20%5Cvarepsilon_A%5E%5Ctext%7Bop%7D"> and multiplication <img src="https://latex.codecogs.com/png.latex?%5Cmu_A%5E%7BI%5E%7B%5Ctext%7Bop%7D%7D%7D%20=%20%5Cdelta_%7BA%7D%5E%7B%5Ctext%7Bop%7D%7D">.</p>
<p>One can then prove that there exists a natural transformation <img src="https://latex.codecogs.com/png.latex?%5Clambda:%20MP%20%5Crightarrow%20PI%5E%7B%5Ctext%7Bop%7D%7D">, such that <img src="https://latex.codecogs.com/png.latex?(P,%20%5Clambda)"> is a morphism of monads from <img src="https://latex.codecogs.com/png.latex?(%5Ctextbf%7BSet%7D%5E%7B%5Ctext%7Bop%7D%7D,%20I%5E%7B%5Ctext%7Bop%7D%7D)"> to <img src="https://latex.codecogs.com/png.latex?(%5Ctextbf%7BPos%7D,%20M)">.</p>
<p>It is worth remarking on the proof, and the fact that, to observe <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D)"> and <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BSub%7D((A%5E%5Cmathbb%7BN%7D)%5E%5Cmathbb%7BN%7D)"> as PLTL algebras, one needs to evaluate a given PLTL formula as predicates on <img src="https://latex.codecogs.com/png.latex?A%5E%5Cmathbb%7BN%7D"> as follows:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?%5B%5Ctop%5D_A%20=%20A%5E%5Cmathbb%7BN%7D">,</li>
<li><img src="https://latex.codecogs.com/png.latex?%5B%5Cvarphi%20%5Cland%20%5Cpsi%5D_A%20=%20%5B%5Cvarphi%5D_A%20%5Ccap%20%5B%5Cpsi%5D_A">,</li>
<li><img src="https://latex.codecogs.com/png.latex?%5B%5Cvarphi%20U%20%5Cpsi%5D_A%20=%20%5C%7B%20%5Calpha:%20%5Cexists%20k%20%5Cgeq%200,%20%5Calpha%5E%7B(k)%7D%20%5Cin%20%5B%5Cpsi%5D_A%20%5Ctext%7B%20and%20%7D%20%5Cforall%200%20%5Cleq%20j%20%3C%20k,%20%5Calpha%5E%7B(j)%7D%20%5Cin%20%5B%5Cvarphi%5D_A%20%5C%7D">,</li>
<li><img src="https://latex.codecogs.com/png.latex?%5B%5Cneg%20%5Cvarphi%5D_A%20=%20A%5E%5Cmathbb%7BN%7D%20%5Cbackslash%20%5B%5Cvarphi%5D_A">,</li>
<li><img src="https://latex.codecogs.com/png.latex?%5BX%20%5Cvarphi%5D_A%20=%20%5C%7B%20%5Calpha%20:%20%5Calpha%5E%7B(1)%7D%20%5Cin%20%5B%5Cvarphi%5D_A%20%5C%7D">.</li>
</ul>
<p>Here, we interpret each <img src="https://latex.codecogs.com/png.latex?U%20%5Csubseteq%20A"> as predicates about the current stream <img src="https://latex.codecogs.com/png.latex?%5Calpha%5E%7B(0)%7D%20=%20%5Calpha">: that is, we define a current-time predicate <img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7Bcur%7D%5EA(U)%20%5Ccoloneqq%20%5C%7B%20%5Calpha%20%5Cin%20A%5E%7B%5Cmathbb%7BN%7D%7D%20:%20%5Calpha(0)%20%5Cin%20U%5C%7D%20%5Cin%20%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D).%0A"> Similarly, for a stream-of-streams <img src="https://latex.codecogs.com/png.latex?%5CSigma%20:%20%5Cmathbb%7BN%7D%20%5Cto%20A%5E%5Cmathbb%7BN%7D">, we may consider each <img src="https://latex.codecogs.com/png.latex?V%20%5Csubseteq%20A%5E%5Cmathbb%7BN%7D"> as predicates regarding the current inner stream, and so define a meta-current-time predicate <img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7Bcur%7D%5E%7BA%5E%5Cmathbb%7BN%7D%7D(V)%20%5Ccoloneqq%20%5C%7B%20%5CSigma%20%5Cin%20(A%5E%7B%5Cmathbb%7BN%7D%7D)%5E%5Cmathbb%7BN%7D:%20%5CSigma%7B(0)%7D%20%5Cin%20V%5C%7D%20%5Cin%20%5Ctext%7BSub%7D((A%5E%5Cmathbb%7BN%7D)%5E%5Cmathbb%7BN%7D)%0A"> and define PLTL operations accordingly. Equivalently, each fibre <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D)"> is an <img src="https://latex.codecogs.com/png.latex?M">-algebra with a corresponding map <img src="https://latex.codecogs.com/png.latex?v%5E%7B%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D)%7D:%20M(%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D))%20%5Crightarrow%20%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D)">, which also defines each <img src="https://latex.codecogs.com/png.latex?%5Ctext%7BSub%7D((A%5E%5Cmathbb%7BN%7D)%5E%5Cmathbb%7BN%7D)"> as an <img src="https://latex.codecogs.com/png.latex?M">-algebra.</p>
<p>We may then define the natural transformation <img src="https://latex.codecogs.com/png.latex?%5Clambda"> via <img src="https://latex.codecogs.com/png.latex?%0A%5Clambda_A%20%5Ccoloneqq%20v%5E%7B%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D)%7D%20%5Ccirc%20M(%5Ctext%7Bcur%7D%5EA):M(%5Ctext%7BSub(A)%7D)%20%5Crightarrow%20%5Ctext%7BSub%7D(A%5E%5Cmathbb%7BN%7D).%0A"></p>
<p>With <img src="https://latex.codecogs.com/png.latex?(P,%20%5Clambda)"> a map of monads, we then observe the following map, for each set <img src="https://latex.codecogs.com/png.latex?A">: <img src="https://latex.codecogs.com/png.latex?%0A%5Clambda_A:%20MPA%20%20%5Crightarrow%20PI%5E%5Ctext%7Bop%7DA%0A"> Since <img src="https://latex.codecogs.com/png.latex?M"> is the monad that produces the free PLTL-algebra of <img src="https://latex.codecogs.com/png.latex?P(A)">, <img src="https://latex.codecogs.com/png.latex?MPA"> is the set of all PLTL-formulae generated from <img src="https://latex.codecogs.com/png.latex?A">. Likewise, <img src="https://latex.codecogs.com/png.latex?PI%5E%7B%5Ctext%7Bop%7D%7DA"> is a poset of predicates on the set <img src="https://latex.codecogs.com/png.latex?I%5E%7B%5Ctext%7Bop%7D%7DA%20=%20%20A%5E%5Cmathbb%7BN%7D">, and so describes properties of streams, or possible behaviours of a sequence of states.</p>
<p>Then, <img src="https://latex.codecogs.com/png.latex?%5Clambda_A"> sends each formula <img src="https://latex.codecogs.com/png.latex?%5Cvarphi%20%5Cin%20MPA"> to a predicate <img src="https://latex.codecogs.com/png.latex?%5Clambda_A(%5Cvarphi)%20%5Cin%20P(I%5E%5Ctext%7Bop%7DA)">. Thus, given a stream <img src="https://latex.codecogs.com/png.latex?%5Calpha%20%5Cin%20A%5E%5Cmathbb%7BN%7D">, the predicate <img src="https://latex.codecogs.com/png.latex?%5Clambda_A(%5Cvarphi)"> determines whether <img src="https://latex.codecogs.com/png.latex?%5Calpha%20%5CvDash_A%20%5Cvarphi">. Thus, the behaviour of a PLTL formula is its characteristic predicate on streams, aka: <img src="https://latex.codecogs.com/png.latex?%0A%5B%5Cvarphi%5D_A%20%5Ccoloneqq%20%5Clambda_A(%5Cvarphi):A%5E%5Cmathbb%7BN%7D%20%5Crightarrow%20%5COmega%0A"> where <img src="https://latex.codecogs.com/png.latex?%5COmega"> is the truth poset in the hyperdoctrine <img src="https://latex.codecogs.com/png.latex?P">.</p>
<p>One may therefore consider <img src="https://latex.codecogs.com/png.latex?MP"> as providing the syntax, whilst <img src="https://latex.codecogs.com/png.latex?PI%5E%7B%5Ctext%7Bop%7D%7D"> provides the semantics. Viewing <img src="https://latex.codecogs.com/png.latex?I"> as an interface that exposes an entire trajectory of states and <img src="https://latex.codecogs.com/png.latex?P"> as providing predicates on <img src="https://latex.codecogs.com/png.latex?I">, the natural transformation <img src="https://latex.codecogs.com/png.latex?%5Clambda"> allows us to interpret each temporal formula as the set of streams satisfying it, thus upgrading a predicate on <img src="https://latex.codecogs.com/png.latex?X"> into a predicate on <img src="https://latex.codecogs.com/png.latex?IX">, consistent with PLTL semantics.</p>
<p>Importantly, given our choice of monad <img src="https://latex.codecogs.com/png.latex?L%20=%20M">, we require a valid interpretation of the PLTL operators <img src="https://latex.codecogs.com/png.latex?X"> and <img src="https://latex.codecogs.com/png.latex?U"> in terms of the semantics of the cofree comonad of the polynomial functor on <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BSet%7D%5E%7B%5Ctext%7Bop%7D%7D">. This is fairly obvious for the stream comonad, but certainly not obvious for polynomial functors whose cofree comonads exhibit branching behaviour (aka, polynomials of degree 2 or higher).</p>
</section>
</section>
<section id="future-directions" class="level3" data-number="2.5">
<h3 data-number="2.5" data-anchor-id="future-directions"><span class="header-section-number">2.5</span> Future Directions</h3>
<p>From here, there are many natural research directions to explore.</p>
<p>We had provided a category of PLTL algebras, <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPLTL-Alg%7D">, based on constructing the Lindenbaum-Tarski algebra of the theory of propositional linear temporal logic. As stated before, PLTL is one of many possible temporal logics, grounded in a specific philosophical interpretation of time as starting from the present and extending to the future in discrete, countable time steps. There are many other temporal logics of interest, and we ask whether they may undergo a similar treatment to PLTL. Of particular note are the following logics:</p>
<ul>
<li>Intuitionistic Linear Temporal Logic, as explored in <span class="citation" data-cites="BalbianiPhilippe2019ILTL">Balbiani et al. (2019)</span> and <span class="citation" data-cites="KR2024-33">Fernández-Duque, McLean, and Zenger (2024)</span>, which may allow us to upgrade classical predicates on states to intuitionistic temporal predicates on streams.</li>
<li>Doxastic Logic, as explored in <span class="citation" data-cites="RönnedalDaniel2018Dlan">Rönnedal (2018)</span> or <span class="citation" data-cites="ZhangJinjin2025FELF">Zhang et al. (2025)</span>, which may allow us to hold epistemic predicates on streams as opposed to temporal predicates.</li>
<li>Computation Tree Logic, as explored in <span class="citation" data-cites="reynolds2001">Reynolds (2001)</span>, which may allow us to consider predicates on branches of streams, as opposed to only a linear timeline of streams as we currently see with the stream comonad.</li>
</ul>
<p>With any monad <img src="https://latex.codecogs.com/png.latex?L"> in our set-up, a natural question is which comonads <img src="https://latex.codecogs.com/png.latex?I"> allow for the hyperdoctrine <img src="https://latex.codecogs.com/png.latex?P"> to be a map of mornads, such that this upgrade of predicates is possible. This is particularly interesting when we allow <img src="https://latex.codecogs.com/png.latex?I"> to be the cofree comonad of polynomial functors <img src="https://latex.codecogs.com/png.latex?p(X)">.</p>
<p>As described before, it could be the case that, for <img src="https://latex.codecogs.com/png.latex?L%20=%20M">, the only polynomial functors <img src="https://latex.codecogs.com/png.latex?p"> for which <img src="https://latex.codecogs.com/png.latex?I"> allows for such a construction is when <img src="https://latex.codecogs.com/png.latex?p%20=%20B%20%5Ctimes%20X"> for <img src="https://latex.codecogs.com/png.latex?B">: that is, for unary polynomials with no constants. Though limiting, it suggests that we ought to consider other logics (such as CTL) which can account for more sophisticated system behaviours (primarily, branching behaviours).</p>
<p>We can also change the hyperdoctrine itself to reflect the underlying logic that we temporalise via PLTL. Primarily, if one develops a hyperdoctrine that accounts for a static form of doxastic logic, then setting <img src="https://latex.codecogs.com/png.latex?L"> to be a monad induced by a free-forgetful adjunction of temporal algebras (such as PLTL) allows one to consider a dynamic or temporal doxastic logic that can apply to systems. In <span class="citation" data-cites="DagninoFrancesco2021Dmac">Dagnino and Rosolini (2021)</span>, they show that modal interior operators may be constructed from adjunctions in the 2-category of doctrines. Likewise, one could instead consider a temporal hyperdoctrine , then upgrade it with a doxastic monad. That there may be two ways to approach this might imply two interpretations of a logic affected with temporal and doxastic modalities, the priority of which depends on the set-up. This suggests a potentially novel way to define dynamic doxastic or temporal doxastic logics.</p>



</section>
</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-BalbianiPhilippe2019ILTL" class="csl-entry">
Balbiani, Philippe, Joseph Boudou, Martín Diéguez, and David Fernández-Duque. 2019. <span>“Intuitionistic Linear Temporal Logics.”</span> <em>ACM Transactions on Computational Logic</em> 21 (2): 1–32.
</div>
<div id="ref-DagninoFrancesco2021Dmac" class="csl-entry">
Dagnino, Francesco, and Giuseppe Rosolini. 2021. <span>“Doctrines, Modalities and Comonads.”</span> <em>Mathematical Structures in Computer Science</em> 31 (7): 769–98.
</div>
<div id="ref-DellaMonicaDario2011ITLA" class="csl-entry">
Della Monica, Dario, Valentin Goranko, Angelo Montanari, and Guido Sciavicco. 2011. <span>“INTERVAL TEMPORAL LOGICS: A JOURNEY.”</span> <em>Bulletin of the European Association for Theoretical Computer Science</em>, no. 105: 73–99.
</div>
<div id="ref-KR2024-33" class="csl-entry">
Fernández-Duque, David, Brett McLean, and Lukas Zenger. 2024. <span>“<span class="nocase">A Sound and Complete Axiomatisation for Intuitionistic Linear Temporal Logic</span>.”</span> In <em><span class="nocase">Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning</span></em>, 350–60. <a href="https://doi.org/10.24963/kr.2024/33">https://doi.org/10.24963/kr.2024/33</a>.
</div>
<div id="ref-fredstephan2008" class="csl-entry">
Fred Kröger, Stephan Merz. 2008. <span>“Temporal Logic and State Systems.”</span> In. Texts in Theoretical Computer Science. An EATCS Series. Springer Nature.
</div>
<div id="ref-LamportLeslie1994Ttlo" class="csl-entry">
Lamport, Leslie. 1994. <span>“The Temporal Logic of Actions.”</span> <em>ACM Transactions on Programming Languages and Systems</em> 16 (3): 872–923.
</div>
<div id="ref-LibkindSophie2024Prom" class="csl-entry">
Libkind, Sophie, and David I Spivak. 2024. <span>“Pattern Runs on Matter: The Free Monad Monad as a Module over the Cofree Comonad Comonad.”</span>
</div>
<div id="ref-MoszkowskiBen2012ACAS" class="csl-entry">
Moszkowski, Ben. 2012. <span>“A Complete Axiom System for Propositional Interval Temporal Logic with Infinite Time.”</span> <em>Logical Methods in Computer Science</em> 8 (3): 2–2.
</div>
<div id="ref-RabinovichA.1998Otot" class="csl-entry">
Rabinovich, A. 1998. <span>“On Translations of Temporal Logic of Actions into Monadic Second-Order Logic.”</span> <em>Theoretical Computer Science</em> 193 (1): 197–214.
</div>
<div id="ref-reynolds2001" class="csl-entry">
Reynolds, M. 2001. <span>“An Axiomatization of Full Computation Tree Logic.”</span> <em>The Journal of Symbolic Logic</em>.
</div>
<div id="ref-RönnedalDaniel2018Dlan" class="csl-entry">
Rönnedal, Daniel. 2018. <span>“Doxastic Logic: A New Approach.”</span> <em>Journal of Applied Non-Classical Logics</em> 28 (4): 313–47.
</div>
<div id="ref-SiqueiraJosé2025Dror" class="csl-entry">
Siqueira, José. 2025. <span>“Double-Functorial Representation of Regular Structures.”</span> <em>arXiv</em>. <a href="https://doi.org/10.48550/arXiv.2508.06637">https://doi.org/10.48550/arXiv.2508.06637</a>.
</div>
<div id="ref-ZhangJinjin2025FELF" class="csl-entry">
Zhang, Jinjin, Xiaoxia Zhou, Yan Zhang, and Lixing Tan. 2025. <span>“Fuzzy Epistemic Logic: Fuzzy Logic of Doxastic Attitudes.”</span> <em>Mathematics (Basel)</em> 13 (7): 1105–5.
</div>
</div></section><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>Tarski’s method does not apply to every logic, as will be discussed later.↩︎</p></li>
<li id="fn2"><p>The rules are modus ponens and temporal generalisation (or the necessitation rule for <img src="https://latex.codecogs.com/png.latex?G">): <img src="https://latex.codecogs.com/png.latex?%0A%5Cfrac%7B%5Calpha,%20%5Calpha%20%5Crightarrow%20%5Cbeta%7D%7B%5Cbeta%7D%20%5Chspace%7B20pt%7D%20%5Cfrac%20%7B%5Calpha%7D%7BG%20%5Calpha%7D.%0A"> The axioms are substitutional instances of the following: C0, any propositional tautology; C1, <img src="https://latex.codecogs.com/png.latex?F%20%5Cneg%20%5Cneg%20%5Calpha%20%5Cleftrightarrow%20F%5Calpha">; C2, <img src="https://latex.codecogs.com/png.latex?G(%5Calpha%20%5Crightarrow%20%5Cbeta)%20%5Crightarrow%20(G%5Calpha%20%5Crightarrow%20G%5Cbeta)">; C3, <img src="https://latex.codecogs.com/png.latex?G%5Calpha%20%5Crightarrow%20(%5Calpha%20%5Cland%20X%5Calpha%20%5Cland%20X(G%5Calpha))">; C4, <img src="https://latex.codecogs.com/png.latex?X%20%5Cneg%20%5Calpha%20%5Cleftrightarrow%20%5Cneg%20X%20%5Calpha">; C5, <img src="https://latex.codecogs.com/png.latex?X%20(%5Calpha%20%5Crightarrow%20%5Cbeta)%20%5Crightarrow%20(X%5Calpha%20%5Crightarrow%20X%5Cbeta)">; C6, <img src="https://latex.codecogs.com/png.latex?G%20(%5Calpha%20%5Crightarrow%20X%5Calpha)%20%5Crightarrow%20(%5Calpha%20%5Crightarrow%20G%5Calpha)">; C7, <img src="https://latex.codecogs.com/png.latex?(%5Calpha%20U%20%5Cbeta)%20%5Cleftrightarrow%20(%5Cbeta%20%5Clor%20(%5Calpha%20%5Cland%20X(%5Calpha%20U%20%5Cbeta)))">; C8, <img src="https://latex.codecogs.com/png.latex?(%5Calpha%20U%20%5Cbeta)%20%5Crightarrow%20F%20%5Cbeta">.↩︎</p></li>
<li id="fn3"><p>With <img src="https://latex.codecogs.com/png.latex?F"> and <img src="https://latex.codecogs.com/png.latex?G"> as defined before, we impose the following (in)equalities, corresponding to the PLTL axiom schema: C1, <img src="https://latex.codecogs.com/png.latex?F%20%5Cneg%20%5Cneg%20%5Calpha%20=%20F%5Calpha">; C2, <img src="https://latex.codecogs.com/png.latex?G(%5Calpha%20%5Crightarrow%20%5Cbeta)%20%5Cleq%20(G%5Calpha%20%5Crightarrow%20G%5Cbeta)">; C3, <img src="https://latex.codecogs.com/png.latex?G%5Calpha%20%5Cleq%20(%5Calpha%20%5Cland%20X%5Calpha%20%5Cland%20X(G%5Calpha))">, so paired with temporal generalisation, we get <img src="https://latex.codecogs.com/png.latex?G%5Calpha%20=%20%5Calpha">, <img src="https://latex.codecogs.com/png.latex?G%5Calpha%20%5Cleq%20%20X%5Calpha"> and <img src="https://latex.codecogs.com/png.latex?G%5Calpha%20%5Cleq%20XG%5Calpha">; C4, <img src="https://latex.codecogs.com/png.latex?X%20%5Cneg%20%5Calpha%20=%20%5Cneg%20X%20%5Calpha">; C5,<img src="https://latex.codecogs.com/png.latex?X%20(%5Calpha%20%5Crightarrow%20%5Cbeta)%20%5Cleq%20(X%5Calpha%20%5Crightarrow%20X%5Cbeta)">; C6, <img src="https://latex.codecogs.com/png.latex?G%20(%5Calpha%20%5Crightarrow%20X%5Calpha)%20%5Cleq%20(%5Calpha%20%5Crightarrow%20G%5Calpha)">; C7, <img src="https://latex.codecogs.com/png.latex?(%5Calpha%20U%20%5Cbeta)%20=%20(%5Cbeta%20%5Clor%20(%5Calpha%20%5Cland%20X(%5Calpha%20U%20%5Cbeta)))">; C8, <img src="https://latex.codecogs.com/png.latex?(%5Calpha%20U%20%5Cbeta)%20%5Cleq%20F%20%5Cbeta">.↩︎</p></li>
<li id="fn4"><p>We have an equivalence relation and a partial ordering on <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BF%7D_%7BPL%7D(P)"> as a consequence of the example given on page 27 of <span class="citation" data-cites="fredstephan2008">Fred Kröger (2008)</span>.↩︎</p></li>
<li id="fn5"><p>Read the corresponding paper to this article.↩︎</p></li>
<li id="fn6"><p>For arbitrary <img src="https://latex.codecogs.com/png.latex?P">, <img src="https://latex.codecogs.com/png.latex?I">, and <img src="https://latex.codecogs.com/png.latex?L">, this need not be the case. As a counterexample, take <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D%20=%20%5Ctextbf%7BSet%7D">, <img src="https://latex.codecogs.com/png.latex?P%20=%20%5Cmathcal%7BP%7D"> be the powerset functor, <img src="https://latex.codecogs.com/png.latex?I%20=%20%5Ctext%7Bid%7D_%7B%5Cmathcal%7BC%7D%7D"> be the identity comonad, so <img src="https://latex.codecogs.com/png.latex?I%5E%7B%5Ctext%7Bop%7D%7D"> is the identity monad, and <img src="https://latex.codecogs.com/png.latex?L"> be the monad such that <img src="https://latex.codecogs.com/png.latex?L(X)%20=%20%5Cmathbf%7B1%7D"> (the terminal object of <img src="https://latex.codecogs.com/png.latex?%5Ctextbf%7BPos%7D">) for all <img src="https://latex.codecogs.com/png.latex?X%20%5Cin%20%5Ctextbf%7BPos%7D">.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>categorical logic</category>
  <category>logic</category>
  <guid>https://topos.institute/blog/2025-09-26-free-pltl-algebras-and-hyperdoctrines/</guid>
  <pubDate>Fri, 26 Sep 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Incremental query updating in adhesive categories</title>
  <dc:creator>Kris Brown</dc:creator>
  <link>https://topos.institute/blog/2025-08-15-incremental-adhesive/</link>
  <description><![CDATA[ 




<div class="hidden">
<p>$$ <!-- Number systems --> </p>
<!-- Categories -->
<!-- Graphs -->
<!-- Double categories -->
<!-- Acsets -->
<!-- Wiring diagrams -->
<p>$$</p>
</div>
<p>Category theory often sheds light on old problems by redescribing them in a conceptually cleaner way, but it less frequently gets used to develop concrete algorithms for practical problems. In this post, the problem we address involves a query we care about: we want to maintain the answer set to some query (e.g.&nbsp;“how many paths of length two are there in this graph?”) when the thing being queried is changing frequently. If the changes are frequent enough, we don’t want to have to run the query after each change: we want to incrementally update our answer set given information about the change, letting us find the new answers to the query without repeating any work that was done to find the old answers. This is schematically depicted below:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/overview.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/overview.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:80.0%"></a></p>
</figure>
</div>
<p>While this problem of incremental computation has been studied in great depth, it is less often studied in context where the changes (<img src="https://latex.codecogs.com/png.latex?%5CDelta">, above) are induced by explicit rules which state the pattern-replacement template that was used to generate the <img src="https://latex.codecogs.com/png.latex?%5CDelta">. We will use this additional information to more efficiently address the problem, which is relevant to computational bottlenecks in e-graphs <span class="citation" data-cites="biondo2025">(2025)</span>, datalog queries, and <a href="../2023-07-07-agent-based-modeling-graph-rewriting">agent based modeling</a>. Before unifying these different domains, let’s consider them each independently.</p>
<div class="callout callout-style-simple callout-warning no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Warning</span>Presumed background
</div>
</div>
<div class="callout-body-container callout-body">
<p>This post will presume familiarity with categories and (co)limits. Also it is a follow-up to <a href="../2025-08-06-substitution-is-pushout/">Substitution is (also) pushout</a> which formally defines “updating” in the categories <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BGrph%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D"> and shows analogies between graph rewriting and Datalog.</p>
</div>
</div>
<section id="example-incremental-solutions" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Example incremental solutions</h1>
<section id="graphs" class="level2" data-number="1.1">
<h2 data-number="1.1" data-anchor-id="graphs"><span class="header-section-number">1.1</span> Graphs</h2>
<p>Our first example of an incrementalized query is in the context of relational databases. We will focus in particular on databases with the schema <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7BE%5Crightrightarrows%20V%7D">, whose instances are (directed, multi-)graphs. The kind of query we can incrementalize is a <em>conjunctive query</em>, such as “give me all pairs of edges such that the target of the first edge is the source of second edge”. Interestingly, we can represent this query with a graph itself, <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20a%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%20b%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%20c%7D%7D">, now regarded as a “pattern” rather than a piece of concrete data. Call this query <img src="https://latex.codecogs.com/png.latex?Q">.</p>
<p>Thinking of the query itself as a special graph also illuminates what answers to our query look like: applying our query to some graph <img src="https://latex.codecogs.com/png.latex?G"> is tantamount to finding all graph homomorphisms <img src="https://latex.codecogs.com/png.latex?Q%5Crightarrow%20G">. The data of each such homomorphism (an assignment of vertices and edges) can be thought of as binding the variables that live in <img src="https://latex.codecogs.com/png.latex?Q"> to the values in <img src="https://latex.codecogs.com/png.latex?G">. For example, if <img src="https://latex.codecogs.com/png.latex?G%20:=%20%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%201%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%202%7D%5Ccirclearrowleft%7D">, then the answers to the query are:</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?%5B1,2,2%5D"> (shorthand for <img src="https://latex.codecogs.com/png.latex?%5C%7Ba%5Cmapsto%201,%5C%20b%5Cmapsto%202,%5C%20c%20%5Cmapsto%202%5C%7D">)<sup>1</sup><br>
</li>
<li><img src="https://latex.codecogs.com/png.latex?%5B2,2,2%5D"></li>
</ul>
<p>One way to describe how a graph can evolve over time is a <em>rewrite rule</em>: for us, a rewrite rule is a graph homomorphism where the domain is the <em>pattern</em> and the codomain is the <em>replacement</em>. In the following example, we consider a rule, <img src="https://latex.codecogs.com/png.latex?f%5Ccolon%20L%5Cto%20R">, which says “given some edge, construct a path of length two which goes from its source to its target”. The pattern of the rule says “given an edge from <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%20x%7D"> to <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%20y%7D">” and the replacement of the rule says “add in a new path of length two going from <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%20x%7D"> to <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%20y%7D">”. An example <em>application</em> of this rule to some graph, <img src="https://latex.codecogs.com/png.latex?G">, requires a match <img src="https://latex.codecogs.com/png.latex?L%5Crightarrowtail%20G"> to specify <em>how</em> the rule is to be applied, as shown below.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig3.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig3.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:50.0%"></a></p>
</figure>
</div>
<p>So, if our non-incremental query <img src="https://latex.codecogs.com/png.latex?Q"> is “what are all paths of length two?”, the incrementalization problem is “If I assume I have all the paths of length two in some arbitrary <img src="https://latex.codecogs.com/png.latex?G"> and I apply the rule <img src="https://latex.codecogs.com/png.latex?f"> (which yields some <img src="https://latex.codecogs.com/png.latex?H"> as result), what should I do to find the <em>new</em> paths of length two in <img src="https://latex.codecogs.com/png.latex?H">?”</p>
<p>Given that we already had <img src="https://latex.codecogs.com/png.latex?%5B1,2,2%5D"> and <img src="https://latex.codecogs.com/png.latex?%5B2,2,2%5D">, the matches which we need to discover are <img src="https://latex.codecogs.com/png.latex?%5B1,3,2%5D"> and <img src="https://latex.codecogs.com/png.latex?%5B3,2,2%5D">. This can be seen by inspection, but we need an algorithm to do this for an arbitrary <img src="https://latex.codecogs.com/png.latex?G"> and match <img src="https://latex.codecogs.com/png.latex?L%5Crightarrowtail%20G">. Keeping <img src="https://latex.codecogs.com/png.latex?Q"> and <img src="https://latex.codecogs.com/png.latex?f"> fixed, it’s possible to intuitively deduce the optimal thing to do: there are three independent ways to get a new answer for <img src="https://latex.codecogs.com/png.latex?Q"> by applying <img src="https://latex.codecogs.com/png.latex?f"> to an arbitrary graph <img src="https://latex.codecogs.com/png.latex?G">:</p>
<ol type="1">
<li>One which will always be introduced by the rule directly (<img src="https://latex.codecogs.com/png.latex?%5B1,3,2%5D"> in our example)</li>
<li>One per <em>outgoing edge</em> from the target of the edge we apply <img src="https://latex.codecogs.com/png.latex?f"> to (this yields just <img src="https://latex.codecogs.com/png.latex?%5B3,2,2%5D"> in our example)</li>
<li>One per <em>incoming edge</em> into the source of the edge we apply <img src="https://latex.codecogs.com/png.latex?f"> to (this yields no matches in our example)</li>
</ol>
</section>
<section id="datalog" class="level2" data-number="1.2">
<h2 data-number="1.2" data-anchor-id="datalog"><span class="header-section-number">1.2</span> Datalog</h2>
<p>A Datalog program has a collection of facts about some ground terms as well as rules for deriving new facts from old ones. As shown in the <a href="../2025-08-06-substitution-is-pushout/">previous post</a>, we can think of the execution of a Datalog program categorically as a sequence of pushouts in a category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D">. This is a natural case for applying incremental query updating, since applying rules then triggers new rules which can be applied.</p>
<p>For example, consider the rule, <img src="https://latex.codecogs.com/png.latex?p">: <code>path(X,Z) :- path(X,Y), edge(Y, Z).</code></p>
<p>Applying <img src="https://latex.codecogs.com/png.latex?p"> makes possible new match possibilities for <img src="https://latex.codecogs.com/png.latex?p">’s preconditions. Can we say how to specifically look for <em>new</em> composable <code>path</code> + <code>edge</code> pairs in light of applying <img src="https://latex.codecogs.com/png.latex?p"> to an arbitrary input? Yes, the solution is to look for outgoing edges from whatever vertex was <code>Z</code> in the previous rule application.</p>
</section>
<section id="other-examples" class="level2" data-number="1.3">
<h2 data-number="1.3" data-anchor-id="other-examples"><span class="header-section-number">1.3</span> Other examples</h2>
<p>This post focuses only on incremental updating with respect to rules which purely ‘add things’ in some sense. A followup post will discuss rules which merge or delete, which will be required to talk about some other interesting applications of this approach, including:</p>
<ul>
<li><a href="https://egraphs-good.github.io/">E-graphs</a> (e-saturation steps as applying rewrite rules, incremental hom search to speed up e-matching)</li>
<li>Regex</li>
<li>Multiset rewriting <span class="citation" data-cites="martens2023modeling">(Martens et al. 2023)</span></li>
</ul>
</section>
</section>
<section id="solution-to-the-basic-incremental-search-problem-purely-additive-rules" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Solution to the basic incremental search problem: purely additive rules</h1>
<p>How can we unify and automate the intuition of the above examples, in the form of an algorithm that is a couple of lines long and self-evidently correct? The following dictionary will help map the intuitive concepts from the above examples onto basic concepts in category theory.</p>
<section id="a-dictionary-for-category-theory-concepts" class="level2" data-number="2.1">
<h2 data-number="2.1" data-anchor-id="a-dictionary-for-category-theory-concepts"><span class="header-section-number">2.1</span> A dictionary for category theory concepts</h2>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Informal term</th>
<th>Categorical analogue</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Setting for incremental search problem</td>
<td>An (adhesive<sup>2</sup>) category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"></td>
</tr>
<tr class="even">
<td>Pattern / Query</td>
<td>An object, <img src="https://latex.codecogs.com/png.latex?Q%20%5Cin%20%5Coperatorname%7BOb%7D%5Cmathsf%7BC%7D"></td>
</tr>
<tr class="odd">
<td>State of the world / set of facts</td>
<td>An object <img src="https://latex.codecogs.com/png.latex?G%20%5Cin%20%5Coperatorname%7BOb%7D%5Cmathsf%7BC%7D"></td>
</tr>
<tr class="even">
<td>Pattern match of <img src="https://latex.codecogs.com/png.latex?Q"> in <img src="https://latex.codecogs.com/png.latex?G"></td>
<td>A morphism <img src="https://latex.codecogs.com/png.latex?Q%20%5Crightarrow%20G"></td>
</tr>
<tr class="odd">
<td>Answer set to a query <img src="https://latex.codecogs.com/png.latex?Q"> in state <img src="https://latex.codecogs.com/png.latex?G"></td>
<td><img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7BHom%7D_%5Cmathsf%7BC%7D(Q,G)"></td>
</tr>
<tr class="even">
<td>An (additive) rewrite rule, with pattern <img src="https://latex.codecogs.com/png.latex?L"> and replacement <img src="https://latex.codecogs.com/png.latex?R"></td>
<td>A monomorphism <img src="https://latex.codecogs.com/png.latex?f:%20L%20%5Crightarrowtail%20R"></td>
</tr>
<tr class="odd">
<td>Application of a rewrite rule <img src="https://latex.codecogs.com/png.latex?f"> to state <img src="https://latex.codecogs.com/png.latex?G"> with <img src="https://latex.codecogs.com/png.latex?L"> matched via <img src="https://latex.codecogs.com/png.latex?m"></td>
<td>A pushout <img src="https://latex.codecogs.com/png.latex?G%5Cxrightarrow%7B%5CDelta%7D%20H%5Cxleftarrow%7Br%7DR"> of <img src="https://latex.codecogs.com/png.latex?f%5Ccolon%20L%5Crightarrowtail%20R"> and <img src="https://latex.codecogs.com/png.latex?m%5Ccolon%20L%5Cto%20G"></td>
</tr>
</tbody>
</table>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig3.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig3.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:50.0%"></a></p>
</figure>
</div>
</section>
<section id="algorithm" class="level2" data-number="2.2">
<h2 data-number="2.2" data-anchor-id="algorithm"><span class="header-section-number">2.2</span> Algorithm</h2>
<p>Describing an algorithm categorically is a double-edged sword — we’re abstracting away from implementation details, with the benefits of getting to the essence of the algorithm and making it possible to apply it in a wide variety of settings. On the other hand, the algorithms do need to eventually be implemented, details and all. A balance is struck below by making certain informal computational assumptions about the category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> we work in: namely we can compute certain things, like small (co)limits, with some known computational complexity in whichever <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> we instantiate our algorithm.</p>
<p>With reference to variables in the above table, our algorithm’s job is to systematically find new answers to <img src="https://latex.codecogs.com/png.latex?Q"> in <img src="https://latex.codecogs.com/png.latex?H"> while avoiding any work that might recover the answers we already had in <img src="https://latex.codecogs.com/png.latex?G">. More formally, the basic case of the <strong>incremental search problem</strong> is: when we are given <img src="https://latex.codecogs.com/png.latex?%7B(G,%20H,%20%5CDelta,%20r)%7D"> as above at runtime, we need to compute <img src="https://latex.codecogs.com/png.latex?%7B%5Coperatorname%7BHom%7D(Q,H)%5Csetminus%20%5Coperatorname%7BHom%7D(Q,G)%5Ccdot%5CDelta%7D"> (where <img src="https://latex.codecogs.com/png.latex?%5Ccdot"> denotes post-composition).</p>
</section>
<section id="solving-the-basic-case" class="level2" data-number="2.3">
<h2 data-number="2.3" data-anchor-id="solving-the-basic-case"><span class="header-section-number">2.3</span> Solving the basic case</h2>
<section id="computational-assumptions" class="level3" data-number="2.3.1">
<h3 data-number="2.3.1" data-anchor-id="computational-assumptions"><span class="header-section-number">2.3.1</span> Computational assumptions</h3>
<p>The above mention of “runtime” is contrasted with “compile time”: long before we begin our process of maintaining an answer set with respect to frequent changes, we know both what <img src="https://latex.codecogs.com/png.latex?Q"> is and what the possible rules like <img src="https://latex.codecogs.com/png.latex?f"> are. This is our chance to do expensive calculations and store the results in memory so that our runtime computation is as fast as possible.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Compile-time vs runtime indicated via color
</div>
</div>
<div class="callout-body-container callout-body">
<p>This distinction is shown via color in the figures of this post: black will be used to represent information which is known at compile time, while red is used to denote information that we take to be provided to us at runtime. Green will be used to represent things our algorithm then computes at runtime.</p>
</div>
</div>
<p>Another computational assumption is that objects in patterns and rules (<img src="https://latex.codecogs.com/png.latex?L,%20R,%20Q">) are <em>small</em> for practical purposes, whereas the states being updated by rewrite rules (<img src="https://latex.codecogs.com/png.latex?G,%20H">) can be <em>large</em>. We assume it’s computationally difficult to compute the answer set to a query <img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7BHom%7D(A,B)"> when <img src="https://latex.codecogs.com/png.latex?B"> is large even when <img src="https://latex.codecogs.com/png.latex?A"> is small (in <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BGrph%7D">, this is the <a href="https://en.wikipedia.org/wiki/Subgraph_isomorphism_problem">subgraph isomorphism problem</a>); however, it’s easy to solve the <em>rooted</em> subgraph isomorphism problem <span class="citation" data-cites="gp2">(2020)</span>, so long as <img src="https://latex.codecogs.com/png.latex?A"> is small.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig4.png" class="lightbox" data-gallery="quarto-lightbox-gallery-4"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig4.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
<p>Such a partial map specifies a rooted homomorphism search problem when the monic map is <em>componentwise connected</em>, i.e.&nbsp;there exists no connected component of <img src="https://latex.codecogs.com/png.latex?A"> which lies entirely outside the image of <img src="https://latex.codecogs.com/png.latex?O">. The intuition here is that, in a constraint satisfaction problem, if every connected component of <img src="https://latex.codecogs.com/png.latex?A"> has been partially initialized, then we don’t really have to “search” for morphisms from <img src="https://latex.codecogs.com/png.latex?A"> to <img src="https://latex.codecogs.com/png.latex?B">; we just have to use the connectivity of <img src="https://latex.codecogs.com/png.latex?A"> to read off all of the matches of <img src="https://latex.codecogs.com/png.latex?A"> within <img src="https://latex.codecogs.com/png.latex?B">, an operation which scales only with the size of <img src="https://latex.codecogs.com/png.latex?A">.<sup>3</sup></p>
<p>The core reason the algorithm presented below is efficient is that it transforms something analogous to a subgraph isomorphism problem into a collection of <em>rooted</em> subgraph isomorphism problems. This is also a good example of how we can specify something abstractly, such as a partial map from <img src="https://latex.codecogs.com/png.latex?A"> to <img src="https://latex.codecogs.com/png.latex?B">, and leave it as a context-specific implementation detail of how one actually finds all of the maps from <img src="https://latex.codecogs.com/png.latex?A"> to <img src="https://latex.codecogs.com/png.latex?B"> consistent with that partial map.</p>
</section>
<section id="working-backwards-towards-a-solution" class="level3" data-number="2.3.2">
<h3 data-number="2.3.2" data-anchor-id="working-backwards-towards-a-solution"><span class="header-section-number">2.3.2</span> Working backwards towards a solution</h3>
<p>To say a category is <strong>adhesive</strong> is to say something specific about its limits and colimits (see <a href="https://ncatlab.org/nlab/show/adhesive+category">nlab</a> or <span class="citation" data-cites="lack2005adhesive">(Lack and Sobociński 2005)</span>). A consequence of this is that, for any pushout square <img src="https://latex.codecogs.com/png.latex?%7BH%5Ccong%20R+_L%20G%7D"> and morphism <img src="https://latex.codecogs.com/png.latex?h:Q%20%5Crightarrow%20H">, we can take four pullbacks to recover a second pushout square whose apex is <img src="https://latex.codecogs.com/png.latex?Q">, depicted below.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig5.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig5.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
<p>For any match into the result of a rewrite, we have a canonical decomposition of our pattern into various subobjects: <img src="https://latex.codecogs.com/png.latex?%7BQ%5Ccong%20Q_R%20+_%7BQ_L%7D%20Q_G%7D">, i.e.&nbsp;<img src="https://latex.codecogs.com/png.latex?Q"> just <em>is</em> the part of <img src="https://latex.codecogs.com/png.latex?Q"> which intersects with <img src="https://latex.codecogs.com/png.latex?R"> and the part which intersects with <img src="https://latex.codecogs.com/png.latex?G">, glued together by the part of <img src="https://latex.codecogs.com/png.latex?Q"> which intersects with <img src="https://latex.codecogs.com/png.latex?L">. So every match <img src="https://latex.codecogs.com/png.latex?h"> has an associated cube where the top and bottom are pushouts and the sides are all pullbacks. For ease of reference, we’ll call this the <em>adhesive cube</em> induced by <img src="https://latex.codecogs.com/png.latex?h">.</p>
<p><strong>How much of this cube can be computed at compile time?</strong></p>
<p>We don’t know <img src="https://latex.codecogs.com/png.latex?G"> or <img src="https://latex.codecogs.com/png.latex?H"> at runtime, so we can’t precompute all their incident maps. However, the rest of the cube (in black) can be anticipated.</p>
</section>
<section id="the-simple-algorithm" class="level3" data-number="2.3.3">
<h3 data-number="2.3.3" data-anchor-id="the-simple-algorithm"><span class="header-section-number">2.3.3</span> The simple algorithm</h3>
<p><strong>At compile time</strong></p>
<ol type="1">
<li>Enumerate all possible top faces of an adhesive cube
<ul>
<li>Call these faces <strong>decompositions</strong> <img src="https://latex.codecogs.com/png.latex?Q%20%5Ccong%20Q_G%20+_%7BQ_L%7D%20Q_R"></li>
</ul></li>
<li>Enumerate all possible side faces above the rewrite rule
<ul>
<li>Call these faces <strong>interactions</strong> between a <img src="https://latex.codecogs.com/png.latex?Q_L%5Crightarrowtail%20Q_R"> and a rule <img src="https://latex.codecogs.com/png.latex?f:%20L%5Crightarrowtail%20R">, so that an interaction is a pair of maps <img src="https://latex.codecogs.com/png.latex?h_L:%20Q_L%5Crightarrow%20L"> and <img src="https://latex.codecogs.com/png.latex?h_R:%20Q_R%5Crightarrow%20R"> that form a pullback square.</li>
</ul></li>
</ol>
<p>One of these decompositions is <em>bad</em>: it has <img src="https://latex.codecogs.com/png.latex?Q_G=Q">: this is saying the match lies entirely in <img src="https://latex.codecogs.com/png.latex?G">. The matches which have this as the top face of their adhesive cube are (precisely) the matches we wanted to avoid in order to be solving the <em>incremental</em> search problem, so we ignore this decomposition.</p>
<p><strong>At runtime:</strong></p>
<ul>
<li><p>Once we know what <img src="https://latex.codecogs.com/png.latex?f"> is, we can separately consider <em>each</em> partial adhesive cube which consists in a decomposition (top face) and a compatible interaction with <img src="https://latex.codecogs.com/png.latex?f"> (side face).</p></li>
<li><p>Given <img src="https://latex.codecogs.com/png.latex?m">, we can compute all possible <img src="https://latex.codecogs.com/png.latex?h_G:%20Q_G%5Crightarrow%20G"> only keeping the ones which form a pullback square with <img src="https://latex.codecogs.com/png.latex?m"> and <img src="https://latex.codecogs.com/png.latex?h_L">.</p></li>
<li><p>Then, for each such <img src="https://latex.codecogs.com/png.latex?h_G">, we have a corresponding match <img src="https://latex.codecogs.com/png.latex?%7Bh=%5Bh_G%5Ccdot%20%5CDelta,%20h_R%5Ccdot%20r%5D%7D">.</p></li>
</ul>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Correctness
</div>
</div>
<div class="callout-body-container callout-body">
<p>That this procedure recovers exactly the new matches, <img src="https://latex.codecogs.com/png.latex?%7BHom(Q,H)%5Csetminus%20Hom(Q,G)%5Ccdot%5CDelta%7D">, is clear: each new match corresponds to a unique adhesive cube, and we enumerate all possible cubes (deliberately excluding the ones which factor through <img src="https://latex.codecogs.com/png.latex?%5CDelta">).</p>
<p>That this is efficient requires showing that the search for <img src="https://latex.codecogs.com/png.latex?h_G"> is always a <em>rooted</em> search problem, i.e.&nbsp;<img src="https://latex.codecogs.com/png.latex?Q_L%20%5Crightarrowtail%20Q_G"> is componentwise connected. First, <img src="https://latex.codecogs.com/png.latex?Q_R"> is nonempty because we ruled out the trivial decomposition. Then, let us assume <img src="https://latex.codecogs.com/png.latex?Q"> is connected.<sup>4</sup> Because <img src="https://latex.codecogs.com/png.latex?%7BQ%20%5Ccong%20Q_G%20+_%7BQ_L%7D%20Q_R%7D">, if some disconnected component of <img src="https://latex.codecogs.com/png.latex?Q_G"> were not in the image of <img src="https://latex.codecogs.com/png.latex?Q_L">, it would remain a disconnected component in <img src="https://latex.codecogs.com/png.latex?Q">.</p>
</div>
</div>
</section>
<section id="example-finding-newly-introduced-paths-of-length-2" class="level3" data-number="2.3.4">
<h3 data-number="2.3.4" data-anchor-id="example-finding-newly-introduced-paths-of-length-2"><span class="header-section-number">2.3.4</span> Example: finding newly introduced paths of length 2</h3>
<p>Let’s revisit our earlier example of finding paths of length two that spring into existence via the rewrite application which introduces a triangle, reproduced on the left.</p>
<div class="columns">
<div class="column" style="width:25%;">
<p><br><br><br><br><br> <img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig3.png" class="img-fluid quarto-figure quarto-figure-center"></p>
</div><div class="column" style="width:75%;">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig6.png" class="lightbox" data-gallery="quarto-lightbox-gallery-6"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig6.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
</div>
</div>
<p>On top we see a choice of decomposition and interaction that recovers the match <img src="https://latex.codecogs.com/png.latex?%5B1,%203,%202%5D">. The <img src="https://latex.codecogs.com/png.latex?Q_G"> of the decomposition asserts that the beginning and end vertex of the path will live in <img src="https://latex.codecogs.com/png.latex?G">, but the middle vertex and both edges will come from material newly added by the rule. Note in this case, the partial map <img src="https://latex.codecogs.com/png.latex?Q_G=Q_L%20%5Crightarrow%20G"> is a total map, so there is always a unique <img src="https://latex.codecogs.com/png.latex?h_G"> (and <img src="https://latex.codecogs.com/png.latex?h">) associated with this rewrite.</p>
<p>On the bottom, we see a choice of decomposition and interaction that recovers the match <img src="https://latex.codecogs.com/png.latex?%5B3,%202,%202%5D">. The <img src="https://latex.codecogs.com/png.latex?Q_G"> of the decomposition asserts that the second edge of the path will live in <img src="https://latex.codecogs.com/png.latex?G">, but the first vertex and edge will come from material newly added by the rule. The search for <img src="https://latex.codecogs.com/png.latex?h_G"> candidates induced by the partial map from <img src="https://latex.codecogs.com/png.latex?Q_G"> to <img src="https://latex.codecogs.com/png.latex?G"> looks for outgoing edges from <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%202%7D"> in <img src="https://latex.codecogs.com/png.latex?G">. There is only one such edge in this case, but in general this decomposition+interaction pair could lead to zero or many new matches found.</p>
</section>
</section>
<section id="an-optimization-when-mathsfc-has-complements" class="level2" data-number="2.4">
<h2 data-number="2.4" data-anchor-id="an-optimization-when-mathsfc-has-complements"><span class="header-section-number">2.4</span> An optimization when <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> has complements</h2>
<p>The previous algorithm might be unsatisfactory in two ways:</p>
<ol type="1">
<li>There are a <em>lot</em> of ways to express <img src="https://latex.codecogs.com/png.latex?Q"> as a pushout. We have to iterate over all of them.</li>
<li>It might seem wasteful that we had to <em>filter</em> <img src="https://latex.codecogs.com/png.latex?h_G"> candidates by those which formed a pullback square, just because adhesive cube side faces are always pullbacks.</li>
</ol>
<p>We can address both these issues when <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> has complements.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Definitions
</div>
</div>
<div class="callout-body-container callout-body">
<p>The <em>union</em> of two subobjects <img src="https://latex.codecogs.com/png.latex?A"> and <img src="https://latex.codecogs.com/png.latex?B">, denoted <img src="https://latex.codecogs.com/png.latex?A%20%5Cvee%20B">, is computed by gluing them together along their intersection (i.e.&nbsp;pullback, denoted <img src="https://latex.codecogs.com/png.latex?A%20%5Cwedge%20B">).</p>
<p>The <em>complement</em> of <img src="https://latex.codecogs.com/png.latex?%7BA%5Crightarrowtail%20X%7D">, denoted <img src="https://latex.codecogs.com/png.latex?%7B%7B%5Csim%7DA%7D">, is the smallest subobject for which <img src="https://latex.codecogs.com/png.latex?%7BX%20=%20A%20%E2%88%A8%20%7B%5Csim%7DA%7D">.</p>
<p>The <em>boundary</em> of <img src="https://latex.codecogs.com/png.latex?A">, denoted <img src="https://latex.codecogs.com/png.latex?%5Cpartial%20A">, is <img src="https://latex.codecogs.com/png.latex?A%20%5Cwedge%20%7B%5Csim%7D%20A">.</p>
</div>
</div>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-7"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig1.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:50.0%"></a></p>
</figure>
</div>
<p>Once we have this structure, we can succinctly express the optimized algorithm. We solve the incremental problem by doing the same procedure as before with two changes:</p>
<ol type="1">
<li><em>Only</em> consider decompositions where <img src="https://latex.codecogs.com/png.latex?Q_R%20=%20%7B%5Csim%7DQ_G">.</li>
<li>Allow <em>all</em> of the the extensions of the partial map from <img src="https://latex.codecogs.com/png.latex?Q_G"> to <img src="https://latex.codecogs.com/png.latex?G"> to be maps <img src="https://latex.codecogs.com/png.latex?h_G"> used to induce new matches <img src="https://latex.codecogs.com/png.latex?h">.</li>
</ol>
<section id="too-good-to-be-true-why-is-the-optimization-correct" class="level3" data-number="2.4.1">
<h3 data-number="2.4.1" data-anchor-id="too-good-to-be-true-why-is-the-optimization-correct"><span class="header-section-number">2.4.1</span> Too good to be true? Why is the optimization correct?</h3>
<p>For any match <img src="https://latex.codecogs.com/png.latex?h:%20Q%5Crightarrow%20H">, we have not only a unique adhesive cube, but also a unique <em>minimal</em> adhesive cube. One obtains the latter from composing two cubes together like in the below diagram:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig7.png" class="lightbox" data-gallery="quarto-lightbox-gallery-8"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig7.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
<p>Note we can see this arbitrary <img src="https://latex.codecogs.com/png.latex?h"> has a unique associated interaction between <img src="https://latex.codecogs.com/png.latex?%7B%5Cpartial%20Q_G%20%5Crightarrowtail%20%7B%5Csim%7DQ_G%7D"> and <img src="https://latex.codecogs.com/png.latex?f">, i.e.&nbsp;a pair of maps <img src="https://latex.codecogs.com/png.latex?%7B(h_%5Cpartial,%20h_%5Csim)%7D"> that forms a pullback with <img src="https://latex.codecogs.com/png.latex?f">. We get this by precomposing <img src="https://latex.codecogs.com/png.latex?h_L"> and <img src="https://latex.codecogs.com/png.latex?h_R"> with <img src="https://latex.codecogs.com/png.latex?%7B%5Cpartial%20Q_G%20%5Crightarrowtail%20Q_L%7D"> and <img src="https://latex.codecogs.com/png.latex?%7B%7B%5Csim%7DQ_G%20%5Crightarrowtail%20Q_R%7D"> respectively.</p>
<p>So the algorithm is structurally the same: each <img src="https://latex.codecogs.com/png.latex?h"> has a unique cube associated with it, so loop over all partial cubes and try to complete them. But it’s nicer to loop over partial <em>minimal</em> adhesive cubes because the possible top faces are generally a small subset of all possible decompositions of <img src="https://latex.codecogs.com/png.latex?Q">. Also, the way to complete these cubes is by simply looking for maps <img src="https://latex.codecogs.com/png.latex?h_G"> which extend the partial map <img src="https://latex.codecogs.com/png.latex?Q_G%20%5Cleftarrowtail%20%5Cpartial%20Q_G%20%5Cxrightarrow%7Bh_%5Cpartial%5Ccdot%20m%7D%20G"> (no filtering based on a pullback condition). By the same argument as above, this partial map induces a <em>rooted</em> search problem because <img src="https://latex.codecogs.com/png.latex?Q"> is connected and we are excluding the trivial decomposition.</p>
</section>
<section id="optimized-algorithm-example" class="level3" data-number="2.4.2">
<h3 data-number="2.4.2" data-anchor-id="optimized-algorithm-example"><span class="header-section-number">2.4.2</span> Optimized algorithm example</h3>
<p><img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BGrph%7D"> <a href="https://blog.algebraicjulia.org/post/2021/09/cset-graphs-4/">has complements</a>. Let’s consider a new scenario, where <img src="https://latex.codecogs.com/png.latex?R=Q"> and <img src="https://latex.codecogs.com/png.latex?L=G">. The rule <img src="https://latex.codecogs.com/png.latex?L%5Crightarrowtail%20R"> looks for a cospan of edges and adds an edge in order to make a path of length two.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig8.png" class="lightbox" data-gallery="quarto-lightbox-gallery-9"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig8.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:100.0%"></a></p>
</figure>
</div>
<p>The decomposition <img src="https://latex.codecogs.com/png.latex?Q_R+_%7BQ_L%7DQ_G"> above one gets by taking pullbacks with <img src="https://latex.codecogs.com/png.latex?h"> is not minimal. Although <img src="https://latex.codecogs.com/png.latex?Q_L"> and <img src="https://latex.codecogs.com/png.latex?Q_R"> involve all three vertices of the pattern, the only part of the pattern <img src="https://latex.codecogs.com/png.latex?L"> that’s actually relevant to the rewrite (i.e.&nbsp;the only part that’s necessary to get us from <img src="https://latex.codecogs.com/png.latex?Q_G"> to <img src="https://latex.codecogs.com/png.latex?Q">) is the <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%20y%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%20z%7D"> part of it. The complement operation is what allows us to formally ignore the parts of the pattern that do not play an essential role in the rewrite.</p>
<p>If we were running the old algorithm using the minimal interaction, the pullback condition would say that, moreover, <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%201%7D"> <em>doesn’t</em> appear in the pattern. Because of this, the previous algorithm would not find the match associated with <img src="https://latex.codecogs.com/png.latex?h_G%20=%20%5B1,%202,%203%5D"> depicted in this figure from the minimal interaction. Instead, that map <img src="https://latex.codecogs.com/png.latex?h_G"> would have been detected by a non-minimal interaction with <img src="https://latex.codecogs.com/png.latex?Q_L"> and <img src="https://latex.codecogs.com/png.latex?Q_R">, also shown in the figure.</p>
<p>The core idea of this optimization, specialized to this example, is that one shouldn’t need to distinguish special cases for whether <img src="https://latex.codecogs.com/png.latex?%5Ctextcircled%7B%5Cfootnotesize%201%7D"> appears in the pattern or not.</p>
</section>
</section>
<section id="batch-update-from-multiple-rule-firings" class="level2" data-number="2.5">
<h2 data-number="2.5" data-anchor-id="batch-update-from-multiple-rule-firings"><span class="header-section-number">2.5</span> Batch update from multiple rule firings</h2>
<p>We can apply many additive rewrites at once with a single colimit, rather than as an artificially-ordered sequence of pushouts.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig9.png" class="lightbox" data-gallery="quarto-lightbox-gallery-10"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig9.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
<p>A match into the result of multiple simultaneous rewrites has a corresponding decomposition of the pattern into a colimit of subobjects of the same shape. The <img src="https://latex.codecogs.com/png.latex?n=2"> case induced adhesive ‘multicube’ is shown below:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig10.png" class="lightbox" data-gallery="quarto-lightbox-gallery-11"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig10.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:50.0%"></a></p>
</figure>
</div>
<p>Our algorithm generalizes: at compile-time enumerate possible nontrivial decompositions of <img src="https://latex.codecogs.com/png.latex?Q"> with the above shape and all interactions of subobject morphisms with rewrite rules. At runtime, some finite family of rewrite rules (e.g.&nbsp;<img src="https://latex.codecogs.com/png.latex?(f_1,f_3,f_3,f_2)">) will have been executed with corresponding matches <img src="https://latex.codecogs.com/png.latex?m_i">. We loop over possible partial multicubes and look for morphisms <img src="https://latex.codecogs.com/png.latex?h_G:%20Q_G%5Crightarrow%20G"> that lead to pullback faces above all of the matches, each of which uniquely results in a new match <img src="https://latex.codecogs.com/png.latex?h=%5Bh_G%5Ccdot%20%5CDelta,%20h_%7BR,1%7D%5Ccdot%20r_1,%20h_%7BR,2%7D%5Ccdot%20r_2,...%5D">.</p>
<div class="callout callout-style-simple callout-warning no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Warning</span>Optimized version when <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> has complements
</div>
</div>
<div class="callout-body-container callout-body">
<p>There is also an optimized batch algorithm that requires just looking for maps <img src="https://latex.codecogs.com/png.latex?Q_G%20%5Crightarrow%20G"> that commute with all <img src="https://latex.codecogs.com/png.latex?h_%7BL,i%7D"> and <img src="https://latex.codecogs.com/png.latex?m_i"> rather than filtering for ones which furthermore satisfy a pullback property. In brief, we require <img src="https://latex.codecogs.com/png.latex?Q_%7BR,i%7D%20=%20%7B%5Csim%7D(Q_G%20%5Cvee%20%5Cbigvee_%7Bj%5Cne%20i%7D%20Q_%7BR,j%7D)">: this codifies that we want each interaction to be as small as possible.</p>
</div>
</div>
<section id="batch-example" class="level3" data-number="2.5.1">
<h3 data-number="2.5.1" data-anchor-id="batch-example"><span class="header-section-number">2.5.1</span> Batch example</h3>
<p>Let’s consider a pattern that looks for paths of length three, rather than two. This example has a batch two applications of the triangle-introducing rule. This leads to a match which incorporates material from the old graph as well as newly introduced material from both rewrites:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig11.png" class="lightbox" data-gallery="quarto-lightbox-gallery-12"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig11.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:70.0%"></a></p>
</figure>
</div>
<p>The resulting match, <img src="https://latex.codecogs.com/png.latex?%5B4,%202,%202,%205%5D">, is ultimately found starting from the decomposition of <img src="https://latex.codecogs.com/png.latex?Q"> on top, which asserts parts of <img src="https://latex.codecogs.com/png.latex?Q"> must overlap with <img src="https://latex.codecogs.com/png.latex?G">, <img src="https://latex.codecogs.com/png.latex?L_i">, and <img src="https://latex.codecogs.com/png.latex?R_i">. The middle edge in the pattern <img src="https://latex.codecogs.com/png.latex?Q"> comes from the loop of the old graph, whereas the first and last vertices and edges are respectively created via the two rule applications.</p>
</section>
</section>
<section id="nonmonic-matches" class="level2" data-number="2.6">
<h2 data-number="2.6" data-anchor-id="nonmonic-matches"><span class="header-section-number">2.6</span> Nonmonic matches</h2>
<p>Nonmonic matches can implicitly quotient parts of the pattern, leading to new possible ways a match for a pattern <img src="https://latex.codecogs.com/png.latex?Q"> could be created. For every possible <img src="https://latex.codecogs.com/png.latex?L%5Ctwoheadrightarrow%20L'">, we can compute the corresponding quotiented rule at compile time. At runtime, we epi-mono factorize any nonmonic match and use the previous algorithm with the quotiented rule. This is shown schematically below:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/fig12.png" class="lightbox" data-gallery="quarto-lightbox-gallery-13"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/fig12.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
<p>By factoring the pushout square into a pushout of epis and a pushout of monos, we can ignore the top pushout square and pretend our rewrite rule was <img src="https://latex.codecogs.com/png.latex?r'"> all along, now with a monic match <img src="https://latex.codecogs.com/png.latex?m'">. A particular example is shown below.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="images/quot.png" class="lightbox" data-gallery="quarto-lightbox-gallery-14"><img src="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/quot.png" class="img-fluid quarto-figure quarto-figure-center figure-img"></a></p>
</figure>
</div>
<p>Applying our triangle rule to a loop rather than an edge between distinct vertices leads to a new kind of path of length two that can appear (the two newly-introduced edges, but now in the opposite order), which wouldn’t be detected by our algorithm using the unquotiented rule.</p>
<!-- 
# Rules which merge

So far we have presumed that our rule $f$ is a monomorphism. When this is relaxed, many aspects of the above story do not change despite the introduction of some complications. The "inefficient" algorithm, which searches for all partial adhesive cubes and then extends these by searching for morphisms which form pullback squares, is still valid. The challenge here for future work is to come up with an analogue of the more efficient algorithm using complements and minimal adhesive cubes. 

Note that additive rules simply extend the number of answers to a query, whereas a rule which performs a merge can both add and merge existing matches. In the following example, the function from answers in $G$ to answers in $H$ is neither injective nor surjective:

![](images/nonmonic_homaction.png){fig-align="center" width=50%}

Here's a scenario we can try to concretely reason about: finding paths of length two after two vertices have been merged. New matches will have the form of $\boxed{\textcircled{1}\rightarrow\textcircled{2}\ \  \textcircled{3}\rightarrow\textcircled{4}}$ in the original graph $G$, where $\textcircled{2}$ and $\textcircled{3}$ get merged and  $\textcircled{1}$ and $\textcircled{4}$ are freely matched, possibly overlapping with any of the other vertices. This corresponds to a decomposition of the pattern into a gluing together of subobjects.

A more complicated case to consider is that of a rule which sends the walking edge to the loop on one vertex. Let our query be the path of length 3. When applied to the middle edge of a zig zag graph of length three, i.e. $\boxed{\textcircled{1}\rightarrow\textcircled{2}\leftarrow\textcircled{3}\rightarrow\textcircled{4}}$ (which has no paths of length 3), one has a new path of length three $[1,23,23,4]$. 
-->
</section>
</section>
<section id="conclusion" class="level1" data-number="3">
<h1 data-number="3"><span class="header-section-number">3</span> Conclusion</h1>
<p>Adhesive categories are a general setting for reasoning about pattern matching. We assume some computational primitives can be implemented in any domain of interest, thought of as an adhesive category:</p>
<ol type="1">
<li>computing decompositions of an object into subobjects</li>
<li>computing small (co)limits</li>
<li>extending a partial map into a set of total ones.</li>
</ol>
<p>The efficiency of this approach derives from its systematic transformation of a subgraph isomorphism problems into a collection of <em>rooted</em> subgraph isomorphism problems. Another aspect that makes this algorithm special is that it leverages information beyond the <em>extensional</em> difference of an update in order to speed up incremental answer set update.</p>
<p>Solving the base problem can be straightforwardly generalized to non-monic matches, non-connected patterns, and batch updates. In cases where one can compute complements to subobjects, we can be even more efficient.</p>
<p>There is an implementation in <a href="https://github.com/AlgebraicJulia/AlgebraicRewriting.jl">AlgebraicRewriting.jl</a> in arbitrary <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">-Set categories <span class="citation" data-cites="Patterson_2022">(2022)</span>. <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BGrph%7D"> is a special case of this. There is more to be said about deletion and merging in future work!</p>



</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-biondo2025" class="csl-entry">
Biondo, Roberto, Davide Castelnovo, and Fabio Gadducci. 2025. <span>“EGGs Are Adhesive!”</span> <a href="https://arxiv.org/abs/2503.13678">https://arxiv.org/abs/2503.13678</a>.
</div>
<div id="ref-gp2" class="csl-entry">
Campbell, Graham, Jack Romo, and Detlef Plump. 2020. <span>“Improving the <span>GP</span> 2 Compiler.”</span> <em>CoRR</em> abs/2002.02914. <a href="https://arxiv.org/abs/2002.02914">https://arxiv.org/abs/2002.02914</a>.
</div>
<div id="ref-lack2005adhesive" class="csl-entry">
Lack, Stephen, and Paweł Sobociński. 2005. <span>“Adhesive and Quasiadhesive Categories.”</span> <em>RAIRO-Theoretical Informatics and Applications</em> 39 (3): 511–45.
</div>
<div id="ref-martens2023modeling" class="csl-entry">
Martens, Chris, Alexander Card, Henry Crain, and Asha Khatri. 2023. <span>“Modeling Game Mechanics with Ceptre.”</span> <em>IEEE Transactions on Games</em> 16 (2): 431–44.
</div>
<div id="ref-Patterson_2022" class="csl-entry">
Patterson, Evan, Owen Lynch, and James Fairbanks. 2022. <span>“Categorical Data Structures for Technical Computing.”</span> <em>Compositionality</em> 4 (December): 5. <a href="https://doi.org/10.32408/compositionality-4-5">https://doi.org/10.32408/compositionality-4-5</a>.
</div>
</div></section><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>We can succinctly describe graph homomorphisms by a vector which says where the domain vertices go. This is unambiguous when the domain vertices have an obvious order and codomain graph has at most one edge between any two vertices.↩︎</p></li>
<li id="fn2"><p>What adhesivity means for us in practice will be described below.↩︎</p></li>
<li id="fn3"><p>This also assumes some bound to the node degree of <img src="https://latex.codecogs.com/png.latex?B">: even though <img src="https://latex.codecogs.com/png.latex?G"> might be big (say ~<img src="https://latex.codecogs.com/png.latex?10%5E6"> vertices and edges), there <em>won’t</em> be <img src="https://latex.codecogs.com/png.latex?10%5E6"> edges between any two particular vertices.↩︎</p></li>
<li id="fn4"><p>We can assume our original pattern <img src="https://latex.codecogs.com/png.latex?Q"> was connected without loss of generality. If <img src="https://latex.codecogs.com/png.latex?Q%20=%20Q_1+Q_2">, we can separately update <img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7BHom%7D(Q_1,G)"> and <img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7BHom%7D(Q_2,G)">. This is because <img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7BHom%7D(Q_1+Q_2,G)%20%5Ccong%20%5Coperatorname%7BHom%7D(Q_1,G)%20%5Ctimes%20%5Coperatorname%7BHom%7D(Q_2,G)">.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>research</category>
  <category>acsets</category>
  <category>applied category theory</category>
  <category>databases</category>
  <category>rewriting</category>
  <category>AlgebraicJulia</category>
  <guid>https://topos.institute/blog/2025-08-15-incremental-adhesive/</guid>
  <pubDate>Fri, 15 Aug 2025 00:00:00 GMT</pubDate>
  <media:content url="https://topos.institute/blog/2025-08-15-incremental-adhesive/images/overview.png" medium="image" type="image/png" height="81" width="144"/>
</item>
<item>
  <title>Substitution is also pushout</title>
  <dc:creator>Kris Brown</dc:creator>
  <link>https://topos.institute/blog/2025-08-06-substitution-is-pushout/</link>
  <description><![CDATA[ 




<p>“Substitution is pullback” is a common slogan in categorical logic. The intuition behind it is found in Andrej Bauer’s brief blog post, <a href="https://math.andrej.com/2012/09/28/substitution-is-pullback">substitution is pullback</a>.</p>
<section id="unrelatedly-substitution-is-sometimes-pushout" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="unrelatedly-substitution-is-sometimes-pushout"><span class="header-section-number">1</span> Unrelatedly, substitution is sometimes pushout</h2>
<p>We’ll demonstrate this phenomenon by focusing on two categories, <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BGrph%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D">, as examples.</p>
<section id="first-example-category-graphs" class="level3" data-number="1.1">
<h3 data-number="1.1" data-anchor-id="first-example-category-graphs"><span class="header-section-number">1.1</span> First example category: graphs</h3>
<p>The objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BGrph%7D"> are directed multigraphs (hereafter: graphs). A graph <img src="https://latex.codecogs.com/png.latex?G"> consists in a set of vertices <img src="https://latex.codecogs.com/png.latex?V_G"> and a set of edges <img src="https://latex.codecogs.com/png.latex?E_G">, where each edge has designated source and target vertex given by functions <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20src%7D_G"> and <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20tgt%7D_G">.<sup>1</sup> Morphisms in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BGrph%7D"> are graph homomorphisms.<sup>2</sup></p>
<ul>
<li>The path graph of length two, <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Cbullet%5Crightarrow%5Cbullet%5Crightarrow%5Cbullet%7D">, can be thought of as a piece of <em>data</em>.
<ul>
<li>We can informally put labels on the vertices to help us refer to parts of the graph.<sup>3</sup></li>
<li>E.g. this (very same) graph could also have been drawn as <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%201%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%202%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%203%7D%7D">.</li>
</ul></li>
<li>However, we can also think of this same graph, <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20x%7D%5Cxrightarrow%7Ba%7D%5Ctextcircled%7B%5Cfootnotesize%20y%7D%5Cxrightarrow%7Bb%7D%5Ctextcircled%7B%5Cfootnotesize%20z%7D%7D">, as representing a conjunctive <em>query</em>, one which could be applied to other graphs: “Find me an edge (<img src="https://latex.codecogs.com/png.latex?a">) and an edge (<img src="https://latex.codecogs.com/png.latex?b">) such that <img src="https://latex.codecogs.com/png.latex?a">’s target equals <img src="https://latex.codecogs.com/png.latex?b">’s source.”
<ul>
<li>In this case, the labels are like variable names.</li>
<li>In this post, we mark this attitudinal distinction by labeling graphs we are thinking as queries with letters. Graphs thought of as data will be labeled with numbers.</li>
</ul></li>
</ul>
<p>Above are two attitudes one can take towards a graph. An attitude one can take towards a morphism from a query <img src="https://latex.codecogs.com/png.latex?X"> to data <img src="https://latex.codecogs.com/png.latex?Y"> is that of a <em>pattern match</em>, i.e.&nbsp;an answer to the query <img src="https://latex.codecogs.com/png.latex?X">. If we take a different attitude to this morphism <img src="https://latex.codecogs.com/png.latex?X%5Crightarrow%20Y">, thinking of it as between two different queries, we would call the morphism a <em>rewrite rule</em>. An example rewrite rule is <img src="https://latex.codecogs.com/png.latex?%7B%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20x%7D%7D%5Crightarrow%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20x%7D%5Ccirclearrowleft%7D%7D">. This rule is saying “if you give me a vertex, <img src="https://latex.codecogs.com/png.latex?x">, I can turn it into a vertex with a loop.”<sup>4</sup></p>
<p>Applying this rewrite rule morphism to some graph <img src="https://latex.codecogs.com/png.latex?G:=%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%201%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%202%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%203%7D%7D">, requires choosing whether <img src="https://latex.codecogs.com/png.latex?x%5Cmapsto%201"> or <img src="https://latex.codecogs.com/png.latex?x%5Cmapsto%202"> or <img src="https://latex.codecogs.com/png.latex?x%5Cmapsto%203">. This is precisely the data of a match morphism from <img src="https://latex.codecogs.com/png.latex?%7B%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20x%7D%7D%7D"> into <img src="https://latex.codecogs.com/png.latex?G">. Suppose we take the map which represents <img src="https://latex.codecogs.com/png.latex?x%5Cmapsto%202">: taking the pushout has the effect of substituting <img src="https://latex.codecogs.com/png.latex?2"> for <img src="https://latex.codecogs.com/png.latex?x">, yielding <img src="https://latex.codecogs.com/png.latex?%7B%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%202%7D%7D%5Crightarrow%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%202%7D%5Ccirclearrowleft%7D%7D">. There is no such loop in <img src="https://latex.codecogs.com/png.latex?G">, but applying the rewrite rule makes the minimal change to <img src="https://latex.codecogs.com/png.latex?G"> required to make the answer true.</p>
<!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXHRleHRjaXJjbGVke3h9Il0sWzEsMCwiXFx0ZXh0Y2lyY2xlZHt4fSJdLFswLDEsIlxcdGV4dGNpcmNsZWR7MX1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezJ9XFxyaWdodGFycm93XFx0ZXh0Y2lyY2xlZHszfSJdLFsxLDEsIlxcdGV4dGNpcmNsZWR7MX1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezJ9XFxyaWdodGFycm93XFx0ZXh0Y2lyY2xlZHszfSJdLFsxLDEsIiIsMCx7InJhZGl1cyI6MX1dLFszLDMsIiIsMCx7InJhZGl1cyI6MSwiYW5nbGUiOi0xODB9XSxbMCwyLCJ4XFxtYXBzdG8gMiIsMCx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFswLDEsIiIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsyLDMsIiIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsxLDMsInhcXG1hcHN0bzIiLDAseyJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkb3R0ZWQifX19XSxbMyw3LCIiLDAseyJsZXZlbCI6MSwic3R5bGUiOnsibmFtZSI6ImNvcm5lciJ9fV1d -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXHRleHRjaXJjbGVke3h9Il0sWzEsMCwiXFx0ZXh0Y2lyY2xlZHt4fSJdLFswLDEsIlxcdGV4dGNpcmNsZWR7MX1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezJ9XFxyaWdodGFycm93XFx0ZXh0Y2lyY2xlZHszfSJdLFsxLDEsIlxcdGV4dGNpcmNsZWR7MX1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezJ9XFxyaWdodGFycm93XFx0ZXh0Y2lyY2xlZHszfSJdLFsxLDEsIiIsMCx7InJhZGl1cyI6MX1dLFszLDMsIiIsMCx7InJhZGl1cyI6MSwiYW5nbGUiOi0xODB9XSxbMCwyLCJ4XFxtYXBzdG8gMiIsMCx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFswLDEsIiIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsyLDMsIiIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsxLDMsInhcXG1hcHN0bzIiLDAseyJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkb3R0ZWQifX19XSxbMyw3LCIiLDAseyJsZXZlbCI6MSwic3R5bGUiOnsibmFtZSI6ImNvcm5lciJ9fV1d&amp;embed" width="560" height="304" style="border-radius: 8px; border: none;">
</iframe>
<p>Let’s look at one more example: the rule “if you gave me an edge, I could give you path of length two which has the same source and target”. Applying this rule requires a match morphism assigning two variable vertices and one variable edge:</p>
<!-- https://q.uiver.app/#q=WzAsNixbMCwxLCJcXHRleHRjaXJjbGVke3h9XFxyaWdodGFycm93XFx0ZXh0Y2lyY2xlZHt5fSJdLFsxLDEsIlxcdGV4dGNpcmNsZWR7eH1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVke3l9Il0sWzAsMiwiXFx0ZXh0Y2lyY2xlZHsxfVxccmlnaHRhcnJvd1xcdGV4dGNpcmNsZWR7Mn1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezN9Il0sWzEsMiwiXFx0ZXh0Y2lyY2xlZHsxfVxccmlnaHRhcnJvd1xcdGV4dGNpcmNsZWR7Mn1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezN9Il0sWzEsMCwiXFx0ZXh0Y2lyY2xlZHt6fSJdLFsxLDMsIlxcdGV4dGNpcmNsZWR7entcXGZvb3Rub3Rlc2l6ZSd9fSJdLFswLDEsIiIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsyLDMsIiIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsxLDMsInhcXG1hcHN0byAyXFxcXHlcXG1hcHN0bzMiLDAseyJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkb3R0ZWQifX19XSxbMCwyLCJ4XFxtYXBzdG8gMlxcXFx5XFxtYXBzdG8zIiwwLHsic3R5bGUiOnsiYm9keSI6eyJuYW1lIjoiZG90dGVkIn19fV0sWzEsNCwiIiwyLHsib2Zmc2V0IjoxLCJjdXJ2ZSI6LTIsInNob3J0ZW4iOnsic291cmNlIjoyMH19XSxbNCwxLCIiLDIseyJvZmZzZXQiOjEsImN1cnZlIjotMiwic2hvcnRlbiI6eyJ0YXJnZXQiOjIwfX1dLFszLDUsIiIsMCx7InNob3J0ZW4iOnsic291cmNlIjoyMCwidGFyZ2V0IjoxMH19XSxbNSwzLCIiLDAseyJvZmZzZXQiOjMsImN1cnZlIjoyLCJzaG9ydGVuIjp7InRhcmdldCI6MzB9fV0sWzMsNiwiIiwwLHsibGV2ZWwiOjEsInN0eWxlIjp7Im5hbWUiOiJjb3JuZXIifX1dXQ== -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNixbMCwxLCJcXHRleHRjaXJjbGVke3h9XFxyaWdodGFycm93XFx0ZXh0Y2lyY2xlZHt5fSJdLFsxLDEsIlxcdGV4dGNpcmNsZWR7eH1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVke3l9Il0sWzAsMiwiXFx0ZXh0Y2lyY2xlZHsxfVxccmlnaHRhcnJvd1xcdGV4dGNpcmNsZWR7Mn1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezN9Il0sWzEsMiwiXFx0ZXh0Y2lyY2xlZHsxfVxccmlnaHRhcnJvd1xcdGV4dGNpcmNsZWR7Mn1cXHJpZ2h0YXJyb3dcXHRleHRjaXJjbGVkezN9Il0sWzEsMCwiXFx0ZXh0Y2lyY2xlZHt6fSJdLFsxLDMsIlxcdGV4dGNpcmNsZWR7entcXGZvb3Rub3Rlc2l6ZSd9fSJdLFswLDEsIiIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsyLDMsIiIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRvdHRlZCJ9fX1dLFsxLDMsInhcXG1hcHN0byAyXFxcXHlcXG1hcHN0bzMiLDAseyJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkb3R0ZWQifX19XSxbMCwyLCJ4XFxtYXBzdG8gMlxcXFx5XFxtYXBzdG8zIiwwLHsic3R5bGUiOnsiYm9keSI6eyJuYW1lIjoiZG90dGVkIn19fV0sWzEsNCwiIiwyLHsib2Zmc2V0IjoxLCJjdXJ2ZSI6LTIsInNob3J0ZW4iOnsic291cmNlIjoyMH19XSxbNCwxLCIiLDIseyJvZmZzZXQiOjEsImN1cnZlIjotMiwic2hvcnRlbiI6eyJ0YXJnZXQiOjIwfX1dLFszLDUsIiIsMCx7InNob3J0ZW4iOnsic291cmNlIjoyMCwidGFyZ2V0IjoxMH19XSxbNSwzLCIiLDAseyJvZmZzZXQiOjMsImN1cnZlIjoyLCJzaG9ydGVuIjp7InRhcmdldCI6MzB9fV0sWzMsNiwiIiwwLHsibGV2ZWwiOjEsInN0eWxlIjp7Im5hbWUiOiJjb3JuZXIifX1dXQ==&amp;embed" width="560" height="560" style="border-radius: 8px; border: none;">
</iframe>
<p>Note because this rule didn’t bind anything to <img src="https://latex.codecogs.com/png.latex?z">, it’s not obvious what label we should informally give the newly introduced vertex. If we applied the rule multiple times, we would continue to generate a new vertex (and two new edges) each time.</p>
</section>
<section id="second-example-category-datalog" class="level3" data-number="1.2">
<h3 data-number="1.2" data-anchor-id="second-example-category-datalog"><span class="header-section-number">1.2</span> Second example category: Datalog</h3>
<p>Let’s attempt to understand the logic programming language <a href="https://en.wikipedia.org/wiki/Datalog">Datalog</a> categorically. The key concepts here are <em>relation</em>, <em>fact</em>, <em>constant</em>, <em>variable</em>, <em>rule</em>, and <em>query</em>. For example one can write some facts about a binary <code>edge</code> relation and constants <code>v1</code>, <code>v2</code>, and <code>v3</code>.</p>
<pre><code>edge(v1,v1). edge(v3,v3). edge(v1,v2). edge(v3,v2).</code></pre>
<p>When someone writes a Datalog program, there is a starting set of ground facts (which are facts about constants). There are also rules, which have two parts, known as the <em>head</em> and the <em>body</em> (written <code>HEAD :- BODY.</code><sup>5</sup>). We can think of the body as the preconditions of the rule and the head as the postcondition(s).<sup>6</sup> An example of a rule (which involves both variables and constants) is:</p>
<pre><code>edge(v1,X) :- edge(X,X), edge(X,v2).</code></pre>
<p>This says that: “if you give me any vertex <img src="https://latex.codecogs.com/png.latex?X"> with a self loop and edge into <code>v2</code>, I’ll give you an edge from <code>v1</code> into <img src="https://latex.codecogs.com/png.latex?X">”. If we ran the Datalog program with this rule and the ground facts above, we would derive the fact that <code>edge(v1,v3)</code> because, if one <em>queries</em> the preconditions, one can get an answer <code>X=v3</code> which then gets plugged into the postcondition. One can imagine making these moves until there are no further changes in the set of facts: this is called the Herbrand model of the Datalog program. The sets of facts which we encounter along the way to the Herbrand model are called <a href="http://kylebayes.com/blog/article5.html">Herbrand interpretations</a> (hereafter: interpretations).</p>
<p>We want to think of the initial collection of ground facts as an interpretation, an update that brings us closer to the Herbrand model as a morphism of interpretations, the rule as a morphism <code>preconditions -&gt; postconditions</code> of interpretations, and the finding of a set of terms that satisfies the preconditions as a morphism of interpretations <code>preconditions -&gt; current_interpretation</code>. Furthermore, we want this update morphism to shake out as the result of taking the pushout in this category. Let’s craft a definition to make this happen!</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span><img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D"> definition (concrete)
</div>
</div>
<div class="callout-body-container callout-body">
<p>Fix some signature <img src="https://latex.codecogs.com/png.latex?%5CSigma:%20R%20%5Crightarrow%20%5Cmathbb%7BN%7D"> assigning arities to a set of relation symbols. Let <img src="https://latex.codecogs.com/png.latex?K"> be some set of constants. We define <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D_%7B%5CSigma,%20K%7D"> (hereafter just <img src="https://latex.codecogs.com/png.latex?%5CSigma"> and <img src="https://latex.codecogs.com/png.latex?K"> will be implicit) to be the category of interpretations and interpretation morphisms, where:</p>
<ul>
<li>An <em>interpretation</em> <img src="https://latex.codecogs.com/png.latex?I"> consists of a set <img src="https://latex.codecogs.com/png.latex?I_V"> of ‘variables’, as well as relations on <img src="https://latex.codecogs.com/png.latex?K+I_V"> for every relation symbol <img src="https://latex.codecogs.com/png.latex?r%20%5Cin%20R"> of arity <img src="https://latex.codecogs.com/png.latex?%5CSigma(r)">.</li>
<li>A morphism of interpretations <img src="https://latex.codecogs.com/png.latex?I%5Crightarrow%20J"> is a function <img src="https://latex.codecogs.com/png.latex?I_V%20%5Crightarrow%20K%20+%20J_V">, assigning variables to either constants or variables,<sup>7</sup> that preserves whatever relations are in <img src="https://latex.codecogs.com/png.latex?I">.</li>
</ul>
</div>
</div>
<p>So to interpret the example rule above as a morphism <img src="https://latex.codecogs.com/png.latex?I%5Crightarrow%20J">, we must take <img src="https://latex.codecogs.com/png.latex?I"> to be <code>edge(X,X), edge(X,v2)</code> and <img src="https://latex.codecogs.com/png.latex?J"> to be <code>edge(v1,X), edge(X,X), edge(X,v2)</code>. Note that, because these rules tell us how to <em>add</em> facts (never removing them), we should always think of the preconditions as implicitly included in the postconditions. We have <img src="https://latex.codecogs.com/png.latex?%7BK=%5C%7Bv_1,v_2,v_3%5C%7D%7D"> and <img src="https://latex.codecogs.com/png.latex?%7BI_V=J_V=%5C%7BX%5C%7D%7D"> with the morphism data the function sending <img src="https://latex.codecogs.com/png.latex?X%5Cmapsto%20X">, which preserves the relations in <img src="https://latex.codecogs.com/png.latex?I"> because <img src="https://latex.codecogs.com/png.latex?J"> extends the set of facts of <img src="https://latex.codecogs.com/png.latex?I">.</p>
<p>It will be easier to show that this category has pushouts when defined in a more abstract way.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span><img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D"> definition (abstract)
</div>
</div>
<div class="callout-body-container callout-body">
<p>Given a signature <img src="https://latex.codecogs.com/png.latex?%5CSigma"> we define the category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D_%5CSigma"> to contain an object <img src="https://latex.codecogs.com/png.latex?X"> as well as morphisms <img src="https://latex.codecogs.com/png.latex?r_1,...,r_%7B%5CSigma(r)%7D:%20A_r%5Crightarrow%20X"> for each <img src="https://latex.codecogs.com/png.latex?r%20%5Cin%20R">. There is an associated finite limit sketch <img src="https://latex.codecogs.com/png.latex?T_%5CSigma"> which adds limit cones asserting that its models <img src="https://latex.codecogs.com/png.latex?M:%20C_%5CSigma%20%5Crightarrow%20%5Cmathsf%7BSet%7D"> have, for each <img src="https://latex.codecogs.com/png.latex?r%20%5Cin%20R">, that <img src="https://latex.codecogs.com/png.latex?M(r_1),...,M(r_%7B%5CSigma(r)%7D)"> are jointly monic.<sup>8</sup></p>
<p>We define <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D_%5CSigma"> to be the the category of models of <img src="https://latex.codecogs.com/png.latex?T_%5CSigma">, which is subcategory of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%5E%7BC_%5CSigma%7D%7D">. As a category of limit sketch models, <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D_%5CSigma"> is a <a href="https://ncatlab.org/nlab/show/reflective+subcategory">reflective subcategory</a> whose reflector quotients each <img src="https://latex.codecogs.com/png.latex?M(A_r)">, merging together elements that agree on all values of <img src="https://latex.codecogs.com/png.latex?M(r_1),%20...,%20M(r_%7B%5CSigma(r)%7D)">. Reflective subcategories of cocomplete categories are cocomplete, with colimits computed by first including into the larger category, performing the colimit there, and then applying the reflector to coerce the result back into the subcategory.</p>
<p>Constants are handled via coslicing: let <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D_%7B%5CSigma,K%7D"> be <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20Const%7D/%5Cmathsf%7BDat%7D_%5CSigma">, where <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20Const%7D"> is the functor with <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20Const%7D(X):=K"> and <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20Const%7D(A_r)=%5Cvarnothing"> for all <img src="https://latex.codecogs.com/png.latex?r%20%5Cin%20R">. Note that coslices of categories with pushouts have pushouts, computed in the base category.</p>
</div>
</div>
<p>Consider interpretations that have just a binary <code>edge</code> relation. These are pretty similar to graphs as defined in the previous section; however, there is no notion of <em>multiple</em> edges. Also the vertices can have fixed, stable identities: although the graph <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20a%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%20b%7D%7D"> is isomorphic / not meaningfully different from <img src="https://latex.codecogs.com/png.latex?%5Cboxed%7B%5Ctextcircled%7B%5Cfootnotesize%20b%7D%5Crightarrow%5Ctextcircled%7B%5Cfootnotesize%20a%7D%7D"> because the labels are not meaningful, an interpretation whose only fact is <code>edge(v1,v2)</code> will not be isomorphic in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D"> to one whose only fact is <code>edge(v2,v1)</code>, if <code>v1</code> and <code>v2</code> are constants.</p>
<!-- ::: {.callout-caution}
## Relationship between the two categories

The two categories $\mathsf{Grph}$ and $\mathsf{Dat}$ (with just a binary edge relation) above exemplify two different ways one could model relational structures with databases. Consider the database schema: $\boxed{{\rm Edge}\overset{s}{\underset{t}{\rightrightarrows}} {\rm Vertex}}$. In the first approach, we act as if there are implicitly primary key columns on each of the tables, whereas the second approach takes the primary key of $\mathrm{Edge}$ to be a composite primary key, consisting in both of its foreign keys. Furthermore, the categorical database approach regards the primary key values of ${\rm Vertex}$ as meaningless identifiers, in contrast to the Datalog approach taking these values to be constants that are non-interchangeable.
::: -->
<p>To see these pushouts in action, consider applying the rule above, using the depicted match morphism (i.e.&nbsp;answer <code>X=v3</code> to the query of the rule’s preconditions). Note we distinguish variables from constants by using red for variables:</p>
<!-- https://q.uiver.app/#q=WzAsMTEsWzQsMCwiXFx0ZXh0Y2lyY2xlZHtcXGZvb3Rub3Rlc2l6ZSB2XzF9Il0sWzUsMCwiXFx0ZXh0Y2lyY2xlZHtcXHRleHRjb2xvcntyZWR9e3h9fSJdLFs2LDAsIlxcdGV4dGNpcmNsZWR7XFxmb290bm90ZXNpemUgdl8yfSJdLFsxLDAsIlxcdGV4dGNpcmNsZWR7XFx0ZXh0Y29sb3J7cmVkfXt4fX0iXSxbMiwwLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbMSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbNSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbNiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNSw2XSxbMCwxXSxbMSwyXSxbMSwxXSxbMywzXSxbNSw1LCIiLDIseyJhbmdsZSI6LTE4MH1dLFs0LDAsIiIsMCx7InNob3J0ZW4iOnsic291cmNlIjoxMCwidGFyZ2V0IjoxMH0sInN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFs3LDcsIiIsMCx7ImFuZ2xlIjotMTgwfV0sWzMsNF0sWzgsOV0sWzgsOCwiIiwyLHsiYW5nbGUiOi0xODB9XSxbMTAsMTAsIiIsMCx7ImFuZ2xlIjotMTgwfV0sWzEsOSwiXFx0ZXh0Y29sb3J7cmVkfXt4fVxcbWFwc3RvIHZfMyIsMCx7InNob3J0ZW4iOnsic291cmNlIjozMCwidGFyZ2V0IjozMH0sInN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFs3LDgsIiIsMCx7InNob3J0ZW4iOnsic291cmNlIjozMCwidGFyZ2V0IjozMH0sInN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFszLDYsIlxcdGV4dGNvbG9ye3JlZH17eH1cXG1hcHN0byB2XzMiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbOCwxMCwiIiwwLHsiY3VydmUiOi0yfV0sWzcsNl0sWzEwLDldXQ== -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsMTEsWzQsMCwiXFx0ZXh0Y2lyY2xlZHtcXGZvb3Rub3Rlc2l6ZSB2XzF9Il0sWzUsMCwiXFx0ZXh0Y2lyY2xlZHtcXHRleHRjb2xvcntyZWR9e3h9fSJdLFs2LDAsIlxcdGV4dGNpcmNsZWR7XFxmb290bm90ZXNpemUgdl8yfSJdLFsxLDAsIlxcdGV4dGNpcmNsZWR7XFx0ZXh0Y29sb3J7cmVkfXt4fX0iXSxbMiwwLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbMSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbNSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbNiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNSw2XSxbMCwxXSxbMSwyXSxbMSwxXSxbMywzXSxbNSw1LCIiLDIseyJhbmdsZSI6LTE4MH1dLFs0LDAsIiIsMCx7InNob3J0ZW4iOnsic291cmNlIjoxMCwidGFyZ2V0IjoxMH0sInN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFs3LDcsIiIsMCx7ImFuZ2xlIjotMTgwfV0sWzMsNF0sWzgsOV0sWzgsOCwiIiwyLHsiYW5nbGUiOi0xODB9XSxbMTAsMTAsIiIsMCx7ImFuZ2xlIjotMTgwfV0sWzEsOSwiXFx0ZXh0Y29sb3J7cmVkfXt4fVxcbWFwc3RvIHZfMyIsMCx7InNob3J0ZW4iOnsic291cmNlIjozMCwidGFyZ2V0IjozMH0sInN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFs3LDgsIiIsMCx7InNob3J0ZW4iOnsic291cmNlIjozMCwidGFyZ2V0IjozMH0sInN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFszLDYsIlxcdGV4dGNvbG9ye3JlZH17eH1cXG1hcHN0byB2XzMiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbOCwxMCwiIiwwLHsiY3VydmUiOi0yfV0sWzcsNl0sWzEwLDldXQ==&amp;embed" width="744" height="432" style="border-radius: 8px; border: none;">
</iframe>
<p>Note that <code>X=v1</code> was also a valid answer to the query. However, in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D">, the pushout does nothing, rather than adding another loop to <code>v1</code>:</p>
<!-- https://q.uiver.app/#q=WzAsMTEsWzQsMCwiXFx0ZXh0Y2lyY2xlZHtcXGZvb3Rub3Rlc2l6ZSB2XzF9Il0sWzUsMCwiXFx0ZXh0Y2lyY2xlZHtcXHRleHRjb2xvcntyZWR9e3h9fSJdLFs2LDAsIlxcdGV4dGNpcmNsZWR7XFxmb290bm90ZXNpemUgdl8yfSJdLFswLDAsIlxcdGV4dGNpcmNsZWR7XFx0ZXh0Y29sb3J7cmVkfXt4fX0iXSxbMSwwLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbMSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbNSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbNiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNSw2XSxbMCwxXSxbMSwyXSxbMSwxXSxbMywzXSxbNSw1LCIiLDIseyJhbmdsZSI6LTE4MH1dLFszLDUsIlxcdGV4dGNvbG9ye3JlZH17eH1cXG1hcHN0byB2XzEiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNCwwLCIiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MTAsInRhcmdldCI6MTB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNyw3LCIiLDAseyJhbmdsZSI6LTE4MH1dLFszLDRdLFs4LDldLFs4LDgsIiIsMix7ImFuZ2xlIjotMTgwfV0sWzEwLDEwLCIiLDAseyJhbmdsZSI6LTE4MH1dLFsxLDksIlxcdGV4dGNvbG9ye3JlZH17eH1cXG1hcHN0byB2XzEiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNyw4LCIiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNyw2XSxbMTAsOV1d= -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsMTEsWzQsMCwiXFx0ZXh0Y2lyY2xlZHtcXGZvb3Rub3Rlc2l6ZSB2XzF9Il0sWzUsMCwiXFx0ZXh0Y2lyY2xlZHtcXHRleHRjb2xvcntyZWR9e3h9fSJdLFs2LDAsIlxcdGV4dGNpcmNsZWR7XFxmb290bm90ZXNpemUgdl8yfSJdLFswLDAsIlxcdGV4dGNpcmNsZWR7XFx0ZXh0Y29sb3J7cmVkfXt4fX0iXSxbMSwwLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbMSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbMiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNCwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMX0iXSxbNSwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfMn0iXSxbNiwyLCJcXHRleHRjaXJjbGVke1xcZm9vdG5vdGVzaXplIHZfM30iXSxbNSw2XSxbMCwxXSxbMSwyXSxbMSwxXSxbMywzXSxbNSw1LCIiLDIseyJhbmdsZSI6LTE4MH1dLFszLDUsIlxcdGV4dGNvbG9ye3JlZH17eH1cXG1hcHN0byB2XzEiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNCwwLCIiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MTAsInRhcmdldCI6MTB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNyw3LCIiLDAseyJhbmdsZSI6LTE4MH1dLFszLDRdLFs4LDldLFs4LDgsIiIsMix7ImFuZ2xlIjotMTgwfV0sWzEwLDEwLCIiLDAseyJhbmdsZSI6LTE4MH1dLFsxLDksIlxcdGV4dGNvbG9ye3JlZH17eH1cXG1hcHN0byB2XzEiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNyw4LCIiLDAseyJzaG9ydGVuIjp7InNvdXJjZSI6MzAsInRhcmdldCI6MzB9LCJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJkYXNoZWQifX19XSxbNyw2XSxbMTAsOV1d=&amp;embed" width="744" height="432" style="border-radius: 8px; border: none;">
</iframe>
<p>Each answer to the query of a Datalog rule’s preconditions is a potential way to <em>ground</em> the rule, which can potentially add a new fact and bring one’s interpretation closer to the Datalog program’s Herbrand model.</p>
<p>A common extension, Datalog<img src="https://latex.codecogs.com/png.latex?%5E%5Cexists">, allows for the heads of rules to introduce new terms. For example, the rule “if you gave me an edge, I could give you path of length two which has the same source and target” is expressed as:</p>
<pre><code>edge(X,Z), edge(Z,Y) :- edge(X,Y). # note "Z" not in body of rule!</code></pre>
<p>This is actually the natural interpretation of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BDat%7D">, though we could restrict to a subcategory which has no ability to introduce terms: to do this we would require all rule morphisms to have their underlying function <img src="https://latex.codecogs.com/png.latex?I_V%5Crightarrow%20J_V+K"> be of the form <img src="https://latex.codecogs.com/png.latex?%7BI_V%20%5Coverset%7B%5Ciota%7D%5Crightarrowtail%20I_V+K%7D">.</p>
</section>
</section>
<section id="takeaway" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="takeaway"><span class="header-section-number">2</span> Takeaway</h2>
<p>We considered categories where objects play dual roles of being <em>queries</em> as well as <em>data</em>. In such categories, it is natural to think of elements of <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20Hom%7D(X,Y)"> as answers to the query of shape <img src="https://latex.codecogs.com/png.latex?X"> in data of shape <img src="https://latex.codecogs.com/png.latex?Y">. We can also think of an element of <img src="https://latex.codecogs.com/png.latex?%7B%5Crm%20Hom%7D(X,Y)"> as a query of shape <img src="https://latex.codecogs.com/png.latex?Y"> that depends on results to a query of shape <img src="https://latex.codecogs.com/png.latex?X">. Taking an answer to <img src="https://latex.codecogs.com/png.latex?X"> and using it to construct a canonical answer to <img src="https://latex.codecogs.com/png.latex?Y"> is a kind of substitution (or <em>grounding</em>), which can be characterized as a pushout.</p>
</section>
<section id="special-thanks-to-minnowbrook-logic-programming-seminar" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="special-thanks-to-minnowbrook-logic-programming-seminar"><span class="header-section-number">3</span> Special thanks to <a href="https://kmicinski.com/minnowbrook-seminar">Minnowbrook logic programming seminar</a></h2>
<p>Making explicit this connection between graph rewrite rules and datalog rules was one of many thoughts which came about talking to <a href="https://www.rntz.net/">Michael Arntzenius</a> and others while hiking in Adirondacks with a great group of logic programmers. This workshop was organized by <a href="https://kmicinski.com/">Kristopher Micinski</a> in May 2025.</p>
<div class="quarto-layout-panel" data-layout-ncol="3">
<div class="quarto-layout-row">
<div class="quarto-layout-cell" style="flex-basis: 33.3%;justify-content: center;">
<p><a href="lakes.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img src="https://topos.institute/blog/2025-08-06-substitution-is-pushout/lakes.jpg" class="img-fluid"></a></p>
</div>
<div class="quarto-layout-cell" style="flex-basis: 33.3%;justify-content: center;">
<p><a href="canoe.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-2"><img src="https://topos.institute/blog/2025-08-06-substitution-is-pushout/canoe.jpg" class="img-fluid"></a></p>
</div>
<div class="quarto-layout-cell" style="flex-basis: 33.3%;justify-content: center;">
<p><a href="group.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-3"><img src="https://topos.institute/blog/2025-08-06-substitution-is-pushout/group.jpg" class="img-fluid"></a></p>
</div>
</div>
</div>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>This is precisely the data of a functor <img src="https://latex.codecogs.com/png.latex?%7B%7B%5Crm%20SchGraph%7D%5Crightarrow%5Cmathsf%7BSet%7D%7D">, where <img src="https://latex.codecogs.com/png.latex?%7B%7B%5Crm%20SchGraph%7D:=%5Cboxed%7B%7B%5Crm%20Edge%7D%5Crightrightarrows%20%7B%5Crm%20Vertex%7D%7D%7D">. Morphisms are natural transformations of these functors. Everything in this section applies to <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">-sets generally.↩︎</p></li>
<li id="fn2"><p>A graph homomorphism <img src="https://latex.codecogs.com/png.latex?h:G%5Crightarrow%20H"> is a pair of functions, <img src="https://latex.codecogs.com/png.latex?h_V:%20V_G%5Crightarrow%20V_H"> and <img src="https://latex.codecogs.com/png.latex?h_E:%20E_G%5Crightarrow%20E_H"> such that <img src="https://latex.codecogs.com/png.latex?h_V%5Ccirc%20s_G=s_H%5Ccirc%20h_E"> and <img src="https://latex.codecogs.com/png.latex?h_E%5Ccirc%20t_G=t_H%5Ccirc%20h_E">.↩︎</p></li>
<li id="fn3"><p>It’s possible to have multiple edges between the same pair of vertices, but the graphs appearing in this post will happen to not have such parallel edges. Hence we will usually avoid labeling edges.↩︎</p></li>
<li id="fn4"><p>I.e. if you give me an answer to the domain query of the morphism, I can give you an answer to the codomain query of the morphism.↩︎</p></li>
<li id="fn5"><p>The <code>:-</code> is meant to be an arrow of sorts pointing to the left.↩︎</p></li>
<li id="fn6"><p>Standard Datalog syntax has a single fact as the postcondition of a rule, but some Datalog interfaces allow providing multiple facts as the postconditions for some set of preconditions. This could be desugared to multiple rules (one for each postcondition) which all have the same preconditions.↩︎</p></li>
<li id="fn7"><p>Implicitly it also assigns all constants to themselves, which is what allows us to compose such functions and get a category of such morphisms.↩︎</p></li>
<li id="fn8"><p>Consider the arity 2 case: <img src="https://latex.codecogs.com/png.latex?r_1,r_2:%20A_r%5Crightarrow%20X"> are jointly monic if and only if <img src="https://latex.codecogs.com/png.latex?A_r"> is the limit of the diagram: <!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCJBX3IiXSxbMiwwLCJBX3IiXSxbMCwxLCJYIl0sWzIsMSwiWCJdLFswLDIsInJfMSIsMl0sWzAsMywicl8yIiwwLHsibGFiZWxfcG9zaXRpb24iOjIwfV0sWzEsMiwicl8xIiwyLHsibGFiZWxfcG9zaXRpb24iOjIwfV0sWzEsMywicl8yIl1d --> <iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCJBX3IiXSxbMiwwLCJBX3IiXSxbMCwxLCJYIl0sWzIsMSwiWCJdLFswLDIsInJfMSIsMl0sWzAsMywicl8yIiwwLHsibGFiZWxfcG9zaXRpb24iOjIwfV0sWzEsMiwicl8xIiwyLHsibGFiZWxfcG9zaXRpb24iOjIwfV0sWzEsMywicl8yIl1d&amp;embed" width="432" height="304" style="border-radius: 8px; border: none;"></iframe>.<br> Let’s make sense of this diagram as a constraint on models of the sketch by thinking of it as a limit diagram in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">. The limit is set of pairs of elements of <img src="https://latex.codecogs.com/png.latex?(x,y)%20%5Cin%20M(A_r)">, such that <img src="https://latex.codecogs.com/png.latex?M(r_1)(x)%20=%20M(r_1)(y)"> <em>and</em> <img src="https://latex.codecogs.com/png.latex?M(r_2)(x)=M(r_2)(y)"> are simply the pairs <img src="https://latex.codecogs.com/png.latex?(a,%20a)"> for all <img src="https://latex.codecogs.com/png.latex?a%20%5Cin%20M(A_r)">. Of course, these pairs will always be a solution to the equation described by the limit, but <img src="https://latex.codecogs.com/png.latex?M(r_1)"> and <img src="https://latex.codecogs.com/png.latex?M(r_2)"> being jointly monic means there will be <em>no other</em> solutions.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>rewriting</category>
  <guid>https://topos.institute/blog/2025-08-06-substitution-is-pushout/</guid>
  <pubDate>Wed, 06 Aug 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>CatColab for Model Building</title>
  <dc:creator>Nathaniel Osgood</dc:creator>
  <link>https://topos.institute/blog/2025-07-18-catcolab-for-model-building/</link>
  <description><![CDATA[ 




<div class="callout callout-style-simple callout-none no-icon">
<div class="callout-body d-flex">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-body-container">
<p><em>This is a crosspost from John Baez’s blog <a href="https://johncarlosbaez.wordpress.com/2025/07/08/catcolab-for-model-building/">Azimuth</a>, written by <a href="https://www.cs.usask.ca/~osgood/">Nathaniel D. Osgood</a>.</em></p>
</div>
</div>
</div>
<p>Together with 4 students from our Computational Epidemiology and Public Health Informatics Lab (<a href="https://cephil.ca/">CEPHIL</a>), I spent my Friday at one of our community group model building event, this one focused on drivers for homelessness in our city (Saskatoon, Canada).</p>
<p>Although our behavioural ethics review board stipulated that the group should not include people who are currently homeless, the participants were people with lived experience of homelessness, with most having personally experienced homelessness within recent years.</p>
<p>Building on facilitated discussion, the focus of the day consisted of a group model building session. To allow for some diversity of thought and exploration, the participants divided into two teams. The <a href="https://en.wikipedia.org/wiki/Causal_loop_diagram">causal loop diagrams</a> resulting from about 1.5-2 hours of work on the part of each team were very thoughtful, and the diagrams captured many important insights and perspectives, and lived experiences. It bears emphasis that while some of those from our lab helped facilitate the discussions, the identification of variables and the existence, directionality and polarity of the links between such variables came firmly from the participants with lived experience themselves. Although they are not yet suitable for public distribution, I thought that I would provide a glimpse of the work products.</p>
<p><a href="catcolab_osgood_1.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img src="https://topos.institute/blog/2025-07-18-catcolab-for-model-building/catcolab_osgood_1.jpg" class="img-fluid"></a></p>
<p><a href="catcolab_osgood_2.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-2"><img src="https://topos.institute/blog/2025-07-18-catcolab-for-model-building/catcolab_osgood_2.jpg" class="img-fluid"></a></p>
<p>For the next stages of this work, <a href="https://github.com/ToposInstitute/CatColab">CatColab</a> will be a key tool—and arguably the single most important tool in our toolbox to secure substantive insights and value from these diagrams. Building on the strong applied category theory experience of 3 of the 4 students involved, we will be using CatColab to find feedback loops in these diagrams individually, and then when combined. This ability to find feedbacks in this fashion will be a tremendous asset for learning from these diagrams. It will also be used to visualize and explore the diagrams, although it will not be the only tool to serve in this capacity. When the ability to compose causal loop diagrams is added to CatColab, we plan to make central use of that feature as well.</p>
<p>Friday’s event is the first in a series focusing on this pressing problem in our community through tapping the deep and grounded knowledge of those with lived experience. It is a great testimonial to the power of CatColab that it will play such a central role in the value delivery from such events. We hope to contribute to the development of CatColab to further its ability to deliver insights and benefits not only to our research team, but also to community members themselves. I wish to express my—indeed, our—gratitude to the core CatColab team for their delivery of such a valuable tool for insight into complex social issues such as homelessness (together with cognate issues such as mental health, domestic violence and substance use, lack of affordable housing), and CEPHIL’s committment to contributing to the development of that tool to further develop its potential in this sphere.</p>



<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>CatColab</category>
  <category>modeling</category>
  <category>crosspost</category>
  <guid>https://topos.institute/blog/2025-07-18-catcolab-for-model-building/</guid>
  <pubDate>Fri, 18 Jul 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Liberating synthetic quasi-coherence from forcing</title>
  <dc:creator>David Jaz Myers</dc:creator>
  <link>https://topos.institute/blog/2025-07-13-liberating-synthetic-quasi-coherence-from-forcing/</link>
  <description><![CDATA[ 




<section id="the-joy-of-synthetic-mathematics" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> The joy of synthetic mathematics</h1>
<p>Since <a href="https://en.wikipedia.org/wiki/Nicolas_Bourbaki">Bourbaki’s first lectures at the Café Grill-Room A. Capoulade in 1934</a>, one could be forgiven for holding the belief that all mathematical activity consists of ever more elaborate arrangements of sets within sets within sets. We begin with the natural numbers, the ability to form pairs, and the ability to comprehend subsets carved out by properties, and before you know it we are describing <a href="https://en.wikipedia.org/wiki/Rigid_analytic_space">rigid analytic spaces</a> and <a href="https://ncatlab.org/nlab/show/ultracategory">ultracategories</a> and <a href="https://topos.institute/blog/2024-06-20-compact-double-categories-1/">twisted lax double functors</a> — all just increasingly complex arrangements of sets. No matter what we can imagine, Bourbaki assures us, we can express in <a href="https://en.wikipedia.org/wiki/Cantor%27s_paradise">Cantor’s paradise</a>.<sup>1</sup></p>
<p>A complex arrangement of sets satisfying certain properties and assumptions is known in logic as a <em>theory</em>. There is a theory of groups, a theory of rings, a theory of ultracategories and twisted lax double functors. A <em>model</em> of a theory is an actual arrangement of sets actually satisfying those properties and assumptions. The integers <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BZ%7D"> with their addition <img src="https://latex.codecogs.com/png.latex?+%20:%20%5Cmathbb%7BZ%7D%20%5Ctimes%20%5Cmathbb%7BZ%7D%20%5Cto%20%5Cmathbb%7BZ%7D"><sup>2</sup> are a model of the theory of groups; with their multiplication as well they become a model of the theory of rings. The traditional view is that any mathematical concept, no matter how invovled, can modelled by some arrangement of sets expressed by a theory (in some or other logic).</p>
<p>But in 1963, Lawvere ate from the apple of knowledge in Cantor’s paradise and produced his <a href="http://www.tac.mta.ca/tac/reprints/articles/5/tr5.pdf">thesis</a> on the <em>functorial semantics of algebraic theories</em>. Lawvere identified an algebraic theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> with a category <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BL%7D(%5Cmathbb%7BT%7D)"> built from the terms of the theory, and identified models <img src="https://latex.codecogs.com/png.latex?M%20%5Cmodels%20%5Cmathbb%7BT%7D"> of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> with a product-preserving functors <img src="https://latex.codecogs.com/png.latex?M%20:%20%5Cmathcal%7BL%7D(%5Cmathbb%7BT%7D)%20%5Cto%20%5Cmathsf%7BSet%7D"> into the category of sets. So far, not so different. But Lawvere’s reformulation opens up a whole new world for logic: now we can define a model of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> in <em>any</em> category <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BC%7D"> with finite products as a product-preserving functor <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BL%7D(%5Cmathbb%7BT%7D)%20%5Cto%20%5Cmathcal%7BC%7D">. For example, if <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> is the theory of groups, then its models in in the category of sets are the groups as usual, but its models in the category of smooth manifolds are the <a href="https://en.wikipedia.org/wiki/Lie_group">Lie groups</a> and in the category of algebraic varieties are the <a href="https://en.wikipedia.org/wiki/Algebraic_group">algebraic groups</a>, and so on. With this extra freedom, we can work in any category we like, so long as it has finite products.<sup>3</sup> Even more, there is always a <em>universal</em> choice of model: the identity functor <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bid%7D%20:%20%5Cmathcal%7BL%7D(%5Cmathbb%7BT%7D)%20%5Cto%20%5Cmathcal%7BL%7D(%5Cmathbb%7BT%7D)"> is a model of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> with absolutely no accidental assumptions creeping in. This is the <em>universal model</em> of the theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">.</p>
<p>Soon, Lawvere <a href="https://lawverearchives.com/wp-content/uploads/2024/12/1970-quantifiers-and-sheaves.pdf">observed</a> that just as universal algebra could be interpreted in any category with finite products, <a href="https://arxiv.org/abs/1212.6543">all of set theory</a> could be interpreted in any of Grothendieck’s categories of set-valued sheaves: <em><a href="https://en.wikipedia.org/wiki/Topos">toposes</a></em>. Toposes of sheaves support not only a notion of natural number and finite products, but also <a href="https://ncatlab.org/nlab/show/subobject+classifier">power-sets and a comprehension axiom</a>. In fact, toposes interpret all of Martin-Löf’s (roughly contemporaneously developed) <a href="https://raw.githubusercontent.com/michaelt/martin-lof/master/pdfs/An-Intuitionistic-Theory-of-Types-1972.pdf&amp;ved=2ahUKEwjajp69saaOAxX7WEEAHTmGAzQQFnoECAkQAQ&amp;usg=AOvVaw335WGi7CpzByPOaPOuazsi">dependent type theory</a> with a <a href="https://ncatlab.org/nlab/show/propositional+extensionality">univalent universe of propositions</a>.</p>
<p>This means that any sort of theory we could interpret in the category of sets, we could just as well interpret in a category of sheaves — in <em>toposes</em>. We gain a powerful freedom in this ability to work “internally” to any topos, because toposes can have wonderful properties which are not true of the category of sets. For example, there are toposes where <a href="https://ncatlab.org/nlab/show/Brouwer%27s+continuity+principle">every real valued function is continuous</a><sup>4</sup>, or <a href="https://ncatlab.org/nlab/show/realizability+topos">computable</a>, or even <a href="https://ncatlab.org/nlab/show/smooth+set">smooth</a><sup>5</sup>. Because of this, you can use ordinary set theoretic arguments to construct whatever complicated functions you want, and they will be continuous/computable/measurable/regular/…, without you even having to check. That is, so as long as you judiciously avoid the <a href="https://en.wikipedia.org/wiki/Law_of_excluded_middle">law of excluded middle</a> and the <a href="https://en.wikipedia.org/wiki/Axiom_of_choice">axiom of choice</a>, which do not hold in all toposes. The logic of toposes is <em><a href="https://ncatlab.org/nlab/show/constructive+mathematics">constructive</a></em>.</p>
<p>The fact that you can just interpret set theoretical arguments into any topos has all sorts of nice and powerful consequences; for example, the category of abelian groups in any topos is an <a href="https://ncatlab.org/nlab/show/abelian+category">abelian category</a> (because the proof of this for sets doesn’t use the law of excluded middle or the axiom of choice), a fact which has been <a href="https://www.math.uni-bonn.de/people/scholze/Condensed.pdf">highlighted by Clausen and Scholze in their re-foundations of analysis</a> as a reason to work in a topos rather than with topological spaces. Even better, structures and properties on sheaves which may be difficult to describe from an ordinary <em>external</em> point of view can become familiar notions when seen from the <em>internal</em> point of view:</p>
<ul>
<li>A sheaf of rings is just a ring, internally.</li>
<li>A sheaf of modules over a sheaf of rings is just a module over that ring, internally.</li>
<li>A sheaf of modules is of <a href="https://stacks.math.columbia.edu/tag/01B4">finite type</a> just when it is a finitely generated module, internally, and so on…<sup>6</sup></li>
</ul>
<p>We can then prove things about sheaves of finite type over some scheme by translating statements about finitely generated modules internal to the topos of sheaves on that scheme. We can also <em>define</em> sheaves internally in very conceptual ways. For example, projective <img src="https://latex.codecogs.com/png.latex?n">-space may be defined internally as the set of lines through the origin in affine space of dimension <img src="https://latex.codecogs.com/png.latex?n+1">; this is the usual definition which works over, say, the complex numbers, but taken internally it works over any base scheme.</p>
<p>By axiomatizing the special features of a topos we would like to work in, we can then work in what feels like ordinary set theory and carry out arguments which are more conceptually transparent than the corresponding external arguments would be. This is called <em><a href="https://ncatlab.org/nlab/show/synthetic+mathematics">synthetic mathematics</a></em>, and there is now a flourishing garden of synthetic approaches to various mathematical topics:<sup>7</sup></p>
<ul>
<li>First, there was Lawvere’s <em><a href="https://ncatlab.org/nlab/show/synthetic+differential+geometry">synthetic differential geometry</a></em>, which takes a <em>smooth real line</em> <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BR%7D_s"> as axiomatic and supposes the <a href="https://ncatlab.org/nlab/show/Kock-Lawvere+axiom">Kock-Lawvere axioms</a>, including that: “every function <img src="https://latex.codecogs.com/png.latex?f%20:%20%5C%7B%5Cvarepsilon%20:%20%5Cmathbb%7BR%7D_s%20%5Cmid%20%5Cvarepsilon%5E2%20=%200%20%5C%7D%20%5Cto%20%5Cmathbb%7BR%7D_s"> of a first order infinitesimal real number is linear: <img src="https://latex.codecogs.com/png.latex?f(%5Cvarepsilon)%20=%20a%20+%20b%5Cvarepsilon"> for unique <img src="https://latex.codecogs.com/png.latex?a"> and <img src="https://latex.codecogs.com/png.latex?b">”. Synthetic differential geometry is a wonderful little field; I did my PhD in it.<sup>8</sup></li>
<li>In his <a href="https://rawgit.com/iblech/internal-methods/master/notes.pdf">thesis</a>, Ingo Blechschmidt laid out the beginnings of <em><a href="https://ncatlab.org/nlab/show/synthetic+algebraic+geometry">synthetic algebraic geometry</a></em>, and it has <a href="https://arxiv.org/abs/2307.00073">since been taken up by a group at Gothenburg/Chalmers</a>.</li>
<li><a href="https://www.dpmms.cam.ac.uk/~jmeh1/Research/Oldpapers/synthetic91.pdf">Martin Hyland</a> began a study into <em><a href="https://ncatlab.org/nlab/show/synthetic+domain+theory">synthetic domain theory</a></em>, which has continued to flourish at Cambridge (as in, for example, <a href="https://arxiv.org/abs/2505.13096">this recent paper by Sterling and Ye</a>).</li>
<li>In his work on <a href="https://en.wikipedia.org/wiki/Homotopy_type_theory">homotopy type theory</a>, Voevodsky (as well Warren and Awodey) identified the correct internal logic of <a href="https://ncatlab.org/nlab/show/(infinity,1)-topos"><em>higher</em> toposes (of sheaves of homotopy types)</a> which opened up the possibility for <em><a href="https://ncatlab.org/nlab/show/synthetic+homotopy+theory">synthetic homotopy theory</a></em>.</li>
<li>In his <em><a href="http://www.tac.mta.ca/tac/volumes/19/3/19-03abs.html">Axiomatic Cohesion</a></em>, Lawvere identified some <em><a href="https://ncatlab.org/nlab/show/modality">modalities</a></em> on a topos which characterize it as a topos of <em>spaces</em>; <a href="https://ncatlab.org/schreiber/show/differential+cohomology+in+a+cohesive+topos">Schreiber interpreted these in higher toposes</a>; and <a href="https://arxiv.org/abs/1509.07584">Shulman described a type theory for them</a>, opening the way for <em>synthetic algebraic topology</em>.<sup>9</sup></li>
<li><em><a href="https://ncatlab.org/nlab/show/synthetic+topology">Synthetic topology</a></em> emerged out of synthetic domain theory through <a href="https://paultaylor.eu/ASD/">Taylor’s work on <em>abstract stone duality</em></a> and <a href="https://martinescardo.github.io/TypeTopology/">Escardó’s work on the topology of types</a>; it has also been taken up by the <a href="https://arxiv.org/abs/2412.03203">Chalmers group</a>.</li>
<li>Riehl and Shulman put forward a <a href="https://higher-structures.math.cas.cz/api/files/issues/Vol1Iss1/RiehlShulman">simplicial type theory</a> for working in (higher) toposes of simplicial sheaves. <a href="https://ncatlab.org/nlab/show/Jonathan+Weinberger">Weinberger et. al.</a> have used this type theory to study <em><a href="https://ncatlab.org/nlab/show/formal+%28infinity%2C1%29-category+theory">synthetic higher category theory</a></em>.</li>
<li><a href="http://tobiasfritz.science/2019/cps_workshop/slides/simpson.pdf">Alex Simpson has begun working on a <em>synthetic probability theory</em></a>, which has strong relations to <a href="https://arxiv.org/abs/1701.02547">convenient categories for higher order probability theory</a>.</li>
</ul>
<p>It is a bit difficult to describe how pleasant it is to work synthetically without running through a single example in full; but this introduction has really gone on long enough. If you’re interested, I recommend checking out <a href="https://www.cambridge.org/core/books/primer-of-infinitesimal-analysis/B0EF33F73CAF97C180897D2FD0AD1B6E">John Bell’s <em>A primer of infinitesimal analysis</em></a> for an elementary introduction to synthetic differential geometry and <a href="https://rawgit.com/iblech/internal-methods/master/notes.pdf">Ingo Blechschmidt’s wonderful PhD thesis</a> for a comprehensive introduction on the uses of synthetic reasoning in algebraic geometry.</p>
</section>
<section id="which-axioms-should-we-take" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Which axioms should we take?</h1>
<p>A work in synthetic mathematics begins by laying out some axioms which hold in the topos we intend to work in. However, it hasn’t always been clear exactly which axioms we need in order to prove the things we want to prove. For example, while the first axiom of synthetic differential geometry presented above is sufficient for some basic facts about derivatives, in order to argue well about higher order derivatives it needs to be extended to higher order infinitesimals. Even with a pretty comprehensive list of axioms (such as those at the beginning of <a href="https://www.cambridge.org/core/books/synthetic-differential-topology/446AD9AE704BD756D03769528DF668A0">Bunge et. al.’s <em>Synthetic differential topology</em></a>), we often run into cases that require more axioms.<sup>10</sup> It’s not tenable to constantly fiddle with foundations in the course of a proof.<sup>11</sup></p>
<p>The main axioms generally fall in the following three sorts:</p>
<ul>
<li>(Duality): There is a duality between “affine schemes” and “finitely presented algebras”. In the algebraic setting, this is what Ingo Blechschmidt called <em>synthetic quasi-coherence</em> in his thesis. But it also includes the Kock-Lawvere axiom, which asks for a duality between <a href="https://ncatlab.org/nlab/show/infinitesimally+thickened+point">Weil algebras</a> and “infinitesimal varieties”<sup>12</sup>, and <a href="https://ncatlab.org/nlab/show/Phoa%27s+principle">Phoa’s principle</a> as emphasized in <a href="https://arxiv.org/abs/2505.13096">Sterling and Ye’s recent paper (see Section 7)</a>. It also appears as Axiom 10 in <a href="https://arxiv.org/pdf/2407.09146">this paper on synthetic higher category theory</a>.</li>
<li>(Local choice): Any surjection into an “affine scheme” admits sections on an “open cover”. This was isolated by <a href="https://arxiv.org/abs/2307.00073">Cherubini-Coquand-Hutzler</a> in the algebraic setting as Zariski local choice, but it also includes the <a href="https://www.taylorfrancis.com/chapters/edit/10.1201/9781003073055-6/local-concepts-synthetic-differential-geometry-germ-representability-marta-bunge-eduardo-dubuc">Bunge-Dubuc Covering Property</a> from synthetic differential geometry, as well as the projectivity of the simplices which Mitchell Riley and I assume of our <a href="https://arxiv.org/abs/2301.13780">simplicial cohesion</a> in order to give a synthetic proof of the nerve theorem.</li>
<li>(Tinyness): Some objects are <em>tiny</em>: the functor <img src="https://latex.codecogs.com/png.latex?(T%20%5Cto%20(-))"> has<sup>13</sup> a right adjoint. This appears in synthetic differential geometry with the assumption that the infinitesimal varieties are tiny, which allows for the definition of <em>differential form classifiers</em>. <a href="https://arxiv.org/abs/2501.19187">Mark Williams has used</a> presentability of (tiny) representables to show that dualities present for presheaves descend to sheaves.</li>
</ul>
<p>But this scheme is more of a suggestion than a formula. What we need is a systematic approach to choosing axioms for synthetic mathematics.</p>
</section>
<section id="blechschmidts-generalized-nullstellensatz" class="level1" data-number="3">
<h1 data-number="3"><span class="header-section-number">3</span> Blechschmidt’s <em>generalized nullstellensatz</em></h1>
<p>In an <a href="https://github.com/iblech/internal-methods/blob/master/paper-qcoh.pdf">unpublished but widely circulating note, “<em>qcoh</em>”</a>, Ingo Blechschmidt has put forward a general axiom scheme which should work for any topos. I’ll work towards describing his idea here (using my own notation, for those following along in <em>qcoh</em>). From this point on, this blog post will assume that you know a fair bit of topos theory.</p>
<p>Lawvere’s functorial semantics for algebraic theories in cartesian categories and finite-product-preserving functors may be extended to a functorial semantics for positive, infinitary first-order theories (<a href="https://ncatlab.org/nlab/show/geometric+theory">“geometric” theories</a>) in toposes and <a href="https://ncatlab.org/nlab/show/geometric+morphism">“geometric morphisms”</a> between them. A “geometric” theory is a theory in first-order logic which allows for equality, finite conjunctions, and infinite disjunctions (i.e.&nbsp;disjunctions indexed by an arbitrary set). For any such theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">, there is a <em>classifying topos</em> <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D"> so that models of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> in any topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> correspond to geometric morphisms <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D">. The identity morphism therefore corresponds to a model <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D"> of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D">, and this is the <em>universal model</em> of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">.</p>
<p>Furthermore, <em>every</em> topos of sheaves is the classifying topos for some theory; namely, if <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%20=%20%5Cmathsf%7BSh%7D(C,%20j)"> is the topos of sheaves on some <a href="https://ncatlab.org/nlab/show/site">site</a>, then <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> classifies “flat, <img src="https://latex.codecogs.com/png.latex?j">-continuous functors” out of <img src="https://latex.codecogs.com/png.latex?C"> by <a href="https://ncatlab.org/nlab/show/Diaconescu%27s+theorem">Diaconescue’s theorem</a>. Therefore, no matter what topos we intend to work internal to, we should at least start by assuming that we have a model <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D"> of a theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> it classifies. For example:</p>
<ul>
<li>If we want to do synthetic algebraic geometry in the big Zariski topos, we may first appeal to the fact that the big Zariski topos classifies the theory of local rings<sup>14</sup> with the affine line <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BA%7D"> being the universal local ring itself. We may then begin our axiomatization by asking for a local ring <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BA%7D">.</li>
<li>If we want to work with simplicial sets, we may appeal to the fact that the topos of simplicial sets <a href="https://ncatlab.org/nlab/show/generic+interval">classifies total orders with distinct top and bottom elements</a>, with the 1-simplex <img src="https://latex.codecogs.com/png.latex?%5CDelta%5B1%5D"> being the universal model (and with <img src="https://latex.codecogs.com/png.latex?%5CDelta%5B2%5D%20%5Chookrightarrow%20%5CDelta%5B1%5D%5Ctimes%20%5CDelta%5B1%5D"> the order relation). We may then begin our axiomatization by asking for a total order with distinct top and bottom elements.</li>
</ul>
<p>However, satisfying this assumption only guarantees that we are working in some topos equipped with a geometric morphism to the topos we intended to work in; we need something else to guarantee that this geometric morphism is the identity. Now, inverse images of geometric morphisms preserve the interpretations of all positive formulas (because they preserve finite limits and infinite colimits, and these suffice to interpret any positive formula), so that any <em>positive</em> formula which is true of the universal model is true of all models in all toposes; conversely, every positive formula which is true of the universal model is <em>positively provable</em> (see, e.g.&nbsp;<a href="https://arxiv.org/abs/0906.3061">Theorem 2.4 of this paper</a>. Therefore, whatever extra axioms we need to take, they can’t be positive. The special features of the universal model are <em>negative</em>.<sup>15</sup></p>
<p>Some of these negative properties have been known for a long time. For example, <a href="">Kock remarked in 197?</a> that the affine line in the big Zariski topos (the universal local ring) is in fact a <em>field</em>: every non-zero element has an inverse. This is a negative property because it is an implication with an implication in the antecedent:</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A(0%20=%20x)%20%5CRightarrow%20%5Cbot%20%5C,%5Cvdash%5C,%20%5Cexists%20y.%20xy%20=%201.%0A"></p>
<p>In his thesis, Bechschmidt extended the Kock-Lawvere axiom to his <em>synthetic quasi-coherence</em> axiom and observes that it suffices to prove all known negative properties about the affine line, including that it is a field. But Blechschmidt doesn’t stop there. In <em><a href="https://github.com/iblech/internal-methods/blob/master/paper-qcoh.pdf">qcoh</a></em>, he isolates a general axiom scheme which suffices to prove <em>every</em> special property of the universal model <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D"> of a geometric theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">. He calls this his <em>general nullstellensatz</em>, though I believe it should be called <em>quasi-coherent definability</em>.</p>
<p>The idea is simple and obviously wrong: what if every proposition concerning the universal model were positively definable, and every true proposition provable? Any true proposition about the universal model — even the weird negative ones — would follow from this axiom scheme and the assumption that <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D"> was a model of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">.</p>
<p>Of course, this axiom scheme can’t hold. Blechschmidt’s genius in <em><a href="https://github.com/iblech/internal-methods/blob/master/paper-qcoh.pdf">qcoh</a></em> is to find a restricted version of it which does. Suppose <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> is a positive theory (in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">); we can then pull it back to get a positive theory <img src="https://latex.codecogs.com/png.latex?%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D"> in the classifying topos <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D">. We can then form a new theory, the <em>slice theory</em> <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D"> by adding in constant terms <img src="https://latex.codecogs.com/png.latex?c(e)"> for every <img src="https://latex.codecogs.com/png.latex?e%20:%20U_%5Cmathbb%7BT%7D"> (of the correct sorts, when <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> is multi-sorted). This is the theory of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">-homorphisms out of <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D">; its classifying topos <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D%5BU_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%20%5Cmathbb%7BT%7D%5D"> is, externally, the morphism <img src="https://latex.codecogs.com/png.latex?d%20:%20%5Cmathsf%7BSet%7D%5B%5Cmathsf%7BHom%7D_%7B%5Cmathbb%7BT%7D%7D%5D%20%5Cto%20%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D"> from the classifying topos for <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">-homomorphisms to the classifying topos of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> which classifies the domain of the universal homomorphism.</p>
<p>This is a special sort of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D">-theory, since it only ever uses <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">-indexed disjunctions.<sup>16</sup> Blechschmidt calls these “geometric* theories”, but I will call them <em>quasi-coherent</em> theories on account of the following analogy: a theory is <em>coherent</em> when it only uses <em>finitary</em> disjunctions, and a sheaf of modules is <em>coherent</em> when it is locally of finite presentation<sup>17</sup>; a sheaf is <em>quasi-coherent</em> when it is locally of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">-indexed presentation; so, a theory is <em>quasi-coherent</em> when it only uses <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">-indexed disjunctions.<sup>18</sup></p>
<p>Blechschmidt’s updated axiom scheme (see Theorem 5.2 of <a href="https://github.com/iblech/internal-methods/blob/master/paper-qcoh.pdf"><em>qcoh</em></a>) is then that (in the internal logic of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D">):</p>
<ol type="1">
<li><p>For every context <img src="https://latex.codecogs.com/png.latex?%5CGamma"> of <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cmathbb%7BT%7D">, and any suboject <img src="https://latex.codecogs.com/png.latex?P%20%5Csubseteq%20%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5CGamma)"> of the interpretation of that context at the identity morphism <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bid%7D%20:%20U_%7B%5Cmathbb%7BT%7D%7D%20%5Cto%20U_%7B%5Cmathbb%7BT%7D%7D"> (which is a model of the slice theory <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D">), there is a <em>quasi-coherent</em> formula <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5Cvdash%20%5Cvarphi"> in the slice theory whose interpretation at the identity is <img src="https://latex.codecogs.com/png.latex?P">: every subset of the universal model is quasi-coherently definable in the slice theory.</p></li>
<li><p>Let <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5Cvdash%20%5Cvarphi"> be a quasi-coherent formula in the slice theory. Then its interpretation <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5Cvarphi)%20%5Csubseteq%20%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5CGamma)"> at the identity of <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D"> holds (that is, <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5Cvarphi)%20=%20%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5CGamma)">) if and only if <img src="https://latex.codecogs.com/png.latex?%5Cvarphi"> is provable in the slice theory.</p></li>
</ol>
<p>These two axioms suffice to show that the sheaf of quasi-coherent formulas in context <img src="https://latex.codecogs.com/png.latex?%5CGamma"> in the slice theory, modulo provable equivalence, is isomorphic to the sheaf of subsheaves of the interpretation of <img src="https://latex.codecogs.com/png.latex?%5CGamma"> at the identity of <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D">. This really is a universal axiom scheme (Theorem 1.2 of <em>ibid.</em>) for first-order statements about the universal model: if <img src="https://latex.codecogs.com/png.latex?%5Cvarphi"> is a first-order formula, then we can interpret it as a subobject of the universal model; it is therefore quasi-coherently definable by the axiom scheme, and is true if and only if it is provable.</p>
<p>Blechschmidt uses a delicate forcing argument to prove that this axiom scheme holds for any theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">. The aim of this blog post is to liberate <em>quasi-coherent definability</em> from these sorts of forcing arguments.</p>
</section>
<section id="dreaming-of-homotopy-types" class="level1" data-number="4">
<h1 data-number="4"><span class="header-section-number">4</span> Dreaming of homotopy types</h1>
<p>The difficulty with forcing argument is that they are highly reliant on syntax. This is not so awful when we’re trying to prove theorems about 1-toposes where syntax means first order logic (though, it’s <em>a little</em> awful). But it becomes haltingly difficult when we want to reason about higher toposes, where syntax means “homotopy type theory” and general coherence issues must be taken into account.</p>
<p>Let’s start by sketching a generalization of Blechschmidt’s scheme from logic to types. The main idea of <a href="https://ncatlab.org/nlab/show/propositions+as+types">propositions as types</a> is that propositions are the <img src="https://latex.codecogs.com/png.latex?(-1)">-truncated types of mathematical objects. Accordingly, we have the following analogy:</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Level</th>
<th>Syntax</th>
<th>Semantics</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><img src="https://latex.codecogs.com/png.latex?-1"></td>
<td>Formula</td>
<td>Proposition</td>
</tr>
<tr class="even">
<td><img src="https://latex.codecogs.com/png.latex?-1"></td>
<td>Proof</td>
<td>Truth</td>
</tr>
<tr class="odd">
<td><img src="https://latex.codecogs.com/png.latex?%5Cinfty"></td>
<td>Definition</td>
<td>Type</td>
</tr>
<tr class="even">
<td><img src="https://latex.codecogs.com/png.latex?%5Cinfty"></td>
<td>Term</td>
<td>Element</td>
</tr>
</tbody>
</table>
<p>I am using “definition” and “term”<sup>19</sup> here for the syntactic analogue of “type” and “element”, taking the role of “formula” and “proof” in relation to “proposition” and “truth”. We might say then that the <em>quasi-coherent definability</em> axiom scheme, in a highly conjectural setting, is that for any positive homotopy type theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> internal to the <img src="https://latex.codecogs.com/png.latex?%5Cinfty">-topos of homotopy types <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BHo%7D"> (“positive” in the sense of involving only <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BHo%7D">-indexed higher inductive types (which include the unit, <img src="https://latex.codecogs.com/png.latex?%5CSigma">, <img src="https://latex.codecogs.com/png.latex?=">, and all <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BHo%7D">-indexed colimits), and no negative types like functions or universes),</p>
<ol type="1">
<li><p>For any context <img src="https://latex.codecogs.com/png.latex?%5CGamma"> of <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D"> and any type family <img src="https://latex.codecogs.com/png.latex?X%20:%20%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5CGamma)%20%5Cto%20%5Cmathsf%7BType%7D">, there is a quasi-coherent definition <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5Cvdash%20C"> in the slice theory which interprets to <img src="https://latex.codecogs.com/png.latex?X">.</p></li>
<li><p>For any element <img src="https://latex.codecogs.com/png.latex?x%20:%20%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(%5CGamma)%20%5Cvdash%20f(x)%20:%20%5Cmathsf%7Bid%7D_%7BU_%7B%5Cmathbb%7BT%7D%7D%7D(C)">, there is a quasi-coherent term <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5Cvdash%20t%20:%20C"> which interprets to <img src="https://latex.codecogs.com/png.latex?f">.</p></li>
</ol>
<p>Now, a definition should be quasi-coherent if it only uses <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BHo%7D">-indexed higher inductive types, and not <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BHo%7D%5B%5Cmathbb%7BT%7D%5D">-indexed higher inductive types.</p>
<p>Mitchell Riley and I have been chatting for years about <em>quasi-coherent definability</em>. Mitchell observed that it really looks like some sort of path induction principle (itself a form of the Yoneda lemma): To do something for a general map (model of the slice theory), it suffices to do it at the identity. Mitchell and I call this conjectural induction principle <em>quasi-coherent induction</em>, and we’ve been dreaming about a type theory which would interpret into <em>all</em> toposes and for which the axiom scheme would become a <em>rule</em>. More about this later in the blog post.</p>
<p>For now, the scaffolding to work syntactically with internal homotopy type theories doesn’t quite exist (though <a href="https://arxiv.org/abs/2205.00798">Uemura-Nguyen <img src="https://latex.codecogs.com/png.latex?%5Cinfty">-type theories might help</a>). For that reason, let me turn to semantics.</p>
</section>
<section id="liberating-synthetic-quasi-coherence-from-syntax" class="level1" data-number="5">
<h1 data-number="5"><span class="header-section-number">5</span> Liberating <em>synthetic quasi-coherence</em> from syntax</h1>
<p>In this section, I want to liberate quasi-coherent definability from syntax. In fact, I will show that it follows from a delightfully simple lifting property first observed by Ivan Di Liberti in his <a href="https://arxiv.org/abs/2211.03104">enlightening exegesis of coherent toposes and ultrastructures</a>. This lifting property will also make it clear that we really are dealing with a form of <em>directed path induction for toposes</em>.</p>
<p>The lifting property we will need appears as Theorem 1.3.1 of Di Liberti’s <a href="https://arxiv.org/abs/2211.03104">paper on coherent toposes</a>. It is so clean that I will prove it here in its entirety; this will also make it clear that it should hold just as well for <img src="https://latex.codecogs.com/png.latex?%5Cinfty">-toposes.<sup>20</sup></p>
<p>We work over an arbitary base topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">, which I will just call the topos of “base types”. In the world of higher toposes, <a href="https://arxiv.org/abs/2303.06437">Martini and Wolf have been working out a theory of internal higher toposes</a>. I do not want to fuss with any details (including <em>actually subtle</em> size issues, and careful internalization) in this blog post, so please regard all the rest as conjectural.</p>
<p>Let <img src="https://latex.codecogs.com/png.latex?%5Ckappa"> be a <img src="https://latex.codecogs.com/png.latex?%5CSigma">-closed sub-universe of a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D"> — a “regular cardinal”.</p>
<div id="def-kappa-presentable" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 1</strong></span> A <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-presentable if it admits a free, <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-ary presentation: a geometric embedding <img src="https://latex.codecogs.com/png.latex?j%20:%20%5Cmathcal%7BX%7D%20%5Chookrightarrow%20%5Cmathcal%7BB%7D%5BC%5D"> into a topos of presheaves on a(<img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-)category <img src="https://latex.codecogs.com/png.latex?C"> with finite limits with <img src="https://latex.codecogs.com/png.latex?j_%7B%5Cast%7D"> <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-accessible: <img src="https://latex.codecogs.com/png.latex?j_%7B%5Cast%7D"> preserves <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-filtered colimits. That is, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-presentable if it admits a presentation as sheaves on a category with finite limits, and <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-filtered colimits of sheaves, computed in presheaves, are still sheaves.</p>
</div>
<div id="def-flat" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 2</strong></span> A map <img src="https://latex.codecogs.com/png.latex?i%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BF%7D"> of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-toposes is <em><img src="https://latex.codecogs.com/png.latex?%5Ckappa">-flat</em> when <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> preserves <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-indexed colimits.</p>
</div>
<p>We now prove Di Liberti’s theorem:</p>
<div id="thm-di-liberti" class="theorem">
<p><span class="theorem-title"><strong>Theorem 1</strong></span> <em>(Di Liberti).</em> Let <img src="https://latex.codecogs.com/png.latex?i%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BF%7D"> be <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-flat. Then every <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-presentable topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <em>weakly right Kan injective</em> against <img src="https://latex.codecogs.com/png.latex?i">; if <img src="https://latex.codecogs.com/png.latex?i"> is an embedding, then <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <em>right Kan injective</em> against <img src="https://latex.codecogs.com/png.latex?i">:</p>
<ul>
<li><p>For any <img src="https://latex.codecogs.com/png.latex?x%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BX%7D">, there exists a geometric morphism <img src="https://latex.codecogs.com/png.latex?r_x%20:%20%5Cmathcal%7BF%7D%20%5Cto%20%5Cmathcal%7BX%7D"> and an 2-cell <img src="https://latex.codecogs.com/png.latex?%5Cvarphi%20:%20r_x%20i%0A%5CRightarrow%20x"> exhibiting <img src="https://latex.codecogs.com/png.latex?r_x"> as the right Kan extension of <img src="https://latex.codecogs.com/png.latex?x"> along <img src="https://latex.codecogs.com/png.latex?i">.</p></li>
<li><p>If <img src="https://latex.codecogs.com/png.latex?i"> is an embedding, then <img src="https://latex.codecogs.com/png.latex?%5Cvarphi"> is an isomorphism.</p></li>
</ul>
</div>
<div class="proof">
<p><span class="proof-title"><em>Proof</em>. </span>Consider a <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-ary presentation <img src="https://latex.codecogs.com/png.latex?j%20:%20%5Cmathcal%7BX%7D%20%5Chookrightarrow%20%5Cmathcal%7BB%7D%5BC%5D">. Consider <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D%20:%20%5Cmathcal%7BF%7D%20%5Cto%20%5Cmathcal%7BB%7D%5BC%5D"> determined by the lex functor <img src="https://latex.codecogs.com/png.latex?C%20%5Cxrightarrow%7By%7D%20%5Cmathcal%7BB%7D%5BC%5D%20%5Cxrightarrow%7Bj%5E%7B%5Cast%7D%7D%20%5Cmathcal%7BX%7D%20%5Cxrightarrow%7Bx%5E%7B%5Cast%7D%7D%20%5Cmathcal%7BE%7D%20%5Cxrightarrow%7Bi_%7B%5Cast%7D%7D%20%5Cmathcal%7BF%7D">. That is, <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D%5E%7B%5Cast%7D%20=%20%5Cmathsf%7Blan%7D_%7By%7D(i_%7B%5Cast%7Dx%5E%7B%5Cast%7Dj%5E%7B%5Cast%7Dy)">, and <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D_%7B%5Cast%7D%20=%20%5Cmathsf%7Blan%7D_%7B%5Chat%7Bx%7D%5E%7B%5Cast%7D%7D(1)"> is its right adjoint. It remains to show that <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D"> descends to sheaves, or that <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D_%7B%5Cast%7D%20=%20j_%7B%5Cast%7Dj%5E%7B%5Cast%7D%5Chat%7Bx%7D_%7B%5Cast%7D">. For this, we need to compute <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D_%7B%5Cast%7D"> with some Kan-fu:</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0A%5Chat%7Bx%7D_%7B%5Cast%7D%20&amp;=%20%5Cmathsf%7Blan%7D_%7B%5Chat%7Bx%7D%5E%7B%5Cast%7D%7D(1)%20%5C%5C%0A&amp;=%20%5Cmathsf%7Blan%7D_%7B%5Chat%7Bx%7D%5E%7B%5Cast%7D%7D(%5Cmathsf%7Blan%7D_y%20y)%20%5C%5C%0A&amp;=%20%5Cmathsf%7Blan%7D_%7B%5Chat%7Bx%7D%5E%7B%5Cast%7Dy%7D(y)%20%5C%5C%0A&amp;=%20%5Cmathsf%7Blan%7D_%7B%5Cmathsf%7Blan%7D_%7By%7D(i_%7B%5Cast%7Dx%5E%7B%5Cast%7Dj%5E%7B%5Cast%7Dy)y%7D(y)%20%5C%5C%0A&amp;=%20%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7Dx%5E%7B%5Cast%7Dj%5E%7B%5Cast%7Dy%7D(y)%5C%5C%0A&amp;=%20%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7Dx%5E%7B%5Cast%7Dj%5E%7B%5Cast%7D%7D(%5Cmathsf%7Blan%7D_y%20y)%20%5C%5C%0A&amp;=%20%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(j_%7B%5Cast%7Dx_%7B%5Cast%7D)%0A%5Cend%7Baligned%7D%0A"></p>
<p>Therefore, <img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0Aj_%7B%5Cast%7Dj%5E%7B%5Cast%7D%5Chat%7Bx%7D_%7B%5Cast%7D%20&amp;=%20j_%7B%5Cast%7Dj%5E%7B%5Cast%7D%20%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(j_%7B%5Cast%7Dx_%7B%5Cast%7D)%20%5C%5C%0A&amp;=%20j_%7B%5Cast%7D%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(j%5E%7B%5Cast%7D%20j_%7B%5Cast%7Dx_%7B%5Cast%7D)%20%5C%5C%0A&amp;=%20j_%7B%5Cast%7D%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(x_%7B%5Cast%7D)%20%5C%5C%0A(!)%20&amp;=%20%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(j_%7B%5Cast%7Dx_%7B%5Cast%7D)%20%5C%5C%0A&amp;=%20%5Chat%7Bx%7D_%7B%5Cast%7D%0A%5Cend%7Baligned%7D%0A"> This only one of these steps which isn’t abstract nonsense is the one marked by (!). This follows because <img src="https://latex.codecogs.com/png.latex?j_%7B%5Cast%7D"> preserves <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-filtered colimits, and the Kan extension on the right can be expressed as the colimit <img src="https://latex.codecogs.com/png.latex?%0A%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(x_%7B%5Cast%7D)%20=%20%5Cmathsf%7Bcolim%7D(i_%7B%5Cast%7D%20%5Cdownarrow%20%5Cmathcal%7BF%7D%20%5Cto%20%5Cmathcal%7BE%7D%20%5Cxrightarrow%7Bj_%7B%5Cast%7Dx_%7B%5Cast%7D%7D%20%5Cmathcal%7BB%7D%5BC%5D)%0A"> Since <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> preserves <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-ary colimits, the slice category <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D%20%5Cdownarrow%20%5Cmathcal%7BF%7D"> is <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-filtered, and so this colimit is preserved by <img src="https://latex.codecogs.com/png.latex?j_%7B%5Cast%7D">. This shows that <img src="https://latex.codecogs.com/png.latex?%5Chat%7Bx%7D%20:%20%5Cmathcal%7BF%7D%20%5Cto%20%5Cmathcal%7BB%7D%5BC%5D"> actually lands in sheaves, giving us <img src="https://latex.codecogs.com/png.latex?r_x%20:%20%5Cmathcal%7BF%7D%20%5Cto%20%5Cmathcal%7BX%7D">; it is straightforward then to check that this is indeed a right Kan extension of geometric morphisms with comparison 2-cell coming from the computation of the direct image as a left Kan extension. Finally, if <img src="https://latex.codecogs.com/png.latex?i"> is an embedding, then <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> is fully faithful and therefore the comparison 2-cell of <img src="https://latex.codecogs.com/png.latex?(r_x)_%7B%5Cast%7D%20=%20%5Cmathsf%7Blan%7D_%7Bi_%7B%5Cast%7D%7D(j_%7B%5Cast%7Dx_%7B%5Cast%7D)"> is an isomorphism.</p>
</div>
<p>Now, let’s free our minds from various internalization anxieties such as the fact that regular cardinals aren’t stable under inverse image and define a <em>quasi-coherent topos</em>.</p>
<div id="def-quasi-coherent-topos" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 3</strong></span> Let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> be a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-topos. An <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <em>quasi-coherent</em> when it is <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-presentable over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> for a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-cardinal <img src="https://latex.codecogs.com/png.latex?%5Ckappa">. For emphasis, this means that <img src="https://latex.codecogs.com/png.latex?j%20:%20%5Cmathcal%7BX%7D%20%5Chookrightarrow%20%5Cmathcal%7BE%7D%5BC%5D"> for <img src="https://latex.codecogs.com/png.latex?C"> an <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-category with finite limits where <img src="https://latex.codecogs.com/png.latex?j_%7B%5Cast%7D"> preserves <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-filtered colimits for some <img src="https://latex.codecogs.com/png.latex?%5Ckappa%20%5Cin%20%5Cmathcal%7BB%7D">.<sup>21</sup></p>
</div>
<div id="def-quasi-coherent-topos-map" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 4</strong></span> A map <img src="https://latex.codecogs.com/png.latex?f%20:%20%5Cmathcal%7BX%7D%20%5Cto%20%5Cmathcal%7BY%7D"> between quasi-coherent <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-toposes is <em>quasi-coherent</em> when <img src="https://latex.codecogs.com/png.latex?f_%7B%5Cast%7D"> is <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-accessible (commutes with <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-filtered colimits) for <img src="https://latex.codecogs.com/png.latex?%5Ckappa"> a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-cardinal.</p>
</div>
<p>We might say that a quasi-coherent <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-topos is <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-locally of constant presentation. Note that if <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D%20=%20%5Cmathcal%7BE%7D">, then the definition trivializes: every <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-topos is <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-quasi-coherent, because any <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-filtered <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-category has a terminal object and so <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-filtered colimits are just given by evaluation at that terminal object.</p>
<p>Now for any <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">, we can form the <em>arrow topos</em> <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> (the arrow object in the 2-category of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-toposes). When <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%20=%20%5Cmathcal%7BB%7D%5B%5Cmathbb%7BT%7D%5D"> classifies models of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">, then <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20=%20%5Cmathcal%7BB%7D%5B%5Cmathsf%7BHom%7D_%7B%5Cmathbb%7BT%7D%7D%5D"> is the classifier for <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">-homomorphisms. Over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">, we have an adjoint triple <img src="https://latex.codecogs.com/png.latex?d%20%5Cdashv%20i%20%5Cdashv%20c%20:%20%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20%5Cto%20%5Cmathcal%7BE%7D"> where <img src="https://latex.codecogs.com/png.latex?d"> classifies the domain of the universal <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">-homomorphism, <img src="https://latex.codecogs.com/png.latex?c"> the codomain, and <img src="https://latex.codecogs.com/png.latex?i%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> the identity of the universal model of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">. This in particular means that <img src="https://latex.codecogs.com/png.latex?d_%7B%5Cast%7D%20=%20i%5E%7B%5Cast%7D"> and <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D%20=%20c%5E%7B%5Cast%7D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">.<sup>22</sup></p>
<p>However, we want to conclude a statement in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">’s internal logic, so we will need to consider <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> as a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-topos. I will always consider <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> as a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-topos via <img src="https://latex.codecogs.com/png.latex?d">, and <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> as a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">-topos via <img src="https://latex.codecogs.com/png.latex?i">. Note that <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> can view itself as an <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> topos, since <img src="https://latex.codecogs.com/png.latex?di%20=%20%5Cmathsf%7Bid%7D_%7B%5Cmathcal%7BE%7D%7D">: <img src="https://latex.codecogs.com/png.latex?i"> is an <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-point of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">.</p>
<p>On the other hand, <img src="https://latex.codecogs.com/png.latex?c%20:%20%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20%5Cto%20%5Cmathcal%7BE%7D"> doesn’t exist over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> or <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">. But it still leaves a trace. All that remains of <img src="https://latex.codecogs.com/png.latex?c">, from <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">’s point of view, are the following two facts:</p>
<ol type="1">
<li><p><img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> preserves <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-indexed colimits (because it has a right adjoint <img src="https://latex.codecogs.com/png.latex?c_%7B%5Cast%7D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">).</p></li>
<li><p><img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> takes values in <img src="https://latex.codecogs.com/png.latex?%5Cbeta">-presentable objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> for some <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-cardinal <img src="https://latex.codecogs.com/png.latex?%5Cbeta"> (because <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D%20%5Cdashv%20c_%7B%5Cast%7D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">, and <img src="https://latex.codecogs.com/png.latex?c_%7B%5Cast%7D"> is a right adjoint between <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-presentable categories and so is <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-accessible).<sup>23</sup></p></li>
</ol>
<p>We are now ready to prove <em>quasi-coherent induction</em>.</p>
<div id="thm-quasi-coherent-induction" class="theorem">
<p><span class="theorem-title"><strong>Theorem 2</strong></span> <em>(Quasi-coherent induction).</em> Let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> be any <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-topos. For any quasi-coherent <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">-topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D">, there is an <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">-equivalence between (the <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">-category of) maps <img src="https://latex.codecogs.com/png.latex?x%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BX%7D"> and quasi-coherent maps <img src="https://latex.codecogs.com/png.latex?r%20:%20%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20%5Cto%20%5Cmathcal%7BX%7D"> given by <img src="https://latex.codecogs.com/png.latex?r%20%5Cmapsto%20ri"> and <img src="https://latex.codecogs.com/png.latex?x%20%5Cmapsto%20%5Cmathsf%7Bran%7D_i%20x">.</p>
<!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhjYWx7RX0iXSxbMSwwLCJcXG1hdGhjYWx7WH0iXSxbMCwxLCJcXG1hdGhjYWx7RX1ee1xccGl0Y2hmb3JrfSJdLFsxLDEsIlxcbWF0aGNhbHtFfV57XFxwaXRjaGZvcmt9Il0sWzIsMywiIiwwLHsibGV2ZWwiOjIsInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbMSwzXSxbMCwyLCJpIiwyXSxbMCwxLCJ4Il0sWzIsMSwiciIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dXQ== -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhjYWx7RX0iXSxbMSwwLCJcXG1hdGhjYWx7WH0iXSxbMCwxLCJcXG1hdGhjYWx7RX1ee1xccGl0Y2hmb3JrfSJdLFsxLDEsIlxcbWF0aGNhbHtFfV57XFxwaXRjaGZvcmt9Il0sWzIsMywiIiwwLHsibGV2ZWwiOjIsInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbMSwzXSxbMCwyLCJpIiwyXSxbMCwxLCJ4Il0sWzIsMSwiciIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dXQ==&amp;embed" width="304" height="304" style="border-radius: 8px; border: none;">
</iframe>
</div>
<div class="proof">
<p><span class="proof-title"><em>Proof</em>. </span>Since <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> has a right adjoint <img src="https://latex.codecogs.com/png.latex?c_%7B%5Cast%7D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">, it preserves all <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-colimits, and since <img src="https://latex.codecogs.com/png.latex?di%20=%20%5Cmathsf%7Bid%7D_%7B%5Cmathcal%7BE%7D%7D">, it is an embedding. Therefore, Di Liberti’s theorem (over the base <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">) shows that maps <img src="https://latex.codecogs.com/png.latex?x%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BX%7D"> form a coreflective subcategory of maps <img src="https://latex.codecogs.com/png.latex?r%20:%20%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20%5Cto%20%5Cmathcal%7BX%7D"> via right Kan extension.</p>
<p>It therefore suffices to show that <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bran%7D_i%20x"> is quasi-coherent for all <img src="https://latex.codecogs.com/png.latex?x">. We know that <img src="https://latex.codecogs.com/png.latex?(%5Cmathsf%7Bran%7D_i%20x)_%7B%5Cast%7D%20=%20%5Cmathsf%7Blan%7D_%7Bi_%5Cast%7D(j_%7B%5Cast%7Dx_%7B%5Cast%7D)">. Now, <a href="https://mathoverflow.net/a/112206/491543"><img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Blan%7D_%7Bi_%5Cast%7D(j_%7B%5Cast%7Dx_%7B%5Cast%7D)"> preserves all colimits preserved by <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D(i_%7B%5Cast%7D%20X,%20-)"> for all <img src="https://latex.codecogs.com/png.latex?X%20%5Cin%20%5Cmathcal%7BE%7D"></a>, and this includes all <img src="https://latex.codecogs.com/png.latex?%5Cbeta">-filtered colimits for some <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-cardinal <img src="https://latex.codecogs.com/png.latex?%5Cbeta"> because <img src="https://latex.codecogs.com/png.latex?i_%7B%5Cast%7D"> takes value in the <img src="https://latex.codecogs.com/png.latex?%5Ckappa">-presentable objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">.</p>
</div>
<p>Let’s now deduce <em>quasi-coherent definability</em> from <em>quasi-coherent induction</em>.</p>
<p><strong>Corollary</strong> <em>(Quasi-coherent definability).</em> For any <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">, let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%20:=%20%5Cmathcal%7BB%7D%5B%5Cmathbb%7BT%7D%5D">. Then it is true internally to <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> that</p>
<ol type="1">
<li><p>Every object of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> is quasi-coherently presentable (i.e.&nbsp;definable) in the slice theory <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D">.</p></li>
<li><p>Every element of every object is quasi-coherently definable in the slice theory <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D">.</p></li>
</ol>
<div class="proof">
<p><span class="proof-title"><em>Proof</em>. </span><em>(Sketch).</em> We will take for granted that quasi-coherence is stable under base change.<sup>24</sup> Therefore, <img src="https://latex.codecogs.com/png.latex?d%5E%7B%5Cast%7D%20%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D%5D"> is a quasi-coherent <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">-topos, and we may take this for <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> in the theorem above. Maps <img src="https://latex.codecogs.com/png.latex?x%20:%20%5Cmathcal%7BE%7D%20%5Cto%20d%5E%7B%5Cast%7D%20%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D%5D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> are equivalent to maps <img src="https://latex.codecogs.com/png.latex?%5Cpi_%7B%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D%5D%7Dx%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D%5D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> since <img src="https://latex.codecogs.com/png.latex?di%20=%20%5Cmathsf%7Bid%7D_%7B%5Cmathcal%7BE%7D%7D">; these are <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">. On the other hand, maps <img src="https://latex.codecogs.com/png.latex?r%20:%20%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20%5Cto%20d%5E%7B%5Cast%7D%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D%5D"> correspond to maps <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D%20%5Cto%20%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D%5D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">; these are <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">. Quasi-coherent induction says that <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bran%7D_%7Bi%7D"> gives an equivalence between <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> and quasi-coherent <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D">.</p>
<p>Let <img src="https://latex.codecogs.com/png.latex?%5Cbeta%20%5Cin%20%5Cmathcal%7BB%7D"> be such that <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bran%7D_i%20x"> is <img src="https://latex.codecogs.com/png.latex?%5Cbeta">-presentable in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> for any <img src="https://latex.codecogs.com/png.latex?x%20%5Cin%20%5Cmathcal%7BE%7D">. By an analogue of the results in D.3.3 of <em>the Elephant</em>, such an object <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bran%7D_i%20x"> is representable in the <img src="https://latex.codecogs.com/png.latex?%5Cbeta">-coherent site of presentation of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">; this is the <img src="https://latex.codecogs.com/png.latex?%5Cbeta">-coherent syntactic category of the slice theory <img src="https://latex.codecogs.com/png.latex?U_%7B%5Cmathbb%7BT%7D%7D%20%5Cdownarrow%20%5Cgamma%5E%7B%5Cast%7D%5Cmathbb%7BT%7D">, showing that <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Bran%7D_i%20x"> is <img src="https://latex.codecogs.com/png.latex?%5Cbeta">-coherently definable.</p>
<p>To deduce the second claim, run the argument again but taking <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D%20=%20d%5E%7B%5Cast%7D%5Cmathcal%7BE%7D%5B%5Cmathbb%7BO%7D_%7B%5Cbullet%7D%5D"> to be the classifier for pointed objects.</p>
</div>
</section>
<section id="the-internal-logic-of-all-toposes" class="level1" data-number="6">
<h1 data-number="6"><span class="header-section-number">6</span> The internal logic of all toposes</h1>
<p>Quasi-coherent induction resembles path induction in that both <a href="https://home.sandiego.edu/~shulman/hottminicourse2012/03models-handout2up.pdf">express a lifting property of some class of display maps against the inclusion of constants into a sort of path object</a>:</p>
<!-- https://q.uiver.app/#q=WzAsOCxbMCwwLCJcXG1hdGhjYWx7RX0iXSxbMSwwLCJcXG1hdGhjYWx7WH0iXSxbMCwxLCJcXG1hdGhjYWx7RX1ee1xccGl0Y2hmb3JrfSJdLFsxLDEsIlxcbWF0aGNhbHtFfV57XFxwaXRjaGZvcmt9Il0sWzMsMCwiQSJdLFszLDEsIkFeSSJdLFs0LDAsIlgiXSxbNCwxLCJBXkkiXSxbMiwzLCIiLDAseyJsZXZlbCI6Miwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFsxLDMsIlxcbWF0aHNme3Fjb2h9Il0sWzAsMiwiaSIsMl0sWzAsMSwieCJdLFsyLDEsIiIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFs1LDcsIiIsMix7ImxldmVsIjoyLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzQsNSwiXFxtYXRoc2Z7cmVmbH0iLDJdLFs0LDYsIngiXSxbNiw3XSxbNSw2LCJcXG1hdGhzZntKfSIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dXQ== -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsOCxbMCwwLCJcXG1hdGhjYWx7RX0iXSxbMSwwLCJcXG1hdGhjYWx7WH0iXSxbMCwxLCJcXG1hdGhjYWx7RX1ee1xccGl0Y2hmb3JrfSJdLFsxLDEsIlxcbWF0aGNhbHtFfV57XFxwaXRjaGZvcmt9Il0sWzMsMCwiQSJdLFszLDEsIkFeSSJdLFs0LDAsIlgiXSxbNCwxLCJBXkkiXSxbMiwzLCIiLDAseyJsZXZlbCI6Miwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFsxLDMsIlxcbWF0aHNme3Fjb2h9Il0sWzAsMiwiaSIsMl0sWzAsMSwieCJdLFsyLDEsIiIsMix7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dLFs1LDcsIiIsMix7ImxldmVsIjoyLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzQsNSwiXFxtYXRoc2Z7cmVmbH0iLDJdLFs0LDYsIngiXSxbNiw3XSxbNSw2LCJcXG1hdGhzZntKfSIsMSx7InN0eWxlIjp7ImJvZHkiOnsibmFtZSI6ImRhc2hlZCJ9fX1dXQ==&amp;embed" width="688" height="304" style="border-radius: 8px; border: none;">
</iframe>
<p>As in cubical approaches to homotopy type theory, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5Cpitchfork%7D"> is a space of functions from an interval object: specfically, the <a href="https://ncatlab.org/nlab/show/Sierpinski+topos"><em>Sierpinski topos</em></a> which classifies <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BB%7D">-propositions.</p>
<p>If we had a type theory where contexts were interepreted as <em>toposes</em> (and not just objects of a fixed topos), then we could potentially express <em>quasi-coherent induction</em> as an induction principle. If we could also express all the ordinary type theory constructions <em>in</em> a particular topos (considered as the toposes etale over that particular one), then we could have a type theory where <em>synthetic quasi-coherence</em> was provable and not an axiom, for any sort of synthetic mathematics what-so-ever. Mitchell and I have been calling such a potential type theory “theory type theory” or “<img src="https://latex.codecogs.com/png.latex?%5B%5Cmathbb%7BT%7D%5D%5Cmathsf%7BTT%7D">”.</p>
<p>Such a type theory would have a number of benefits for synthetic mathematics. First, of course, is that <em>synthetic quasi-coherence</em> should become provable, rather than an axiom. But also, the ability to jump between toposes in the middle of an argument promises a resolution to one of the curious problems of homotopy type theory: despite the fact that all types are now implicitly homotopy types, much of <em>homotopical mathematics</em> (“<a href="https://ncatlab.org/nlab/show/brave+new+algebra">brave new algebra</a>”) becomes impossibly difficult because combinatorial methods become infeasibly littered with coherence conditions. With a type theory that interprets into all toposes, we could just jump into the topos of simplicial objects of our current topos whenever we wanted to make a simplicial (or categorical) argument.<sup>25</sup> I want to give a very rough sketch of what such a type theory could look like.</p>
<p>Here at the Topos Institute, we are interested in <a href="https://topos.institute/blog/2024-10-31-declarative-models-and-collaborative-modeling/">declarative modelling</a>: first, the modeller <em>schematizes</em> their models, defining the <em>theory</em> what it means to be a model (this is also known as <a href="https://en.wikipedia.org/wiki/Metamodeling"><em>metamodelling</em></a>). Then they develop models within that schema. And then they analyze those models computationally. By making the model description explicit, it becomes clear how we could change the model when analysis conflicts with our data or intentions; by making the theory explicit, we extend this fleetness of thought to a change in modelling paradigms.</p>
<p>Declarative modelling underlies the <a href="https://arxiv.org/abs/2005.04831">modelling approach</a> of the <a href="https://www.algebraicjulia.org">Algebraic Julia project</a>, where one first schematizes using a <a href="https://arxiv.org/abs/2404.04837"><em>generalized algebraic theory</em> (GAT)</a>, potentially including base-type valued <a href="https://blog.algebraicjulia.org/post/2020/10/acset-theory/"><em>attributes</em></a>. Generalized algebraic theories correspond to the lex fragment of positive logic whose classifying toposes are the cofree toposes <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5BC%5D"> of presheaves on a finitely complete category <img src="https://latex.codecogs.com/png.latex?C">.<sup>26</sup></p>
<p>This approach to declarative modelling also underlies the design of <a href="https://topos.institute/blog/2024-10-02-introducing-catcolab/">CatColab</a>, where a theory is a <a href="https://arxiv.org/abs/2310.05384">cartesian double theory</a> and a model within that theory is expressed as a notebook in a structure editor (left below) and analyzed using general computations (right below):</p>
<div class="quarto-video"><video id="video_shortcode_videojs_video1" class="video-js vjs-default-skin vjs-fluid" controls="" preload="auto" data-setup="{}" title="Analyzing dynamics of a Lotka-Volterra model"><source src="small_lotka.mov"></video></div>
<p>At a very high level, then, the modelling task consists of defining a (positive) theory for models, presenting a model within that theory (via positive definitions), and then analyzing that model using general computation (using the <em>negative</em> notions of streams and functions). I have a lot more to say about this point of view, especially concerning the <em>development</em> of models and the <em>ecology of models</em> (to take a term from <a href="https://www.cs.usask.ca/people/faculty%20profiles/nathaniel-osgood.php">Nate Osgood</a>), but I think I’ll save this for another blog post.</p>
<p>Our own <a href="https://owenlynch.org">Owen Lynch</a> has come up with a 2-level type theory, <a href="https://www.youtube.com/watch?list=PLhgq-BqyZ7i4zZ9nAIcTQ3w6H0YBo8DR0&amp;v=Id-9XE5TsA8&amp;feature=youtu.be&amp;themeRefresh=1">“<em>Element Model Type Theory</em> (EMTT)”</a> for defining lex theories and their models, named after its four basic judgements. The theory has a simple presentation in the <a href="https://arxiv.org/abs/1406.3219">natural model style</a> which I will now include:</p>
<div id="def-emtt" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 5</strong></span> A natural model presentation <em>element model type theory</em> consists of:</p>
<ol type="1">
<li><p>A representable transformation <img src="https://latex.codecogs.com/png.latex?u_%7B%5Cbullet%7D%20:%20%5Cmathsf%7BEm%7D%20%5Cto%20%5Cmathsf%7BTy%7D"> expressing the judgement <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5Cvdash%20a%20:%20A"> that <img src="https://latex.codecogs.com/png.latex?a"> is an element of the type <img src="https://latex.codecogs.com/png.latex?A">. We suppose that this type theory supports a unit type, record (<img src="https://latex.codecogs.com/png.latex?%5CSigma">-)types, and identity types.</p></li>
<li><p>A representable transformation <img src="https://latex.codecogs.com/png.latex?u_%7B%5Ccirc%7D%20:%20%5Cmathsf%7BMod%7D%20%5Cto%20%5Cmathsf%7BThy%7D"> expressing the judgement <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5Cvdash%20M%20%5CvDash%20%5Cmathbb%7BT%7D"> that <img src="https://latex.codecogs.com/png.latex?M"> is a model of a theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">. We suppose this type theory supports a unit type and record types.</p></li>
<li><p>For any type <img src="https://latex.codecogs.com/png.latex?A">, we have a theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BE%7D%5Cmathsf%7Bl%7D(A)"> of elements of <img src="https://latex.codecogs.com/png.latex?A">, expressed as a pullback square:</p></li>
</ol>
<!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhzZntFbH0iXSxbMCwxLCJcXG1hdGhzZntUeX0iXSxbMSwwLCJcXG1hdGhzZntNb2R9Il0sWzEsMSwiXFxtYXRoc2Z7VGh5fSJdLFsxLDMsIlxcbWF0aGJie0V9XFxtYXRoc2Z7bH0iLDJdLFswLDEsInVfe1xcYnVsbGV0fSIsMl0sWzAsMiwiXFx1bGNvcm5lciAtIFxcdXJjb3JuZXIiXSxbMiwzLCJ1X3tcXGNpcmN9Il0sWzAsMywiIiwxLHsic3R5bGUiOnsibmFtZSI6ImNvcm5lciJ9fV1d -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhzZntFbH0iXSxbMCwxLCJcXG1hdGhzZntUeX0iXSxbMSwwLCJcXG1hdGhzZntNb2R9Il0sWzEsMSwiXFxtYXRoc2Z7VGh5fSJdLFsxLDMsIlxcbWF0aGJie0V9XFxtYXRoc2Z7bH0iLDJdLFswLDEsInVfe1xcYnVsbGV0fSIsMl0sWzAsMiwiXFx1bGNvcm5lciAtIFxcdXJjb3JuZXIiXSxbMiwzLCJ1X3tcXGNpcmN9Il0sWzAsMywiIiwxLHsic3R5bGUiOnsibmFtZSI6ImNvcm5lciJ9fV1d&amp;embed" width="304" height="304" style="border-radius: 8px; border: none;">
</iframe>
<ol start="4" type="1">
<li>We have <img src="https://latex.codecogs.com/png.latex?%5CPi">-types for theories indexed by types: that is, theories <img src="https://latex.codecogs.com/png.latex?%5Cforall%20x%20:%20A.%5C,%20%5Cmathbb%7BT%7D(x)"> whose models are given by <img src="https://latex.codecogs.com/png.latex?A">-indexed families of models of the theories <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D(x)">.</li>
</ol>
<!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCIoQSA6IFxcbWF0aHNme1R5fSkgXFx0aW1lcyBcXG1hdGhzZntNb2R9XntBfSJdLFswLDEsIihBIDogXFxtYXRoc2Z7VHl9KSBcXHRpbWVzIFxcbWF0aHNme1RoeX1ee0F9Il0sWzEsMCwiXFxtYXRoc2Z7TW9kfSJdLFsxLDEsIlxcbWF0aHNme1RoeX0iXSxbMSwzLCJcXGZvcmFsbCIsMl0sWzAsMSwidV97XFxidWxsZXR9IiwyXSxbMCwyLCJcXGZvcmFsbCJdLFsyLDMsInVfe1xcY2lyY30iXSxbMCwzLCIiLDEseyJzdHlsZSI6eyJuYW1lIjoiY29ybmVyIn19XV0= -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCIoQSA6IFxcbWF0aHNme1R5fSkgXFx0aW1lcyBcXG1hdGhzZntNb2R9XntBfSJdLFswLDEsIihBIDogXFxtYXRoc2Z7VHl9KSBcXHRpbWVzIFxcbWF0aHNme1RoeX1ee0F9Il0sWzEsMCwiXFxtYXRoc2Z7TW9kfSJdLFsxLDEsIlxcbWF0aHNme1RoeX0iXSxbMSwzLCJcXGZvcmFsbCIsMl0sWzAsMSwidV97XFxidWxsZXR9IiwyXSxbMCwyLCJcXGZvcmFsbCJdLFsyLDMsInVfe1xcY2lyY30iXSxbMCwzLCIiLDEseyJzdHlsZSI6eyJuYW1lIjoiY29ybmVyIn19XV0=&amp;embed" width="467" height="304" style="border-radius: 8px; border: none;">
</iframe>
<ol start="5" type="1">
<li>Finally, as Owen likes to say, “the first rule of element model type theory is <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7Btype%7D%5C,%20%5Cmathsf%7Btheory%7D">”: we have a theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D%5Cmathsf%7Bype%7D"> of types.</li>
</ol>
<!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhzZntUeX0iXSxbMCwxLCJcXGFzdCJdLFsxLDAsIlxcbWF0aHNme01vZH0iXSxbMSwxLCJcXG1hdGhzZntUaHl9Il0sWzEsMywiXFxtYXRoYmJ7VH1cXG1hdGhzZnt5cGV9IiwyXSxbMCwxXSxbMCwyXSxbMiwzLCJ1X3tcXGNpcmN9Il0sWzAsMywiIiwxLHsic3R5bGUiOnsibmFtZSI6ImNvcm5lciJ9fV1d -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhzZntUeX0iXSxbMCwxLCJcXGFzdCJdLFsxLDAsIlxcbWF0aHNme01vZH0iXSxbMSwxLCJcXG1hdGhzZntUaHl9Il0sWzEsMywiXFxtYXRoYmJ7VH1cXG1hdGhzZnt5cGV9IiwyXSxbMCwxXSxbMCwyXSxbMiwzLCJ1X3tcXGNpcmN9Il0sWzAsMywiIiwxLHsic3R5bGUiOnsibmFtZSI6ImNvcm5lciJ9fV1d&amp;embed" width="304" height="304" style="border-radius: 8px; border: none;">
</iframe>
</div>
<p>This type theory is highly reminiscent of the multi-level type theories in <a href="https://andraskovacs.github.io/pdfs/phdthesis_compact.pdf">András Kovács’ extraordinary thesis</a>, which goes much further in the exploration of type theories for theories and their models.</p>
<p>Toposes over <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D"> are a model of EMTT, as presented above. We take the theories over a topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> to be the bounded geometric morphisms <img src="https://latex.codecogs.com/png.latex?%5Cgamma%20:%20%5Cmathcal%7BX%7D%20%5Cto%20%5Cmathcal%7BE%7D"> and we take the types over a topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> to be the <em>etale morphisms</em> <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%20%5Cdownarrow%20A%20%5Cto%20%5Cmathcal%7BE%7D">. The existence of <img src="https://latex.codecogs.com/png.latex?%5CPi">-theories over types comes from the exponentiability of etale maps, proved in B4.3.1 of <em>the Elephant</em>.</p>
<p>We could then add to the above rules all higher inductive types to <img src="https://latex.codecogs.com/png.latex?u_%7B%5Cbullet%7D">, since these are all stable under inverse image of geometric morphisms (they are <em>positive</em>). Indeed, such higher inductive types eliminate into all toposes, since <a href="https://arxiv.org/abs/2506.10431">colimits of etale maps are etale</a>. To get negative types, and to express <em>quasi-coherence</em>, we need to keep track of the difference between a general extension and an etale extension. Etale maps preserve both positive and negative types; they are <em>logical</em>. Indeed, in higher topos theory, preserving functions and universes characterizes the etale maps (see Proposition 5.10 of <a href="https://arxiv.org/abs/2506.10431"><em>ibid.</em></a>).</p>
<p>Rather than add negative types in one-by-one, we can add in a single negative type former that suffices to construct all of them (I contend): <em>model universes</em> <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BM%7D%5Cmathsf%7Bod%7D(%5Cmathbb%7BT%7D)">. If <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D"> is a theory, them <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BM%7D%5Cmathsf%7Bod%7D(%5Cmathbb%7BT%7D)"> is the <em>type</em> of models of that theory. Geometrically speaking, this is the (core of the) category of points of the classifying topos of <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D">. This certainly suffices to give us universes and functions:</p>
<ul>
<li><p>The type <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BM%7D%5Cmathsf%7Bod%7D(%5Cmathbb%7BT%7D%5Cmathsf%7Bype%7D)"> of models of the theory of types is a type universe.</p></li>
<li><p>Given a dependent type <img src="https://latex.codecogs.com/png.latex?x%20:%20A%20%5Cvdash%20B(x)%20%5C,%5Cmathsf%7Btype%7D">, the type <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BM%7D%5Cmathsf%7Bod%7D(%5Cforall%20x%20:%20A.%5C,%20%5Cmathbb%7BE%7D%5Cmathsf%7Bl%7D(B(x)))"> of models of the theory of elements of <img src="https://latex.codecogs.com/png.latex?B(x)"> indexed by <img src="https://latex.codecogs.com/png.latex?x%20:%20A"> is a type of functions <img src="https://latex.codecogs.com/png.latex?(x%20:%20A)%20%5Cto%20B(x)">.</p></li>
</ul>
<p>The difficulty is that <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BM%7D%5Cmathsf%7Bod%7D"> is only stable under etale substitution. It is not clear to me how to handle this syntactically in a 2-level type theory. However, in the natural model style, it should be described by a pullback as follows:</p>
<!-- https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhzZntNb2R9fF97XFwmfSJdLFswLDEsIlxcbWF0aHNme1RoeX18X3tcXCZ9Il0sWzEsMSwiXFxtYXRoc2Z7VHl9fF97XFwmfSJdLFsxLDAsIlxcbWF0aHNme0VsfXxfe1xcJn0iXSxbMCwxLCJ1X3tcXGNpcmN9IiwyXSxbMywyLCJ1X3tcXGJ1bGxldH0iXSxbMSwyLCJcXG1hdGhjYWx7TX1cXG1hdGhzZntvZH0iLDJdLFswLDNdLFswLDIsIiIsMSx7InN0eWxlIjp7Im5hbWUiOiJjb3JuZXIifX1dXQ== -->
<iframe class="quiver-embed" src="https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXG1hdGhzZntNb2R9fF97XFwmfSJdLFswLDEsIlxcbWF0aHNme1RoeX18X3tcXCZ9Il0sWzEsMSwiXFxtYXRoc2Z7VHl9fF97XFwmfSJdLFsxLDAsIlxcbWF0aHNme0VsfXxfe1xcJn0iXSxbMCwxLCJ1X3tcXGNpcmN9IiwyXSxbMywyLCJ1X3tcXGJ1bGxldH0iXSxbMSwyLCJcXG1hdGhjYWx7TX1cXG1hdGhzZntvZH0iLDJdLFswLDNdLFswLDIsIiIsMSx7InN0eWxlIjp7Im5hbWUiOiJjb3JuZXIifX1dXQ==&amp;embed" width="327" height="304" style="border-radius: 8px; border: none;">
</iframe>
<p>where the natural models have been restricted to the category of contexts and etale substitutions.<sup>27</sup></p>
<p>Actually expressing the <em>quasi-coherent induction</em> rule in such a setting is difficult for a number of reasons; not the least of which being that defining <em>quasi-coherent</em> is difficult. The notion of <em>quasi-coherence</em> is a bit like “crispness” in <a href="https://arxiv.org/abs/1509.07584">Shulman’s cohesive type theory</a>; it means that a theory extension doesn’t use types defined from that theory.</p>
<p>For example, the theory <img src="https://latex.codecogs.com/png.latex?(X%20%5CvDash%20%5Cmathbb%7BT%7D%5Cmathsf%7Bype%7D),%20(x%20:%20%5Cmathbb%7BE%7D%5Cmathsf%7Bl%7D(X))"> is quasi-coherent in the empty context, but the theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BE%7D%5Cmathsf%7Bl%7D(X)"> is not quasi-coherent in the context of <img src="https://latex.codecogs.com/png.latex?X%20%5CvDash%20%5Cmathbb%7BT%7D%5Cmathsf%7Bype%7D">. This examples shows that a naive inductive approach to defining quasi-coherence will have to be modified. For this reason, Mitchell and I have also been playing around with a much more involved type theory that includes judgements for <em>definition</em> and <em>term</em>; but nothing has firmed up yet.</p>
<p>The second difficulty concerns the slice theories (and Hom-theories). In principle, these should be <em>observable</em> from the structure of the theory itself. If this is the case, it may be better to understand <em>quasi-coherent induction</em> not as an induction principle, but rather as a fibrancy condition on quasi-coherent theory extensions which enables certain transports.</p>
<p>I’ll leave the elaboration of these ideas to the future. My goal in this blog post is only really to express the <em>possibility</em> of a type theory for all toposes which is complete for all negative properties of all universal models.</p>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>This introduction is a bit of historical fiction meant to dramatize this blog post and should not be taken too literally. Those interested in the history of categorical logic should check out <a href="https://ncatlab.org/nlab/files/MarquisReyes_CategoricalLogic.pdf">this article</a> for a more sober retelling.↩︎</p></li>
<li id="fn2"><p>Remember that a function <img src="https://latex.codecogs.com/png.latex?f%20:%20A%20%5Cto%20B"> is, in the Bourbakiste style, a subset <img src="https://latex.codecogs.com/png.latex?G_f%20%5Csubseteq%20A%20%5Ctimes%20B"> of the set of pairs satisfying a property.↩︎</p></li>
<li id="fn3"><p>Sure, these other categories have objects which may be described as arrangements of sets themselves, but there’s a big difference between “<img src="https://latex.codecogs.com/png.latex?G"> is a group (in the category of manifolds)” and “<img src="https://latex.codecogs.com/png.latex?G"> is a Lie group (in the category of sets)”: these two statements involve two different theories. Thinking of Lie groups as “just” groups, but in another category, lets us work with the comparatively simple theory of groups when we need to, and with the special features of smooth manifolds when we need to, without always having to face the full combined structure. It also makes possible analogies to other structures which may be obscured if we have to think of them only in terms of their set-valued models. For example, it’s a cute (<a href="https://ncatlab.org/nlab/show/stabilization+hypothesis">but deep</a>) theorem that a group in the category of groups is an abelian group; we would never notice this by looking at the theory of abelian groups (with set-valued models) alone.↩︎</p></li>
<li id="fn4"><p>For an introduction to one of the many toposes where this is the case, check out <a href="https://grossack.site/2024/07/03/life-in-johnstones-topological-topos.html">this</a> <a href="https://grossack.site/2024/07/03/topological-topos-2-algebras">excellent</a> <a href="https://grossack.site/2024/07/03/topological-topos-3-bonus-axioms">series</a> on <a href="https://academic.oup.com/plms/article-abstract/s3-38/2/237/1484548?redirectedFrom=PDF">Johnstone’s <em>topological topos</em></a>↩︎</p></li>
<li id="fn5"><p>This case differs a bit from the other two, but we’ll come back to it.↩︎</p></li>
<li id="fn6"><p>I’m not impressing any algebraic geometers here, but I do recommend looking at <a href="https://rawgit.com/iblech/internal-methods/master/notes.pdf">Blechschmidt’s thesis</a> for more in depth and useful examples. The above examples are specifically <a href="https://math.stackexchange.com/questions/394194/what-does-a-proof-in-an-internal-logic-actually-look-like/394981#394981">from this MathStackExchange answer by Ingo Blechschmidt</a>. I also recommend looking at his <a href="https://youtu.be/7S8--bIKaWQ?si=yhxQlEfeuO1qmErQ">excellent talk</a> on the subject.↩︎</p></li>
<li id="fn7"><p>I’m only mentioning a few key instigators for each subject; please see the links for more!↩︎</p></li>
<li id="fn8"><p>These are <a href="https://arxiv.org/abs/2106.15390">my</a> <a href="https://arxiv.org/abs/2205.15887">papers</a> in synthetic differential geometry.↩︎</p></li>
<li id="fn9"><p>I also <a href="https://higher-structures.math.cas.cz/api/files/issues/Vol6Iss1/Myers">wrote a paper in synthetic algebraic topology</a>, giving a notion of <em>fibration</em> adapted to the synthetic setting.↩︎</p></li>
<li id="fn10"><p>This happened to me while writing <a href="https://arxiv.org/abs/2205.15887">my paper on orbifolds in SDG</a>; I took Bunge’s axioms, but required another “covering axiom” from an earlier work of her’s and Dubuc’s in order to prove what I needed about compact sets. I didn’t see it coming at the time, though the extra axiom turned out to be a special case of <em>local choice</em>.↩︎</p></li>
<li id="fn11"><p>Though it may be desirable. And possible! At least, in a singular “meta-foundation”. More on that below.↩︎</p></li>
<li id="fn12"><p>See, e.g., Section 4.2 of <a href="https://arxiv.org/pdf/2205.15887">my paper on orbifolds</a>.↩︎</p></li>
<li id="fn13"><p>Really, this adjoint only appears externally, or internally with a “Frobenius formula”. See <a href="https://arxiv.org/abs/2403.01939">Mitchell Riley’s tiny type theory</a> for more.↩︎</p></li>
<li id="fn14"><p>See, e.g.&nbsp;<a href="https://link.springer.com/book/10.1007/978-1-4612-0927-0">Mac Lane &amp; Moerdijk, Sheaves in Geometry and Logic, §VIII.6.</a>.↩︎</p></li>
<li id="fn15"><p>I will remark that this <em><a href="https://ncatlab.org/nlab/show/polarity+in+type+theory">polarity</a></em> distinction between positive (finite limits and colimits) and negative (limits, functions, (sub)object classifiers) phenomena is something that only makes sense in a <em>first order</em> context.↩︎</p></li>
<li id="fn16"><p>We’ll come back to this in a bit, but there is a major difficulty in internalizing the notion of “only using <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">-indexed disjunctions” to <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D%5B%5Cmathbb%7BT%7D%5D">, since “being a <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">” is not a pullback stable notion. Rather, we could use <em>locally constantly indexed</em> disjunctions, which is the internalization of the notion of “being a <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">”, and is more directly comparable to quasi-coherence for sheaves.↩︎</p></li>
<li id="fn17"><p>Over a locally Noetherian scheme…↩︎</p></li>
<li id="fn18"><p>This analogy is somewhat stained by the fact that a coherent sheaf of modules is not just locally of finite presentation over a general base scheme. This difference between “coherence” and “finite presentation” become more severe in higher category theory, where these notions fail to coincide even for bare homotopy types (where the former are the <img src="https://latex.codecogs.com/png.latex?%5Cpi">-finite homotopy types (having finite homotopy groups, and only finitely many of them), and the latter are the retracts of finite cell complexes). In this blog post, I will always fall on the side of <em>presentation</em>. In general, we will see quasi-coherence as “<em>locally of constant presentation</em>”; it therefore generalizes finite presentation and quasi-coherence, but not coherence.↩︎</p></li>
<li id="fn19"><p>I would have preferred to use the term <em>construction</em> over <em>definition</em> here. However, “constructible” firmly lies in the <em>coherent</em> (and not <em>quasi-coherent</em>) side of the generalizations from 1-categories to <img src="https://latex.codecogs.com/png.latex?%5Cinfty">-categories, and I imagine it would cause confusion if I named the principle “quasi-coherent constructibility”. I could also have gone with “presentation”, since the principle also has to do with the <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BHo%7D">-presentability of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-toposes.↩︎</p></li>
<li id="fn20"><p>Ivan and I had a pleasant chat over dinner at CT2023 (where he had presented that paper) during which I told him about this <em>quasi-coherent induction</em> idea; he said he expected to see the story told at the next CT. I have certainly kept him wanting. I hope this blog post, prepared in advance of CT2025, suffices for the time being.↩︎</p></li>
<li id="fn21"><p>More precisely, we should say that an <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-topos <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <img src="https://latex.codecogs.com/png.latex?%5Cgamma">-quasi-coherent for <img src="https://latex.codecogs.com/png.latex?%5Cgamma%20:%20%5Cmathcal%7BE%7D%20%5Cto%20%5Cmathcal%7BB%7D"> the global sections maps when <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BX%7D"> is <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D">-<img src="https://latex.codecogs.com/png.latex?%5Cgamma%5E%7B%5Cast%7D%5Ckappa">-presentable for <img src="https://latex.codecogs.com/png.latex?%5Ckappa%20%5Cin%20%5Cmathcal%7BB%7D">.↩︎</p></li>
<li id="fn22"><p>I want to thank Mathieu Anel for a delightful walk in the woods while I was a student at Johns Hopkins where we discussed the importance of the arrow topos for synthetic quasi-coherence.↩︎</p></li>
<li id="fn23"><p>This claim contains an internalization subtlety which needs careful resolution.↩︎</p></li>
<li id="fn24"><p>A major difficulty in turning this conjectural account into a rigorous proof is the fact that regular cardinals (<img src="https://latex.codecogs.com/png.latex?%5CSigma">-closed subuniverses) do not quite pull back. I’m sure this difficulty is surmountable, but it is a thorn in my toe.↩︎</p></li>
<li id="fn25"><p>It is worth wondering whether <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D%5E%7B%5CDelta%5E%7B%5Cmathsf%7Bop%7D%7D%7D"> classifies total orders with distinct top and bottom elements over <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BE%7D"> without assuming a classical meta-theory. The <a href="http://mathieu.anel.free.fr/mat/doc/Anel-2021-CRM.pdf">enveloping topos arguments of Mathieu Anel</a> makes use of the generation of all simplicial objects as colimits of monomorphisms, which strikes me as the sort of reasoning that led to the adoption of cubical methods over simplicial methods in constructive approaches to homotopy type theory.↩︎</p></li>
<li id="fn26"><p>Roughly speaking, GATs with <em>attributes</em> correspond to the (infinitary) lextensive fragment which allows for the internalization <img src="https://latex.codecogs.com/png.latex?%5CDelta%20B"> of base types <img src="https://latex.codecogs.com/png.latex?B%20%5Cin%20%5Cmathsf%7BSet%7D"> as <img src="https://latex.codecogs.com/png.latex?%5CDelta%20B%20:=%20%5Ccoprod_%7Bb%20%5Cin%20B%7D%20%5Ctop">; attributes valued in the base type <img src="https://latex.codecogs.com/png.latex?B%20%5Cin%20%5Cmathsf%7BSet%7D"> correspond to terms <img src="https://latex.codecogs.com/png.latex?%5CGamma%20%5C,%5Cvdash%20t%20:%20%5CDelta%20B">.↩︎</p></li>
<li id="fn27"><p>…and I’m ignoring obvious size issues.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>topos theory</category>
  <category>type theory</category>
  <guid>https://topos.institute/blog/2025-07-13-liberating-synthetic-quasi-coherence-from-forcing/</guid>
  <pubDate>Sun, 13 Jul 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Our Summer Research Associates in 2025</title>
  <dc:creator>Molly White</dc:creator>
  <link>https://topos.institute/blog/2025-07-01-summer-research-associates-2025/</link>
  <description><![CDATA[ 




<p>It is, once again, the time of year where we welcome our Summer Research Associates (RAs) to Topos. These early-career researchers bring with them not just technical knowledge and capability, but also their perspectives on the sort of culture that we should be actively cultivating within Topos. We are very lucky to be able to award these positions, which are a key part of our academic community building mission.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="2025-group.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="The Summer RAs, from left to right: Ea, Lucy, Matt, Corinthia, Aaron, Tony"><img src="https://topos.institute/blog/2025-07-01-summer-research-associates-2025/2025-group.jpg" class="img-fluid figure-img" alt="The Summer RAs, from left to right: Ea, Lucy, Matt, Corinthia, Aaron, Tony"></a></p>
<figcaption>The Summer RAs, from left to right: Ea, Lucy, Matt, Corinthia, Aaron, Tony</figcaption>
</figure>
</div>
<hr>
<p><strong>Tony Wehbe</strong> is a PhD student in Applied Mathematics at the University of Toledo, advised by William Kalies. His research interests are in dynamical systems (specifically hybrid systems), and he also has a strong interest in Category Theory for its use in studying them. At Topos this summer, he is working with Sophie Libkind on understanding the composition of attractor lattices. Specifically, he is exploring how the lattice of attractors in coupled and feedback systems can be characterized in terms of the lattices of attractors of the component systems.</p>
<p><strong>Lucy Horowitz</strong> just finished the first year of her PhD in logic up the hill in Evans Hall, and this summer is working with Kristopher Brown on logical expressivism. They are trying to understand the relationship between “implication-space semantics” and phase-space semantics for linear logic, as well as how to do this kind of substructural logic in some kind of category (likely virtual double categories). Previously Lucy has collaborated with Valeria de Paiva on knowledge graphs of mathematics. When not doing logic Lucy likes to go hiking, play soccer, listen to and play music, and read science fiction.</p>
<p><strong>Aaron Fairbanks</strong> is working with Kevin and David studying comonads on the category <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">. Several people at Topos are already fans of <em>polynomial</em> comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">. This means that the comonad endofunctor <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D%5Cto%5Cmathbf%7BSet%7D"> is of the form <img src="https://latex.codecogs.com/png.latex?%5Csum_%7Bi%5Cin%20I%7Dy%5E%7BX_i%7D">, where <img src="https://latex.codecogs.com/png.latex?y%5E%7BX_i%7D"> denotes the representable functor homming out of the set <img src="https://latex.codecogs.com/png.latex?X_i">. Surprisingly, it turns out that polynomial comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D"> are the same thing as categories (shown <a href="https://arxiv.org/abs/1604.01187">here</a>). They plan to study general (not necessarily polynomial) comonads on <img src="https://latex.codecogs.com/png.latex?%5Cmathbf%7BSet%7D">, viewing them as a kind of “generalised category”.</p>
<p><strong>Matt Cuffaro</strong> is a programmer visiting Topos as an RA, splitting his time between building features which capture selections from H.T. Odum’s Systems Ecology into CatColab as well as discussing modelling with Dana Scott. Matt has collaborated with Topos on the AlgebraicJulia ecosystem as a programmer in the GATAS lab in Gainesville, FL, but is glad to be here on the other side this Summer!</p>
<p><a href="https://eaetopoi.github.io/"><strong>Ea E T</strong></a> is a first-year math PhD student at the University of Illinois Urbana-Champaign, working in homotopy theory, infinity-categories, and higher algebra. They did their undergrad in Physics and Mathematics at the University of Calgary, Alberta Canada, which inspired their interest in exploring connections and applications of higher categorical methods in the natural sciences. This summer they are working with Sophie Libkind to explore the use of loose bimodules in the study of dynamical systems.</p>
<p><a href="https://cbaberle.com/"><strong>Corinthia Aberle</strong></a> is a 2nd year PhD student in Pure and Applied Logic in the CS Department at Carnegie Mellon. This Summer, she is working with Evan Patterson and Kevin Carlson on double-categorical logic—specifically, extending the framework of Cartesian double theories to include other sorts of double-categorical limits such as tabulators— she is also working with Dana Scott on the side on promoting formalization in Agda (since She’ll be formalizing all of her results on double categories anyway!) Corinthia was an RA here last summer as well (under the name CB, back then), during which time she worked with David Spivak on applications of polynomial functors to the semantics of dependent type theory. Corinthia is also a composer, songwriter, and producer, who just released her first pop album and is currently working on another one in her spare time! Before starting her PhD, Corinthia also did half her undergrad in philosophy, and remains keenly interested in philosophical issues pertaining to math, logic, technology, and their role in society.</p>



<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>Topos</category>
  <category>personnel</category>
  <guid>https://topos.institute/blog/2025-07-01-summer-research-associates-2025/</guid>
  <pubDate>Tue, 01 Jul 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>How to prove equations using diagrams, part 2</title>
  <dc:creator>Evan Patterson</dc:creator>
  <link>https://topos.institute/blog/2025-06-10-e-graphs-2/</link>
  <description><![CDATA[ 




<p>This is the second part in a series about diagrammatic reasoning, inspired by e-graphs. <a href="../e-graphs-1">Last time</a>, we reviewed the concept of <a href="https://ncatlab.org/nlab/show/initial+functor"><em>initial functor</em></a> and showed by example how to calculate with diagrams and initial functors. This time, we make that calculus more systematic and we reconceive e-graphs in terms of initial functors.</p>
<section id="weak-equivalence-of-diagrams" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="weak-equivalence-of-diagrams"><span class="header-section-number">1</span> Weak equivalence of diagrams</h2>
<p>We’ve been deriving equations by chaining together initial functors between diagrams, going in either direction. Let’s give a name to this equivalence relation on diagrams.</p>
<div id="def-weak-equivalence" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 1</strong></span> A <strong>weak equivalence</strong> from a diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> to another diagram <img src="https://latex.codecogs.com/png.latex?D':%20%5Cmathsf%7BJ%7D'%20%5Cto%20%5Cmathsf%7BC%7D"> is an initial functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D%20%5Ctwoheadrightarrow%0A%5Cmathsf%7BJ%7D'"> making the triangle commute:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/227551ea667fad1833eb5a1389d4e756f6075e3f.svg" class="img-fluid">
</div>
<p>Two diagrams in a category are said to be <strong>weakly equivalent</strong> if they can be connected by a zig-zag of weak equivalences.</p>
</div>
<p>Why call this relation <em>weak</em> equivalence? First, it is not <a href="https://ncatlab.org/nlab/show/equivalence+in+a+2-category">equivalence</a> in any familiar 2-category of diagrams. Moreover, though initial functors are closed under composition and any isomorphism of categories is initial, as follows directly from the definition, initial functors are most interesting when they’re <em>not</em> invertible. So, in order to make weak equivalence be an equivalence relation, we have to consider <em>zig-zags</em> of initial functors.<sup>1</sup></p>
<div class="callout callout-style-simple callout-warning no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Warning</span>Weak equivalence versus commutativity
</div>
</div>
<div class="callout-body-container callout-body">
<p>By definition, weak equivalence of diagrams preserves limits whenever they exist. Sometimes this property can be used to extract commutation relations from diagrams, as we saw last time. However, we caution that weak equivalence does <em>not</em> preserve commutativity:<sup>2</sup> if a commutative diagram <img src="https://latex.codecogs.com/png.latex?D"> is weakly equivalent to another diagram <img src="https://latex.codecogs.com/png.latex?D'">, it need not be the case that <img src="https://latex.codecogs.com/png.latex?D'"> commutes.</p>
<p>The following weak equivalence of diagrams is a minimal counterexample.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/07daf8762b40ad4658b80a3e390bbe112e67de88.svg" class="img-fluid">
</div>
<p>The functor shown is initial because the limit of both diagrams is the equalizer of <img src="https://latex.codecogs.com/png.latex?g%20%5Ccirc%20f"> and <img src="https://latex.codecogs.com/png.latex?h%20%5Ccirc%20f">, whenever it exists. However, if we suppose that</p>
<p><img src="https://latex.codecogs.com/png.latex?%20g%20%5Ccirc%20f%20=%20h%20%5Ccirc%20f%20%5Cqquad%5Ctext%7Bbut%7D%5Cqquad%20g%20%5Cneq%20h,%20"></p>
<p>so that limit of both diagrams is <img src="https://latex.codecogs.com/png.latex?X">, then the first diagram commutes but the second does not.</p>
<p>It can be a useful feature of weak equivalence that it works just as well regardless of whether the diagrams involved commute. As it happens, I first got into this topic by studying “Tonti diagrams,” which present partial differential equations in physics <span class="citation" data-cites="patterson2023">(Patterson et al. 2023)</span>. These diagrams do <em>not</em> commute; if they did, the equations would already be solved!</p>
</div>
</div>
</section>
<section id="e-diagrams" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="e-diagrams"><span class="header-section-number">2</span> E-diagrams</h2>
<p>We now attempt to make contact with e-graphs. That’s less straightforward than it might seem since, taken at face value, the concrete descriptions of e-graphs offered by <span class="citation" data-cites="nelson1980 detlefs2005">Nelson (1980; see also Detlefs, Nelson, and Saxe 2005, sec. 4.2)</span> and by <span class="citation" data-cites="willsey2021">Willsey et al. (2021, sec. 2.1)</span> look rather different. We reproduce features of both without claiming to be fully faithful to either.</p>
<div id="def-e-diagram" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 2</strong></span> An <strong>e-diagram</strong> over a diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> is a factorization of <img src="https://latex.codecogs.com/png.latex?D"> through an initial functor, comprising a category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D">, an initial functor <img src="https://latex.codecogs.com/png.latex?E:%20%5Cmathsf%7BJ%7D%20%5Ctwoheadrightarrow%5Cmathsf%7BH%7D">, and a diagram <img src="https://latex.codecogs.com/png.latex?P:%20%5Cmathsf%7BH%7D%20%5Cto%20%5Cmathsf%7BC%7D"> such that <img src="https://latex.codecogs.com/png.latex?D%20=%20P%20%5Ccirc%20E">.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/581d5c4a084aa616ad4714d7d0d1353b639d95c2.svg" class="img-fluid">
</div>
</div>
<p>The pieces constituting an e-diagram have interpretations in e-graph jargon:</p>
<ul>
<li>The target category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> is a <strong>theory</strong>, most clearly when <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> is finitely presented, so that its generating graph is a <strong>signature</strong>, defining types and (unary) operations, and its path equations are equational <strong>axioms</strong>.</li>
<li>The diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> is a <strong>term graph</strong> in the theory <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, particularly when the indexing category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> is freely generated by a finite graph. The objects of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> are <strong>e-class IDs</strong>.</li>
<li>The category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D"> is something like a <strong>hash cons</strong>. Its objects are <strong>canonical e-class IDs</strong>.<sup>3</sup> Below, we give conditions on the functor <img src="https://latex.codecogs.com/png.latex?P:%20%5Cmathsf%7BH%7D%20%5Cto%20%5Cmathsf%7BC%7D"> that make the morphisms of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D"> encode the mapping of a hash cons.</li>
<li>As for the functor <img src="https://latex.codecogs.com/png.latex?E:%20%5Cmathsf%7BJ%7D%20%5Ctwoheadrightarrow%5Cmathsf%7BH%7D">, the object map <img src="https://latex.codecogs.com/png.latex?%5Cmathop%7B%5Cmathrm%7BOb%7D%7DE:%20%5Cmathop%7B%5Cmathrm%7BOb%7D%7D%0A%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathop%7B%5Cmathrm%7BOb%7D%7D%5Cmathsf%7BH%7D"> assigns each e-class ID to a canonical e-class ID, like in a <strong>union-find</strong>, while the morphism map just exists to witness the initiality of <img src="https://latex.codecogs.com/png.latex?E">.</li>
</ul>
<p>We now define the <em>category</em> of all e-diagrams over a diagram.</p>
<div id="def-e-diagram-morphism" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 3</strong></span> A <strong>morphism of e-diagrams</strong> <img src="https://latex.codecogs.com/png.latex?(%5Cmathsf%7BH%7D,%20E,%20P)%20%5Cto%20(%5Cmathsf%7BH%7D',%20E',%20P')"> over a common diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> is a functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BH%7D%20%5Cto%20%5Cmathsf%7BH%7D'"> making the two triangles commute:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/f5eb4e24c0399b240c496e2f9b1400aab3fcf212.svg" class="img-fluid">
</div>
</div>
<p>We do not assume that the functor <img src="https://latex.codecogs.com/png.latex?R"> is initial but, as we will see shortly, a cancellation property of initial functors ensures that <img src="https://latex.codecogs.com/png.latex?R"> is automatically initial. So there is not actually a choice to make.</p>
<p>In other words, the category of e-diagrams over a diagram <img src="https://latex.codecogs.com/png.latex?D"> is the full subcategory of the <a href="https://ncatlab.org/nlab/show/factorization+category">factorization category</a> of <img src="https://latex.codecogs.com/png.latex?D"> spanned by factorizations whose left component is initial. The factorization category construction goes back at least to <span class="citation" data-cites="lawvere1986">Lawvere (1986)</span>.</p>
</section>
<section id="the-trivial-e-diagram" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="the-trivial-e-diagram"><span class="header-section-number">3</span> The trivial e-diagram</h2>
<p>Any diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> trivially has an e-diagram over it, given by the factorization <img src="https://latex.codecogs.com/png.latex?(1_%5Cmathsf%7BJ%7D,%20D)">. This e-diagram is initial in the category of e-diagrams over <img src="https://latex.codecogs.com/png.latex?D">:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/4c5b288b09b746355bb4ed19e982caa879d28b3b.svg" class="img-fluid">
</div>
<p>The terminology is apt because the initial e-diagram is, in practice, how an e-diagram will be initialized from an existing diagram (term graph).</p>
</section>
<section id="the-ideal-e-diagram" class="level2" data-number="4">
<h2 data-number="4" data-anchor-id="the-ideal-e-diagram"><span class="header-section-number">4</span> The ideal e-diagram</h2>
<p>What is not so obvious is that the category of e-diagrams over a fixed diagram also has a terminal object. This follows from the foundational theorem by <span class="citation" data-cites="street1973">Street and Walters (1973)</span> that initial functors form the left class of morphisms in an orthogonal factorization system (OFS) on <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D">, called the <a href="https://ncatlab.org/nlab/show/comprehensive+factorization+system"><em>comprehensive factorization system</em></a>.</p>
<div id="thm-comprehensive-factorization" class="theorem">
<p><span class="theorem-title"><strong>Theorem 1 (Comprehensive factorization)</strong></span> Initial functors and discrete opfibrations form the left and right classes, respectively, of an orthogonal factorization system on <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D">. Thus, any functor <img src="https://latex.codecogs.com/png.latex?F:%20%5Cmathsf%7BC%7D%20%5Cto%20%5Cmathsf%7BD%7D"> admits a factorization <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D%20%5Ctwoheadrightarrow%5Cmathsf%7BE%7D%0A%5Crightarrowtail%5Cmathsf%7BD%7D"> as initial functor followed by a discrete opfibration, and this factorization is unique up to unique isomorphism.</p>
</div>
<p>Recall that a functor <img src="https://latex.codecogs.com/png.latex?P:%20%5Cmathsf%7BE%7D%20%5Cto%20%5Cmathsf%7BC%7D"> is a <strong>discrete opfibration</strong>, here denoted<sup>4</sup> <img src="https://latex.codecogs.com/png.latex?P:%20%5Cmathsf%7BE%7D%20%5Crightarrowtail%0A%5Cmathsf%7BC%7D">, if, for every morphism <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> and every object <img src="https://latex.codecogs.com/png.latex?x%0A%5Cin%20%5Cmathsf%7BE%7D"> with <img src="https://latex.codecogs.com/png.latex?P(x)%20=%20X">, there exists a unique morphism <img src="https://latex.codecogs.com/png.latex?%5Cbar%20f:%20x%20%5Cto%20y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BE%7D"> such that <img src="https://latex.codecogs.com/png.latex?P(%5Cbar%20f)%20=%20f">.</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/1688ed49945a9dfb89fb8d7391741d242897c80a.svg" class="img-fluid">
</div>
<p>The existence of the comprehensive factorization system is a powerful result with many consequences, such as:</p>
<ul>
<li>the <a href="https://ncatlab.org/nlab/show/orthogonal+factorization+system#CancellationProperties">cancellation property</a> of the left class in an OFS implies that any functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BH%7D%20%5Cto%20%5Cmathsf%7BH%7D'"> constituting a morphism of e-diagrams is initial, as noted above;</li>
<li>a <a href="https://ncatlab.org/nlab/show/weak+factorization+system#ClosureProperties">closure property</a> of the left class states that initial functors are stable under pushout, as used below.</li>
</ul>
<p>Moreover, comprehensive factorization implies that the factorization of a diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> as an initial functor <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BE%7D_*:%20%5Cmathsf%7BJ%7D%0A%5Ctwoheadrightarrow%5Cmathsf%7BH%7D_*"> followed by a discrete opfibration <img src="https://latex.codecogs.com/png.latex?P_*:%20%5Cmathsf%7BH%7D_*%20%5Crightarrowtail%0A%5Cmathsf%7BC%7D"> is terminal in the category of e-diagrams over <img src="https://latex.codecogs.com/png.latex?D">:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/ca24771477fa7f5fa5169ad92c667ef38b282f1e.svg" class="img-fluid">
</div>
<p>The existence and uniqueness of a functor <img src="https://latex.codecogs.com/png.latex?R"> filling the square is a direct application of initial functors being <em>left orthogonal</em> with respect to discrete opfibrations.</p>
<p>The e-diagram produced by comprehensive factorization is ideal in the sense that the “hash cons invariant” <span class="citation" data-cites="willsey2021">(Willsey et al. 2021, Definition 2.7)</span> is satisfied for any canonical e-node that can be formed. Rephrased in e-graph jargon, the functor <img src="https://latex.codecogs.com/png.latex?P_*:%20%5Cmathsf%7BH%7D_*%20%5Crightarrowtail%5Cmathsf%7BC%7D"> being a discrete opfibration says that for every canonical e-class ID <img src="https://latex.codecogs.com/png.latex?x%20%5Cin%20%5Cmathsf%7BH%7D_*"> and every operation <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> with domain <img src="https://latex.codecogs.com/png.latex?X%20=%20P_*(x)">—that is, for every <strong>canonical e-node</strong> “<img src="https://latex.codecogs.com/png.latex?f(x)">”—there exists a unique lift of <img src="https://latex.codecogs.com/png.latex?f"> through <img src="https://latex.codecogs.com/png.latex?P_*"> to a morphism <img src="https://latex.codecogs.com/png.latex?%5Cbar%0Af:%20x%20%5Cto%20y">. The codomain <img src="https://latex.codecogs.com/png.latex?y%20=%20%5Coperatorname%7Bcod%7D(%5Cbar%20f)"> of this unique lift is the canonical e-class ID associated with the canonical e-node “<img src="https://latex.codecogs.com/png.latex?f(x)">”. Thus, in the ideal e-diagram, the relation from canonical e-nodes to canonical e-class IDs is a function, and evaluating this function decides whether canonical e-nodes are equivalent.</p>
<p>So, is the ideal e-diagram the only e-diagram we’ll ever need? No, because in general it cannot be computed. As we’ll have occasion to study in a future post, the comprehensive factorization of a functor <img src="https://latex.codecogs.com/png.latex?F:%20%5Cmathsf%7BC%7D%20%5Cto%20%5Cmathsf%7BD%7D"> is constructed by left Kan extending the terminal copresheaf on <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> along <img src="https://latex.codecogs.com/png.latex?F">. Left Kan extensions generally cannot be computed, for two reasons. First, even when all the input data is finite, the output may be infinite. Second, even when the output is finite, it still might not be possible to compute it. Left Kan extension is formally uncomputable: it includes solving the word problem for categories, hence also the word problem for groups, an early and famous undecidable problem. Thus, to suggest that comprehensive factorization or left Kan extension “solves” the problem of reasoning with e-graphs would be entirely backward; rather, it is <em>because</em> left Kan extension is uncomputable that we need a flexible e-graph data structure supporting a variety of reasoning heuristics.<sup>5</sup> Iteratively approximating a left Kan extension is just one important application of e-graphs.</p>
</section>
<section id="rewriting-e-diagrams" class="level2" data-number="5">
<h2 data-number="5" data-anchor-id="rewriting-e-diagrams"><span class="header-section-number">5</span> Rewriting e-diagrams</h2>
<p>Having codified the <em>objects</em> of interest as e-diagrams, we turn to <em>manipulating</em> e-diagrams using the formalism of pushout-based rewriting. The goal is to show that calculations similar to <a href="../e-graphs-1/#examples-and-calculations">last time’s</a> can be carried out by applying rewrite rules, where each rule application is guaranteed to preserve weak equivalence of diagrams. Note that this scheme is not intended as a guide to implementation. Though e-graphs can be implemented using rewriting techniques, it should likely not be in terms of initial functors between categories. Rather, having proved the procedure correct, we can forget about initiality and compile to rewrite rules operating directly on the graphs generating the diagram shapes. As a proof of concept, my colleague <a href="../../people/kristopher-brown/">Kris Brown</a> has implemented e-graphs using hypergraph rewriting <span class="citation" data-cites="brown2025">(Brown 2025)</span>.</p>
<p>Rewrites of an e-diagram <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D%20%5Ctwoheadrightarrow%5Cmathsf%7BH%7D%20%5Cto%20%5Cmathsf%7BC%7D"> may affect just the category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D"> or both <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D">. Below we imagine that the “term graph” <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> only ever grows by introducing new terms, whereas the “hash cons” <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D"> is also reduced through equation introduction and congruence closure. Other schemes are also possible.</p>
<section id="rewriting-over-a-fixed-diagram" class="level3" data-number="5.1">
<h3 data-number="5.1" data-anchor-id="rewriting-over-a-fixed-diagram"><span class="header-section-number">5.1</span> Rewriting over a fixed diagram</h3>
<p>The simplest rewrites change the e-diagram <img src="https://latex.codecogs.com/png.latex?(%5Cmathsf%7BH%7D,%20E,%20P)"> without changing the diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> it is over. Given a <strong>rewrite rule</strong> of the form</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/e3f2ab501ff132840b863990e391d14f43008f1e.svg" class="img-fluid">
</div>
<p>along with a <strong>match</strong> of its left-hand side, namely any map <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BL%7D%20%5Cto%0A%5Cmathsf%7BH%7D"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D/%5Cmathsf%7BC%7D">, we take a pushout</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/09e09dd08edf005209e1c62de4121604175dae42.svg" class="img-fluid">
</div>
<p>to obtain a new e-diagram <img src="https://latex.codecogs.com/png.latex?(%5Cmathsf%7BH%7D',%20E',%20P')"> over <img src="https://latex.codecogs.com/png.latex?D">. We use the fact that initial functors are stable under pushout.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Rule: congruence reduction
</div>
</div>
<div class="callout-body-container callout-body">
<p>Each morphism <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> generates a rewrite rule</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/89cd5debb42b332b18ecb3fd48cbf6801051b33d.svg" class="img-fluid">
</div>
<p>that can be applied in this fashion to perform congruence reduction in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D">.</p>
</div>
</div>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Rule: equation introduction
</div>
</div>
<div class="callout-body-container callout-body">
<p>Any path equation in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, say <img src="https://latex.codecogs.com/png.latex?g%20%5Ccirc%20f%20=%20k%20%5Ccirc%20h">, generates a rewrite rule</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/6e13d7197e5c7df807dac662496fd3bf73454c20.svg" class="img-fluid">
</div>
<p>where the checkmark indicates that the square <em>in the indexing category itself</em> commutes. Thus, at the expense of using diagram shapes that are not free, we can apply an equation in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> using a single initial functor, rather than a span of initial functors as in <a href="../e-graphs-1/#motifs-among-initial-functors">previous post</a>.</p>
</div>
</div>
</section>
<section id="rewriting-the-diagram-itself" class="level3" data-number="5.2">
<h3 data-number="5.2" data-anchor-id="rewriting-the-diagram-itself"><span class="header-section-number">5.2</span> Rewriting the diagram itself</h3>
<p>Given a rewrite rule <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BL%7D%20%5Ctwoheadrightarrow%5Cmathsf%7BR%7D"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D/%5Cmathsf%7BC%7D"> as above along with a <strong>match</strong> <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BL%7D%20%5Cto%20%5Cmathsf%7BJ%7D">, now in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D">, we produce a compatible match in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D"> by post-composing with <img src="https://latex.codecogs.com/png.latex?E:%20%5Cmathsf%7BJ%7D%20%5Ctwoheadrightarrow%0A%5Cmathsf%7BH%7D">. We then apply the rule along both matches by taking two pushouts, which the pasting law for pushout squares allows us to express as:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-06-10-e-graphs-2/_svgs/7595a54a1fe7070002880e2c3176d68b99429698.svg" class="img-fluid">
</div>
<p>The result is a new e-diagram <img src="https://latex.codecogs.com/png.latex?(%5Cmathsf%7BH%7D',%20E',%20P')"> over the new diagram <img src="https://latex.codecogs.com/png.latex?D'%0A%5Ccoloneqq%20P'%20%5Ccirc%20E'"> and, by construction, <img src="https://latex.codecogs.com/png.latex?D'"> is weakly equivalent to the original diagram <img src="https://latex.codecogs.com/png.latex?D%20=%20P%20%5Ccirc%20E">. Again, we use that initial functors are stable under pushout.</p>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Rule: term introduction
</div>
</div>
<div class="callout-body-container callout-body">
<p>Each morphism <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> generates a rewrite rule</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbig%5C%7B%20X%20%5Cbig%5C%7D%20%5Cquad%5Ctwoheadrightarrow%5Cquad%20%5Cleft%5C%7B%20X%20%5Cxrightarrow%7Bf%7D%20Y%20%5Cright%5C%7D%0A"></p>
<p>that can be applied as above to introduce a new term in both <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BH%7D">.</p>
</div>
</div>
</section>
</section>
<section id="outlook" class="level2" data-number="6">
<h2 data-number="6" data-anchor-id="outlook"><span class="header-section-number">6</span> Outlook</h2>
<p>In this second post on diagrammatic reasoning, we filled in aspects of the formalism neglected in the first post, proposing a definition of <em>e-diagram</em> and showing how to rewrite e-diagrams by applying rules in the form of initial functor <em>motifs</em>. While this is all “just” formalism, with the key ideas already present in the examples and calculations from last time, it has been a good excuse to review the comprehensive factorization system on <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D">, a powerful theorem that, among other consequences, points to the ideal object of e-graph computation.</p>
<p>Having set out the basic formalism, we are now free to embelish it by considering categories with extra structure. Next time we’ll study diagrams and initial functors for categories with finite products, recovering the standard setting of e-graphs that allows constants and operations of arity greater than one. More ambitiously, in future posts, we hope to show the benefits of a clean categorical semantics by generalizing to new settings where e-graphs are not standardly applied.</p>
</section>
<section id="references" class="level2" data-number="7">
<h2 data-number="7" data-anchor-id="references"><span class="header-section-number">7</span> References</h2>
<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-brown2025" class="csl-entry">
Brown, Kris. 2025. <span>“<span class="nocase">CSetEGraphs.jl</span>.”</span> <a href="https://github.com/kris-brown/CSetEGraphs.jl">https://github.com/kris-brown/CSetEGraphs.jl</a>.
</div>
<div id="ref-carlson2024" class="csl-entry">
Carlson, Kevin, James Fairbanks, Tim Hosgood, and Evan Patterson. 2024. <span>“The Diagrammatic Presentation of Equations in Categories.”</span> <a href="https://arxiv.org/abs/2401.09751">https://arxiv.org/abs/2401.09751</a>.
</div>
<div id="ref-detlefs2005" class="csl-entry">
Detlefs, David, Greg Nelson, and James B. Saxe. 2005. <span>“Simplify: A Theorem Prover for Program Checking.”</span> <em>Journal of the ACM</em> 52 (3): 365–473. <a href="https://doi.org/10.1145/1066100.1066102">https://doi.org/10.1145/1066100.1066102</a>.
</div>
<div id="ref-lawvere1986" class="csl-entry">
Lawvere, F. William. 1986. <span>“State Categories and Response Functors.”</span> <a href="https://github.com/mattearnshaw/lawvere/blob/master/pdfs/1986-state-categories-and-response-functors.pdf">https://github.com/mattearnshaw/lawvere/blob/master/pdfs/1986-state-categories-and-response-functors.pdf</a>.
</div>
<div id="ref-nelson1980" class="csl-entry">
Nelson, Greg. 1980. <span>“Techniques for Program Verification.”</span> PhD thesis, Stanford University.
</div>
<div id="ref-patterson2023" class="csl-entry">
Patterson, Evan, Andrew Baas, Timothy Hosgood, and James Fairbanks. 2023. <span>“A Diagrammatic View of Differential Equations in Physics.”</span> <em>Mathematics in Engineering</em> 5 (2): 1–59. <a href="https://doi.org/10.3934/mine.2023036">https://doi.org/10.3934/mine.2023036</a>.
</div>
<div id="ref-street1973" class="csl-entry">
Street, Ross, and R. F. C. Walters. 1973. <span>“The Comprehensive Factorization of a Functor.”</span> <em>Bulletin of the American Mathematical Society</em> 79 (5): 936–41. <a href="https://doi.org/10.1090/S0002-9904-1973-13268-9">https://doi.org/10.1090/S0002-9904-1973-13268-9</a>.
</div>
<div id="ref-willsey2021" class="csl-entry">
Willsey, Max, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt, Zachary Tatlock, and Pavel Panchekha. 2021. <span>“Egg: Fast and Extensible Equality Saturation.”</span> <em>Proceedings of the ACM on Programming Languages</em> 5 (POPL): 1–29. <a href="https://doi.org/10.1145/3434304">https://doi.org/10.1145/3434304</a>.
</div>
</div>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>Instead of passing to a mere relation of weak equivalence, which forgets <em>how</em> two diagrams are weakly equivalent, the believing structuralist would rather <a href="https://ncatlab.org/nlab/show/category+of+fractions"><em>localize</em></a> at the initial functors, formally inverting that class of morphisms within the category of diagrams. In a paper led by Kevin Carlson <span class="citation" data-cites="carlson2024">(Carlson et al. 2024)</span>, we proved that localizing at initial functors is equivalent to localizing at the largest class of diagram morphisms that preserve solutions to equations (lifts against any discrete opfibration). This justifies defining weak equivalences of diagrams to be initial functors.↩︎</p></li>
<li id="fn2"><p>Recall from the <a href="../e-graphs-1/#def-diagram">first post</a> that a diagram <strong>commutes</strong> if, for every pair of parallel morphisms in the diagram’s shape, their images in the target category are equal.↩︎</p></li>
<li id="fn3"><p>Calling a chosen representative of an equivalence class “canonical” is traditional in computer science but should not be confused with <a href="https://mathoverflow.net/q/19644">“canonical”</a> as a term of art in mathematics. Far from being mathematically canonical, the choice of elements to play the role of canonical e-class IDs is completely arbitrary. In a union-find data structure, the canonical IDs are usually taken to be a subset of the set of all IDs—a set-theoretic distinction meaningless in structuralist mathematics. What <em>is</em> canonical is the ideal e-diagram introduced later, since it is unique up to unique isomorphism.↩︎</p></li>
<li id="fn4"><p>Writing initial functors with “<img src="https://latex.codecogs.com/png.latex?%5Ctwoheadrightarrow">” arrows and discrete opfibrations with “<img src="https://latex.codecogs.com/png.latex?%5Crightarrowtail">” arrows calls to mind the ur-example of a factorization system, the epi-mono factorization in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">. However, the analogy runs deeper than that: the comprehensive factorization in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D"> categorifies the epi-mono factorization in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">. A discrete opfibration (as well as a discrete fibration) is a map into a 1-category whose fibers are 0-categories, i.e., sets, while an injection is a map into a 0-category whose fibers are <a href="https://ncatlab.org/nlab/show/%28-1%29-category">(-1)-categories</a>, i.e., propositions. Moreover, an initial functor is a functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D%20%5Cto%0A%5Cmathsf%7BK%7D"> such that each comma category (“lax pullback”) <img src="https://latex.codecogs.com/png.latex?R/k"> is non-empty and connected, while a surjection is a function <img src="https://latex.codecogs.com/png.latex?R:%20J%20%5Cto%20K"> such that each pullback <img src="https://latex.codecogs.com/png.latex?R%20%5Ctimes_K%20k"> is nonempty. I thank David Jaz Myers for pointing out this analogy to me.↩︎</p></li>
<li id="fn5"><p>In the e-graph engine <code>egglog</code>, these heuristics take of the form of <em>schedules</em> for applying rewrite rules.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>category theory</category>
  <category>rewriting</category>
  <guid>https://topos.institute/blog/2025-06-10-e-graphs-2/</guid>
  <pubDate>Tue, 10 Jun 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Growing the Topos tech team</title>
  <dc:creator>Evan Patterson</dc:creator>
  <link>https://topos.institute/blog/2025-05-29-software-team/</link>
  <description><![CDATA[ 




<section id="integrating-research-and-tech" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="integrating-research-and-tech"><span class="header-section-number">1</span> Integrating research and tech</h2>
<p>Mathematics and science achieve their greatest impact when innovative basic research is coupled with translation into robust and usable technology. That is easier said than done. Today, research and development, despite appearing conjoined in the acronym “R&amp;D,” are rarely done together. Research in mathematics and other foundational fields happens almost exclusively in academia, whereas production-grade technology is built mostly by industry. Moreover, the flow of ideas tends to be unidirectional, from “theory” to “practice,” failing to create the feedback loops that would supply basic researchers with unexpected ideas and worthwhile problems.</p>
<p>So far, much of <a href="../../work">our work</a> at Topos Institute has been basic research in mathematics and computer science, pioneering a mathematical systems science and and demonstrating it through software prototypes. That important work will continue. However, for our research to produce its intended effects—enabling collective inquiry across science and engineering, and helping people of all stripes navigate a complex and rapidly changing world—we must integrate our research with practices and workflows that people have, without requiring that they possess specialized training in advanced mathematics. Technology is a key means to embody mathematical ideas in this way.</p>
<p>At Topos Institute, we are working toward practicing an integrative process of creating new mathematics and building usable technologies, with feedback flowing regularly in both directions. We aim to vertically integrate basic research in systems theory with the development of usable technology for collective inquiry, all in service of public benefit. We believe that our unique structure and culture—drawing funding from a mix of research grants, industrial contracts, and philanthropy; equally respecting the crafts of research and development; pursuing team science though high-bandwidth, in-person collaboration; and taking a careful, reflective attitude toward the creation of technology—will make it possible for us to do so.</p>
</section>
<section id="catcolab" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="catcolab"><span class="header-section-number">2</span> CatColab</h2>
<p>Our first foray into user-facing technology is <a href="../../work/catcolab">CatColab</a>, a collaborative environment for formal, interoperable, conceptual modeling.</p>
<p>Now at an early alpha stage, CatColab supports modeling, qualitative and quantitative, across a range of domain-specific languages. Its key components include a library for its core logic, written in Rust; a backend server, also written in Rust; and a web frontend supporting real-time collaborative editing, written in TypeScript. At the same time, CatColab is based on, and is being developed continuously with, new mathematical approaches to categorical logic and categorical systems theory. Thus, CatColab is at once a tool intended to be used by modelers in science, engineering, and beyond, and a means to ground and validate new mathematics being created at the Institute.</p>
<p>While we’re proud of what we’ve built so far, we have a long way yet to go. Much of our vision for CatColab is only implicit in the tool as it exists today. A few directions that I’m particularly excited about are:</p>
<ul>
<li><strong>Compositional models</strong>: The only reliable way to build or understand a complex model is to decompose it into a smaller pieces. CatColab will support importing existing models and fusing them together into a new model, a fully declarative approach to modularly constructing complex models.</li>
<li><strong>Data instances</strong>: It will be possible to create not just data schemas but also instances of tabular data over a schema. Schema and instance will be editable live and in parallel, offering much of the fluidity of a spreadsheet but with the guardrails and type safety of a database system.</li>
<li><strong>Specs and verification</strong>: In engineering, systems are designed to meet external specifications or requirements. CatColab will support defining specifications and aid in verifying that a proposed design satisfies the specs.</li>
</ul>
<p>Ultimately, we aim to make a CatColab a next-generation tool for collective inquiry that seamlessly integrates models, data, analysis, learning, specification, and verification.</p>
</section>
<section id="growing-the-team" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="growing-the-team"><span class="header-section-number">3</span> Growing the team</h2>
<p>To realize this ambitious vision, we need to grow our team of technologists. I’m excited to announce two new positions on the Topos tech team:</p>
<ul>
<li>Software Engineer (US): <a href="https://topos.institute/files/jobs/call-for-applications-(CA-2025-SWE-1).pdf">call for applications</a></li>
<li>Software Engineer (UK): <a href="https://topos.institute/files/jobs/call-for-applications-(UK-25-SWE-1).pdf">call for applications</a></li>
</ul>
<p>These will be the first full-time software engineers that we hire at Topos, complementing the research scientists and research software engineers currently on our technical staff. As such, this is an unique opportunity to shape the design and implementation of CatColab at a critical juncture in the project, and to both learn from, and advance toward practice, the mathematical research that CatColab is based on.</p>
<p>If you have any questions about the positions or the process, please don’t hesitate to reach out at the email addresses linked in the calls for applications. Thank you for your interest in Topos Institute!</p>


</section>

<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>CatColab</category>
  <category>technology</category>
  <category>personnel</category>
  <guid>https://topos.institute/blog/2025-05-29-software-team/</guid>
  <pubDate>Thu, 29 May 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>How to prove equations using diagrams, part 1</title>
  <dc:creator>Evan Patterson</dc:creator>
  <link>https://topos.institute/blog/2025-05-27-e-graphs-1/</link>
  <description><![CDATA[ 




<p>An <a href="https://en.wikipedia.org/wiki/E-graph">e-graph</a>, short for “equality graph,” is a data structure that maintains a congruence relation on expression trees: an equivalence relation stable under forming new expressions. First devised by Nelson and Oppen in 1980 <span class="citation" data-cites="nelson1980 nelson-oppen1980">(Nelson 1980; Nelson and Oppen 1980)</span>, e-graphs received a surge of new attention when Willsey et al demonstrated, via their software package <a href="https://github.com/egraphs-good/egg"><code>egg</code></a>, that e-graphs combined with <a href="https://doi.org/10.1145/1480881.1480915">equality saturation</a> can be a fast, powerful, and adaptable tool for equational reasoning <span class="citation" data-cites="willsey2021">(Willsey et al. 2021)</span>. In my own work on <a href="https://github.com/ToposInstitute/CatColab">CatColab</a>, I’ve begun using <code>egg</code>’s successor, <a href="https://github.com/egraphs-good/egglog"><code>egglog</code></a> <span class="citation" data-cites="zhang2023">(Zhang et al. 2023)</span>, to reason about finitely presented categories.</p>
<p>Standard presentations, beginning with Nelson’s PhD thesis <span class="citation" data-cites="nelson1980">(Nelson 1980)</span>, emphasize the data structures and algorithms needed to implement e-graphs, such as the <a href="https://en.wikipedia.org/wiki/Disjoint-set_data_structure">union-find</a> data structure. It’s crucial that work in computer algebra ultimately touch the ground in this way. Still, I can’t help but wonder what, abstracted from the implementation details, is <em>really</em> going on with e-graphs. The diagrammatic and visual nature of e-graphs, so apparent in the interactive <a href="https://egraphs-good.github.io/egglog"><code>egglog</code> demo</a>, will suggest to any category theorist that categorical ideas may be implicitly at work.</p>
<p>Two groups have recently proposed categorical semantics for e-graphs <span class="citation" data-cites="biondo2025 tiurin2025">(Biondo, Castelnovo, and Gadducci 2025; Tiurin et al. 2025)</span>. Without going into specifics, both define an “e-hypergraph” to be a labeled hypergraph equipped with extra structure that, directly or indirectly, specifies an equivalence relation. Their starting point is to say what an e-graph <em>is.</em> Though I’ll eventually propose my own definition of an “e-diagram,” I will start by considering how e-graphs are <em>manipulated</em>, with the ultimate aim being to give an categorical and operational semantics for e-graph computation. The key concept will be that of an <a href="https://ncatlab.org/nlab/show/initial+functor"><em>initial functor</em></a>.</p>
<p>In this post, I’ll introduce the main ideas for categories without further structure. In comparison with e-graphs, this will be quite restrictive—it will correspond to allowing only <em>unary</em> function symbols—but it has the advantage of bringing us to the point with a minimum of setup. In future posts, we’ll generalize to categories with finite products and recover the standard setting of e-graphs.</p>
<section id="representing-equations-using-diagrams" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="representing-equations-using-diagrams"><span class="header-section-number">1</span> Representing equations using diagrams</h2>
<p>If you’ve encountered any abstract algebra, you’ve likely seen how category theorists represent equations between morphisms by drawing commutative diagrams. For example, saying that a square of morphisms</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/6c36d26b8312515c83f6255c48b3abbea836ceae.svg" class="img-fluid">
</div>
<p>in some category <em>commutes</em> means that equation <img src="https://latex.codecogs.com/png.latex?g%20%5Ccirc%20f%20=%20k%20%5Ccirc%20h"> holds.</p>
<p>Let’s recall the formal definitions, which are standard if not without fine distinctions.</p>
<div id="def-diagram" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 1</strong></span> A <strong>diagram</strong> in a category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> is a functor <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> whose domain <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D">, the <strong>indexing category</strong> or <strong>shape</strong> of the diagram, is a small category. Further terminology:</p>
<ul>
<li>the diagram is <strong>free</strong> if its shape is a free category, i.e., <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D%20=%0A%5Cmathrm%7BPath%7D(G)"> is freely generated by a (possibly infinite) graph <img src="https://latex.codecogs.com/png.latex?G">;</li>
<li>the diagram is <strong>finitely presented</strong> if its shape is a finitely presented category;</li>
<li>the diagram <strong>commutes</strong>, or is <strong>commutative</strong>, if for every pair of morphisms in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> with the same domain and codomain, their images in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> are equal.</li>
</ul>
</div>
<p>Note that a diagram may well be both free and commutative: freeness is a property solely of the diagram’s shape, whereas commutativity also crucially concerns the diagram’s image in the target category.</p>
<p>In practice, we work with diagrams that are free and finitely presented. That means that the diagram’s shape is freely generated by a finite graph, a data structure easily implemented on a computer. When doing computer algebra, the target category will itself be finitely presented by generators and relations. Initially, the only equations that we “know” are the ones explicitly given as relations. Our aim is to derive further equations in the target category by manipulating diagrams in it.</p>
<p>But wait: if a diagram in a finitely presented category can be described using only graph-theoretic concepts, familiar to any computer scientist, what is the point of introducing categories and functors? We’ll see that category theory is indispensable for concisely describing the valid <em>manipulations</em> of diagrams. These manipulations take the form of <em>morphisms</em> between diagrams, which are in the first instance functors.</p>
</section>
<section id="initial-functors" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="initial-functors"><span class="header-section-number">2</span> Initial functors</h2>
<p>Reasoning with diagrams, or “diagram chasing,”<sup>1</sup> is the art of transforming a given diagram, say <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D">, into another diagram <img src="https://latex.codecogs.com/png.latex?D':%20%5Cmathsf%7BJ%7D'%20%5Cto%20%5Cmathsf%7BC%7D">, following certain rules of inference. In ordinary mathematical practice, nobody bothers to say what these rules are. We aim to be more systematic.</p>
<p>Let’s consider the obvious moves we could make. Given a diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%0A%5Cmathsf%7BC%7D">, we could pull it back along a functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D'%20%5Cto%20%5Cmathsf%7BJ%7D"> to obtain another diagram <img src="https://latex.codecogs.com/png.latex?D'%20%5Ccoloneqq%20D%20%5Ccirc%20R:%20%5Cmathsf%7BJ%7D'%20%5Cto%20%5Cmathsf%7BC%7D">. Conversely, we could extend the diagram <img src="https://latex.codecogs.com/png.latex?D"> by finding a functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D%20%5Cto%0A%5Cmathsf%7BJ%7D'"> and along with a diagram <img src="https://latex.codecogs.com/png.latex?D':%20%5Cmathsf%7BJ%7D'%20%5Cto%20%5Cmathsf%7BC%7D"> such that <img src="https://latex.codecogs.com/png.latex?D%20=%20D'%0A%5Ccirc%20R">:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/94518a312b9bf8eab22a93e4ba5a9db16acf6f2e.svg" class="img-fluid">
</div>
<p>Without assuming more, neither contemplated rule of inference is valid in the sense (to be made precise) of exactly preserving solutions to the equations presented by diagrams. For that, we need <img src="https://latex.codecogs.com/png.latex?R"> to be a special kind of functor, an <em>initial functor</em>, characterized by the following definition/theorem.</p>
<section id="definition" class="level3" data-number="2.1">
<h3 data-number="2.1" data-anchor-id="definition"><span class="header-section-number">2.1</span> Definition</h3>
<div id="thm-initial-functor" class="theorem">
<p><span class="theorem-title"><strong>Theorem 1 (Initial functors)</strong></span> A functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BK%7D"> is <strong>initial</strong>, here denoted <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D%0A%5Ctwoheadrightarrow%5Cmathsf%7BK%7D">, if any of the following equivalent conditions hold:</p>
<ul>
<li><em>Pullback along <img src="https://latex.codecogs.com/png.latex?R"> preserves limits</em>: if <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> is a category and <img src="https://latex.codecogs.com/png.latex?D:%0A%5Cmathsf%7BK%7D%20%5Cto%20%5Cmathsf%7BC%7D"> is a diagram in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, then the canonical morphism between limits <img src="https://latex.codecogs.com/png.latex?%5Clim%20_%7B%5Cmathsf%7BK%7D%7D%20D%20%5Cto%20%5Clim_%7B%5Cmathsf%7BJ%7D%7D%20(D%20%5Ccirc%20R)"> is an isomorphism, whenever the limits in question exist.</li>
<li><em>Pullback along <img src="https://latex.codecogs.com/png.latex?R"> preserves limits of sets</em>: if <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BK%7D%20%5Cto%20%5Cmathsf%7BSet%7D"> is a diagram of sets, then the canonical function between limits <img src="https://latex.codecogs.com/png.latex?%5Clim_%7B%5Cmathsf%7BK%7D%7D%20D%0A%5Cto%20%5Clim_%7B%5Cmathsf%7BJ%7D%7D%20(D%20%5Ccirc%20R)"> is a bijection.</li>
<li><em>Slices relative to <img src="https://latex.codecogs.com/png.latex?R"> are connected</em>: for any object <img src="https://latex.codecogs.com/png.latex?k%20%5Cin%20%5Cmathsf%7BK%7D">, the comma category <img src="https://latex.codecogs.com/png.latex?R/k"> is non-empty and connected.<sup>2</sup></li>
</ul>
</div>
<p>For a proof of (the dual of) this equivalence, see <span class="citation" data-cites="riehl2014">(Riehl 2014, Lemma 8.3.4)</span>.</p>
<p>With a good intuition for limits, the limit characterization of initiality is useful because you can often see at a glance whether a given functor is initial just by imagining what will happen to a limit of sets. On the other hand, the slice characterization is useful in being concrete and syntactical. Recall that, given a functor <img src="https://latex.codecogs.com/png.latex?R:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BK%7D"> and an object <img src="https://latex.codecogs.com/png.latex?k%20%5Cin%20%5Cmathsf%7BK%7D">, the <strong>comma category</strong> <img src="https://latex.codecogs.com/png.latex?R/k"> has</p>
<ul>
<li>as objects, an object <img src="https://latex.codecogs.com/png.latex?j%20%5Cin%20%5Cmathsf%7BJ%7D"> together with a morphism <img src="https://latex.codecogs.com/png.latex?f:%20R(j)%20%5Cto%0Ak"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BK%7D">;</li>
<li>as morphisms <img src="https://latex.codecogs.com/png.latex?(j,%20f)%20%5Cto%20(j',%20f')">, morphisms <img src="https://latex.codecogs.com/png.latex?h:%20j%20%5Cto%20j'"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> making the triangle commutes:</li>
</ul>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/e9bc3173747996af102d0af715ef7167e60a91ca.svg" class="img-fluid">
</div>
<p>In the typical case that the categories involved are free and finitely generated, proving initiality—checking that each comma category <img src="https://latex.codecogs.com/png.latex?R/k"> is non-empty and connected—thus reduces to a combinatorial problem.</p>
</section>
<section id="interpretation" class="level3" data-number="2.2">
<h3 data-number="2.2" data-anchor-id="interpretation"><span class="header-section-number">2.2</span> Interpretation</h3>
<p>Why are initial functors relevant to equational reasoning? In general, a limit of a diagram can be thought of as an object representing all possible solutions to the equations postulated by the diagram. This interpretation is clear in the ur-category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BSet%7D">, where a general formula gives the limit of a diagram of sets as the subset of all tuples of elements obeying equations indexed by the shape’s morphisms. Namely, a limit of a diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BSet%7D"> is the set of all tuples <img src="https://latex.codecogs.com/png.latex?(x_j)_%7Bj%20%5Cin%20%5Cmathsf%7BJ%7D%7D">, where <img src="https://latex.codecogs.com/png.latex?x_j%20%5Cin%20D(j)">, such that the equations</p>
<p><img src="https://latex.codecogs.com/png.latex?%20D(f)(x_i)%20=%20x_j,%20%5Cqquad%20%5Cforall%20f:%20i%20%5Cto%20j%5C%20%5Ctext%7Bin%7D%5C%20%5Cmathsf%7BJ%7D,%20"></p>
<p>are satisfied <span class="citation" data-cites="leinster2014">(Leinster 2014, Example 5.1.22)</span>. So, as pullback along an initial functor preserves limits, the initial functors are intuitively those that preserve the “solution set” of the system of equations presented by a diagram.</p>
<p>However, our interest lies in diagrams <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D"> whose target is a <em>finitely presented</em> category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">. Such categories rarely have many nontrivial products or equalizers. We can circumvent this problem in two ways.</p>
<p>First, we can always consider set-theoretic <em>interpretations</em> of the presentation, namely functors <img src="https://latex.codecogs.com/png.latex?F:%20%5Cmathsf%7BC%7D%20%5Cto%20%5Cmathsf%7BSet%7D">. Then the composite <img src="https://latex.codecogs.com/png.latex?F%20%5Ccirc%0AD:%20%5Cmathsf%7BC%7D%20%5Cto%20%5Cmathsf%7BSet%7D"> is a diagram of sets and we are returned to the standard setting where all limits exist. This viewpoint is taken in the e-graph community when they speak of “uninterpreted functions” or “function symbols” (for us, generating morphisms of <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">). Any equation deduced for uninterpreted functions remains true in any interpretation of them by actual functions between sets. Thus, if you have a formal system of proofs that is <em>complete</em> for equational reasoning with functions, then there exist proofs in that system for equations deduced using initial functors.<sup>3</sup></p>
<p>Taking a little extra care, we can go further to deduce equations that hold in an arbitrary category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">. Suppose we start with a <em>singleton</em> diagram in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, indexing a single object <img src="https://latex.codecogs.com/png.latex?X%20%5Cin%20%5Cmathsf%7BC%7D">. The limit of that diagram exists trivially, being <img src="https://latex.codecogs.com/png.latex?X"> itself. Thus, any diagram obtained by pulling back or extending the diagram along an initial functor will continue to have <img src="https://latex.codecogs.com/png.latex?X"> as its limit. In particular, any path in such a diagram <em>originating</em> at <img src="https://latex.codecogs.com/png.latex?X"> must commute. We will use this technique in the calculations that follow. It will become more powerful when we extend to categories with finite products, since we can then start with any finite discrete diagram, the indexing objects of which act as “free variables.”</p>
</section>
</section>
<section id="examples-and-calculations" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="examples-and-calculations"><span class="header-section-number">3</span> Examples and calculations</h2>
<p>The remainder of the post will illustrate the concept of initial functor through commonly occurring examples and explicit calculations. The aim is to suggest how initial functors can be deployed for mechanical reasoning with diagrams, deferring to next time a further theoretical development.</p>
<section id="motifs-among-initial-functors" class="level3" data-number="3.1">
<h3 data-number="3.1" data-anchor-id="motifs-among-initial-functors"><span class="header-section-number">3.1</span> Motifs among initial functors</h3>
<p>Let’s begin with a few minimal examples of initial functors, acting as motifs or patterns. Each such example will give rise to a rule of inference for diagrammatic reasoning.</p>
<p>The target category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> for the diagrams is fixed throughout. That is, any initial functor should also be a morphism in the <strong>category of diagrams</strong> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, the slice category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BCat%7D/%5Cmathsf%7BC%7D">.</p>
<ul>
<li><p><strong>Operation introduction</strong>: for any morphism <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, the map of diagrams</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/6ac66969c681d69830147da0cdbcba5140eb5778.svg" class="img-fluid">
</div>
<p>is initial.</p></li>
<li><p>More generally, for any path <img src="https://latex.codecogs.com/png.latex?X_0%20%5Cxrightarrow%7Bf_1%7D%20X_1%20%5Cxrightarrow%7Bf_2%7D%20%5Ccdots%20%5Cxrightarrow%7Bf_n%7D%0AX_n"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, the map of diagrams</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/a6a45880f445416a52e34cf56571bc45a7f516ee.svg" class="img-fluid">
</div>
<p>is initial.</p></li>
<li><p><strong>Congruence reduction</strong>: for any morphism <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, the map of diagrams,<sup>4</sup></p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/e07ec5611231b692cafad4eec9b58f768d81a28b.svg" class="img-fluid">
</div>
<p>sending both <img src="https://latex.codecogs.com/png.latex?y"> and <img src="https://latex.codecogs.com/png.latex?y'"> in the domain shape to <img src="https://latex.codecogs.com/png.latex?y"> in the codomain shape, is initial.</p></li>
<li><p>Subsuming both operation introduction and congruence reduction, for any morphism <img src="https://latex.codecogs.com/png.latex?f:%20X%20%5Cto%20Y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> and number <img src="https://latex.codecogs.com/png.latex?n%20%5Cgeq%200">, the map of diagrams,</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/afff08cb633157ccae5be6d59ec6d33d73682da1.svg" class="img-fluid">
</div>
<p>sending all of <img src="https://latex.codecogs.com/png.latex?y_1,%5Cdots,y_n"> to <img src="https://latex.codecogs.com/png.latex?y">, is initial.</p></li>
<li><p><strong>Equation introduction</strong>: suppose that the equation <img src="https://latex.codecogs.com/png.latex?g%20%5Ccirc%20f%20=%20k%20%5Ccirc%20h"> holds in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, as depicted earlier. Then both maps in the span of free diagrams</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/c04e383cab1efb08edde62e973f66b8d1f06f90c.svg" class="img-fluid">
</div>
<p>are initial. More generally, this works for any path equation in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">. As another example, we can introduce a nullary path equation, say <img src="https://latex.codecogs.com/png.latex?%5Coperatorname%7Bid%7D_X%20=%20g%0A%5Ccirc%20f">, as:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/6271d4c9f4f70166f52f94a0a4a2c2135eea836e.svg" class="img-fluid">
</div></li>
</ul>
<p>Later, we will formalize not just the rules but how to <em>apply</em> them, using ideas from <a href="https://ncatlab.org/nlab/show/span+rewriting">category-theoretic rewriting</a>. For the moment, we take for granted that when applying the rules in a larger context, the resulting functors are still initial. Or, you can check initiality by inspection in each application.</p>
</section>
<section id="pasting-commutative-squares" class="level3" data-number="3.2">
<h3 data-number="3.2" data-anchor-id="pasting-commutative-squares"><span class="header-section-number">3.2</span> Pasting commutative squares</h3>
<p>We’re ready to do our first calculation, proving the pasting law for commutative squares: that two commutative squares with a common edge can be juxtaposed to produce a commutative rectangle. The notation makes this seem obviously true—that’s what makes it good notation!—but it still needs a proof. We’ll present the proof in a highly mechanical style, where each diagram in the sequence is related to the previous one by an initial functor or, when introducing an equation, by a span of initial functors.</p>
<p><strong>Assume</strong>: We are given the two commutative squares</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/ca734c60bcbb7a50384b638e7d49f08b53d481c7.svg" class="img-fluid">
</div>
<p>By this we mean, the target category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> is generated by six objects, called <img src="https://latex.codecogs.com/png.latex?X,X',Y,Y',Z,Z'">, and seven morphisms, called <img src="https://latex.codecogs.com/png.latex?f,f',g,g',h,k,%5Cell">, subject to those two equations.</p>
<p><strong>Construct</strong>: Start with the singleton diagram on <img src="https://latex.codecogs.com/png.latex?X">, whose limit is trivially <img src="https://latex.codecogs.com/png.latex?X">. Introduce the left- and right-hand sides of the path equation we want to prove:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/91af8604e2ff08c0cad95c1da5387c14bc3183b8.svg" class="img-fluid">
</div>
<p>Recognize the path <img src="https://latex.codecogs.com/png.latex?X%20%5Cxrightarrow%7Bh%7D%20X'%20%5Cxrightarrow%7Bf'%7D%20Y'"> as the left-hand side of the first square, then introduce that equation:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/a04c956726ba27e1d4a089ad47719f400374d3ba.svg" class="img-fluid">
</div>
<p>Apply congruence reduction to the occurrences of <img src="https://latex.codecogs.com/png.latex?f">:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/11084b1fd0408d6f916c640930207a7fd9b8b4ec.svg" class="img-fluid">
</div>
<p>Now recognize the path <img src="https://latex.codecogs.com/png.latex?Y%20%5Cxrightarrow%7Bk%7D%20Y'%20%5Cxrightarrow%7Bg'%7D%20Z'"> as the left-hand side of the second square, then introduce that equation:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/db581f072b7df7ef731323488d0e8591826811bb.svg" class="img-fluid">
</div>
<p>We’re already done, but we might as well tidy up by congruence reducing the occurrences of <img src="https://latex.codecogs.com/png.latex?g"> and then <img src="https://latex.codecogs.com/png.latex?%5Cell">:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/1697fb126d8c6fb8627a4b15441b4f22806f490f.svg" class="img-fluid">
</div>
<p><strong>Conclude</strong>: The outer rectangle commutes, since the limit of the diagram is still <img src="https://latex.codecogs.com/png.latex?X">.</p>
</section>
<section id="a-monoid-presentation" class="level3" data-number="3.3">
<h3 data-number="3.3" data-anchor-id="a-monoid-presentation"><span class="header-section-number">3.3</span> A monoid presentation</h3>
<p>Consider a monoid with an element <img src="https://latex.codecogs.com/png.latex?f"> satisfying the equations</p>
<p><img src="https://latex.codecogs.com/png.latex?%20f%5E3%20=%20%5Coperatorname%7Bid%7D=%20f%5E5.%20"></p>
<p>That is, the target category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> is a generated by a single object, say <img src="https://latex.codecogs.com/png.latex?%5Cbullet">, and an endomorphism, <img src="https://latex.codecogs.com/png.latex?f:%20%5Cbullet%20%5Cto%20%5Cbullet">, satisfying those two equations.</p>
<p>Start with the singleton diagram <img src="https://latex.codecogs.com/png.latex?%5C%7B%5Cbullet%5C%7D"> and introduce both defining equations, noting that since each equation has an identity on one side, they appear as cycles:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/611a7e20296d7dea7f7f7be11b953b823ec468e6.svg" class="img-fluid">
</div>
<p>We neglect to label the arrows since they are all over the generating morphism <img src="https://latex.codecogs.com/png.latex?f">. We’ll now compute the <em>congruence closure</em>, iteratively applying congruence reduction until that is no longer possible. Arrows affected by a congruence reduction are colored the same on either side of the reduction, starting with the two blue arrows above. The first reduction is:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/34995b23ff44d4aec6ce87460b90c44c9f2af183.svg" class="img-fluid">
</div>
<p>Next:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/ad15183626f11c7d93e449b9aa18e66780797086.svg" class="img-fluid">
</div>
<p>Congruence reducing three more times gives the sequence:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-27-e-graphs-1/_svgs/6568b6f58019168b6c744698b2cde4604929abb5.svg" class="img-fluid">
</div>
<p>We could stop here, but we might as well reduce twice more, yielding the diagram that is the self-loop over <img src="https://latex.codecogs.com/png.latex?f">. We have proved the equation</p>
<p><img src="https://latex.codecogs.com/png.latex?%20f%20=%20%5Coperatorname%7Bid%7D,%20"></p>
<p>since the limit of the diagram is the one we started with, namely the unique object <img src="https://latex.codecogs.com/png.latex?%5Cbullet">. In other words, the monoid presented is actually the trivial monoid. You might remember this is as a special case of the fact in group theory that if a group element <img src="https://latex.codecogs.com/png.latex?g"> satisfies <img src="https://latex.codecogs.com/png.latex?g%5Em%20=%20%5Coperatorname%7Bid%7D=%20g%5En"> for relatively prime numbers <img src="https://latex.codecogs.com/png.latex?m"> and <img src="https://latex.codecogs.com/png.latex?n">, then <img src="https://latex.codecogs.com/png.latex?g%20=%20%5Coperatorname%7Bid%7D">.</p>
</section>
</section>
<section id="discussion" class="level2" data-number="4">
<h2 data-number="4" data-anchor-id="discussion"><span class="header-section-number">4</span> Discussion</h2>
<p>Category theory is often said to be abstract, even “abstract nonsense,” but it is the interplay between abstract and concrete that gives category theory its power. Initial functors, with their complementary intrinsic and syntactical descriptions, exemplify this interplay.</p>
<p>We’ve begun to explore how initial functors are the basis for an operational semantics for e-graphs. Rather than defining the individual steps and then chaining them together, as in the usual “small-step” operational semantics, we define the valid transformations invariantly via initial functors and then look for useful specializations. Beyond its conceptual content, this flexibility matters because practical systems tend to batch reductions together to improve efficiency. For us, that will often just amount to composing initial functors.</p>
<p>We haven’t yet made a direct connection with e-graphs, though there have been many hints. Another hint is that our final example is lifted directly from Nelson and Oppen’s early work <span class="citation" data-cites="nelson1980 nelson-oppen1980">(Nelson 1980; Nelson and Oppen 1980)</span>, where it is a running example. In future posts, we’ll tighten up the connection with e-graphs. We’ll also explain how the formalism generalizes to categories with finite products, the categorical counterpart to algebraic theories.</p>
</section>
<section id="references" class="level2" data-number="5">
<h2 data-number="5" data-anchor-id="references"><span class="header-section-number">5</span> References</h2>
<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-biondo2025" class="csl-entry">
Biondo, Roberto, Davide Castelnovo, and Fabio Gadducci. 2025. <span>“<span>EGGs</span> Are Adhesive!”</span> <a href="https://arxiv.org/abs/2503.13678">https://arxiv.org/abs/2503.13678</a>.
</div>
<div id="ref-leinster2014" class="csl-entry">
Leinster, Tom. 2014. <em>Basic Category Theory</em>. Cambridge University Press. <a href="https://doi.org/10.1017/CBO9781107360068">https://doi.org/10.1017/CBO9781107360068</a>.
</div>
<div id="ref-nelson1980" class="csl-entry">
Nelson, Greg. 1980. <span>“Techniques for Program Verification.”</span> PhD thesis, Stanford University.
</div>
<div id="ref-nelson-oppen1980" class="csl-entry">
Nelson, Greg, and Derek C. Oppen. 1980. <span>“Fast Decision Procedures Based on Congruence Closure.”</span> <em>Journal of the ACM</em> 27 (2): 356–64. <a href="https://doi.org/10.1145/322186.322198">https://doi.org/10.1145/322186.322198</a>.
</div>
<div id="ref-riehl2014" class="csl-entry">
Riehl, Emily. 2014. <em>Categorical Homotopy Theory</em>. Cambridge University Press. <a href="https://doi.org/10.1017/CBO9781107261457">https://doi.org/10.1017/CBO9781107261457</a>.
</div>
<div id="ref-tiurin2025" class="csl-entry">
Tiurin, Aleksei, Barrett Chris, Dan R. Ghica, and Nick Hu. 2025. <span>“Equivalence Hypergraphs: <span>DPO</span> Rewriting for Monoidal e-Graphs.”</span> <a href="https://arxiv.org/abs/2406.15882">https://arxiv.org/abs/2406.15882</a>.
</div>
<div id="ref-willsey2021" class="csl-entry">
Willsey, Max, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt, Zachary Tatlock, and Pavel Panchekha. 2021. <span>“Egg: Fast and Extensible Equality Saturation.”</span> <em>Proceedings of the ACM on Programming Languages</em> 5 (POPL): 1–29. <a href="https://doi.org/10.1145/3434304">https://doi.org/10.1145/3434304</a>.
</div>
<div id="ref-zhang2023" class="csl-entry">
Zhang, Yihong, Yisu Remy Wang, Oliver Flatt, David Cao, Philip Zucker, Eli Rosenthal, Zachary Tatlock, and Max Willsey. 2023. <span>“Better Together: Unifying <span>Datalog</span> and Equality Saturation.”</span> <em>Proceedings of the ACM on Programming Languages</em> 7 (PLDI): 468–92. <a href="https://doi.org/10.1145/3591239">https://doi.org/10.1145/3591239</a>.
</div>
</div>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>In this series, we work first with bare categories and later generalize to cartesian categories. Diagram chasing in its most traditional form takes place in <a href="https://ncatlab.org/nlab/show/additive+and+abelian+categories">additive and abelian categories</a>, a different direction of generalization. It would be fun to try to extend our methods to the additive setting, beginning with categories enriched in commutative monoids or abelian groups.↩︎</p></li>
<li id="fn2"><p>A category is <strong>connected</strong> if any two of its objects can be connected by a <a href="https://ncatlab.org/nlab/show/zigzag">zig-zag</a> of morphisms, i.e., there is an <em>undirected</em> path between them.↩︎</p></li>
<li id="fn3"><p>That is not to say that exhibiting a proof implied by completeness is easy or convenient. As I understand it, <em>proof extraction</em> is a topic of active work in the e-graph community.↩︎</p></li>
<li id="fn4"><p>When drawing a diagram <img src="https://latex.codecogs.com/png.latex?D:%20%5Cmathsf%7BJ%7D%20%5Cto%20%5Cmathsf%7BC%7D">, the “type-theoretic” notation <img src="https://latex.codecogs.com/png.latex?x:%20X"> names an object <img src="https://latex.codecogs.com/png.latex?x"> in the indexing category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BJ%7D"> that is mapped to the object <img src="https://latex.codecogs.com/png.latex?X"> in the target category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">. Thinking of the diagram as a <a href="https://en.wikipedia.org/wiki/Term_graph">term graph</a>, the object <img src="https://latex.codecogs.com/png.latex?x"> is indeed a “term of type <img src="https://latex.codecogs.com/png.latex?X">.”↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>category theory</category>
  <category>rewriting</category>
  <guid>https://topos.institute/blog/2025-05-27-e-graphs-1/</guid>
  <pubDate>Tue, 27 May 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>The Sun is Good</title>
  <dc:creator>Kevin Carlson</dc:creator>
  <link>https://topos.institute/blog/2025-05-05-the-sun-is-good/</link>
  <description><![CDATA[ 




<section id="introduction" class="level1">
<h1>Introduction</h1>
<p>What is the world? Is it “everything that is the <a href="https://en.wikipedia.org/wiki/Tractatus_Logico-Philosophicus">case?</a>” Does it have different strata, whose realities are grounded in mutually incompatible ways, or just one? When we describe the world to each other, don’t our choices of language privilege certain answers to these questions, and foreclose on the possibility of certain others?</p>
<p>I won’t waste much time with monism (i.e.&nbsp;the answer “just one”), even when many fellow Western tech-and-science types seem to take it as not only beyond the pale but actually laughable to quibble with the monistic assumption of rank materialism. As Aristotle saw long ago, “things are said to be in many ways”; pace him, for reasons I can’t so easily explain, the following millennia of careful research into the “ways in which things are said to be” have recently been overwritten with nothing much more than, well…a quick snicker at Cartesian dualism followed by a jump to, at best, Dan Dennett, or maybe early Wittgenstein.</p>
<p>Yet, the simple fact remains that things are said to be in many ways, and eliminativisms and materialisms of all kinds are foolish, harmful when taken seriously, and ineffective in following and influencing the unfolding of the world.</p>
</section>
<section id="schopenhauers-view" class="level1">
<h1>Schopenhauer’s View</h1>
<p>A favorite answer of mine to the questions up top is Schopenhauer’s. He says things are said to be in two ways: first, as Will (capitalized <em>á l’Allemand</em>), in which there are no <em>things</em> at all, really, just the surging, chaotic flow of pure existence that lies behind all appearances.</p>
<p>The second, which Schopenhauer calls the world as Representation, is the familiar world of subjects-regarding-objects. What’s interesting is that, even in this world of Representation, Schopenhauer subdivides into four distinct ways in which things are grounded, or in which things can be: cognitive objects, grounded by reason (if all men are pigs and Socrates is a man, then Socrates is a pig), material objects (through causation), moments and places in time and space (grounded by other nearby places and times), and the ground of motive (the connection between intention and action).</p>
</section>
<section id="models-for-real" class="level1">
<h1>Models, for real</h1>
<p>Why am I inflicting this recapitulation of Schopenhauer on you? Well, let me get back to that…First: I’m interested in world modeling—what it is, how to do it, and whether AI can help. Here are some examples of world models:</p>
<ul>
<li>GDP = C+I+G+X</li>
<li>If GDP’ &gt; 0, then all in all the economy is doing well.</li>
<li>God is love.</li>
<li>The vibes are off with that guy.</li>
<li>The rich are, by and large, talented, hardworking, and probably way cooler than you.</li>
<li>The rich are, by and large, greedy, lucky, and probably ugly.</li>
<li><div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="regnet.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1" title="A large regulatory network describing many human cancer pathways"><img src="https://topos.institute/blog/2025-05-05-the-sun-is-good/regnet.png" class="img-fluid figure-img" alt="A large regulatory network describing many human cancer pathways"></a></p>
<figcaption>A large regulatory network describing many human cancer pathways</figcaption>
</figure>
</div></li>
</ul>
<p>A world model is at bottom nothing more or less than a representation in the sense of Schopenhauer: a network of objects: a subject organizing (part of) the world to itself. Modernity is the state of a civilization that can develop precise language and intrepid norms of discourse to permit more-or-less free competition between publicly expressed world models. Postmodernity is the observation that grand public world models seem to often throw the baby (the illegible, fractally complex, organic system determining individual flourishing) out with the bathwater (naive adherence to tradition).</p>
<p>The fundamental problem of today’s civilization is finding what comes after postmodernity, which correctly teaches that excessive reliance on legible public models leads to runaway harm beyond the edges of the model, but then gets mired in inescapable negativity. Some individuals find a way out of nihilism to what might be called a meta-modern attitude of understanding and using modern systems (plural) without identifying with them, but our civilization hasn’t advanced to this way of being at scale. (If you like this paragraph, you’ll love David Chapman’s writings on <a href="https://meaningness.com">meaning</a> and <a href="https://metarationality.com">metarationality</a>.)</p>
</section>
<section id="the-world-is-not-an-object" class="level1">
<h1>The World Is Not An Object</h1>
<p>My point in juxtaposing Schopenhauer’s metaphysics and the dream of meta-modern world modeling is this: a world model is a claim, made by some particular subject, about what is to be attended to (perhaps, what is to receive <em>care</em>), which is pragmatically indistinguishable from a claim about what is real. The middlebrow attitude is that a model approximates the world. This is wrong, because the world is not an object. There is no “ground truth” to compare models to, not because we’re solipsists, but because the world-in-itself is a chaotic surging mess in which no grounds are admitted.</p>
<p>The world is not an object. The only objects are our models of the world. This doesn’t mean models can’t be wrong—if you believe “vaccines cause autism,” I can produce observations that (defeasibly!) contradict it. But it wouldn’t be by “looking at the ground truth”; I’d observe that your qualitative model is inconsistent with what seem to me to be reasonable quantitative models, and we’d debate, presumably, until exhaustion.</p>
</section>
<section id="a-story-about-the-sun" class="level1">
<h1>A Story About the Sun</h1>
<p>Let me tell a story about a day when Alice and Bob, a couple, were discussing the ideal frequency of sunscreen use. Alice thought people should use sunscreen every day. Bob opposed this, citing studies showing most deadly skin cancer risk comes from childhood sunburns, with moderate sun exposure possibly beneficial (via Vitamin D). Alice responded citing anecdotes of contacts who tanned and later died of skin cancer.</p>
<p>This seemingly rational debate concealed deeper models. Alice’s unstated world model factors included “if Bob really cares about me, he’ll listen without being annoying about statistical details.” Bob’s hidden model factors included “I’m highly sensitive to the perception of being forced into something, even when the point is correct” and deeper still, something like “the Sun is Good”—a quasi-religious view.</p>
<p>This pattern—where legible, objective modeling on the surface masks emotional, relational, and spiritual paradigms below—is not special to small-scale, intimate interactions, but characterizes human disagreements generally. Consider NAFTA debates: quantitative economic models may mask deeper motivations about the decay of childhood hometowns, manufacturing jobs’ reality-grounding nature, or—of course—attitudes toward foreigners.</p>
<p>We often have this cargo cult of public conversation where we, complicated bundles of stories and feelings, drape ourselves in black cloth and hold out crisp graphs as the only focus of discussion, hoping no one will look under the drape at the messy, emotional, willful grounds of our complete world model. One clear sign of reaching into meta-modernity would be when the sad, angry, hopeful creatures under the cloth start explaining their real models in all their incommensurability, and only then seek common ground as necessary.</p>
<p>A case at larger scale: in problems like “design a zoning policy for Berkeley,” I want everyone with a stake to potentially contribute. There are serious challenges:</p>
<ol type="1">
<li>Normal people would rather socialize than specify policy preferences</li>
<li>Models range from “Berkeley should never change” to complex quantitative projections</li>
<li>There are many stakeholders with stakes of many, contested, sizes</li>
</ol>
<p>Sortition (jury-duty style participation) could help with problems 1 and 3, but number 2 is deeper. How do you funge the infungible, commensurate the incommensurable? Current options are:</p>
<ol type="1">
<li>Establish a top-down modeling paradigm producing scalar ratings that can be mechanically aggregated</li>
<li>Contributions are in plain text, recombined unpredictably and illegibly by decision-makers to produce a conclusion</li>
</ol>
<p>Both have problems: Option 1 excludes those who can’t express themselves in the approved language, leads to overconfidence, and lacks consensus mechanisms to update. Option 2 determines the course of civilization by who yells loudest nearest the leader.</p>
</section>
<section id="what-is-to-be-done" class="level1">
<h1>What Is To Be Done?</h1>
<p>People haven’t really learned to communicate their world models to each other; modernity was built on narrow exceptions that postmodernity has shown unsatisfactory. How do we get people explaining honestly, fully, how they see the world? This problem has spiritual aspects—getting people to notice how they see the world may require a lot of meditation, for instance. But that part really isn’t my brief.</p>
<p>What do I offer, then? Structures for models: organizing, translating, comparing them. In the sunscreen example, the conversation would have improved if Alice and Bob had made their models explicit. Both could have seen the sensitive emotional points they were approaching instead of debating factual details. I think this would really help, modulo the UX problem of figuring out how to develop these models in the midst of a real, human conversation.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="bob.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2" title="Bob’s world model (click hamburger menu-> new analysis -> new cell symbol in new pane -> visualization to view graph scrollably)"><img src="https://topos.institute/blog/2025-05-05-the-sun-is-good/bob.png" class="img-fluid figure-img" alt="Bob’s world model (click hamburger menu-> new analysis -> new cell symbol in new pane -> visualization to view graph scrollably)"></a></p>
<figcaption>Bob’s world <a href="https://catcolab.org/diagram/01955a7b-9d05-7c92-a3c6-e5c36b05383b">model</a> (click hamburger menu-&gt; new analysis -&gt; new cell symbol in new pane -&gt; visualization to view graph scrollably)</figcaption>
</figure>
</div>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="alice.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3" title="Alice’s world model"><img src="https://topos.institute/blog/2025-05-05-the-sun-is-good/alice.png" class="img-fluid figure-img" alt="Alice’s world model"></a></p>
<figcaption>Alice’s world <a href="https://catcolab.org/diagram/01955a60-e098-72f1-8bde-f520baf9b2fd">model</a></figcaption>
</figure>
</div>
<p>For those UX problems at the very least, AI support is a critical activator, smoothing over what would otherwise often become a grind of manual model refinement disincentivizing the kind of deep iterated reflection that seems worthwhile even for this kind of quotidian discussion. We need low barriers to entry but high legibility and reliability.</p>
<p>My suggestion, instantiated in the <a href="http://catcolab.org/help">CatColab</a> software being built at Topos and used to make the models shown above, is not to pick a single modeling language but a single way of constructing languages, formal enough to describe translations between approaches. AI can help by scanning possibilities and showing candidate jumps in the space of models. If candidate models have to be expressed in a well-specified language, that solves some AI-slop problems. If humans pick from candidate refinements, rather than relying on the AI to provide a consensus world model out of its broad averaging over humans-whose-writing-is-on-the-internet, that solves more problems.</p>
<p>The key to all this is to use AI to help clarify people’s world models, not press people to align with algorithm-generated models. We must preserve and enrich individuals’ and communities’ abilities to see the world clearly and express their vision as it is, enhanced, never constrained, by new technological affordancesssss</p>
<p><em>Thumbnail credit: Jan Buchholtz on <a href="https://www.flickr.com/photos/jansgate/16926167745">flickr</a></em></p>
<p><em>If you liked this and want to full-length and slightly unhinged version, including rambling footnotes on the dating of the beginning of modernity and all, it’s <a href="https://docs.google.com/document/d/1qyWbE3s1oe30Ufrw56iWIHU_sUa8s114KIYUQqx2clI/edit?tab=t.0">here</a>, below the short version.</em></p>


</section>

<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>informal</category>
  <category>vision</category>
  <category>CatColab</category>
  <category>AI</category>
  <category>philosophy</category>
  <guid>https://topos.institute/blog/2025-05-05-the-sun-is-good/</guid>
  <pubDate>Fri, 09 May 2025 00:00:00 GMT</pubDate>
  <media:content url="https://topos.institute/blog/2025-05-05-the-sun-is-good/lemur.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>TopOx seminar</title>
  <dc:creator>Tim Hosgood</dc:creator>
  <link>https://topos.institute/blog/2025-05-08-topox-seminar/</link>
  <description><![CDATA[ 




<p>Next week we will be hosting a guest seminar talk in Oxford, co-organised by José Siqueira here at Topos UK, and Sandra Kiefer and Sam Staton at the Oxford University Computer Science department. If you’re around town, then you’re very welcome to attend — you can find a copy of the announcement below.</p>
<hr>
<p>Dear all,</p>
<p>It is with great pleasure that I announce the start of our TopOx seminar series, a partnership between the Topos Institute and the Oxford University Computer Science department. We will extend invitations to distinguished speakers throughout the year to come to Oxford and join us for a discussion on Category Theory, Logic, Type Theory, and adjacent topics.</p>
<p>The first talk will be held on <strong>Tuesday, the 13th of May</strong>, at <strong>4pm</strong> at the <strong>Oxford Mathematical Institute</strong> (Andrew Wiles Building, <strong>Lecture Theatre L2</strong>, downstairs). Our inaugural speaker is Professor Peter T. Johnstone (University of Cambridge)</p>
<blockquote class="blockquote">
<p><em>Title:</em> Remarks on local state classifiers</p>
<p><em>Abstract:</em> In a recent paper, Ryuya Hora introduced a remarkable new concept called a local state classifier, and showed that (when it exists) it provides a solution to Lawvere’s problem of parametrizing the hyperconnected quotients of a given topos by structures internal to the topos. However, he left some questions unanswered. This talk will describe Hora’s construction, together with my attempts to answer the outstanding questions, and some new examples.</p>
</blockquote>
<p>The talk is open to all. We hope to see you there.</p>
<p>Best wishes, The Organisers</p>



<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>events</category>
  <category>micro</category>
  <guid>https://topos.institute/blog/2025-05-08-topox-seminar/</guid>
  <pubDate>Thu, 08 May 2025 00:00:00 GMT</pubDate>
  <media:content url="https://topos.institute/blog/2025-05-08-topox-seminar/thumbnail.png" medium="image" type="image/png" height="137" width="144"/>
</item>
<item>
  <title>The three functions of a name: reference, identity and display</title>
  <dc:creator>Owen Lynch</dc:creator>
  <link>https://topos.institute/blog/2025-05-07-three-functions-of-a-name/</link>
  <description><![CDATA[ 




<p>This is a brief little post about naming. Naming is well-known to be one of the hardest problems in computer science. But why is this the case? I claim that one of the reasons is because often naming systems are being asked to do triple-duty; a single name is used to perform the three functions of <em>reference</em>, <em>identity</em>, and <em>display</em>. What does this mean?</p>
<p>Consider a group of people. Each person has a name. However, these names may not be unique. If I want to <em>refer</em> to a person, I might say something like “the John who most recently took a trip to Japan”. But this is not the only way to refer to this person; there are innumerable ways to pick out an individual. As another example, in an unambiguous context, I might simply say “John”. Or I might have a nickname for him, “Johnny”.</p>
<p>However, how do we figure out if two references point to the same person? One way would be to physically check by following the reference to the people, but if you want to do this on a computer, this doesn’t work. Another way to do it would be to have a way of resolving references to social security numbers (assuming the people are US citizens). Social security numbers <em>identify</em> people in the sense that there is an injection from people to social security numbers.</p>
<p>Finally, if I have a list of social security numbers and I want to make them mnemonic in some way, I might put each person’s full name next to the social security number. Or I might put each person’s full name and a little bio. This is the function of <em>display</em>. Just like references, displays are context-sensitive; I might want to show different information in different contexts. One way of making a display is to invert a certain class of references. For instance, you could display for each person all of their nicknames. But this is not the only purpose of a display; a display often functions to give some useful information about a person. In the olden days, a person’s surname might advertise their profession, like “smith”.</p>
<p>In practice, we might have displays which one would not typically think of in terms of “naming,” like showing documentation for a function in a programming language. But names are often used for the purpose of display, so it is worth thinking about under the context of naming.</p>
<p>We now give a variety of examples of various computer systems and how they distinguish between these functions.</p>
<p><strong>Example: Lexical scoping</strong></p>
<p>In a programming language with lexical scoping, context information is used to disambiguate names, so that <code>a</code> refers to the most recently bound variable in scope with name <code>a</code> . Names are not sufficient to resolve identity though. Consider the following dependent function:</p>
<pre><code>f : (a : Int) -&gt; (let b = a in Eq Int a b)
f a = Refl</code></pre>
<p>This will typecheck, because <code>a</code> and <code>b</code> are definitionally equal, even though they are refered to by different names. Note that this is different from <code>a</code> and <code>b</code> coincidentally having the same value; they are actually the same <em>variable</em>.</p>
<p>The question of display for variables is a tricky one. Consider the program</p>
<pre><code>f : {a : Type} -&gt; a -&gt; {a : Type} -&gt; a -&gt; a
f x y = x</code></pre>
<p>(As is the convention in Agda, we use <code>{...}</code> for implicit arguments.) This does not type check, because <code>x</code> has type the first <code>a</code> and <code>y</code> has type the second <code>a</code>. A naive implementation of error messages would print out <code>error: x has type a when type a was expected</code>, which is of course horribly useless. A better error message would be something like <code>error: x has type a#1 when type a#0 was expected</code>, where <code>a#0</code> refers to the most recently bound <code>a</code> and <code>a#1</code> refers to the second most recently bound <code>a</code>.</p>
<p><strong>Example: Julia packages</strong></p>
<p>In the Julia package manager, packages can be referred to by:</p>
<ul>
<li>Their name as registered in the Julia package registry</li>
<li>Their github repo</li>
<li>Their path on a local computer</li>
</ul>
<p>However, each package is <em>identified</em> by a UUID. And packages always are <em>displayed</em> by their name.</p>
<p><strong>Example: Rust package manager</strong></p>
<p>The Rust package manager, like the Julia package manager, can refer to other packages by their name in the cargo repository, or by github repo, or local path, etc.</p>
<p>However, it <em>identifies</em> them by their sha256 sum. That is, a package is identified by precisely its content.</p>
<p>There is not one single way to handle the functions of reference, identity, and display. But any system for naming things usually perform all three functions, and realizing that these functions can be handled by distinct means opens up the design space to better designs, including designs in which there are even multiple display modes or multiple reference modes.</p>
<p>For a related, but distinct trilemma involving names, see <a href="https://en.wikipedia.org/wiki/Zooko's_triangle">Zooko’s triangle</a>, and also see <a href="https://files.spritely.institute/papers/petnames.html">petnames</a>, a solution to the triangle which exploits the fact that one can use a different system for reference than identity.</p>



<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

 ]]></description>
  <category>programming</category>
  <category>double categories</category>
  <guid>https://topos.institute/blog/2025-05-07-three-functions-of-a-name/</guid>
  <pubDate>Wed, 07 May 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Graded categories as double functors</title>
  <dc:creator>Evan Patterson</dc:creator>
  <link>https://topos.institute/blog/2025-05-01-graded-categories/</link>
  <description><![CDATA[ 




<!-- Category theory -->
<!-- Categories -->
<!-- Double category theory -->
<!-- Double categories -->
<!-- Graded categories -->
<p>At last week’s <a href="https://topos.institute/events/topos-colloquium/">Topos Colloquium</a>, Rory Lucyshyn-Wright told us about categories graded by a monoidal category, following his recent preprint <span class="citation" data-cites="lucyshyn-wright2025">(Lucyshyn-Wright 2025)</span>. <em>Graded categories</em>, short for <a href="https://ncatlab.org/nlab/show/locally+graded+category"><em>locally graded categories</em></a>, were first introduced by Richard Wood under a different name <span class="citation" data-cites="wood1976 wood1978">(Wood 1976, 1978)</span>. Graded categories are of mathematical interest because they simultaneously generalize <a href="https://ncatlab.org/nlab/show/action+of+a+monoidal+category">actions of a monoidal category</a> (“actegories”) and, via a Yoneda-type embedding, enriched categories, while enjoying the advantage that extra monoidal structure like symmetry is not needed to construct functor categories and bifunctors.</p>
<p>My own interest was piqued since, from its very beginning, <a href="https://github.com/ToposInstitute/CatColab">CatColab</a> has featured categories graded by monoids. As the simplest example, categories graded by the multiplicative monoid of signs <img src="https://latex.codecogs.com/png.latex?%5C%7B+,%20-%5C%7D"> are called <em>signed categories</em>. Among these, the <em>free</em> signed categories are a good description of causal loop diagrams and regulatory networks <span class="citation" data-cites="aduddell2023">(Aduddell et al. 2024)</span>. Grading by a monoidal category generalizes grading by a monoid. In fact, within CatColab’s mathematical framework <span class="citation" data-cites="lambert2024">(Lambert and Patterson 2024)</span>, categories graded by a monoidal category are just the models of a simple double theory determined by the monoidal category.</p>
<p>The purpose of this blog post is to explain that. I will explain how a category graded by a monoidal category <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> is the same thing as a lax double functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D">, where the delooping double category <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)"> is the monoidal category <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> viewed as a double category with trivial category of objects and arrows. First, I review the main definition.</p>
<section id="graded-categories-concretely" class="level2" data-number="1">
<h2 data-number="1" data-anchor-id="graded-categories-concretely"><span class="header-section-number">1</span> Graded categories, concretely</h2>
<p>There are several quick, conceptual ways to define a category graded by a monoidal category. I prefer to start with a fully concrete description.</p>
<div id="def-graded-category" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 1</strong></span> Let <img src="https://latex.codecogs.com/png.latex?(%5Cmathcal%7BV%7D,%20%5Cotimes,%20I)"> be a monoidal category. A <strong>category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> graded by <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"></strong> consists of:</p>
<ul>
<li>a set of <strong>objects</strong>;</li>
<li>for each object <img src="https://latex.codecogs.com/png.latex?x"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> and each pair of objects <img src="https://latex.codecogs.com/png.latex?a,b"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, a set <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D_x(a,b)">, whose elements are called <strong>morphisms</strong> from <img src="https://latex.codecogs.com/png.latex?a"> to <img src="https://latex.codecogs.com/png.latex?b"> <strong>graded</strong> by <img src="https://latex.codecogs.com/png.latex?x">, and denoted <img src="https://latex.codecogs.com/png.latex?f:%20(x,%20a)%20%5Cto%20b">;</li>
<li>for each pair of objects <img src="https://latex.codecogs.com/png.latex?x,y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> and triple of objects <img src="https://latex.codecogs.com/png.latex?a,b,c"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, a <strong>composition</strong> operation <img src="https://latex.codecogs.com/png.latex?%0A%5Cmathsf%7BC%7D_x(a,b)%20%5Ctimes%20%5Cmathsf%7BC%7D_y(b,c)%20%5Cto%20%5Cmathsf%7BC%7D_%7Bx%20%5Cotimes%20y%7D(a,c);%0A"></li>
<li>for each object <img src="https://latex.codecogs.com/png.latex?a"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, an <strong>identity</strong> morphism <img src="https://latex.codecogs.com/png.latex?1%20%5Cto%0A%5Cmathsf%7BC%7D_I(a,a)"> graded by the unit, denoted <img src="https://latex.codecogs.com/png.latex?1_a:%20(I,%20a)%20%5Cto%20a">;</li>
<li>for each morphism <img src="https://latex.codecogs.com/png.latex?%5Calpha:%20x%20%5Cto%20y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> and each pair of objects <img src="https://latex.codecogs.com/png.latex?a,b"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, a <strong>reindexing</strong> operation <img src="https://latex.codecogs.com/png.latex?%0A%5Calpha%5E*:%20%5Cmathsf%7BC%7D_y(a,b)%20%5Cto%20%5Cmathsf%7BC%7D_x(a,b),%0A"> sending a morphism <img src="https://latex.codecogs.com/png.latex?f:%20(y,a)%20%5Cto%20b"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> to a morphism <img src="https://latex.codecogs.com/png.latex?%5Calpha%5E*(f):%0A(x,%20a)%20%5Cto%20b">.</li>
</ul>
<p>The following axioms must be satisfied.</p>
<ul>
<li><em>Functorality of reindexing</em>: we have <img src="https://latex.codecogs.com/png.latex?(%5Cbeta%20%5Ccirc%20%5Calpha)%5E*(f)%20=%0A%5Calpha%5E*(%5Cbeta%5E*(f))"> and <img src="https://latex.codecogs.com/png.latex?1_x%5E*(f)%20=%20f"> whenever those equations make sense.</li>
<li><em>Naturality of composition</em>: for all morphisms <img src="https://latex.codecogs.com/png.latex?%5Calpha:%20w%20%5Cto%20x"> and <img src="https://latex.codecogs.com/png.latex?%5Cbeta:%20y%0A%5Cto%20z"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> and morphisms <img src="https://latex.codecogs.com/png.latex?f:%20(x,%20a)%20%5Cto%20b"> and <img src="https://latex.codecogs.com/png.latex?g:%20(z,%20b)%20%5Cto%20c"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, we have <img src="https://latex.codecogs.com/png.latex?%0A(%5Calpha%20%5Cotimes%20%5Cbeta)%5E*(f%20%5Ccdot%20g)%20=%20%5Calpha%5E*(f)%20%5Ccdot%20%5Cbeta%5E*(g).%0A"></li>
<li><em>Associativity and unitality</em>: as expected, see <span class="citation" data-cites="lucyshyn-wright2025">(Lucyshyn-Wright 2025, Definition 3.3)</span> for details.</li>
</ul>
</div>
</section>
<section id="graded-categories-double-categorically" class="level2" data-number="2">
<h2 data-number="2" data-anchor-id="graded-categories-double-categorically"><span class="header-section-number">2</span> Graded categories, double-categorically</h2>
<p>A category graded by a monoidal category <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> is succinctly described as a category enriched in <img src="https://latex.codecogs.com/png.latex?%5Cwidehat%7B%5Cmathcal%7BV%7D%7D">, the presheaf category <img src="https://latex.codecogs.com/png.latex?%5Cwidehat%7B%5Cmathcal%7BV%7D%7D%0A%5Ccoloneqq%20%5B%5Cmathcal%7BV%7D%5E%5Cmathrm%7Bop%7D,%20%5Cmathsf%7BSet%7D%5D"> with its monoidal structure given by Day convolution. While brief, this characterization is somewhat complicated since the formula for Day convolution involves a coend. The following characterizations are equally brief but avoid mention of any colimits.</p>
<div id="prp-graded-category-as-lax-functor" class="theorem proposition">
<p><span class="theorem-title"><strong>Proposition 1</strong></span> Let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> be a monoidal category. The following are equivalent:</p>
<ol type="1">
<li>Categories graded by <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">;</li>
<li>Lax double functors <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D">;</li>
<li>Discrete double fibrations over <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)">, i.e., double functors <img src="https://latex.codecogs.com/png.latex?P:%0A%5Cmathbb%7BD%7D%20%5Cto%20%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)"> whose underlying functors <img src="https://latex.codecogs.com/png.latex?P_0:%20%5Cmathbb%7BD%7D_0%20%5Cxrightarrow%7B!%7D%0A%5Cmathsf%7B1%7D"> and <img src="https://latex.codecogs.com/png.latex?P_1:%20%5Cmathbb%7BD%7D_1%20%5Cto%20%5Cmathcal%7BV%7D"> are discrete fibrations.</li>
</ol>
</div>
<div class="callout callout-style-simple callout-tip no-icon callout-titled">
<div class="callout-header d-flex align-content-center collapsed" data-bs-toggle="collapse" data-bs-target=".callout-1-contents" aria-controls="callout-1" aria-expanded="false" aria-label="Toggle callout">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Proof
</div>
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
</div>
<div id="callout-1" class="callout-1-contents callout-collapse collapse">
<div class="callout-body-container callout-body">
<p>The equivalence between (2) and (3) is a general fact about double functors <span class="citation" data-cites="lambert2021">(Lambert 2021)</span>, so we need only check that (1) and (2) are equivalent. Consider a lax double functor <img src="https://latex.codecogs.com/png.latex?F:%20%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D">. The data of such a functor is just that of a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">:</p>
<ul>
<li>The image <img src="https://latex.codecogs.com/png.latex?F(*)"> of the unique object in the domain double category is the set of objects in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">.</li>
<li>For each object <img src="https://latex.codecogs.com/png.latex?x"> of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">, the span <img src="https://latex.codecogs.com/png.latex?F(x):%20F(*)%20%5Cmathrel%7B%5Cmkern%203mu%5Cvcenter%7B%5Chbox%7B$%5Cshortmid$%7D%7D%5Cmkern-10mu%7B%5Cto%7D%7DF(*)"> is the set of all <img src="https://latex.codecogs.com/png.latex?x">-graded morphisms in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, along with the domain and codomain assignments.</li>
<li>For each pair of objects <img src="https://latex.codecogs.com/png.latex?x,y"> in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">, the laxator <img src="https://latex.codecogs.com/png.latex?F_%7Bx,y%7D:%20F(x)%20%5Codot%0AF(y)%20%5Cto%20F(x%20%5Cotimes%20y)"> gives the composition operation in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D"> sending a compatible pair of <img src="https://latex.codecogs.com/png.latex?x">-graded and <img src="https://latex.codecogs.com/png.latex?y">-graded morphisms to a <img src="https://latex.codecogs.com/png.latex?(x%20%5Cotimes%0Ay)">-graded morphism.</li>
<li>The unitor <img src="https://latex.codecogs.com/png.latex?F_*:%20%5Coperatorname%7Bid%7D_%7BF(*)%7D%20%5Cto%20F(I)"> gives the <img src="https://latex.codecogs.com/png.latex?I">-graded identity morphisms in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">.</li>
</ul>
<p>As for the axioms, functorality of <img src="https://latex.codecogs.com/png.latex?F"> is equivalent to functorality of reindexing in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, naturality of the laxators of <img src="https://latex.codecogs.com/png.latex?F"> is naturality of composition in <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D">, naturality of the unitor of <img src="https://latex.codecogs.com/png.latex?F"> is trivial, and finally the associativity and unitality axioms of the two structures coincide.</p>
</div>
</div>
</div>
<p>Since the only arrow in <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)"> is the identity, a lax double functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D"> can equally be described as a lax functor from the delooping <em>bicategory</em> of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> to the bicategory of spans. As usual in such cases, the advantage of working double-categorically rather than bicategorically is that we get the right morphisms. It is straightforward to show that a (tight) natural transformation <img src="https://latex.codecogs.com/png.latex?%0A%5Calpha:%20F%20%5CRightarrow%20G:%20%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D%0A"> between lax double functors is just a graded functor between graded categories, in the sense of <span class="citation" data-cites="lucyshyn-wright2025">(Lucyshyn-Wright 2025, Definition 3.5)</span>.</p>
<p>Pursuing this further, the above Proposition&nbsp;1, stated somewhat loosely as a correspondence between objects, would be better upgraded to an equivalence between <em>virtual double categories</em>.<sup>1</sup> Such an equivalence almost certainly holds, though I will not check the details here.</p>
</section>
<section id="examples" class="level2" data-number="3">
<h2 data-number="3" data-anchor-id="examples"><span class="header-section-number">3</span> Examples</h2>
<p>You can easily find examples of graded categories once you know to look for them. Two large classes of examples are <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-enriched categories and <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-actegories, each of which embed fully faithfully into <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded categories <span class="citation" data-cites="lucyshyn-wright2025">(Lucyshyn-Wright 2025, Examples 3.8 &amp; 3.9)</span>. Let’s look at more specific examples instead.</p>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Grading by monoids
</div>
</div>
<div class="callout-body-container callout-body">
<p>Since a discrete monoidal category is just a monoid, a category graded by a monoid is, in a degenerate way, a category graded by a monoidal category. We have already mentioned signed categories as a particular case. Further examples in that style are the different flavors of causal loop diagram appearing in <a href="https://catcolab.org/help/theories">CatColab</a> and in John Baez’s blog series on <a href="https://johncarlosbaez.wordpress.com/2024/11/02/polarities/">polarities</a>.</p>
</div>
</div>
<p>A step up in complexity to grade by a <em>thin</em> monoidal category, i.e., a monoidal preorder. In progamming jargon, the morphisms in such a graded category have types that are implicitly converted to a common supertype when composed.</p>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Promonads
</div>
</div>
<div class="callout-body-container callout-body">
<p>In an <a href="https://topos.institute/blog/2024-01-29-algebras-are-promonads/">earlier post</a>, we saw how to describe <a href="https://ncatlab.org/nlab/show/promonad">promonads</a> as double functors, enabling us to formalize an analogy between promonads on a category and algebras over a ring. In fact, promonads are examples of graded categories. To be more precise, if <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D%5E%5Cmathrm%7Bop%7D%5Ccoloneqq%20%5C%7B%5Cbot%20%5Cto%20%5Ctop%5C%7D"> is the monoidal poset of booleans under disjunction,<sup>2</sup> then <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Ccong%20%5Cmathbb%7BT%7D_%7B%5Cmathsf%7BPromnd%7D%7D">, where the theory of promonads <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BT%7D_%7B%5Cmathsf%7BPromnd%7D%7D"> was introduced <a href="https://topos.institute/blog/2024-01-29-algebras-are-promonads/#the-theory-of-promonads">previously</a>, and hence a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category is the same thing as a category along with a promonad on it.</p>
</div>
</div>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Grading by semilattices
</div>
</div>
<div class="callout-body-container callout-body">
<p>Promonads capture the situation that a common set of objects admits two category structures, with one type of morphism mapping functorially into the other. Such situations occur often in mathematics, and not necessarily with just two types. Generalizing, we can take <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D%5E%5Cmathrm%7Bop%7D"> to be any join-semilattice. For example, functions between real vector spaces, or subsets thereof, may obey any of the properties recorded in the following lattice <span class="citation" data-cites="patterson2020">(Patterson 2020, Examples 2.4.2 &amp; 2.4.3)</span>:</p>
<div class="tikz">
<img src="https://topos.institute/blog/2025-05-01-graded-categories/_svgs/1bfe34c4dec64e654259c7eb1ae1000de319e7f3.svg" class="img-fluid">
</div>
<p>In such a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category, an affine map can be composed with a conic-linear map to obtain a convex-linear map. As another example, Bonchi et al define an <em>effectful triple</em> to be, among other things, a category graded by the linear order <img src="https://latex.codecogs.com/png.latex?%5B3%5D">, where the three types of morphisms model programs with pure functions, local effects, and global effects <span class="citation" data-cites="bonchi2024">(Bonchi, Di Lavore, and Román 2024)</span>.</p>
</div>
</div>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Grading by cost
</div>
</div>
<div class="callout-body-container callout-body">
<p>Let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D=%20(%5B0,%5Cinfty%5D,%20%5Cgeq)"> be the monoidal poset of extended nonnegative real numbers under the opposite order, with monoidal product given by addition. Famously, a category enriched in <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> is a Lawvere metric space.</p>
<p>What about a category graded by <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">? We can think of a morphism <img src="https://latex.codecogs.com/png.latex?a%20%5Cto%20b"> graded by <img src="https://latex.codecogs.com/png.latex?x%20%5Cgeq%200"> as a “proof that the distance from <img src="https://latex.codecogs.com/png.latex?a"> to <img src="https://latex.codecogs.com/png.latex?b"> is at most <img src="https://latex.codecogs.com/png.latex?x">” or as a “path from <img src="https://latex.codecogs.com/png.latex?a"> to <img src="https://latex.codecogs.com/png.latex?b"> with cost at most <img src="https://latex.codecogs.com/png.latex?x">”. Composition in the graded category says that if we have a proof that the distance from <img src="https://latex.codecogs.com/png.latex?a"> to <img src="https://latex.codecogs.com/png.latex?b"> is at most <img src="https://latex.codecogs.com/png.latex?x"> and a proof that the distance from <img src="https://latex.codecogs.com/png.latex?b"> to <img src="https://latex.codecogs.com/png.latex?c"> is at most <img src="https://latex.codecogs.com/png.latex?y">, then we get a proof that the distance from <img src="https://latex.codecogs.com/png.latex?a"> to <img src="https://latex.codecogs.com/png.latex?c"> is at most <img src="https://latex.codecogs.com/png.latex?x%20+%20y">. Reindexing says that if <img src="https://latex.codecogs.com/png.latex?y%20%5Cgeq%20x"> and we have a proof that the distance from <img src="https://latex.codecogs.com/png.latex?a"> to <img src="https://latex.codecogs.com/png.latex?b"> is at most <img src="https://latex.codecogs.com/png.latex?x">, then we get a weaker proof that said distance is at most <img src="https://latex.codecogs.com/png.latex?y">. Thus, <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded categories are a minimal fragment of the “logic of analysis,” in which we can rarely calculate distances but must settle for bounding them.</p>
</div>
</div>
<p>Finally, categories with “parameterized” maps are often viewable as categories graded by the parameter spaces, with reindexing in the graded category being <em>reparameterization</em>. The nLab page on the <a href="https://ncatlab.org/nlab/show/para+construction">Para construction</a> lists many examples inspired by machine learning and optimization. The Para construction is taken to produce a bicategory, but making the reparameterizations be 2-cells in a bicategory obscures their fibered character, which is made explicit in a graded category. In terms of Proposition&nbsp;1, the bicategory of parameterized maps can be recovered as the elements construction of a span-valued double functor or, equivalently, as the total double category in a discrete double fibration.</p>
<p>For the sake of variety, let’s see a different flavor of parameterized map, inspired by the <a href="https://ncatlab.org/nlab/show/Moore+path+category">Moore path category</a> from topology.</p>
<div class="callout callout-style-simple callout-note no-icon callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Homotopies as graded morphisms
</div>
</div>
<div class="callout-body-container callout-body">
<p>Let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> be the category whose objects are nonnegative real numbers <img src="https://latex.codecogs.com/png.latex?T">, viewed as closed intervals <img src="https://latex.codecogs.com/png.latex?%5B0,%20T%5D">, and whose morphisms <img src="https://latex.codecogs.com/png.latex?T%20%5Cto%20T'"> are endpoint-preserving continuous maps <img src="https://latex.codecogs.com/png.latex?%5Calpha:%20%5B0,%20T%5D%20%5Cto%20%5B0,%20T'%5D">. Endow <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> with the monoidal product <img src="https://latex.codecogs.com/png.latex?%5Coplus"> that acts by adding objects and concatenating morphisms, i.e., given maps <img src="https://latex.codecogs.com/png.latex?%5Calpha:%20%5B0,%20T%5D%20%5Cto%20%5B0,%20T'%5D"> and <img src="https://latex.codecogs.com/png.latex?%5Cbeta:%20%5B0,%20S%5D%20%5Cto%0A%5B0,%20S'%5D">, we have <img src="https://latex.codecogs.com/png.latex?%0A(%5Calpha%20%5Coplus%20%5Cbeta)(t)%20%5Ccoloneqq%20%5Cbegin%7Bcases%7D%0A%20%20%5Calpha(t)%20&amp;%5Ctext%7Bif%20%7D%20t%20%5Cleq%20T%20%5C%5C%0A%20%20T'%20+%20%5Cbeta(t%20-%20T)%20&amp;%5Ctext%7Bif%20%7D%20t%20%5Cgeq%20T,%0A%5Cend%7Bcases%7D%0A%5Cqquad%200%20%5Cleq%20t%20%5Cleq%20T%20+%20S.%0A"></p>
<p>We will construct a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category whose <img src="https://latex.codecogs.com/png.latex?T">-graded morphisms are homotopies of duration <img src="https://latex.codecogs.com/png.latex?T">. Fix a partial continuous map of topological spaces <img src="https://latex.codecogs.com/png.latex?I%20%5Chookleftarrow%20I_0%20%5Cxrightarrow%7Bh%7D%20X">. The <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D_h(I,%20X)"> will have, as objects, continuous maps <img src="https://latex.codecogs.com/png.latex?f:%20I%20%5Cto%20X"> extending the map <img src="https://latex.codecogs.com/png.latex?h:%20I_0%0A%5Cto%20X"> along the inclusion <img src="https://latex.codecogs.com/png.latex?I_0%20%5Chookrightarrow%20I">, i.e., such that <img src="https://latex.codecogs.com/png.latex?f(i)%20=%0Ah(i)"> for each <img src="https://latex.codecogs.com/png.latex?i%20%5Cin%20I_0">. Then a <img src="https://latex.codecogs.com/png.latex?T">-graded morphism <img src="https://latex.codecogs.com/png.latex?f%20%5CRightarrow%20g"> is a <strong>homotopy</strong> from <img src="https://latex.codecogs.com/png.latex?f"> to <img src="https://latex.codecogs.com/png.latex?g"> <strong>relative</strong> to <img src="https://latex.codecogs.com/png.latex?h"> and of <strong>duration</strong> <img src="https://latex.codecogs.com/png.latex?T">, meaning a continuous map <img src="https://latex.codecogs.com/png.latex?H:%20I%20%5Ctimes%20%5B0,%20T%5D%20%5Cto%20X"> satisfying the equations <img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0A%20%20H(i,%200)%20=%20f(i),%20&amp;%5Cqquad%20%5Cforall%20i%20%5Cin%20I,%20%5C%5C%0A%20%20H(i,%20T)%20=%20g(i),%20&amp;%5Cqquad%20%5Cforall%20i%20%5Cin%20I,%20%5C%5C%0A%20%20H(i,%20t)%20=%20h(i),%20&amp;%5Cqquad%20%5Cforall%20i%20%5Cin%20I_0,%5C%20t%20%5Cin%20%5B0,%20T%5D.%0A%5Cend%7Baligned%7D%0A"> Homotopies <img src="https://latex.codecogs.com/png.latex?f%20%5CRightarrow%20g"> and <img src="https://latex.codecogs.com/png.latex?g%20%5CRightarrow%20k"> of respective durations <img src="https://latex.codecogs.com/png.latex?T"> and <img src="https://latex.codecogs.com/png.latex?S"> compose by concatenation to give a homotopy <img src="https://latex.codecogs.com/png.latex?f%20%5CRightarrow%20k"> of duration <img src="https://latex.codecogs.com/png.latex?T%20+%20S">, and the identity homotopy on a map is the unique homotopy of duration zero. Finally, the reindexing of a homotopy <img src="https://latex.codecogs.com/png.latex?H"> of duration <img src="https://latex.codecogs.com/png.latex?T'"> along a map <img src="https://latex.codecogs.com/png.latex?%5Calpha:%20%5B0,%20T%5D%20%5Cto%0A%5B0,%20T'%5D"> is the reparameterized homotopy <img src="https://latex.codecogs.com/png.latex?%5Calpha%5E*(H)%20%5Ccoloneqq%20H%20%5Ccirc%20(1_I%0A%5Ctimes%20%5Calpha)">, which has duration <img src="https://latex.codecogs.com/png.latex?T">.</p>
<p>Important special cases of the graded category <img src="https://latex.codecogs.com/png.latex?%5Cmathsf%7BC%7D_h(I,X)"> are:</p>
<ol type="1">
<li>When <img src="https://latex.codecogs.com/png.latex?I%20=%201"> and <img src="https://latex.codecogs.com/png.latex?I_0%20=%200">, the objects are points in <img src="https://latex.codecogs.com/png.latex?X"> and <img src="https://latex.codecogs.com/png.latex?T">-graded morphisms are paths of duration <img src="https://latex.codecogs.com/png.latex?T">.</li>
<li>When <img src="https://latex.codecogs.com/png.latex?I%20=%20S%5E1"> is the circle and <img src="https://latex.codecogs.com/png.latex?I_0%20=%201">, the objects are loops in <img src="https://latex.codecogs.com/png.latex?X"> with fixed base point and morphisms are basepoint-preserving homotopies between loops.</li>
<li>When <img src="https://latex.codecogs.com/png.latex?I%20=%20%5B0,1%5D"> is the unit interval and <img src="https://latex.codecogs.com/png.latex?I_0%20=%20%5C%7B0,%201%5C%7D">, the objects are paths in <img src="https://latex.codecogs.com/png.latex?X"> with fixed endpoints and the morphisms are endpoint-preserving homotopies between paths.</li>
</ol>
<p>Thus, by augmenting our categories with a grading, we can build analogues of the fundamental group and fundamental groupoid without having to take any quotients. To recover a unit-duration homotopy from a composite of two such, simply reindex along any reparameterization <img src="https://latex.codecogs.com/png.latex?%5Calpha:%20%5B0,%201%5D%20%5Cto%20%5B0,%202%5D">, such as the linear one <img src="https://latex.codecogs.com/png.latex?%5Calpha(t)%20%5Ccoloneqq%202t">. Of course, the choice of reparameterization is arbitrary. The point is that by keeping <em>all</em> of the reparameterizations around, we never have to choose just <em>one</em>, which is what forces quotienting in the standard constructions.</p>
</div>
</div>
</section>
<section id="bigraded-categories" class="level2" data-number="4">
<h2 data-number="4" data-anchor-id="bigraded-categories"><span class="header-section-number">4</span> Bigraded categories</h2>
<p>A careful study of graded categories from the perspective of double category theory (which I have not done!) would likely yield many insights. I’ll mention just one, concerning <em>bi</em>graded categories, that jumped out to me while skimming <span class="citation" data-cites="lucyshyn-wright2025">Lucyshyn-Wright (2025)</span>’s paper.</p>
<p>Given a monoidal category <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">, write <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D%5E%5Cmathrm%7Brev%7D"> for the monoidal category with reversed multiplication, so that <img src="https://latex.codecogs.com/png.latex?x%20%5Cotimes_%5Cmathrm%7Brev%7Dy%20%5Ccoloneqq%20y%20%5Cotimes%20x">.</p>
<div id="def-bigraded-category" class="theorem definition">
<p><span class="theorem-title"><strong>Definition 2</strong></span> Let <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BW%7D"> be monoidal categories. A <strong>category bigraded by <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D"> and <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BW%7D"></strong> is a category graded by the product <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D%5Ctimes%20%5Cmathcal%7BW%7D%5E%5Cmathrm%7Brev%7D">.</p>
</div>
<p>The <em>bigraded product</em> is a construction that takes a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category and a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BW%7D%5E%5Cmathrm%7Brev%7D">-graded category and produces <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-<img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BW%7D">-bigraded category. It admits a simple description using double functors, which follows directly from the definitions.</p>
<div id="prp-bigraded-product" class="theorem proposition">
<p><span class="theorem-title"><strong>Proposition 2</strong></span> The bigraded product <span class="citation" data-cites="lucyshyn-wright2025">(Lucyshyn-Wright 2025, Definition 9.9)</span> of <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded and <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BW%7D%5E%5Cmathrm%7Brev%7D">-graded categories, viewed as lax double functors <img src="https://latex.codecogs.com/png.latex?%0AF:%20%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D%0A%5Cqquad%5Ctext%7Band%7D%5Cqquad%0AG:%20%5Cmathbb%7BB%7D(%5Cmathcal%7BW%7D)%5E%5Cmathrm%7Bcoop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D,%0A"> is given by the double functor <img src="https://latex.codecogs.com/png.latex?%0A%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D%5Ctimes%20%5Cmathcal%7BW%7D%5E%5Cmathrm%7Brev%7D)%5E%5Cmathrm%7Bop%7D=%0A%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Ctimes%20%5Cmathbb%7BB%7D(%5Cmathcal%7BW%7D)%5E%5Cmathrm%7Bcoop%7D%5Cxrightarrow%7BF%20%5Ctimes%20G%7D%0A%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D%5E2%20%5Cxrightarrow%7B%5Ctimes%7D%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D,%0A"> where the final (pseudo) double functor is the product in the cartesian double category <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D">.</p>
</div>
</section>
<section id="outlook" class="level2" data-number="5">
<h2 data-number="5" data-anchor-id="outlook"><span class="header-section-number">5</span> Outlook</h2>
<p>If a <img src="https://latex.codecogs.com/png.latex?%5Cmathcal%7BV%7D">-graded category is a lax functor <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D"> on the delooping double category, then why not drop the restriction to monoidal categories and define a <strong>category graded by a double category <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BD%7D"></strong> to be a lax presheaf on <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BD%7D"> or, equivalently, a discrete double fibration over <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BD%7D">? That is precisely what Michael and I called a <strong>model of the simple double theory <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BD%7D%5E%5Cmathrm%7Bop%7D"></strong> in our paper on cartesian double theories <span class="citation" data-cites="lambert2024">(Lambert and Patterson 2024, sec. 3)</span>.</p>
<p>However, grading is a <a href="https://ncatlab.org/nlab/show/concept+with+an+attitude">concept with an attitude</a>, suggestive of new examples that we did not consider. For example, a category graded by the core of the double category of finite sets and spans would be a higher-dimensional <a href="https://ncatlab.org/nlab/show/species">combinatorial species</a>, having both objects and morphisms indexed by finite sets. I hope to revisit such ideas in a future post.</p>
</section>
<section id="references" class="level2" data-number="6">
<h2 data-number="6" data-anchor-id="references"><span class="header-section-number">6</span> References</h2>
<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0">
<div id="ref-aduddell2023" class="csl-entry">
Aduddell, Rebekah, James Fairbanks, Amit Kumar, Pablo S. Ocal, Evan Patterson, and Brandon T. Shapiro. 2024. <span>“A Compositional Account of Motifs, Mechanisms, and Dynamics in Biochemical Regulatory Networks.”</span> <em>Compositionality</em> 6 (2). <a href="https://doi.org/10.32408/compositionality-6-2">https://doi.org/10.32408/compositionality-6-2</a>.
</div>
<div id="ref-bonchi2024" class="csl-entry">
Bonchi, Filippo, Elena Di Lavore, and Mario Román. 2024. <span>“Effectful <span>Mealy</span> Machines: Bisimulation and Trace.”</span> <a href="https://arxiv.org/abs/2410.10627">https://arxiv.org/abs/2410.10627</a>.
</div>
<div id="ref-lambert2021" class="csl-entry">
Lambert, Michael. 2021. <span>“Discrete Double Fibrations.”</span> <em>Theory and Applications of Categories</em> 37 (22): 671–708. <a href="http://www.tac.mta.ca/tac/volumes/37/22/37-22abs.html">http://www.tac.mta.ca/tac/volumes/37/22/37-22abs.html</a>.
</div>
<div id="ref-lambert2024" class="csl-entry">
Lambert, Michael, and Evan Patterson. 2024. <span>“Cartesian Double Theories: A Double-Categorical Framework for Categorical Doctrines.”</span> <em>Advances in Mathematics</em> 444: 109630. <a href="https://doi.org/10.1016/j.aim.2024.109630">https://doi.org/10.1016/j.aim.2024.109630</a>.
</div>
<div id="ref-lucyshyn-wright2025" class="csl-entry">
Lucyshyn-Wright, Rory B. B. 2025. <span>“<span class="nocase">V-graded</span> Categories and <span class="nocase">V-W-bigraded</span> Categories: Functor Categories and Bifunctors over Non-Symmetric Bases.”</span> <a href="https://arxiv.org/abs/2502.18557">https://arxiv.org/abs/2502.18557</a>.
</div>
<div id="ref-pare2011" class="csl-entry">
Paré, Robert. 2011. <span>“Yoneda Theory for Double Categories.”</span> <em>Theory and Applications of Categories</em> 25 (17): 436–89. <a href="http://www.tac.mta.ca/tac/volumes/25/17/25-17abs.html">http://www.tac.mta.ca/tac/volumes/25/17/25-17abs.html</a>.
</div>
<div id="ref-patterson2020" class="csl-entry">
Patterson, Evan. 2020. <span>“The Algebra and Machine Representation of Statistical Models.”</span> PhD thesis, Stanford University. <a href="https://arxiv.org/abs/2006.08945">https://arxiv.org/abs/2006.08945</a>.
</div>
<div id="ref-wood1976" class="csl-entry">
Wood, Richard J. 1976. <span>“Indicial Methods for Relative Categories.”</span> PhD thesis, Dalhousie University.
</div>
<div id="ref-wood1978" class="csl-entry">
———. 1978. <span>“<span class="nocase">V-indexed</span> Categories.”</span> In <em>Indexed Categories and Their Applications</em>, 126–40. <a href="https://doi.org/10.1007/BFb0061362">https://doi.org/10.1007/BFb0061362</a>.
</div>
</div>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>In the virtual double category of lax functors <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%7BB%7D(%5Cmathcal%7BV%7D)%5E%5Cmathrm%7Bop%7D%5Cto%20%5Cmathbb%7BS%7D%5Cmathsf%7Bpan%7D">, the arrows are natural transformations, the proarrows are modules, and the multicells are multimodulations. See <span class="citation" data-cites="pare2011">Paré (2011)</span>, <span class="citation" data-cites="lambert2021">Lambert (2021)</span>, or <span class="citation" data-cites="lambert2024">Lambert and Patterson (2024)</span>.↩︎</p></li>
<li id="fn2"><p>The contravariance of the reindexing operation in a graded category is conventional, chosen to simplify the Yoneda-type embedding of enriched categories into graded categories. In this example it is a hindrance.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>category theory</category>
  <category>double categories</category>
  <guid>https://topos.institute/blog/2025-05-01-graded-categories/</guid>
  <pubDate>Thu, 01 May 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Wiring Euclid for manufacturing</title>
  <dc:creator>Edmund Harriss</dc:creator>
  <link>https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/</link>
  <description><![CDATA[ 




<div class="callout callout-style-simple callout-none no-icon">
<div class="callout-body d-flex">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-body-container">
<p><em>Communicated by David Spivak.</em></p>
<p>I invited Edmund Harriss to visit Topos Institute last October, because his work on mathematical art so beautifully exemplified the sort of “working language” I’ve been exploring. Mathematical forms (such as a “perfect circle”) can be conceptually overlaid onto a real-world condition (such as an actual piece of paper) and constrain our behavior enough that the form is efficiently materialized (such as by a computer program hooked up to a mill). I found that Edmund has a deep, tangible understanding of this phenomenon—of how to efficiently materialize forms—and we learned a lot from each other by discussing it. So I asked Edmund to write a blog post about what he took away from our meeting, and the following is his response.</p>
</div>
</div>
</div>
<section id="introduction" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Introduction</h1>
<p>Euclid’s elements has an almost mythical role in the history of modern mathematics. In particular it had significant influence on the notion of axiom and proof systems. Establishing a fixed set of rules and axioms and then seeing what can be built from those using proofs. Yet it is also a practical text, the propositions are often not just proofs, but operations that use straight edge and compass to create geometric figures, from the equilateral triangle to the regular polyhedra<sup>1</sup>.</p>
<p>In modern mathematics the notion of proof has been well developed to be independent of the notion of construction. What happens if we instead explore ideas of construction and abstract models of tools independently? In doing so we will show how <a href="https://arxiv.org/abs/2101.12046">wiring diagrams</a> provide a model to structure manufacturing methods and add detail to David Spivak’s notion of <a href="https://topos.institute/blog/2024-08-27-plausible-fiction/">plausible fiction</a> as a model for manufacturing.</p>
</section>
<section id="euclidean-construction" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Euclidean construction</h1>
<p>Euclidean construction begins with two tools, the straight edge and compass. The axioms establish a mapping between physical actions with these tools and abstract notions. For example a straight edge can be placed next to two points on a piece of paper and the line between them drawn. This is abstracted as the axiom that any two points lie on a straight line. Similarly the point of a compass can be placed at one point and the circle through the second traced. Which gives the abstract definition of a circle.</p>
<p>At this stage it is worth noting that the rules allow our actions to have abstract meaning as well as physical content. The points we begin with will not be perfect points, but dots drawn with area. The line between them will thus not really be unique, even if there is sufficient skill to draw the line so it does actually pass through them. Yet, abstractly we can consider the small dots to represent pure points, and then the line we draw represents the line between them. Similarly the surface we are working on, for example a sheet of paper, is clearly never the infinite Euclidean plane. It has boundary, and if we zoom in far enough it will no longer be flat. Yet in many cases the assumption it is just Euclidean is incredibly useful.</p>
<p>The beautiful aspect of this abstraction is that these issues can often be ignored, and thus the physical drawings can help understand the world created by the axioms and in contrast more advanced propositions can create useful physical processes. In the case of geometry we are quite comfortable with this relationship and often do not even reflect on it. It is therefore worth considering a case where the abstract and physical traditions of geometry diverge, in the construction of regular polygons. We therefore have a conversation between the abstract system and the physical where each can inform and help understand the other.</p>
</section>
<section id="the-challenge-between-theory-and-practice" class="level1" data-number="3">
<h1 data-number="3"><span class="header-section-number">3</span> The challenge between theory and practice</h1>
<p>The relationship between the two can be quite subtle and not always what is expected. For example, take the powerful results of <a href="https://en.wikipedia.org/wiki/Heptadecagon">Gauss</a> and <a href="https://www.sciencedirect.com/science/article/pii/S031508600900010X">Wantzel</a> showing exactly which regular polygons can be constructed with straight edge and compass. In particular the heptagon can’t be and the 17-gon can. Yet in Islamic art, that used straight edge and compass extensively, we find heptagonal tilings. These were constructed not by bringing in an additional tool but by a process of approximation:</p>
<ol type="1">
<li>Take the circle you want to construct a heptagon, and guess the right length for the edge.</li>
<li>Run the compass round the circle making points at that distance.</li>
<li>Adjust based on the final error.</li>
<li>Repeat 2 and 3 until the error is small enough.</li>
</ol>
<p>In practice, therefore, the lack of an exact construction for the heptagon is not a significant barrier. In addition the slight blurring between the physical and the abstract, mentioned above, ensures that the resulting heptagon is no less accurate than a pentagon constructed perfectly by Euclidean methods. When considering the 17-gon this becomes even clearer, as the “perfect” construction is technically challenging and complex. When I have tried it, my initial guess of the correct edge length is often more accurate than the length I obtain following the supposedly exact method. The approximation method is also significantly simpler. Thus, even when a perfect abstract method exists, it might not be the best option in practice.</p>
<p>This illustrates a key challenge in considering abstract models of manufacturing. Especially as they are developed these might seem to be ill-defined and non-rigorous to mathematicians, on one hand and a lot of work for little practical benefit to engineers and practical makers. Yet it is already happening informally, especially with digital manufacturing, which turns computer designed models into physical objects with CNC and 3d printing. Creating good abstractions to look at the systems as a whole has the potential to make the processes more visible and thus help with communication of ideas from prototype to manufacturing, reveal significant challenges and enable more direct application of research into practice.</p>
<p>A good candidate for this abstraction is the <a href="https://arxiv.org/abs/2101.12046">wiring diagram</a>. One of the ways these can be implemented is in data flow programming, for example Grasshopper (part of the CAD software Rhinoceros 3d). The following examples will be implemented in Grasshopper to keep a consistent visual language, even when there is no computational content.</p>
</section>
<section id="example-euclid-book-1-proposition-1" class="level1" data-number="4">
<h1 data-number="4"><span class="header-section-number">4</span> Example: Euclid Book 1 Proposition 1</h1>
<p>Let us begin by going back to Euclid for inspiration. Here is the construction from Proposition 1 of book 1 of Euclid’s elements rendered in Grasshopper:</p>
<p><a href="image-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-1.png" class="img-fluid"></a></p>
<p>Note that this is a functioning operation that gives a triangle for a given base. This implementation immediately reveals two limitations in Euclid’s version, for example the lack of any axiom to say when two circles intersect (that box is labelled with a question mark). There are also two intersections and both are drawn here, giving two triangles.</p>
<p><a href="movie-2.mov" class="lightbox" data-gallery="quarto-lightbox-gallery-2"><video src="movie-2.mov" class="img-fluid" controls=""></video></a><a href="movie-2.mov">Video</a></p>
<p>After the construction, however, the proof of Proposition 1, continues, showing that the resulting triangle is indeed equilateral. So the large green region can be seen as a component in its own right, taking in a line and returning an equilateral triangle with that line as base. In Euclid this proposition is used as a component in many later proofs starting with Proposition 2.</p>
</section>
<section id="proposal-augmented-wiring-diagrams" class="level1" data-number="5">
<h1 data-number="5"><span class="header-section-number">5</span> Proposal: Augmented Wiring Diagrams</h1>
<p>The key proposal here is to augment each component in the wiring diagram with assertions about the nature of the result. For a full wiring diagram these assertions could be used to prove properties of the output, perhaps with additional assertions on the input. In the case of Proposition 1, above, the base level components are the axioms and definitions of the elements.</p>
<p>At the lowest level these assertions would be just that, clear assumptions about the nature of the inputs and outputs. They can then be combined into standard workflows (just like propositions) where the behavior of a collection of components has an argument (or even proof) that it will work a certain way, given the assumptions of the sub-components. The behavior of more complex components thus rests on the hopefully simpler assertions of its components, rather than just an assertion that the whole thing works.</p>
<p>The goal might be best described as creating a more local mathematics. Instead of proof being needed for powerful universal statements within a broadly accepted axiom system or field of study, the proofs would just be of interest to a specific case, the axioms required just being assumptions about how certain tools work (or should work). Below I give an example of how the process of milling wood can be considered in this frame. One distinct aspect of this local mathematics is that the axioms are far more lightweight. The solution to a problem might be including a new tool, and thus axioms about its use, rather than clever working with what is already on hand.</p>
<p>In developing a techniques for unfamiliar or new problem, this process connects directly to David Spivak’s notion of plausible fictions. An overall claim is made that can be broken down into a series of steps. At each stage the steps can be asked if they are plausible. Any step that is perhaps plausible but certainly not straightforward—maybe on the verge of “magical”—must be broken down further. In this case instead of building up the wiring diagram from already accepted components we start with a component we want to create. To achieve this much of the work might take place through standard processes, so the magic unknown component can then be pushed down into a simpler subcomponent. Over several rounds everything is perhaps reduced to known work and the whole process can be tested. Alternatively a key step might still be missing but new software, machine or tool can be developed to solve that issue.</p>
<p>The multi-level nature of wiring diagrams, combined with the notions of plausibility and proof also allows for details to be blurred out an revealed as needed. For example in the planning stage a task that has not been done can be deemed plausible to achieve and left until it needs to be done. An example might be work holding of material in a machine. This always requires a little bit of work, with standard techniques like vises, but can generally be left until the time comes to machine the part.</p>
<p>In this picture there are obviously multiple levels of plausibility. In mathematics for example, everything must be reduced to an accepted axiom set as the only possible plausible set. For manufacturing plausibility is allowed to rest on concrete practical claims about the abilities of certain tools, but the list of tools available is flexible, so new axioms can be created. This is still more concrete than the examples of social change in Spivak’s work that allow plausibility to include predictions about reasonable future acts.</p>
</section>
<section id="example-milling-lumber" class="level1" data-number="6">
<h1 data-number="6"><span class="header-section-number">6</span> Example: Milling Lumber</h1>
<p>We now consider a more practical example, turning rough cut lumber into a dimensioned board<sup>2</sup>. Here is the diagram:</p>
<p><a href="image-3.png" class="lightbox" data-gallery="quarto-lightbox-gallery-3"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-3.png" class="img-fluid"></a></p>
<p>This process begins by using a jointer which is able to create a flat surface on one side of the board, and a second flat surface at ninety degrees to the first. This creates a reference edge. Then a planer is used to make the other side of the board parallel to the first. Finally a table saw makes the far edge parallel to the jointed edge and cuts the board to length. These operations also give the height, width and length of the board.</p>
<p>Each tool here behaves like an axiom, we asserted its abilities. Much like the Euclidean axioms assert the abilities of straight edge and compass. Combining these assertions we are able to prove that the resulting board can be considered abstractly as a cuboid with the given dimensions. A rather complex assertion is thus reduced to assertions about the abilities of individual machines. At each stage a different machine might substitute as long as it is capable of the equivalent operation. A CNC router for example can be used to flatten a face, and give a straight edge, replacing the jointer. Similarly a mitre saw can replace the table saw in crosscut to cut the board to length.</p>
<p>It is worth noting that the assertions made here can also be augmented, for example to add claims about the time spent, or the quality of the finish that a tool gives. These extra assertions might mean that a previously possible replacement tool cannot be used.</p>
</section>
<section id="example-curved-metal-sculptures" class="level1" data-number="7">
<h1 data-number="7"><span class="header-section-number">7</span> Example: Curved Metal Sculptures</h1>
<p><a href="image-4.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-4"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-4.jpg" class="img-fluid"></a></p>
<p>The examples given so far are more illustrative of the idea, placing classic ideas of mathematical proof or practical process into the language discussed here. To conclude I have a final example where versions of these ideas were used in a research setting to develop a new technique; the zipform system I developed with Emily Baker, initially to create the Gearhart Courtyard Curvahedra sculpture (above) at the University of Arkansas.</p>
<p>The nature of practical examples means that the process has a larger technical load that might be of general interest, but is not all directly relevant to the specific discussion here. I give a more detailed discussion in an appendix. Here is the wiring diagram:</p>
<p><a href="image-5.png" class="lightbox" data-gallery="quarto-lightbox-gallery-5"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-5.png" class="img-fluid"></a></p>
<p>In order to make this sculpture the challenge was to create curved metal beams. In order to achieve this we already had a powerful tool, a plasma cutter that can cut sheet metal into nearly any shape we ask of it. Sheet metal can also be bent in many ways, as long as its intrinsic geometry is not changed. Mathematically these bent sheets can be considered as developable surfaces. In the physical space we can therefore assume we can make arbitrary shapes and then find ways to bend them precisely. This created two smaller challenges, firstly could we create developable surfaces with the properties we wanted, and secondly could we bend the cut sheets into the right form.</p>
<p>The first problem was solved with differential geometry, and the Bishop or zero-torsion frame which creates developable surfaces, at right angles containing a given curve. The physical solution also used this frame, building a jig to keep the two flat sheets at right angles as they were bent together to recreate the curve in physical space.</p>
<p>This theoretical process, with its assertions, was also being tested in practice. Our first tests were not even in steel, but in a different material (paper) cut in a different process (laser cutting). Like sheet metal this can be assumed to be a developable surface. We then made scale models in metal. For both these test models we used augmented reality to compare the designed beam on the computer with the physical model. Abstractly this gives a different mapping from the computer model to the physical world. We therefore achieve a form of commuting diagram to validate that the beam built is the one we think it is. The accuracy was rather necessary for the large sculpture as the beams formed loops and needed to be rigid, so the tolerances needed to be tight enough that the loops could be connected without bending.</p>
<p>The use of paper implies a different abstract relationship. As both paper and sheet metal can be considered as developable surfaces a paper model can be scaled up to one from sheet metal. Here, though, one does have to be careful. Not all properties are shared, for example paper is very elastic when bent, and so in combining the two pieces hand holding and glue were sufficient for the integration phase. This is why, while the paper model was encouraging, the scale model in metal was necessary. This is an example of how making assertions clear is useful even when the assertion is incorrect or not complete. The argument here that gives a path from a paper model to metal just uses the developable surface assertions. These do not say anything about the elastic properties of the materials. Understanding this reveals where work might need to be done. The use of paper models as a design space for metal ones can then take into account the precise differences as well as the relationships.</p>
<p>After validation, and just like the propositions of Euclid, this technique can now be used in many different situations. For example we have used it to create a completely different shape a hyperboloid, rather than a sphere (shown below). Part of the <a href="https://mathemalchemy.org/">mathemalchemy</a> exhibit. The zipform technique was also used to create precise developable surfaces to cast <a href="https://www.ingentaconnect.com/content/iass/piass/2022/00002022/00000013/art00009">optimised concrete beams.</a> In each of these cases additional geometry was required to create the curves involved, but the method described then smoothly recreated this geometry in physical form.</p>
<p><a href="image-6.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-6"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-6.jpg" class="img-fluid" style="width:60.0%"></a></p>
</section>
<section id="conclusion" class="level1" data-number="8">
<h1 data-number="8"><span class="header-section-number">8</span> Conclusion</h1>
<p>The ideas described here are still very much in development. To me, however, they reveal some powerful aspects of flexibly mixing abstraction into physical manufacturing. In particular I feel there are several potential benefits, such as:</p>
<ul>
<li>Breaking problems down into component pieces. (like the milling of wooden blocks, or the propositions in Euclid’s elements).</li>
<li>Combining tools and processes to create new reliable technologies (like zipform).</li>
<li>Clearly describing the power and limitations of moving between different physical modeling spaces (like the difference between constructing polygons in theory and practice, or moving between paper and metal models).</li>
</ul>
<p><strong>The Author</strong></p>
<p>Edmund Harriss is an assistant professor at the University of Arkansas holding a joint appointment between mathematics and art. Much of his work considers the ways mathematical ideas interact with the physical world other than in the classic notion of scientific models. This includes methods of illustrating mathematics to reveal the power and beauty of the ideas, but also open up questions for mathematical research. To do this he often works to create illustrations and artworks using digital manufacturing, leading to an interest in the right ways to conceptualize those processes, and thus the work discussed here. He can be reached at <a href="mailto:eharriss@uark.edu" class="email">eharriss@uark.edu</a> and as <code>Gelada</code> on Mastodon and Bluesky. Other examples of his work to bring mathematics into the physical world include his two <a href="https://theexperimentpublishing.com/creator/edmund-harriss/">coloring books</a> and the construction toy <a href="https://curvahedra.com/">curvahedra</a>.</p>
</section>
<section id="appendix-zipform-details" class="level1" data-number="9">
<h1 data-number="9"><span class="header-section-number">9</span> Appendix: Zipform details</h1>
<p><a href="image-7.jpg" class="lightbox" data-gallery="quarto-lightbox-gallery-7"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-7.jpg" class="img-fluid"></a></p>
<p>The heart of zipform uses the rigidity of a T-beam, but creates one that is curved, rather than straight. In fact where the joint between the vertical and horizontal followed an arbitrary smooth curve in 3d. In the resulting wiring diagram (below) information about the bending of the curve is split into two curvature functions (using the zero torsion or bishop frame). These functions can then be used to created two curves with that curvature. Thickened versions of these curves are then cut out of sheet steel. The actual curve is the centre line of one piece that will form the crossbar of the T and the edge of the other (forming the vertical). The two flat sheets are then placed together in a T-shaped jig (shown above) and welded together. They are then pulled a little way through, in each case the thin direction of the metal allows it to bend to match the curve on the other sheet. As they are pulled, bent and welded together the curve along their intersection recreates the input curve. Here is the diagram:</p>
<p><a href="image-8.png" class="lightbox" data-gallery="quarto-lightbox-gallery-8"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/image-8.png" class="img-fluid"></a></p>
<p>We therefore start with an assertion about this process as a whole. The curve that is actually made is the input curve. In development this was broken down into smaller assertions that could be combined with proof to create a theoretical process.</p>
<p>We began with a commonly used assertion, that sheet metal cut on a plasma cutter, and then carefully bent is a realisation of a developable surface (a surface with constant Gaussian curvature 0). This assertion for a sheet material (thinking of it as having no thickness) is quite close to the assertion that a straight edge creates lines, or a compass draws circles.</p>
<p><a href="movie-9.gif" class="lightbox" data-gallery="quarto-lightbox-gallery-9"><img src="https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/movie-9.gif" class="img-fluid"></a></p>
<p>With this assertion, on the abstract side we can therefore create developable surfaces knowing they can be turned into physical objects. The zero torsion frame of the curve is perfect for this. Taking any line at right angles to a point on the curve the zero torsion frame sweeps it out along the curve in a unique way so that it never twists around the curve’s tangent (this twisting is torsion). The animation above shows curves and the resulting surfaces for different initial lines. Note that they twist along the whole length of the curve at once. The resulting surfaces are always developable. These developable surfaces can then be flattened onto the plane. When this happens the intersection with the original curve becomes a 2d curve. The curvature of the two curves produced are called the geodesic and normal curvatures. These two curvature functions determine the original curve up to rigid motion.</p>
<p>The resulting flat shapes can now be cut out. They then need to be bent into shape, to reverse the flattening process and recover the initial curve. In this case we began not with a process we had used before but the assertion we wanted. Essentially we needed a physical process that would work like the integration of geodesic and normal curvature. The jig described above was the result of this development.</p>


</section>


<script defer="" src="https://cdn.commento.io/js/commento.js"></script>

<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>For a recent discussion of the messy history, geometry and cultural impact of Euclid a good resource is Benjamin Wardhaugh’s <a href="https://press.princeton.edu/books/hardcover/9780691211695/encounters-with-euclid">Encounters with Euclid</a>.↩︎</p></li>
<li id="fn2"><p>If you are not familiar with the process of milling lumber for woodworking you can find out about the whole process <a href="https://www.youtube.com/watch?v=cMA_aG48OM0">here</a>, as well as how you need to be careful with exactly what the machines are doing <a href="https://www.youtube.com/watch?v=-5RPhgf_eQM">here</a>.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>wiring diagrams</category>
  <guid>https://topos.institute/blog/2025-04-30-wiring-euclid-for-manufacturing/</guid>
  <pubDate>Wed, 30 Apr 2025 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
