trait Bool[A] extends Heyting[A] with GenBool[A]
Boolean algebras are Heyting algebras with the additional constraint that the law of the excluded middle is true (equivalently, double-negation is true).
This means that in addition to the laws Heyting algebras obey, boolean algebras also obey the following:
- (a ∨ ¬a) = 1
- ¬¬a = a
Boolean algebras generalize classical logic: one is equivalent to
"true" and zero is equivalent to "false". Boolean algebras provide
additional logical operators such as xor
, nand
, nor
, and
nxor
which are commonly used.
Every boolean algebras has a dual algebra, which involves reversing true/false as well as and/or.
- Self Type
- Bool[A]
- Source
- Bool.scala
- Alphabetic
- By Inheritance
- Bool
- GenBool
- Heyting
- BoundedDistributiveLattice
- DistributiveLattice
- BoundedLattice
- BoundedJoinSemilattice
- BoundedMeetSemilattice
- Lattice
- MeetSemilattice
- JoinSemilattice
- Serializable
- Serializable
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
and(a: A, b: A): A
- Definition Classes
- GenBool
-
abstract
def
complement(a: A): A
- Definition Classes
- Heyting
-
abstract
def
getClass(): Class[_]
- Definition Classes
- Any
-
abstract
def
one: A
- Definition Classes
- BoundedMeetSemilattice
-
abstract
def
or(a: A, b: A): A
- Definition Classes
- GenBool
-
abstract
def
zero: A
- Definition Classes
- BoundedJoinSemilattice
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
def
asBoolRing: BoolRing[A]
Every Boolean algebra is a BoolRing, with multiplication defined as
and
and addition defined asxor
.Every Boolean algebra is a BoolRing, with multiplication defined as
and
and addition defined asxor
. 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 fromBoundedDistributiveLattice.asCommutativeRig
. -
def
asCommutativeRig: CommutativeRig[A]
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.
- Definition Classes
- BoundedDistributiveLattice
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
dual: Bool[A]
This is the lattice with meet and join swapped
This is the lattice with meet and join swapped
- Definition Classes
- Bool → BoundedDistributiveLattice → BoundedLattice → Lattice
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
def
hashCode(): Int
- Definition Classes
- Any
- def imp(a: A, b: A): A
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOne(a: A)(implicit ev: Eq[A]): Boolean
- Definition Classes
- BoundedMeetSemilattice
-
def
isZero(a: A)(implicit ev: Eq[A]): Boolean
- Definition Classes
- BoundedJoinSemilattice
-
def
join(a: A, b: A): A
- Definition Classes
- GenBool → JoinSemilattice
-
def
joinPartialOrder(implicit ev: Eq[A]): PartialOrder[A]
- Definition Classes
- JoinSemilattice
-
def
joinSemilattice: BoundedSemilattice[A]
- Definition Classes
- BoundedJoinSemilattice → JoinSemilattice
-
def
meet(a: A, b: A): A
- Definition Classes
- GenBool → MeetSemilattice
-
def
meetPartialOrder(implicit ev: Eq[A]): PartialOrder[A]
- Definition Classes
- MeetSemilattice
-
def
meetSemilattice: BoundedSemilattice[A]
- Definition Classes
- BoundedMeetSemilattice → MeetSemilattice
-
def
nand(a: A, b: A): A
- Definition Classes
- Heyting
-
def
nor(a: A, b: A): A
- Definition Classes
- Heyting
-
def
nxor(a: A, b: A): A
- Definition Classes
- Heyting
-
def
toString(): String
- Definition Classes
- Any
-
def
without(a: A, b: A): 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). -
def
xor(a: A, b: A): A
Logical exclusive or, set-theoretic symmetric difference.