a **monoid** is a [[associative|semigroup]] with an [[identity element]] $e$: $xe = ex = x$ Note that any [[category]] with a single object gives rise to a monoid. And that a monoid forms a category with a single object. ![[associative]] # [[Haskell]] notation ie a [[type theory|type]] `m` with two operations ``` mempty : m mappend : m -> m -> m ``` such that ``` left-unit : mappend mempty x = x right-unit : mappend x mempty = x associativity : mappend (mappend x y) z = mappend x (mappend y z) ``` # sources https://wiki.haskell.org/Monoid