semibounded-lattices-0.1.0.0: A Haskell implementation of semibounded lattices

Copyright(c) Hao Xu, 2016
LicenseBSD-3
Maintainerxuh@email.unc.edu
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Algebra.SemiBoundedLattice

Description

Haskell typeclasses and instances of semibounded lattices, Heyting algebra, co-Heyting algebra, and Boolean algebra

Synopsis

Documentation

data Complemented a Source #

Constructors

Include a 
Exclude a 

Instances

Show a => Show (Complemented a) Source # 
SemiCoHeytingAlgebra a => JoinSemiLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => MeetSemiLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => Lattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => BoundedJoinSemiLattice (Complemented a) Source # 

Methods

bottom :: Complemented a #

SemiCoHeytingAlgebra a => BoundedMeetSemiLattice (Complemented a) Source # 

Methods

top :: Complemented a #

SemiCoHeytingAlgebra a => BoundedLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => BooleanAlgebra (Complemented a) Source # 
SemiCoHeytingAlgebra a => BiHeytingAlgebra (Complemented a) Source # 
SemiCoHeytingAlgebra a => HeytingAlgebra (Complemented a) Source # 
SemiCoHeytingAlgebra a => SemiHeytingAlgebra (Complemented a) Source # 
SemiCoHeytingAlgebra a => CoHeytingAlgebra (Complemented a) Source # 
SemiCoHeytingAlgebra a => SemiCoHeytingAlgebra (Complemented a) Source # 
SemiCoHeytingAlgebra a => UpperBoundedDistributiveLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => LowerBoundedDistributiveLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => DistributiveLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => LowerBoundedLattice (Complemented a) Source # 
SemiCoHeytingAlgebra a => UpperBoundedLattice (Complemented a) Source # 

class Lattice a => DistributiveLattice a Source #

A lattice is distributive if the distributivity law holds:

Distributivity: a /\ (b \/ c) == (a /\ b) \/ (a /\ c)

see https://en.wikipedia.org/wiki/Distributive_lattice

class (BoundedJoinSemiLattice a, MeetSemiLattice a) => LowerBoundedLattice a Source #

The combination of a BoundedJoinSemiLattice and a MeetSemiLattice makes an LowerBoundedLattice if the absorption law holds:

Absorption: a \/ (a /\ b) == a /\ (a \/ b) == a

class (JoinSemiLattice a, BoundedMeetSemiLattice a) => UpperBoundedLattice a Source #

The combination of a JoinSemiLattice and a BoundedMeetSemiLattice makes an UpperBoundedLattice if the absorption law holds:

Absorption: a \/ (a /\ b) == a /\ (a \/ b) == a

class LowerBoundedLattice a => LowerBoundedDistributiveLattice a Source #

A lattice is distributive if the distributivity law holds:

Distributivity: a /\ (b \/ c) == (a /\ b) \/ (a /\ c)

see https://en.wikipedia.org/wiki/Distributive_lattice

class UpperBoundedLattice a => UpperBoundedDistributiveLattice a Source #

A lattice is distributive if the distributivity law holds:

Distributivity: a /\ (b \/ c) == (a /\ b) \/ (a /\ c)

see https://en.wikipedia.org/wiki/Distributive_lattice

class BiHeytingAlgebra a => BooleanAlgebra a where Source #

A Boolean Algebra is a complemented distributive lattice, see https://en.wikipedia.org/wiki/Boolean_algebra_(structure) or equivalently a Heyting algebra where

negation (negation a) == a

in a Boolean algebra

supplement == negation

Methods

complement :: a -> a Source #

class UpperBoundedDistributiveLattice a => SemiHeytingAlgebra a where Source #

In most literature, a Heyting algebra requires a bounded lattice. We only require a UpperBoundedDistributiveLattice here for semi-Heyting algebra. (here the lattice must be upper bounded) The following law holds:

x /\ a <= b if and only if x <= (a --> b)

see https://ncatlab.org/nlab/show/Heyting+algebra Heyting algebras are always distributive. see https://en.wikipedia.org/wiki/Heyting_algebra#Distributivity

Methods

implication :: a -> a -> a Source #

(-->) :: a -> a -> a Source #

class LowerBoundedDistributiveLattice a => SemiCoHeytingAlgebra a where Source #

A semi-co-Heyting Algebra is dual of a semi-Heyting algebra where the following law holds:

x \\\ y <= z if and only if x <= y \/ z

see https://ncatlab.org/nlab/show/co-Heyting+algebra

Methods

subtraction :: a -> a -> a Source #

(\\\) :: a -> a -> a Source #

class (HeytingAlgebra a, CoHeytingAlgebra a) => BiHeytingAlgebra a Source #

A lattice that is both a Heyting algebra and a co-Heyting algebra is a bi-Heyting algebra