Skip to main content

Module laws

Module laws 

Source
Expand description

Finite-sample algebraic law helpers.

Functionsยง

has_inverses
Returns whether every value in elements has a two-sided inverse with respect to identity and operation.
identity_element
Returns a two-sided identity element for operation, if one exists in elements.
is_abelian_group
Returns whether elements with operation form an abelian group.
is_associative
Returns whether operation is associative over elements.
is_closed_under
Returns whether applying operation to any pair of values in elements yields another member of elements.
is_commutative
Returns whether operation is commutative over elements.
is_distributive_over
Returns whether multiply distributes over add from both sides on elements.
is_group
Returns whether elements with operation form a group.
is_monoid
Returns whether elements with operation form a monoid.
is_ring
Returns whether elements with add and multiply form a ring.