More Flexible Interfaces for Specifying Simulations of Systems in CatColab
2026 ICMS - Computational Category Theory Session
2026-07-20
$$
% https://tex.stackexchange.com/a/269194
%
$$
CatColab, a web app for collaborative, formal, and declarative modeling.
Decapodes.jl project from GATAS group, is multiphysics software for declaratively specifying ODE/PDEs, with special emphasis on category-theoretic design, namely compositionality
How can we integrate Decapodes into CatColab?
Introduce CatColab concepts necessary for describing the integration challenge
As a simulation target, introduce and define a “Decapode” which demonstrates compositionality and our integration strategy
Demonstrate this in action
Example: ThSchema describes the relation between tables and column types
\textsf{columntype}:\textsf{table}\mathrel{\mkern 3mu\vcenter{\hbox{$\scriptstyle+$}}\mkern-13mu{\to}}\textsf{column}
…has database schemas as models, and a possible analysis might be compiling to SQL CREATE TABLE statements
An instance is a set of data in those tables, and an analysis might be compiling to SQL INSERT statements
How are multiphysics models implemented in Julia?
Provides…
Unites
Several reasons I’m motivated by a CatColab integration: 1. expose multiphysics simulation to a broader audience 2. quicken the multiphysics workflow through structured editing 3. the theory in CatColab underlying the DEC model is itself an artifact; in Decapodes, it is a body of inference rules
The DSL:
Objects are forms and morphisms are operators. Equality is established by paths.
Stored in an in-memory database called an ACSet (Patterson et al. 2022)
The instance functions as the “diagram” concept in CatColab.
# See Klausmeier Equation 2.a
# `w` is surface water
# `a` is rainfall
# `-w` water uptake is a loss
# downwards advection
Hydrodynamics = @decapode begin
(n,w)::DualForm0
dX::Form1
(a,ν)::Constant
∂ₜ(w) == a - w - w * n^2 + ν * L(dX, w)
end
# See Klausmeier Equation 2.b
# `n` is plant biomass
# `wn^2` is
Phytodynamics = @decapode begin
(n,w)::DualForm0
m::Constant
∂ₜ(n) == w * n^2 - m*n + Δ(n)
endWe need to define
What’s stopping us?
In 2024, we did attempt an implementation! We defined a diagram of a model of the Navier-Stokes vorticity model
This introduced two challenges:
This stimulated both a need to advance the mathematical theory.
We need structures which have “lists of inputs.” Two candidates are
A modal (read, monad) double theory (\mathbb{D},T) is a double theory equipped with a monad T. A modal double model is a double functor: M: (\mathbb{D},T)\to(\mathbb{S}\textsf{pan},\textsf{List})
Monoidal theories have the underlying theory of monoidal categories, T_{\textsf{List}}x\to x
Multicategories have the underlying theory of generalized multicategories T_{\textsf{List}}x\mathrel{\mkern 3mu\vcenter{\hbox{$\scriptstyle+$}}\mkern-13mu{\to}}x
deRham complex as a modal double model in CatColab.
…has six objects, several operations, some binary
We have a model now but we need to define an instance whose elements are typed by those of the DEC. u::\Omega_0,\>\partial_tu::\Omega_0,\>{k}::\textsf{Constant}
We have a notion of this, but we need one in the “modal” variant
The present code on instances (“diagrams”) made it simple enough to adapt for this purpose
With the model and instance implemented, we need to define the analysis.
StructTypes.jl, the JSON is parsed into structs carrying data necessary for building the simulationendpoint accepts a JSON, separating the model, instance, analysis
SymbolicUtils.jl)analysis specifies the mesh the Decapodes materializes.
initial_conditions are dispatched on the variable and initial condition
I’ll show a demo of this right now
![]()