The coproduct of two monoids.
m :+: n is the coproduct of monoids
n. Values of
m :+: n consist of alternating lists of
values. The empty list is the identity, and composition is list
concatenation, with appropriate combining of adjacent elements
killL takes a value in a coproduct monoid and sends all the
values from the left monoid to the identity.
killR takes a value in a coproduct monoid and sends all the
values from the right monoid to the identity.
Take a value from a coproduct monoid where the left monoid has an action on the right, and "untangle" it into a pair of values. In particular,
m1 <> n1 <> m2 <> n2 <> m3 <> n3 <> ...
is sent to
(m1 <> m2 <> m3 <> ..., (act m1 n1) <> (act (m1 <> m2) n2) <> (act (m1 <> m2 <> m3) n3) <> ...)
That is, before combining
n values, every
n value is acted on
by all the
m values to its left.