A sketch of a plan, to be presented at the 2023 ARIA workshop
Topos Institute
December 7, 2023
Definition 1 A combinatorial data structure is a data structure where parts of the data structure refer to other parts of the data structure, possibly cyclically.
b
Combinatorial data structures…
From an implementation standpoint, acsets are in-memory databases.
Category theoretically, acsets are “functors with some extra stuff” from finitely presented categories to \mathsf{Set}
Advantage: higher operations like limits/colimits/rewriting/subobject classifier implemented generically.
No top-level attributes (e.g., name of the scientific model)
Higher-level structures like morphisms between acsets,
or diagrams of such morphisms,
are acsets, but have a natural hierarchical structure not expressed by a flat acset schema.
Recursive structures not supported
Things like “a vector of edge ids or strings” not expressible
Add two things to your favorite type theory that extends System F:
In (Rossberg 2018), module systems are embedded via existential types in System Fω.
The trick for 1ML: make a distinction between “large” and “small” types
Then make sure large types only exist at compile time.
The trick for us: make a distinction between “small” and “finite” types, moreover for function types:
Then all small types are countable/serializable, and the type of modules which only have finite associated types is small instead of large!
Path dependent types
record GraphHom {
dom: Graph
codom: Graph
apply(e: dom.Edge): codom.Edge
apply(v: dom.Vertex): -> codom.Vertex
}
Refinement types
Definition 2 A version control system is a category, where we interpret the objects as states and the morphisms as patches, along with some form of merge operation.
Found, with variations in: (Mimram and Di Giusto 2013), (Edwards and Petricek 2021)
Let \mathsf{VCS} be some 2-category of version control systems (depending on the laws we choose for merge).
Formal theory should encompass both “git-like” and “live-editing” systems
Example 1 For any set D, consider the codiscrete category on D + \bot, with 3-way merge
We call this the trivial VCS system on D.
Example 2 Let \mathsf{UUIDPatch} be the category where
3-way merge is pushout, which is just union.
Big idea: build denotational semantics for our type theory in \mathsf{VCS}.
Interpret a type as a version control system, i.e. an object in the 2-category \mathsf{VCS}, given by structural induction on the type definition.
Int
and String
as trivial version control systems