BooleanAlgebra

algebra.instances.BooleanAlgebra

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

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

Attributes

Source:
boolean.scala
Graph
Supertypes

Members list

Concise view

Value members

Concrete methods

def and(x: Boolean, y: Boolean): Boolean

Attributes

Source:
boolean.scala

Attributes

Source:
boolean.scala
override def isOne(x: Boolean)(implicit ev: Eq[Boolean]): Boolean

Tests if a is one.

Tests if a is one.

Attributes

Definition Classes
Source:
boolean.scala
override def isZero(x: Boolean)(implicit ev: Eq[Boolean]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Definition Classes
Source:
boolean.scala

Attributes

Source:
boolean.scala
def or(x: Boolean, y: Boolean): Boolean

Attributes

Source:
boolean.scala

Attributes

Source:
boolean.scala
override def pow(a: Boolean, b: Int): Boolean

Attributes

Definition Classes
Source:
boolean.scala
override def times(a: Boolean, b: Boolean): Boolean

Attributes

Definition Classes
Source:
boolean.scala

Attributes

Source:
boolean.scala

Inherited methods

override def asBoolRing: BoolRing[A]

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.

Attributes

Definition Classes
Inherited from:
Bool
Source:
Bool.scala
override def dual: Bool[A]

This is the lattice with meet and join swapped

This is the lattice with meet and join swapped

Attributes

Definition Classes
Inherited from:
Bool
Source:
Bool.scala
def imp(a: Boolean, b: Boolean): A

Attributes

Inherited from:
Bool
Source:
Bool.scala
override def join(a: Boolean, b: Boolean): A

Attributes

Definition Classes
Inherited from:
GenBool
Source:
GenBool.scala
def joinPartialOrder(implicit ev: Eq[Boolean]): PartialOrder[A]

Attributes

Inherited from:
JoinSemilattice
Source:
JoinSemilattice.scala
override def meet(a: Boolean, b: Boolean): A

Attributes

Definition Classes
Inherited from:
GenBool
Source:
GenBool.scala
def meetPartialOrder(implicit ev: Eq[Boolean]): PartialOrder[A]

Attributes

Inherited from:
MeetSemilattice
Source:
MeetSemilattice.scala
def nand(a: Boolean, b: Boolean): A

Attributes

Inherited from:
Heyting
Source:
Heyting.scala
def nor(a: Boolean, b: Boolean): A

Attributes

Inherited from:
Heyting
Source:
Heyting.scala
def nxor(a: Boolean, b: Boolean): A

Attributes

Inherited from:
Heyting
Source:
Heyting.scala

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Attributes

Inherited from:
MultiplicativeMonoid
Source:
Multiplicative.scala
def sum(as: IterableOnce[Boolean]): A

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Attributes

Inherited from:
AdditiveMonoid
Source:
Additive.scala
override def sumN(a: Boolean, n: Int): A

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source:
Additive.scala
override def tryProduct(as: IterableOnce[Boolean]): Option[A]

Given a sequence of as, combine them and return the total.

Given a sequence of as, combine them and return the total.

If the sequence is empty, returns None. Otherwise, returns Some(total).

Attributes

Definition Classes
Inherited from:
MultiplicativeMonoid
Source:
Multiplicative.scala
override def trySum(as: IterableOnce[Boolean]): Option[A]

Given a sequence of as, combine them and return the total.

Given a sequence of as, combine them and return the total.

If the sequence is empty, returns None. Otherwise, returns Some(total).

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source:
Additive.scala
def without(a: Boolean, b: Boolean): A

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).

Attributes

Inherited from:
Bool
Source:
Bool.scala
override def xor(a: Boolean, b: Boolean): A

Logical exclusive or, set-theoretic symmetric difference. Defined as a\b ∨ b\a.

Logical exclusive or, set-theoretic symmetric difference. Defined as a\b ∨ b\a.

Attributes

Definition Classes
Inherited from:
Bool
Source:
Bool.scala