Logic

algebra.lattice.Logic
See theLogic companion object
trait Logic[A] extends BoundedDistributiveLattice[A]

Logic models a logic generally. It is a bounded distributive lattice with an extra negation operator.

The negation operator obeys the weak De Morgan laws: - ¬(x∨y) = ¬x∧¬y - ¬(x∧y) = ¬¬(¬x∨¬y)

For intuitionistic logic see Heyting For fuzzy logic see DeMorgan

Attributes

Companion
object
Source
Logic.scala
Graph
Supertypes
trait BoundedLattice[A]
trait Lattice[A]
trait MeetSemilattice[A]
trait JoinSemilattice[A]
trait Serializable
class Any
Show all
Known subtypes
trait DeMorgan[A]
Self type
Logic[A]

Members list

Value members

Abstract methods

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

Attributes

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

Attributes

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

Attributes

Source
Logic.scala

Concrete methods

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

Attributes

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

Attributes

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

Attributes

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

Attributes

Source
Logic.scala

Inherited methods

override def dual: BoundedDistributiveLattice[A]

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

Attributes

Inherited from:
BoundedMeetSemilattice
Source
BoundedMeetSemilattice.scala
def isZero(a: A)(implicit ev: Eq[A]): Boolean

Attributes

Inherited from:
BoundedJoinSemilattice
Source
BoundedJoinSemilattice.scala
def join(lhs: A, rhs: A): A

Attributes

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

Attributes

Inherited from:
JoinSemilattice
Source
JoinSemilattice.scala

Attributes

Definition Classes
Inherited from:
BoundedJoinSemilattice
Source
BoundedJoinSemilattice.scala
def meet(lhs: A, rhs: A): A

Attributes

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

Attributes

Inherited from:
MeetSemilattice
Source
MeetSemilattice.scala

Attributes

Definition Classes
Inherited from:
BoundedMeetSemilattice
Source
BoundedMeetSemilattice.scala
def one: A

Attributes

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

Attributes

Inherited from:
BoundedJoinSemilattice
Source
BoundedJoinSemilattice.scala