An idempotent function that ensures an object has a non-negative sign.
An idempotent function that ensures an object has a non-negative sign.
Returns true if x and y are equivalent, false otherwise.
Return the identity element for this monoid.
Return the identity element for this monoid.
Return the inverse of a.
Return the inverse of a.
Returns false if x and y are equivalent, true otherwise.
Returns false if x and y are equivalent, true otherwise.
Defines an order on B by mapping B to A using f and using As
order to order B.
Combine a with the inverse of b.
Combine a with the inverse of b.
Defines an ordering on A where all arrows switch direction.
Defines an ordering on A where all arrows switch direction.
Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.
Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.
Returns 0 if a is 0, > 0 if a is positive, and < 0 is a is negative.
Returns 0 if a is 0, > 0 if a is positive, and < 0 is a is negative.
Given a sequence of as, sum them using the monoid and return the total.
Given a sequence of as, sum them using the monoid and return the total.
Given a sequence of as, sum them using the semigroup and return the total.
Given a sequence of as, sum them using the semigroup and return the total.
If the sequence is empty, returns None. Otherwise, returns Some(total).
Return a combined with itself n times.