Boolean Ring
A Boolean ring is a ring in which multiplication is idempotent, i.e. a · a = a for all elements a.
This property also implies a + a = 0 for all a, as well as the commutativity of multiplication: a · b = b · a.
A Boolean ring can be represented as a commutative ring with identity in which every element is idempotent with respect to multiplication. In terms of lattice theory, a Boolean ring is a distributive lattice with complements.
The following laws must hold for a Boolean ring:
- Additive closure (closure): for \(\forall x, y \in B\), \(x + y \in B\).
- Additive associativity (associativity): for \(\forall x, y, z \in B\), \((x + y) + z = x + (y + z)\).
- Existence of zero element: there exists \(\exists 0 \in B\) such that for \(\forall x \in B\), \(0 + x = x + 0 = x\).
- Additive invertibility: for \(\forall x \in B\) there exists \((-x)\) such that \(x + (-x) = (-x) + x = 0\). In boolean algebra, \(-x = x\).
- Additive commutativity (commutative): for \(\forall x, y \in B\), \(x + y = y + x\).
- Multiplicative closure (closure): for \(\forall x, y \in B\), \(x * y \in B\).
- Multiplicative associativity (associativity): for \(\forall x, y, z \in B\), \((x * y) * z = x * (y * z)\).
- Existence of unit element: \(\exists 1 \in B \quad \forall x \in B \quad x * 1 = 1 * x = x\).
- Multiplicative commutativity: for \(\forall x, y \in B\), \(x * y = y * x\).
- Distributivity (distributivus, distributive law): for \(\forall x, y, z \in B\), \(x * (y + z) = x * y + x * z\) and \((x + y) * z = x * z + y * z\).
- Multiplicative idempotency: for \(\forall x \in B\), \(x * x = x\).
- Negation property: for \(\forall x \in B\), \(x + x = 0\).
Code
trait BoolRng[A] extends CommutativeRng[A]:
extension (a: A)
override def inverse: A = a
trait BoolRing[A] extends BoolRng[A], CommutativeRing[A]
Diagram
classDiagram
class Semigroup~A~{
+combine(x: A, y: A) A
}
class Monoid~A~{
+empty() A
}
Semigroup <|-- Monoid
class CommutativeSemigroup~A~
Semigroup <|-- CommutativeSemigroup
class Group~A~{
+inverse(x: A) A
}
Monoid <|-- Group
class CommutativeMonoid~A~
Monoid <|-- CommutativeMonoid
CommutativeSemigroup <|-- CommutativeMonoid
class AbelianGroup~A~
Group <|-- AbelianGroup
CommutativeMonoid <|-- AbelianGroup
class Semiring~A~
CommutativeMonoid <|-- Semiring
class MultiplicativeSemigroup~A~{
+times(x: A, y: A) A
}
MultiplicativeSemigroup <|-- Semiring
Semigroup .. MultiplicativeSemigroup
class Rng~A~
AbelianGroup <|-- Rng
Semiring <|-- Rng
class CommutativeSemiring~A~
Semiring <|-- CommutativeSemiring
class Rig~A~{
+one() A
}
Semiring <|-- Rig
class CommutativeRng~A~
Rng <|-- CommutativeRng
CommutativeSemiring <|-- CommutativeRng
class CommutativeRig~A~
Rig <|-- CommutativeRig
CommutativeSemiring <|-- CommutativeRig
class Ring~A~
Rng <|-- Ring
Rig <|-- Ring
class CommutativeRing~A~
Ring <|-- CommutativeRing
CommutativeRig <|-- CommutativeRing
CommutativeRng <|-- CommutativeRing
class BoolRng~A~
CommutativeRng <|-- BoolRng
class BoolRing~A~
BoolRng <|-- BoolRing
CommutativeRing <|-- BoolRing
References: