In the monoidal category under the composition product, a comonoid is not extra structure bolted onto a polynomial. It is exactly a small category (Ahman–Uustalu). Positions are objects, directions are outgoing morphisms, the comultiplication is composition and the counit is identities. This note works the monomial case, where the comonoid is a state machine.

Comonoids are categories

A comonoid in is a polynomial with and satisfying coassociativity and counitality. Ahman–Uustalu show these are precisely small categories: the position set is the set of objects, the directions at an object are the morphisms out of , picks out identities, and encodes codomains-and-composition.

Proposition. The monomial comonoid

is a comonoid: the codiscrete (chaotic) category on , one morphism between every ordered pair of states. The comultiplication has and = “compose the updates”, and the counit reads , projection. (Ahman–Uustalu, Prop. 2.6.)

Iterated power as a behaviour tree

The -fold composition power of a monomial unfolds a dynamical system for steps. As a polynomial,

whose positions record the readouts along every branch and whose directions are the length- input words. Reading a monomial as one step, the -step readout is the composite , which runs the system for steps and then reads out.

Property. Horizontal composition via lens formulas

A monomial map is a dependent lens: , a paired with a . For the tensor , and likewise on . For the composition product , .