BooleanAlgebra

class BooleanAlgebra extends Bool[Boolean] with CommutativeRig[Boolean]

This commutative rig is different than the one obtained from GF(2).

This commutative rig is different than the one obtained from GF(2).

It uses || for plus, and && for times.

trait CommutativeRig[Boolean]
trait CommutativeSemiring[Boolean]
trait Rig[Boolean]
trait MultiplicativeMonoid[Boolean]
trait Semiring[Boolean]
trait AdditiveMonoid[Boolean]
trait AdditiveSemigroup[Boolean]
trait Bool[Boolean]
trait GenBool[Boolean]
trait Heyting[Boolean]
trait DistributiveLattice[Boolean]
trait BoundedLattice[Boolean]
trait BoundedJoinSemilattice[Boolean]
trait BoundedMeetSemilattice[Boolean]
trait Lattice[Boolean]
trait MeetSemilattice[Boolean]
trait JoinSemilattice[Boolean]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def and(x: Boolean, y: Boolean): Boolean
def complement(x: Boolean): Boolean
override def isOne(x: Boolean)(ev: Eq[Boolean]): Boolean
override def isZero(x: Boolean)(ev: Eq[Boolean]): Boolean
def one: Boolean
def or(x: Boolean, y: Boolean): Boolean
def plus(a: Boolean, b: Boolean): Boolean
override def pow(a: Boolean, b: Int): Boolean
override def times(a: Boolean, b: Boolean): Boolean
Definition Classes
def zero: Boolean

Inherited methods

override def additive: CommutativeMonoid[Boolean]
override def asBoolRing: BoolRing[Boolean]

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.

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.

Definition Classes
Inherited from
Bool

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.

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.

Inherited from
BoundedDistributiveLattice
override def dual: Bool[Boolean]
Definition Classes
Inherited from
Bool
def imp(a: Boolean, b: Boolean): Boolean
Inherited from
Bool
override def join(a: Boolean, b: Boolean): Boolean
Definition Classes
Inherited from
GenBool
def joinPartialOrder(ev: Eq[Boolean]): PartialOrder[Boolean]
Inherited from
JoinSemilattice
override def joinSemilattice: BoundedSemilattice[Boolean]
override def meet(a: Boolean, b: Boolean): Boolean
Definition Classes
Inherited from
GenBool
def meetPartialOrder(ev: Eq[Boolean]): PartialOrder[Boolean]
Inherited from
MeetSemilattice
override def meetSemilattice: BoundedSemilattice[Boolean]
def nand(a: Boolean, b: Boolean): Boolean
Inherited from
Heyting
def nor(a: Boolean, b: Boolean): Boolean
Inherited from
Heyting
def nxor(a: Boolean, b: Boolean): Boolean
Inherited from
Heyting
def product(as: IterableOnce[Boolean]): Boolean

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def sum(as: IterableOnce[Boolean]): Boolean

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override def sumN(a: Boolean, n: Int): Boolean
Definition Classes
Inherited from
AdditiveMonoid
override def tryProduct(as: IterableOnce[Boolean]): Option[Boolean]
override def trySum(as: IterableOnce[Boolean]): Option[Boolean]
Definition Classes
Inherited from
AdditiveMonoid
def without(a: Boolean, b: Boolean): Boolean
Inherited from
Bool
override def xor(a: Boolean, b: Boolean): Boolean
Definition Classes
Inherited from
Bool