Module scirust::algebra::structure::semigroup
[−]
[src]
Defines the semigroup algebraic structure.
A semigroup is an algebraic structure consisting of a set together with an associative binary operation.
Semigroup builds on top of magma and provides associativity.
We define four kinds of semigroups.
- Semigroup with an addition operation with partial equivalence
- Semigroup with an addition operation with full equivalence
- Semigroup with a multiplication operation with partial equivalence
- Semigroup with a multiplication operation with full equivalence
It is not possible to check the associativity of the group operation at the compile time. We do provide a function (with each semigroup trait) to validate the associativity of the operation.
References:
Traits
SemiGroupAdd |
Semigroup with an addition operation with full equivalence |
SemiGroupAddPartial |
Semigroup with an addition operation with partial equivalence |
SemiGroupMul |
Semigroup with a multiplication operation with full equivalence |
SemiGroupMulPartial |
Semigroup with a multiplication operation with partial equivalence |