The semi-direct product of monoids s and m, which is a monoid
when m acts on s. Structurally, the semi-direct product is
just a pair (s,m). However, the monoid instance is different.
In particular, we have
(s1,m1) <> (s2,m2) = (s1 <> (m1 `act` s2), m1 <> m2)We think of the m values as a "tag" decorating the s values,
which also affect the way the s values combine.
NOTE: this is only a valid semigroup/monoid if the action of m
on s satisfies BOTH:
actis a monoid/semigroup homomorphism frommto(s -> s), that is,act mempty = idandact (m1 <> m2) = act m1 . act m2act mis a monoid/semigroup homomorphism for anym, that is,act m mempty = memptyandact m (s1 <> s2) = act m s1 <> act m s2.
For a more fine-grained treatment of these ideas, see the
lr-acts package.
We call the monoid m the quotient monoid and the monoid s the
sub-monoid of the semi-direct product. The semi-direct product
Semi s m is an extension of the monoid s with m being the
quotient.