algebra.lattice
Members list
Type members
Classlikes
Boolean algebras are Heyting algebras with the additional constraint that the law of the excluded middle is true (equivalently, double-negation is true).
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.
Attributes
- Companion
- object
- Source
- Bool.scala
- Supertypes
-
trait GenBool[A]trait Heyting[A]trait BoundedDistributiveLattice[A]trait DistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Known subtypes
- Self type
-
Bool[A]
Attributes
- Companion
- trait
- Source
- Bool.scala
- Supertypes
-
trait GenBoolFunctions[Bool]trait HeytingFunctions[Bool]trait JoinSemilatticeFunctions[Bool]trait MeetSemilatticeFunctions[Bool]class Objecttrait Matchableclass AnyShow all
- Self type
-
Bool.type
Every Boolean ring gives rise to a Boolean algebra: - 0 and 1 are preserved; - ring multiplication (times
) corresponds to and
; - ring addition (plus
) corresponds to xor
; - a or b
is then defined as a xor b xor (a and b)
; - complement (¬a
) is defined as a xor 1
.
Every Boolean ring gives rise to a Boolean algebra: - 0 and 1 are preserved; - ring multiplication (times
) corresponds to and
; - ring addition (plus
) corresponds to xor
; - a or b
is then defined as a xor b xor (a and b)
; - complement (¬a
) is defined as a xor 1
.
Attributes
- Source
- Bool.scala
- Supertypes
-
trait Bool[A]trait Heyting[A]trait BoundedDistributiveLattice[A]trait BoundedLattice[A]trait BoundedMeetSemilattice[A]class GenBoolFromBoolRng[A]trait GenBool[A]trait BoundedJoinSemilattice[A]trait DistributiveLattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Source
- Bool.scala
- Supertypes
-
trait BoolRing[A]trait CommutativeRing[A]trait CommutativeRig[A]trait MultiplicativeCommutativeMonoid[A]trait Ring[A]trait Rig[A]trait MultiplicativeMonoid[A]class BoolRngFromGenBool[A]trait BoolRng[A]trait CommutativeRng[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Source
- GenBool.scala
- Supertypes
-
trait BoolRng[A]trait CommutativeRng[A]trait CommutativeSemiring[A]trait MultiplicativeCommutativeSemigroup[A]trait Rng[A]trait AdditiveCommutativeGroup[A]trait AdditiveGroup[A]trait Semiring[A]trait MultiplicativeSemigroup[A]trait AdditiveCommutativeMonoid[A]trait AdditiveCommutativeSemigroup[A]trait AdditiveMonoid[A]trait AdditiveSemigroup[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class BoolRingFromBool[A]
A bounded distributive lattice is a lattice that both bounded and distributive
A bounded distributive lattice is a lattice that both bounded and distributive
Attributes
- Companion
- object
- Source
- BoundedDistributiveLattice.scala
- Supertypes
-
trait DistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Known subtypes
-
trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]Show all
- Self type
Attributes
- Companion
- trait
- Source
- BoundedDistributiveLattice.scala
- Supertypes
- Self type
Attributes
- Companion
- object
- Source
- BoundedJoinSemilattice.scala
- Supertypes
- Known subtypes
-
trait BoundedLattice[A]trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]trait GenBool[A]class BitSetAlgebraclass SetLattice[A]class GenBoolFromBoolRng[A]Show all
Attributes
- Companion
- trait
- Source
- BoundedJoinSemilattice.scala
- Supertypes
- Self type
Attributes
- Source
- BoundedJoinSemilattice.scala
- Supertypes
- Known subtypes
-
object BoundedDistributiveLatticeobject BoundedJoinSemilatticeobject BoundedLatticetrait DeMorganFunctions[H]object DeMorgantrait GenBoolFunctions[G]object Boolobject GenBooltrait HeytingFunctions[H]object HeytingShow all
A bounded lattice is a lattice that additionally has one element that is the bottom (zero, also written as ⊥), and one element that is the top (one, also written as ⊤).
A bounded lattice is a lattice that additionally has one element that is the bottom (zero, also written as ⊥), and one element that is the top (one, also written as ⊤).
This means that for any a in A:
join(zero, a) = a = meet(one, a)
Or written using traditional notation:
(0 ∨ a) = a = (1 ∧ a)
Attributes
- Companion
- object
- Source
- BoundedLattice.scala
- Supertypes
-
trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Known subtypes
-
trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]Show all
- Self type
Attributes
- Companion
- trait
- Source
- BoundedLattice.scala
- Supertypes
- Self type
-
BoundedLattice.type
Attributes
- Companion
- object
- Source
- BoundedMeetSemilattice.scala
- Supertypes
- Known subtypes
-
trait BoundedLattice[A]trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]Show all
Attributes
- Companion
- trait
- Source
- BoundedMeetSemilattice.scala
- Supertypes
- Self type
Attributes
- Source
- BoundedMeetSemilattice.scala
- Supertypes
- Known subtypes
-
object BoundedDistributiveLatticeobject BoundedLatticeobject BoundedMeetSemilatticetrait DeMorganFunctions[H]object DeMorgantrait HeytingFunctions[H]object Boolobject HeytingShow all
De Morgan algebras are bounded lattices that are also equipped with a De Morgan involution.
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
- Supertypes
-
trait Logic[A]trait BoundedDistributiveLattice[A]trait DistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Self type
-
DeMorgan[A]
Attributes
- Companion
- trait
- Source
- DeMorgan.scala
- Supertypes
-
trait DeMorganFunctions[DeMorgan]trait LogicFunctions[DeMorgan]trait JoinSemilatticeFunctions[DeMorgan]trait MeetSemilatticeFunctions[DeMorgan]class Objecttrait Matchableclass AnyShow all
- Self type
-
DeMorgan.type
Attributes
- Source
- DeMorgan.scala
- Supertypes
-
trait LogicFunctions[H]trait BoundedJoinSemilatticeFunctions[H]trait JoinSemilatticeFunctions[H]trait BoundedMeetSemilatticeFunctions[H]trait MeetSemilatticeFunctions[H]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object DeMorgan
A distributive lattice a lattice where join and meet distribute:
A distributive lattice a lattice where join and meet distribute:
-
a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)
-
a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)
Attributes
- Companion
- object
- Source
- DistributiveLattice.scala
- Supertypes
- Known subtypes
-
trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]trait GenBool[A]class BitSetAlgebraclass SetLattice[A]class GenBoolFromBoolRng[A]class MinMaxLattice[A]Show all
Attributes
- Companion
- trait
- Source
- DistributiveLattice.scala
- Supertypes
- Self type
-
DistributiveLattice.type
Attributes
- Source
- Bool.scala
- Supertypes
-
trait Bool[A]trait GenBool[A]trait Heyting[A]trait BoundedDistributiveLattice[A]trait DistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
Generalized Boolean algebra, that is, a Boolean algebra without the top element.
Generalized Boolean algebra, that is, a Boolean algebra without the top element. Generalized Boolean algebras do not (in general) have (absolute) complements, but they have relative complements (see GenBool.without).
Attributes
- Companion
- object
- Source
- GenBool.scala
- Supertypes
-
trait BoundedJoinSemilattice[A]trait DistributiveLattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Known subtypes
-
class BitSetAlgebraclass SetLattice[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]class GenBoolFromBoolRng[A]Show all
- Self type
-
GenBool[A]
Attributes
- Companion
- trait
- Source
- GenBool.scala
- Supertypes
-
trait GenBoolFunctions[GenBool]trait MeetSemilatticeFunctions[GenBool]trait JoinSemilatticeFunctions[GenBool]class Objecttrait Matchableclass AnyShow all
- Self type
-
GenBool.type
Every Boolean rng gives rise to a Boolean algebra without top: - 0 is preserved; - ring multiplication (times
) corresponds to and
; - ring addition (plus
) corresponds to xor
; - a or b
is then defined as a xor b xor (a and b)
; - relative complement a\b
is defined as a xor (a and b)
.
Every Boolean rng gives rise to a Boolean algebra without top: - 0 is preserved; - ring multiplication (times
) corresponds to and
; - ring addition (plus
) corresponds to xor
; - a or b
is then defined as a xor b xor (a and b)
; - relative complement a\b
is defined as a xor (a and b)
.
BoolRng.asBool.asBoolRing
gives back the original BoolRng
.
Attributes
- See also
- Source
- GenBool.scala
- Supertypes
-
trait GenBool[A]trait BoundedJoinSemilattice[A]trait DistributiveLattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class BoolFromBoolRing[A]
Attributes
- Source
- GenBool.scala
- Supertypes
-
trait MeetSemilatticeFunctions[G]trait BoundedJoinSemilatticeFunctions[G]trait JoinSemilatticeFunctions[G]class Objecttrait Matchableclass AnyShow all
- Known subtypes
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
.
Attributes
- Companion
- object
- Source
- Heyting.scala
- Supertypes
-
trait BoundedDistributiveLattice[A]trait DistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Known subtypes
- Self type
-
Heyting[A]
Attributes
- Companion
- trait
- Source
- Heyting.scala
- Supertypes
-
trait HeytingGenBoolOverlap[Heyting]trait HeytingFunctions[Heyting]trait JoinSemilatticeFunctions[Heyting]trait MeetSemilatticeFunctions[Heyting]class Objecttrait Matchableclass AnyShow all
- Self type
-
Heyting.type
Attributes
- Source
- Heyting.scala
- Supertypes
-
trait BoundedJoinSemilatticeFunctions[H]trait JoinSemilatticeFunctions[H]trait BoundedMeetSemilatticeFunctions[H]trait MeetSemilatticeFunctions[H]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Source
- Heyting.scala
- Supertypes
- Known subtypes
-
object Heyting
A join-semilattice (or upper semilattice) is a semilattice whose operation is called "join", and which can be thought of as a least upper bound.
A join-semilattice (or upper semilattice) is a semilattice whose operation is called "join", and which can be thought of as a least upper bound.
Attributes
- Companion
- object
- Source
- JoinSemilattice.scala
- Supertypes
-
trait Serializableclass Any
- Known subtypes
-
trait BoundedJoinSemilattice[A]trait BoundedLattice[A]trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]trait GenBool[A]class BitSetAlgebraclass SetLattice[A]class GenBoolFromBoolRng[A]trait Lattice[A]trait DistributiveLattice[A]class MinMaxLattice[A]Show all
Attributes
- Companion
- trait
- Source
- JoinSemilattice.scala
- Supertypes
- Self type
-
JoinSemilattice.type
Attributes
- Source
- JoinSemilattice.scala
- Supertypes
- Known subtypes
-
object BoundedJoinSemilatticetrait BoundedJoinSemilatticeFunctions[B]object BoundedDistributiveLatticeobject BoundedLatticetrait DeMorganFunctions[H]object DeMorgantrait GenBoolFunctions[G]object Boolobject GenBooltrait HeytingFunctions[H]object Heytingobject DistributiveLatticeobject JoinSemilatticeobject LatticeShow all
A lattice is a set A
together with two operations (meet and join).
A lattice is a set A
together with two operations (meet and join). Both operations individually constitute semilattices (join- and meet-semilattices respectively): each operation is commutative, associative, and idempotent.
Join can be thought of as finding a least upper bound (supremum), and meet can be thought of as finding a greatest lower bound (infimum).
The join and meet operations are also linked by absorption laws:
meet(a, join(a, b)) = join(a, meet(a, b)) = a
Attributes
- Companion
- object
- Source
- Lattice.scala
- Supertypes
- Known subtypes
-
trait BoundedLattice[A]trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]trait DistributiveLattice[A]trait GenBool[A]class BitSetAlgebraclass SetLattice[A]class GenBoolFromBoolRng[A]class MinMaxLattice[A]Show all
- Self type
-
Lattice[A]
Attributes
- Companion
- trait
- Source
- Lattice.scala
- Supertypes
-
trait MeetSemilatticeFunctions[Lattice]trait JoinSemilatticeFunctions[Lattice]class Objecttrait Matchableclass Any
- Self type
-
Lattice.type
Logic models a logic generally.
Attributes
- Companion
- object
- Source
- Logic.scala
- Supertypes
-
trait BoundedDistributiveLattice[A]trait DistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass AnyShow all
- Known subtypes
-
trait DeMorgan[A]
- Self type
-
Logic[A]
Attributes
- Companion
- trait
- Source
- Logic.scala
- Supertypes
- Self type
-
Logic.type
Attributes
- Source
- Logic.scala
- Supertypes
- Known subtypes
A meet-semilattice (or lower semilattice) is a semilattice whose operation is called "meet", and which can be thought of as a greatest lower bound.
A meet-semilattice (or lower semilattice) is a semilattice whose operation is called "meet", and which can be thought of as a greatest lower bound.
Attributes
- Companion
- object
- Source
- MeetSemilattice.scala
- Supertypes
-
trait Serializableclass Any
- Known subtypes
-
trait BoundedMeetSemilattice[A]trait BoundedLattice[A]trait BoundedDistributiveLattice[A]trait Heyting[A]trait Bool[A]class BooleanAlgebraclass BoolFromBoolRing[A]class DualBool[A]trait Logic[A]trait DeMorgan[A]class MinMaxBoundedDistributiveLattice[A]trait Lattice[A]trait DistributiveLattice[A]trait GenBool[A]class BitSetAlgebraclass SetLattice[A]class GenBoolFromBoolRng[A]class MinMaxLattice[A]Show all
Attributes
- Companion
- trait
- Source
- MeetSemilattice.scala
- Supertypes
- Self type
-
MeetSemilattice.type
Attributes
- Source
- MeetSemilattice.scala
- Supertypes
- Known subtypes
-
trait BoundedMeetSemilatticeFunctions[B]object BoundedDistributiveLatticeobject BoundedLatticeobject BoundedMeetSemilatticetrait DeMorganFunctions[H]object DeMorgantrait HeytingFunctions[H]object Boolobject Heytingobject DistributiveLatticetrait GenBoolFunctions[G]object GenBoolobject Latticeobject MeetSemilatticeShow all
Attributes
- Source
- BoundedDistributiveLattice.scala
- Supertypes
-
trait BoundedDistributiveLattice[A]trait BoundedLattice[A]trait BoundedJoinSemilattice[A]trait BoundedMeetSemilattice[A]class MinMaxLattice[A]trait DistributiveLattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Source
- DistributiveLattice.scala
- Supertypes
-
trait DistributiveLattice[A]trait Lattice[A]trait MeetSemilattice[A]trait JoinSemilattice[A]trait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class MinMaxBoundedDistributiveLattice[A]