DeMorgan

algebra.lattice.DeMorgan
See theDeMorgan companion object
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.

Attributes

Companion:
object
Source:
DeMorgan.scala
Graph
Supertypes
Self type

Members list

Concise view

Value members

Concrete methods

def imp(a: A, b: A): A

Attributes

Source:
DeMorgan.scala
def join(a: A, b: A): A

Attributes

Source:
DeMorgan.scala
def meet(a: A, b: A): A

Attributes

Source:
DeMorgan.scala

Inherited methods

def and(a: A, b: A): A

Attributes

Inherited from:
Logic
Source:
Logic.scala

This is the lattice with meet and join swapped

This is the lattice with meet and join swapped

Attributes

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

Attributes

Inherited from:
JoinSemilattice
Source:
JoinSemilattice.scala
def meetPartialOrder(implicit ev: Eq[A]): PartialOrder[A]

Attributes

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

Attributes

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

Attributes

Inherited from:
Logic
Source:
Logic.scala
def not(a: A): A

Attributes

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

Attributes

Inherited from:
Logic
Source:
Logic.scala
def one: A
def or(a: A, b: A): A

Attributes

Inherited from:
Logic
Source:
Logic.scala
def xor(a: A, b: A): A

Attributes

Inherited from:
Logic
Source:
Logic.scala
def zero: A