manyvalued
Safe HaskellNone
LanguageGHC2024

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

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

Methods

(\/) :: a -> a -> a infixr 5 Source #

Instances

Instances details
JoinSemiLattice H3 Source # 
Instance details

Defined in Circuit.Logics.H3

Methods

(\/) :: H3 -> H3 -> H3 Source #

JoinSemiLattice K3 Source # 
Instance details

Defined in Circuit.Logics.K3

Methods

(\/) :: K3 -> K3 -> K3 Source #

JoinSemiLattice Bool Source # 
Instance details

Defined in Circuit.Logics.Lattice

Methods

(\/) :: Bool -> Bool -> Bool Source #

Ord r => JoinSemiLattice (Goedel r) Source # 
Instance details

Defined in Circuit.Logics.Goedel

Methods

(\/) :: Goedel r -> Goedel r -> Goedel r Source #

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

Methods

(/\) :: a -> a -> a infixr 6 Source #

Instances

Instances details
MeetSemiLattice H3 Source # 
Instance details

Defined in Circuit.Logics.H3

Methods

(/\) :: H3 -> H3 -> H3 Source #

MeetSemiLattice K3 Source # 
Instance details

Defined in Circuit.Logics.K3

Methods

(/\) :: K3 -> K3 -> K3 Source #

MeetSemiLattice Bool Source # 
Instance details

Defined in Circuit.Logics.Lattice

Methods

(/\) :: Bool -> Bool -> Bool Source #

Ord r => MeetSemiLattice (Goedel r) Source # 
Instance details

Defined in Circuit.Logics.Goedel

Methods

(/\) :: Goedel r -> Goedel r -> Goedel r Source #

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 #

Methods

bottom :: a Source #

Instances

Instances details
LowerBounded H3 Source # 
Instance details

Defined in Circuit.Logics.H3

Methods

bottom :: H3 Source #

LowerBounded K3 Source # 
Instance details

Defined in Circuit.Logics.K3

Methods

bottom :: K3 Source #

LowerBounded Bool Source # 
Instance details

Defined in Circuit.Logics.Lattice

Methods

bottom :: Bool Source #

(Ord r, Num r) => LowerBounded (Goedel r) Source # 
Instance details

Defined in Circuit.Logics.Goedel

Methods

bottom :: Goedel r Source #

class MeetSemiLattice a => UpperBounded a where Source #

Methods

top :: a Source #

Instances

Instances details
UpperBounded H3 Source # 
Instance details

Defined in Circuit.Logics.H3

Methods

top :: H3 Source #

UpperBounded K3 Source # 
Instance details

Defined in Circuit.Logics.K3

Methods

top :: K3 Source #

UpperBounded Bool Source # 
Instance details

Defined in Circuit.Logics.Lattice

Methods

top :: Bool Source #

(Ord r, Num r) => UpperBounded (Goedel r) Source # 
Instance details

Defined in Circuit.Logics.Goedel

Methods

top :: Goedel r Source #