Lesson 02 · Structure
Operads: The Algebra of Multi-ary Composition
Define an operad (operations, composition, unit, equivariance) and compose operations along a tree.
Beyond binary composition
Ordinary categories compose morphisms two at a time. Many designs need n-ary slots: a circuit with three subcircuits, a pipeline stage that fans in four streams, a UI layout with a variable number of children. An operad packages those multi-ary operations and how they nest.
Compose operations along a tree
Operad composition tree
Nested form: α ∘ (β, γ) lives in P(3+1)=P(4). Tree shape encodes substitution.
Reading an operad operation
Read arity
P(n) means n input slots, one output slot.
The composition cycle
Operad structure
Ops
Families P(n)
Why the axioms matter for engineers
Associativity of operadic composition means hierarchical nesting is unambiguous: regrouping subassemblies does not change the composite operation. The unit means “do nothing” is a first-class 1-ary operation — identity adapters, pass-through wires, no-op stages. Equivariance means renaming or reordering ports is coherent with composition, not a special case that breaks glue.
Build a composition tree by hand
- 01Choose a root operation and write its arity n.
- 02For each of the n inputs, either leave a leaf (contributes 1 to total arity) or attach a child operation.
- 03Sum the leaf counts — that is the arity of the composite.
- 04Check the unit law mentally: inserting a pass-through 1 on any edge must not change the operation.
- 05Check associativity: regroup a subtree; the flat list of leaves and the root decorations must match.
Check yourself
Retrieval practice — feedback explains why.
Explain it back
Pick a multi-input operation from your domain (merge, reduce, layout, orchestrate). What would its operadic arities and composition tree look like?
Sources · claim ledger
An operad encodes families of n-ary operations together with composition along trees, a unit 1-ary operation, and (for symmetric operads) permutation actions compatible with composition.
Operad — Wikipedia (Boardman–Vogt 1968; May 1972) · verified 2026-07-28
J. Peter May coined the term operad (operations + monad) in The Geometry of Iterated Loop Spaces (1972); Boardman and Vogt introduced equivalent structure earlier as categories of operators in standard form (1968–1973).
Operad — Wikipedia · verified 2026-07-28
Operadic composition is associative (parenthesization does not matter) and unital: θ ∘ (1,…,1) = θ = 1 ∘ θ.
Operad — Wikipedia · verified 2026-07-28