3 ms·
A semigroup is a set M and a function m: M x M -> M that is associative, m(a,m(b,c)) = m(m(a,b),c). Writing ab for m(a, b) this can be written a(bc) = (ab)c. A
by keithalewis 2y ago
A semigroup is a set M and a function m: M x M -> M that is associative, m(a,m(b,c)) = m(m(a,b),c). Writing ab for m(a, b) this can be written a(bc) = (ab)c. A monoid is a semigroup with an identity e satisfying em = m = me for every m in M.
This can be used for map-reduce and pivot tables.
A (small) category is a partial monoid. The domain of m is the set of composable arrows.