Heyting

trait Heyting[@specialized(Int, Long) A] extends BoundedDistributiveLattice[A]

Heyting algebras are bounded lattices that are also equipped with an additional binary operation imp (for implication, also written as →).

Heyting algebras are bounded lattices that are also equipped with an additional binary operation imp (for implication, also written as →).

Implication obeys the following laws:

  • a → a = 1
  • a ∧ (a → b) = a ∧ b
  • b ∧ (a → b) = b
  • a → (b ∧ c) = (a → b) ∧ (a → c)

In heyting algebras, and is equivalent to meet and or is equivalent to join; both methods are available.

Heyting algebra also define complement operation (sometimes written as ¬a). The complement of a is equivalent to (a → 0), and the following laws hold:

  • a ∧ ¬a = 0

However, in Heyting algebras this operation is only a pseudo-complement, since Heyting algebras do not necessarily provide the law of the excluded middle. This means that there is no guarantee that (a ∨ ¬a) = 1.

Heyting algebras model intuitionistic logic. For a model of classical logic, see the boolean algebra type class implemented as Bool.

Companion
object
trait Lattice[A]
trait Serializable
class Any
trait Bool[A]
class DualBool[A]

Value members

Abstract methods

def and(a: A, b: A): A
def complement(a: A): A
def imp(a: A, b: A): A
def or(a: A, b: A): A

Concrete methods

def join(a: A, b: A): A
def meet(a: A, b: A): A
def nand(a: A, b: A): A
def nor(a: A, b: A): A
def nxor(a: A, b: A): A
def xor(a: A, b: A): A

Inherited methods

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.

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.

Inherited from
BoundedDistributiveLattice
def isOne(a: A)(ev: Eq[A]): Boolean
def isZero(a: A)(ev: Eq[A]): Boolean
def joinPartialOrder(ev: Eq[A]): PartialOrder[A]
Inherited from
JoinSemilattice
override def joinSemilattice: BoundedSemilattice[A]
def meetPartialOrder(ev: Eq[A]): PartialOrder[A]
Inherited from
MeetSemilattice
override def meetSemilattice: BoundedSemilattice[A]
def one: A
def zero: A