Lesson 05 · Transfer
Applications Across Domains
Map operadic composition to circuits, databases, software pipelines, and agent workflows.
One syntax, many algebras
The payoff of separating operad (how we wire) from algebra (what wiring means) is transfer: the same hierarchical pictures host circuits, queries, dataflow graphs, and multi-agent plans — each with its own X and α.
Domain map
Circuits
- Ports: terminals
- Wires: conductors
- Algebra: electrical relations / behaviors
Databases
- Ports: attributes/sorts
- Wires: equalities
- Algebra: Rel / queries
Pipelines
- Ports: schemas/events
- Wires: channels
- Algebra: stream maps
Agents
- Ports: tools/messages
- Wires: sessions
- Algebra: policies + costs
Tradeoffs when picking an algebra
Relational (Rel)
algebraGreat for constraints & queries
Functional maps
algebraExecutable, less nondeterminism
Process/session
algebraConcurrency & protocols
Cost-only
algebraBudget tracking, not behavior
Port a domain into the framework
- 01Name the open systems (what can be a box).
- 02List port types (what can be wired).
- 03Define legal wirings (the operad fragment you actually use).
- 04Pick primary semantics X and maps α(θ).
- 05Write one compositionality test: nest two levels; compare whole meaning vs composed meanings.
- 06Optionally add a second algebra (cost, risk) on the same diagrams.
Check yourself
Retrieval practice — feedback explains why.
Explain it back
Choose one domain below and write the triple: (operad of architectures, algebra of behaviors, test that composition preserves meaning).
Sources · claim ledger
David Spivak showed that hierarchical wiring diagrams form morphisms of an operad T, providing a graphical language for databases, recursion, and plug-and-play circuits.
Spivak, The operad of wiring diagrams (arXiv:1305.0297) · verified 2026-07-28
The algebra Rel of mathematical relations on the wiring-diagram operad lets wiring diagrams structure relational database queries; circuit diagrams appear as a special case.
Spivak, The operad of wiring diagrams · verified 2026-07-28
Classical applications of operads include characterizing iterated loop spaces and encoding algebraic structures (e.g. algebras over the Lie operad are Lie algebras).
Operad — Wikipedia · verified 2026-07-28
Applied category theory (Fong & Spivak, Seven Sketches in Compositionality) develops compositionality via monoidal categories, wiring diagrams, and graphical calculi for open systems.
Fong & Spivak, Seven Sketches in Compositionality (arXiv:1803.05316) · verified 2026-07-28