Trait alga::general::AbstractSemigroup
source · pub trait AbstractSemigroup<O: Operator>: PartialEq + AbstractMagma<O> {
// Provided methods
fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool
where Self: RelativeEq { ... }
fn prop_is_associative(args: (Self, Self, Self)) -> bool
where Self: Eq { ... }
}Expand description
A semigroup is a quasigroup that is associative.
A semigroup is a set equipped with a closed associative binary operation and that has the divisibility property.
§Associativity
∀ a, b, c ∈ Self, (a ∘ b) ∘ c = a ∘ (b ∘ c)
Provided Methods§
sourcefn prop_is_associative_approx(args: (Self, Self, Self)) -> boolwhere
Self: RelativeEq,
fn prop_is_associative_approx(args: (Self, Self, Self)) -> boolwhere
Self: RelativeEq,
Returns true if associativity holds for the given arguments. Approximate equality is used
for verifications.
sourcefn prop_is_associative(args: (Self, Self, Self)) -> boolwhere
Self: Eq,
fn prop_is_associative(args: (Self, Self, Self)) -> boolwhere
Self: Eq,
Returns true if associativity holds for the given arguments.
Object Safety§
This trait is not object safe.