semibounded-lattices-0.1.1.0: A Haskell implementation of semibounded lattices
Copyright(c) Hao Xu 2016
LicenseBSD-3
Maintainerxuh@email.unc.edu
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
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

Instances details
Show a => Show (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => JoinSemiLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => MeetSemiLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => Lattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => BoundedJoinSemiLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

Methods

bottom :: Complemented a #

SemiCoHeytingAlgebra a => BoundedMeetSemiLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

Methods

top :: Complemented a #

SemiCoHeytingAlgebra a => BoundedLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => BooleanAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => BiHeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => HeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => SemiHeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => CoHeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => SemiCoHeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => UpperBoundedDistributiveLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => LowerBoundedDistributiveLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => DistributiveLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => LowerBoundedLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => UpperBoundedLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

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

Instances

Instances details
SemiCoHeytingAlgebra a => DistributiveLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

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

Instances

Instances details
LowerBoundedLattice Integer Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

Ord a => LowerBoundedLattice (Set a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

SemiCoHeytingAlgebra a => LowerBoundedLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

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

Instances

Instances details
SemiCoHeytingAlgebra a => UpperBoundedLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

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

Instances

Instances details
SemiCoHeytingAlgebra a => UpperBoundedDistributiveLattice (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

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

Minimal complete definition

Nothing

Methods

complement :: a -> a Source #

Instances

Instances details
SemiCoHeytingAlgebra a => BooleanAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

class (BoundedLattice a, SemiHeytingAlgebra a) => HeytingAlgebra a where Source #

Minimal complete definition

Nothing

Methods

negation :: a -> a Source #

Instances

Instances details
SemiCoHeytingAlgebra a => HeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

class (BoundedLattice a, SemiCoHeytingAlgebra a) => CoHeytingAlgebra a where Source #

Minimal complete definition

Nothing

Methods

supplement :: a -> a Source #

Instances

Instances details
SemiCoHeytingAlgebra a => CoHeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

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

Minimal complete definition

Nothing

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

Minimal complete definition

Nothing

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

Instances

Instances details
SemiCoHeytingAlgebra a => BiHeytingAlgebra (Complemented a) Source # 
Instance details

Defined in Algebra.SemiBoundedLattice

Orphan instances

JoinSemiLattice Integer Source # 
Instance details

MeetSemiLattice Integer Source # 
Instance details

BoundedJoinSemiLattice Integer Source # 
Instance details

Methods

bottom :: Integer #