Every Boolean algebra is a BoolRing, with multiplication defined as
and
and addition defined as xor
.
Every Boolean algebra is a BoolRing, with multiplication defined as
and
and addition defined as xor
. Bool does not extend BoolRing
because, e.g. we might want a Bool[Int] and CommutativeRing[Int] to
refer to different structures, by default.
Note that the ring returned by this method is not an extension of
the Rig
returned from BoundedDistributiveLattice.asCommutativeRig
.
Return a CommutativeRig using join and meet.
Return a CommutativeRig using join and meet. Note this must obey the commutative rig laws since meet(a, one) = a, and meet and join are associative, commutative and distributive.
This is the lattice with meet and join swapped
This is the lattice with meet and join swapped
The operation of relative complement, symbolically often denoted
a\b
(the symbol for set-theoretic difference, which is the
meaning of relative complement in the lattice of sets).
The operation of relative complement, symbolically often denoted
a\b
(the symbol for set-theoretic difference, which is the
meaning of relative complement in the lattice of sets).
Logical exclusive or, set-theoretic symmetric difference.
Every Boolean ring gives rise to a Boolean algebra:
times
) corresponds toand
;plus
) corresponds toxor
;a or b
is then defined asa xor b xor (a and b)
;¬a
) is defined asa xor 1
.