A Boolean ring is a ring whose multiplication is idempotent, that is
a⋅a = a
for all elements a.
A Boolean rng is a rng whose multiplication is idempotent, that is
a⋅a = a
for all elements a.
A Boolean rng is a rng whose multiplication is idempotent, that is
a⋅a = a
for all elements a. This property also implies a+a = 0
for all a, and a⋅b = b⋅a
(commutativity of multiplication).
Every BoolRng
is equivalent to algebra.lattice.GenBool
.
See algebra.lattice.GenBoolFromBoolRng
for details.
CommutativeRig is a Rig that is commutative under multiplication.
CommutativeRing is a Ring that is commutative under multiplication.
EuclideanRing implements a Euclidean domain.
EuclideanRing implements a Euclidean domain.
The formal definition says that every euclidean domain A has (at least one) euclidean function f: A -> N (the natural numbers) where:
(for every x and non-zero y) x = yq + r, and r = 0 or f(r) < f(y).
The idea is that f represents a measure of length (or absolute value), and the previous equation represents finding the quotient and remainder of x and y. So:
quot(x, y) = q mod(x, y) = r
This type does not provide access to the Euclidean function, but only provides the quot, mod, and quotmod operators.
Rig consists of:
Rig consists of:
Alternately, a Rig can be thought of as a ring without multiplicative or additive inverses (or as a semiring with a multiplicative identity).
Mnemonic: "Rig is a Ring without 'N'egation."
Ring consists of:
Ring consists of:
Additionally, multiplication must distribute over addition.
Ring implements some methods (for example fromInt) in terms of other more fundamental methods (zero, one and plus). Where possible, these methods should be overridden by more efficient implementations.
Rng (pronounced "Rung") consists of:
Rng (pronounced "Rung") consists of:
Alternately, a Rng can be thought of as a ring without a multiplicative identity (or as a semiring with an additive inverse).
Mnemonic: "Rng is a Ring without multiplicative 'I'dentity."
Semiring consists of:
Semiring consists of:
Alternately, a Semiring can be thought of as a ring without a multiplicative identity or an additive inverse.
A Semiring with an additive inverse (-) is a Rng. A Semiring with a multiplicative identity (1) is a Rig. A Semiring with both of those is a Ring.
A Boolean ring is a ring whose multiplication is idempotent, that is
a⋅a = a
for all elements a. This property also impliesa+a = 0
for all a, anda⋅b = b⋅a
(commutativity of multiplication).Every Boolean ring is equivalent to a Boolean algebra. See
algebra.lattice.BoolFromBoolRing
for details.