Package

algebra

lattice

Permalink

package lattice

Visibility
  1. Public
  2. All

Type Members

  1. trait Bool[A] extends Heyting[A]

    Permalink

    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.

  2. trait BoolFunctions extends AnyRef

    Permalink
  3. trait BoundedJoinSemilattice[A] extends JoinSemilattice[A]

    Permalink
  4. trait BoundedLattice[A] extends Lattice[A] with BoundedMeetSemilattice[A] with BoundedJoinSemilattice[A]

    Permalink

    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)

  5. trait BoundedLatticeFunctions extends AnyRef

    Permalink
  6. trait BoundedMeetSemilattice[A] extends MeetSemilattice[A]

    Permalink
  7. class DualBool[A] extends Bool[A]

    Permalink
  8. trait Heyting[A] extends BoundedLattice[A]

    Permalink

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

    Heyting algebras are bounded lattices that are also equipped with an additional binary operation imp (for impliciation, 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.

  9. trait HeytingFunctions extends AnyRef

    Permalink
  10. trait JoinSemilattice[A] extends Serializable

    Permalink

    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.

  11. trait Lattice[A] extends JoinSemilattice[A] with MeetSemilattice[A]

    Permalink

    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.

    The join and meet operations are also linked by absorption laws:

    meet(a, join(a, b)) = join(a, meet(a, b)) = a

    Additionally, join and meet distribute:

    • a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)
    • a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)

    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).

    In many texts the following symbols are used:

    • ∧ for meet
    • ∨ for join
  12. trait LatticeFunctions extends AnyRef

    Permalink
  13. trait MeetSemilattice[A] extends Serializable

    Permalink

    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.

  14. class MinMaxLattice[A] extends Lattice[A]

    Permalink

Ungrouped