Cospans and spans of graphs: a categorical algebra for the sequential and parallel composition of discrete systems

Cospans and spans of graphs: a categorical algebra for the sequential   and parallel composition of discrete systems
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

We develop further the algebra of cospans and spans of graphs introduced by Katis, Sabadini and Walters for the sequential and parallel composition of processes, adding here data types.


💡 Research Summary

The paper extends the categorical algebra of cospans and spans of graphs originally introduced by Katis, Sabadini and Walters, incorporating data types to model discrete systems that combine both sequential and parallel composition. The authors begin by formalising the category of (labelled) graphs, where objects are graphs whose vertices carry type labels drawn from an arbitrary category (sets, groups, etc.). Morphisms preserve both the graph structure and the vertex labels, ensuring type safety throughout the construction.

A cospan is defined as a pair of morphisms X → G₁ and X → G₂ sharing a common interface graph X. Sequential composition of two systems is realised by taking the push‑out of the cospan, which identifies the interface vertices and edges of the two component graphs while leaving the remaining structure untouched. Conversely, a span consists of morphisms G₁ ← Y → G₂ sharing a common subgraph Y; parallel composition is obtained via the pull‑back, which forces the two systems to share the state represented by Y. The existence of push‑outs and pull‑backs in the labelled‑graph category guarantees that both compositions are always defined.

The core contribution is the organisation of cospans (horizontal 1‑cells) and spans (vertical 1‑cells) into a double category. 2‑cells are natural transformations that witness the interchange law: (G₁;G₂) ⊗ (H₁;H₂) ≅ (G₁ ⊗ H₁);(G₂ ⊗ H₂). This law shows that sequential and parallel composition commute up to canonical isomorphism, mirroring the algebraic properties of classic process calculi such as CCS or the π‑calculus. The double category is equipped with a symmetric monoidal structure (tensor = parallel composition) and a trace operator that captures feedback loops, thereby supporting recursive system definitions.

To illustrate the theory, the authors model three families of systems. In digital circuits, logic gates are represented as labelled graphs; inputs and outputs form the interface X, and the push‑out of cospans wires gates sequentially, while shared buses are modelled as spans. In workflow specifications, tasks are vertices and data flows are edges; sequential task chains are cospans, parallel task groups are spans. Finally, Petri nets are encoded as labelled graphs where places and transitions carry token‑type labels; firing sequences become cospans and concurrent firings become spans. In each case, the type‑preserving conditions on push‑outs and pull‑backs guarantee that only compatible components can be composed, providing a built‑in type‑checking mechanism.

The paper proves two main theorems. The first establishes that the category of labelled graphs is both complete and cocomplete, guaranteeing the existence of all required push‑outs and pull‑backs. The second shows that the constructed double category is simultaneously a symmetric monoidal and a traced monoidal category, satisfying the interchange law and supporting feedback. These results give a solid mathematical foundation for modular system design, automated composition, and formal verification.

In conclusion, the authors argue that their enriched cospan‑span algebra offers a unified, type‑safe framework for modelling, composing, and reasoning about discrete systems. The approach integrates naturally with existing model‑checking and theorem‑proving tools, and opens avenues for future work such as extending the framework to continuous‑time dynamics, higher‑order data types, and implementing a software library that automates the categorical constructions presented.


Comments & Academic Discussion

Loading comments...

Leave a Comment