trait DeMorgan[A] extends Logic[A]
De Morgan algebras are bounded lattices that are also equipped with a De Morgan involution.
De Morgan involution obeys the following laws:
- ¬¬a = a
- ¬(x∧y) = ¬x∨¬y
However, in De Morgan algebras this involution does not necessarily provide the law of the excluded middle. This means that there is no guarantee that (a ∨ ¬a) = 1. De Morgan algebra do not not necessarily provide the law of non contradiction either. This means that there is no guarantee that (a ∧ ¬a) = 0.
De Morgan algebras are useful to model fuzzy logic. For a model of classical logic, see the boolean algebra type class implemented as Bool.
- Self Type
- DeMorgan[A]
- Source
- DeMorgan.scala
- Alphabetic
- By Inheritance
- DeMorgan
- Logic
- 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
- Logic
-
abstract
def
getClass(): Class[_]
- Definition Classes
- Any
-
abstract
def
not(a: A): A
- Definition Classes
- Logic
-
abstract
def
one: A
- Definition Classes
- BoundedMeetSemilattice
-
abstract
def
or(a: A, b: A): A
- Definition Classes
- Logic
-
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
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: BoundedDistributiveLattice[A]
This is the lattice with meet and join swapped
This is the lattice with meet and join swapped
- Definition Classes
- 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
- DeMorgan → 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
- DeMorgan → 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
- Logic
-
def
nor(a: A, b: A): A
- Definition Classes
- Logic
-
def
nxor(a: A, b: A): A
- Definition Classes
- Logic
-
def
toString(): String
- Definition Classes
- Any
-
def
xor(a: A, b: A): A
- Definition Classes
- Logic