Defines an algebraic structure known as a monoid.
The set of the monoid
The operation of the monoid
Optional
The identity element of the monoid (optional if the set is Z, Q, R, C, A, S, M, or GL)
const residues = Chalkboard.abal.Z(5);const additive = Chalkboard.abal.monoid(residues, (a, b) => (a + b) % 5, 0); // Defines the additive monoid modulo 5 Copy
const residues = Chalkboard.abal.Z(5);const additive = Chalkboard.abal.monoid(residues, (a, b) => (a + b) % 5, 0); // Defines the additive monoid modulo 5
Defines an algebraic structure known as a monoid.