package alg_structs
Module Alg_structs.SemigroupSource
An interface for a type with a binary, associative operator over it.
"A semigroup is an algebraic structure consisting of a set together with an associative binary operation" (wikipedia).
"The term 'semigroup' is standard, but semi-monoid would be more systematic." ncatlab
Modules that implement the semigroup interface are a structural subtype of the better known Monoids interface. Semigroups are differentiated from Monoids by the absence of a unit (or identity) element. in their specification.
Seed
Interface
A semigroup is a set of objects with an associative binary operation over it
Laws
Law notes the laws that should be obeyed by any instantiation of Semigroup in the form of predicates that should be true for any arguments of the appropriate type.
Constructors
Functions and module functors for creating implementations of Semigroups
make op is an implementation of Semigroup generated from the operation op.
Implementations
Endo is a semigroup where the operator is the composition of functions with input and output of the same type.