| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Circuit.Logics.Lattice
Description
Order lattices for truth-value carriers.
Naming follows numhask's lattice vocabulary (/, /\, bounds) so a
future alignment is a thin instance layer, not a redesign. This package
owns its hierarchy so it stays an optional compile target.
Synopsis
- class Eq a => JoinSemiLattice a where
- (\/) :: a -> a -> a
- class Eq a => MeetSemiLattice a where
- (/\) :: a -> a -> a
- type Lattice a = (JoinSemiLattice a, MeetSemiLattice a)
- class JoinSemiLattice a => LowerBounded a where
- bottom :: a
- class MeetSemiLattice a => UpperBounded a where
- top :: a
- type BoundedLattice a = (JoinSemiLattice a, MeetSemiLattice a, LowerBounded a, UpperBounded a)
Documentation
class Eq a => JoinSemiLattice a where Source #
Join-semilattice (disjunction / least upper bound).
Associativity: x \/ (y \/ z) == (x \/ y) \/ z Commutativity: x \/ y == y \/ x Idempotency: x \/ x == x
Instances
class Eq a => MeetSemiLattice a where Source #
Meet-semilattice (conjunction / greatest lower bound).
Associativity: x /\ (y /\ z) == (x /\ y) /\ z Commutativity: x /\ y == y /\ x Idempotency: x /\ x == x
Instances
type Lattice a = (JoinSemiLattice a, MeetSemiLattice a) Source #
Lattice when absorption holds:
a \/ (a /\ b) == a a /\ (a \/ b) == a
class JoinSemiLattice a => LowerBounded a where Source #
Instances
| LowerBounded H3 Source # | |
Defined in Circuit.Logics.H3 | |
| LowerBounded K3 Source # | |
Defined in Circuit.Logics.K3 | |
| LowerBounded Bool Source # | |
Defined in Circuit.Logics.Lattice | |
| (Ord r, Num r) => LowerBounded (Goedel r) Source # | |
Defined in Circuit.Logics.Goedel | |
class MeetSemiLattice a => UpperBounded a where Source #
Instances
| UpperBounded H3 Source # | |
Defined in Circuit.Logics.H3 | |
| UpperBounded K3 Source # | |
Defined in Circuit.Logics.K3 | |
| UpperBounded Bool Source # | |
Defined in Circuit.Logics.Lattice | |
| (Ord r, Num r) => UpperBounded (Goedel r) Source # | |
Defined in Circuit.Logics.Goedel | |
type BoundedLattice a = (JoinSemiLattice a, MeetSemiLattice a, LowerBounded a, UpperBounded a) Source #