Category-theoretic graph structures in Rust. The catgraph crate (v0.11.4, slim baseline) is a strict Rust implementation of Fong & Spivak, Hypergraph Categories (2019). Applied-CT extensions (catgraph-applied v0.4.0) track Fong & Spivak, Seven Sketches in Compositionality (2018). Wolfram-physics extensions live in a third sibling workspace crate.
| Crate | Path | Purpose |
|---|---|---|
catgraph v0.11.4 |
catgraph/ |
Strict Fong-Spivak 2019 paper implementation: cospans, spans, Frobenius algebras, hypergraph categories, Theorem 1.2 equivalence, spider theorem (Thm 6.55), Cospan::compose_with_quotient additive API, parallel feature (WASM + native, W.1) |
catgraph-physics v0.2.2 |
catgraph-physics/ |
Wolfram-physics extensions: hypergraph DPO rewriting, multiway evolution, gauge theory, branchial spectral analysis |
catgraph-applied v0.4.0 |
catgraph-applied/ |
Applied CT extensions: generic DecoratedCospan<F> (Def 6.75, Thm 6.77), Petri nets as hypergraph category, wiring diagrams, E_n operads, Temperley-Lieb, linear combinations, props + Free(G) (Def 5.2, 5.25), OperadAlgebra with Circ (Def 6.99, Ex 6.100), OperadFunctor with canonical E₁↪E₂ (Rough Def 6.98) |
These are separate repos that depend on catgraph and/or catgraph-physics:
| Repo | Purpose |
|---|---|
| catgraph-surreal | SurrealDB persistence layer for catgraph and catgraph-physics types |
| irreducible | Computational irreducibility framework (Gorard 2023) using catgraph and catgraph-physics |
cargo build --workspace
cargo test --workspace
cargo clippy --workspace -- -W clippy::pedanticEach crate has its own README and CLAUDE.md:
catgraph/README.md— strict F&S 2019 implementationcatgraph-physics/README.md— Wolfram-physics extensionscatgraph-applied/README.md— applied-CT extensions
MIT — see LICENSE.