lattices-1.5.0: Fine-grained library for constructing and manipulating lattices

Copyright(C) 2010-2015 Maximilian Bolingbroke
LicenseBSD-3-Clause (see the file LICENSE)
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellTrustworthy
LanguageHaskell2010

Algebra.Lattice

Contents

Description

In mathematics, a lattice is a partially ordered set in which every two elements have a unique supremum (also called a least upper bound or join) and a unique infimum (also called a greatest lower bound or meet).

In this module lattices are defined using meet and join operators, as it's constructive one.

Synopsis

Unbounded lattices

class JoinSemiLattice a where #

A algebraic structure with element joins: http://en.wikipedia.org/wiki/Semilattice

Associativity: x \/ (y \/ z) == (x \/ y) \/ z
Commutativity: x \/ y == y \/ x
Idempotency:   x \/ x == x

Minimal complete definition

(\/) | join

Methods

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

join :: a -> a -> a #

Deprecated: Use \/ infix operator

Instances

JoinSemiLattice Bool # 

Methods

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

join :: Bool -> Bool -> Bool #

JoinSemiLattice () # 

Methods

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

join :: () -> () -> () #

JoinSemiLattice Void # 

Methods

(\/) :: Void -> Void -> Void #

join :: Void -> Void -> Void #

JoinSemiLattice All # 

Methods

(\/) :: All -> All -> All #

join :: All -> All -> All #

JoinSemiLattice Any # 

Methods

(\/) :: Any -> Any -> Any #

join :: Any -> Any -> Any #

JoinSemiLattice IntSet # 

Methods

(\/) :: IntSet -> IntSet -> IntSet #

join :: IntSet -> IntSet -> IntSet #

JoinSemiLattice a => JoinSemiLattice (Identity a) # 

Methods

(\/) :: Identity a -> Identity a -> Identity a #

join :: Identity a -> Identity a -> Identity a #

JoinSemiLattice a => JoinSemiLattice (Endo a) # 

Methods

(\/) :: Endo a -> Endo a -> Endo a #

join :: Endo a -> Endo a -> Endo a #

JoinSemiLattice v => JoinSemiLattice (IntMap v) # 

Methods

(\/) :: IntMap v -> IntMap v -> IntMap v #

join :: IntMap v -> IntMap v -> IntMap v #

Ord a => JoinSemiLattice (Set a) # 

Methods

(\/) :: Set a -> Set a -> Set a #

join :: Set a -> Set a -> Set a #

(Eq a, Hashable a) => JoinSemiLattice (HashSet a) # 

Methods

(\/) :: HashSet a -> HashSet a -> HashSet a #

join :: HashSet a -> HashSet a -> HashSet a #

JoinSemiLattice a => JoinSemiLattice (Dropped a) # 

Methods

(\/) :: Dropped a -> Dropped a -> Dropped a #

join :: Dropped a -> Dropped a -> Dropped a #

JoinSemiLattice a => JoinSemiLattice (Levitated a) # 

Methods

(\/) :: Levitated a -> Levitated a -> Levitated a #

join :: Levitated a -> Levitated a -> Levitated a #

JoinSemiLattice a => JoinSemiLattice (Lifted a) # 

Methods

(\/) :: Lifted a -> Lifted a -> Lifted a #

join :: Lifted a -> Lifted a -> Lifted a #

MeetSemiLattice a => JoinSemiLattice (Op a) # 

Methods

(\/) :: Op a -> Op a -> Op a #

join :: Op a -> Op a -> Op a #

Ord a => JoinSemiLattice (Ordered a) # 

Methods

(\/) :: Ordered a -> Ordered a -> Ordered a #

join :: Ordered a -> Ordered a -> Ordered a #

JoinSemiLattice v => JoinSemiLattice (k -> v) # 

Methods

(\/) :: (k -> v) -> (k -> v) -> k -> v #

join :: (k -> v) -> (k -> v) -> k -> v #

(JoinSemiLattice a, JoinSemiLattice b) => JoinSemiLattice (a, b) # 

Methods

(\/) :: (a, b) -> (a, b) -> (a, b) #

join :: (a, b) -> (a, b) -> (a, b) #

JoinSemiLattice (Proxy * a) # 

Methods

(\/) :: Proxy * a -> Proxy * a -> Proxy * a #

join :: Proxy * a -> Proxy * a -> Proxy * a #

(Ord k, JoinSemiLattice v) => JoinSemiLattice (Map k v) # 

Methods

(\/) :: Map k v -> Map k v -> Map k v #

join :: Map k v -> Map k v -> Map k v #

(Eq k, Hashable k) => JoinSemiLattice (HashMap k v) # 

Methods

(\/) :: HashMap k v -> HashMap k v -> HashMap k v #

join :: HashMap k v -> HashMap k v -> HashMap k v #

(PartialOrd k, JoinSemiLattice k, JoinSemiLattice v) => JoinSemiLattice (Lexicographic k v) # 
JoinSemiLattice a => JoinSemiLattice (Const * a b) # 

Methods

(\/) :: Const * a b -> Const * a b -> Const * a b #

join :: Const * a b -> Const * a b -> Const * a b #

JoinSemiLattice a => JoinSemiLattice (Tagged * t a) # 

Methods

(\/) :: Tagged * t a -> Tagged * t a -> Tagged * t a #

join :: Tagged * t a -> Tagged * t a -> Tagged * t a #

class MeetSemiLattice a where #

A algebraic structure with element meets: http://en.wikipedia.org/wiki/Semilattice

Associativity: x /\ (y /\ z) == (x /\ y) /\ z
Commutativity: x /\ y == y /\ x
Idempotency:   x /\ x == x

Minimal complete definition

(/\) | meet

Methods

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

meet :: a -> a -> a #

Deprecated: Use /\ infix operator

Instances

MeetSemiLattice Bool # 

Methods

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

meet :: Bool -> Bool -> Bool #

MeetSemiLattice () # 

Methods

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

meet :: () -> () -> () #

MeetSemiLattice Void # 

Methods

(/\) :: Void -> Void -> Void #

meet :: Void -> Void -> Void #

MeetSemiLattice All # 

Methods

(/\) :: All -> All -> All #

meet :: All -> All -> All #

MeetSemiLattice Any # 

Methods

(/\) :: Any -> Any -> Any #

meet :: Any -> Any -> Any #

MeetSemiLattice a => MeetSemiLattice (Identity a) # 

Methods

(/\) :: Identity a -> Identity a -> Identity a #

meet :: Identity a -> Identity a -> Identity a #

MeetSemiLattice a => MeetSemiLattice (Endo a) # 

Methods

(/\) :: Endo a -> Endo a -> Endo a #

meet :: Endo a -> Endo a -> Endo a #

Ord a => MeetSemiLattice (Set a) # 

Methods

(/\) :: Set a -> Set a -> Set a #

meet :: Set a -> Set a -> Set a #

(Eq a, Hashable a) => MeetSemiLattice (HashSet a) # 

Methods

(/\) :: HashSet a -> HashSet a -> HashSet a #

meet :: HashSet a -> HashSet a -> HashSet a #

MeetSemiLattice a => MeetSemiLattice (Dropped a) # 

Methods

(/\) :: Dropped a -> Dropped a -> Dropped a #

meet :: Dropped a -> Dropped a -> Dropped a #

MeetSemiLattice a => MeetSemiLattice (Levitated a) # 

Methods

(/\) :: Levitated a -> Levitated a -> Levitated a #

meet :: Levitated a -> Levitated a -> Levitated a #

MeetSemiLattice a => MeetSemiLattice (Lifted a) # 

Methods

(/\) :: Lifted a -> Lifted a -> Lifted a #

meet :: Lifted a -> Lifted a -> Lifted a #

JoinSemiLattice a => MeetSemiLattice (Op a) # 

Methods

(/\) :: Op a -> Op a -> Op a #

meet :: Op a -> Op a -> Op a #

Ord a => MeetSemiLattice (Ordered a) # 

Methods

(/\) :: Ordered a -> Ordered a -> Ordered a #

meet :: Ordered a -> Ordered a -> Ordered a #

MeetSemiLattice v => MeetSemiLattice (k -> v) # 

Methods

(/\) :: (k -> v) -> (k -> v) -> k -> v #

meet :: (k -> v) -> (k -> v) -> k -> v #

(MeetSemiLattice a, MeetSemiLattice b) => MeetSemiLattice (a, b) # 

Methods

(/\) :: (a, b) -> (a, b) -> (a, b) #

meet :: (a, b) -> (a, b) -> (a, b) #

MeetSemiLattice (Proxy * a) # 

Methods

(/\) :: Proxy * a -> Proxy * a -> Proxy * a #

meet :: Proxy * a -> Proxy * a -> Proxy * a #

(Ord k, MeetSemiLattice v) => MeetSemiLattice (Map k v) # 

Methods

(/\) :: Map k v -> Map k v -> Map k v #

meet :: Map k v -> Map k v -> Map k v #

(Eq k, Hashable k) => MeetSemiLattice (HashMap k v) # 

Methods

(/\) :: HashMap k v -> HashMap k v -> HashMap k v #

meet :: HashMap k v -> HashMap k v -> HashMap k v #

(PartialOrd k, MeetSemiLattice k, MeetSemiLattice v) => MeetSemiLattice (Lexicographic k v) # 
MeetSemiLattice a => MeetSemiLattice (Const * a b) # 

Methods

(/\) :: Const * a b -> Const * a b -> Const * a b #

meet :: Const * a b -> Const * a b -> Const * a b #

MeetSemiLattice a => MeetSemiLattice (Tagged * t a) # 

Methods

(/\) :: Tagged * t a -> Tagged * t a -> Tagged * t a #

meet :: Tagged * t a -> Tagged * t a -> Tagged * t a #

class (JoinSemiLattice a, MeetSemiLattice a) => Lattice a #

The combination of two semi lattices makes a lattice if the absorption law holds: see http://en.wikipedia.org/wiki/Absorption_law and http://en.wikipedia.org/wiki/Lattice_(order)

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

Instances

Lattice Bool # 
Lattice () # 
Lattice Void # 
Lattice All # 
Lattice Any # 
Lattice a => Lattice (Identity a) # 
Lattice a => Lattice (Endo a) # 
Ord a => Lattice (Set a) # 
Lattice a => Lattice (Dropped a) # 
Lattice a => Lattice (Levitated a) # 
Lattice a => Lattice (Lifted a) # 
(Lattice a, Ord a) => Lattice (Op a) # 
(Lattice a, Ord a) => Lattice (Ordered a) # 
Lattice v => Lattice (k -> v) # 
(Lattice a, Lattice b) => Lattice (a, b) # 
Lattice (Proxy * a) # 
(Ord k, Lattice v) => Lattice (Map k v) # 
(PartialOrd k, Lattice k, Lattice v) => Lattice (Lexicographic k v) # 
Lattice a => Lattice (Const * a b) # 
Lattice a => Lattice (Tagged * t a) # 

joinLeq :: (Eq a, JoinSemiLattice a) => a -> a -> Bool #

The partial ordering induced by the join-semilattice structure

joins1 :: JoinSemiLattice a => [a] -> a #

The join of at a list of join-semilattice elements (of length at least one)

meetLeq :: (Eq a, MeetSemiLattice a) => a -> a -> Bool #

The partial ordering induced by the meet-semilattice structure

meets1 :: MeetSemiLattice a => [a] -> a #

The meet of at a list of meet-semilattice elements (of length at least one)

Bounded lattices

class JoinSemiLattice a => BoundedJoinSemiLattice a where #

A join-semilattice with some element |bottom| that / approaches.

Identity: x \/ bottom == x

Minimal complete definition

bottom

Methods

bottom :: a #

Instances

BoundedJoinSemiLattice Bool # 

Methods

bottom :: Bool #

BoundedJoinSemiLattice () # 

Methods

bottom :: () #

BoundedJoinSemiLattice All # 

Methods

bottom :: All #

BoundedJoinSemiLattice Any # 

Methods

bottom :: Any #

BoundedJoinSemiLattice IntSet # 

Methods

bottom :: IntSet #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Identity a) # 

Methods

bottom :: Identity a #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Endo a) # 

Methods

bottom :: Endo a #

JoinSemiLattice v => BoundedJoinSemiLattice (IntMap v) # 

Methods

bottom :: IntMap v #

Ord a => BoundedJoinSemiLattice (Set a) # 

Methods

bottom :: Set a #

(Eq a, Hashable a) => BoundedJoinSemiLattice (HashSet a) # 

Methods

bottom :: HashSet a #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Dropped a) # 

Methods

bottom :: Dropped a #

JoinSemiLattice a => BoundedJoinSemiLattice (Levitated a) # 

Methods

bottom :: Levitated a #

JoinSemiLattice a => BoundedJoinSemiLattice (Lifted a) # 

Methods

bottom :: Lifted a #

BoundedMeetSemiLattice a => BoundedJoinSemiLattice (Op a) # 

Methods

bottom :: Op a #

(Ord a, Bounded a) => BoundedJoinSemiLattice (Ordered a) # 

Methods

bottom :: Ordered a #

BoundedJoinSemiLattice v => BoundedJoinSemiLattice (k -> v) # 

Methods

bottom :: k -> v #

(BoundedJoinSemiLattice a, BoundedJoinSemiLattice b) => BoundedJoinSemiLattice (a, b) # 

Methods

bottom :: (a, b) #

BoundedJoinSemiLattice (Proxy * a) # 

Methods

bottom :: Proxy * a #

(Ord k, JoinSemiLattice v) => BoundedJoinSemiLattice (Map k v) # 

Methods

bottom :: Map k v #

(Eq k, Hashable k) => BoundedJoinSemiLattice (HashMap k v) # 

Methods

bottom :: HashMap k v #

(PartialOrd k, BoundedJoinSemiLattice k, BoundedJoinSemiLattice v) => BoundedJoinSemiLattice (Lexicographic k v) # 

Methods

bottom :: Lexicographic k v #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Const * a b) # 

Methods

bottom :: Const * a b #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Tagged * t a) # 

Methods

bottom :: Tagged * t a #

class MeetSemiLattice a => BoundedMeetSemiLattice a where #

A meet-semilattice with some element |top| that / approaches.

Identity: x /\ top == x

Minimal complete definition

top

Methods

top :: a #

Instances

BoundedMeetSemiLattice Bool # 

Methods

top :: Bool #

BoundedMeetSemiLattice () # 

Methods

top :: () #

BoundedMeetSemiLattice All # 

Methods

top :: All #

BoundedMeetSemiLattice Any # 

Methods

top :: Any #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Identity a) # 

Methods

top :: Identity a #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Endo a) # 

Methods

top :: Endo a #

(Ord a, Finite a) => BoundedMeetSemiLattice (Set a) # 

Methods

top :: Set a #

MeetSemiLattice a => BoundedMeetSemiLattice (Dropped a) # 

Methods

top :: Dropped a #

MeetSemiLattice a => BoundedMeetSemiLattice (Levitated a) # 

Methods

top :: Levitated a #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Lifted a) # 

Methods

top :: Lifted a #

BoundedJoinSemiLattice a => BoundedMeetSemiLattice (Op a) # 

Methods

top :: Op a #

(Ord a, Bounded a) => BoundedMeetSemiLattice (Ordered a) # 

Methods

top :: Ordered a #

BoundedMeetSemiLattice v => BoundedMeetSemiLattice (k -> v) # 

Methods

top :: k -> v #

(BoundedMeetSemiLattice a, BoundedMeetSemiLattice b) => BoundedMeetSemiLattice (a, b) # 

Methods

top :: (a, b) #

BoundedMeetSemiLattice (Proxy * a) # 

Methods

top :: Proxy * a #

(Ord k, Finite k, BoundedMeetSemiLattice v) => BoundedMeetSemiLattice (Map k v) # 

Methods

top :: Map k v #

(PartialOrd k, BoundedMeetSemiLattice k, BoundedMeetSemiLattice v) => BoundedMeetSemiLattice (Lexicographic k v) # 

Methods

top :: Lexicographic k v #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Const * a b) # 

Methods

top :: Const * a b #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Tagged * t a) # 

Methods

top :: Tagged * t a #

joins :: (BoundedJoinSemiLattice a, Foldable f) => f a -> a #

The join of a list of join-semilattice elements

meets :: (BoundedMeetSemiLattice a, Foldable f) => f a -> a #

The meet of a list of meet-semilattice elements

Monoid wrappers

newtype Meet a #

Monoid wrapper for MeetSemiLattice

Constructors

Meet 

Fields

Instances

Monad Meet # 

Methods

(>>=) :: Meet a -> (a -> Meet b) -> Meet b #

(>>) :: Meet a -> Meet b -> Meet b #

return :: a -> Meet a #

fail :: String -> Meet a #

Functor Meet # 

Methods

fmap :: (a -> b) -> Meet a -> Meet b #

(<$) :: a -> Meet b -> Meet a #

Applicative Meet # 

Methods

pure :: a -> Meet a #

(<*>) :: Meet (a -> b) -> Meet a -> Meet b #

(*>) :: Meet a -> Meet b -> Meet b #

(<*) :: Meet a -> Meet b -> Meet a #

MonadZip Meet # 

Methods

mzip :: Meet a -> Meet b -> Meet (a, b) #

mzipWith :: (a -> b -> c) -> Meet a -> Meet b -> Meet c #

munzip :: Meet (a, b) -> (Meet a, Meet b) #

Bounded a => Bounded (Meet a) # 

Methods

minBound :: Meet a #

maxBound :: Meet a #

Eq a => Eq (Meet a) # 

Methods

(==) :: Meet a -> Meet a -> Bool #

(/=) :: Meet a -> Meet a -> Bool #

Data a => Data (Meet a) # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Meet a -> c (Meet a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Meet a) #

toConstr :: Meet a -> Constr #

dataTypeOf :: Meet a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Meet a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Meet a)) #

gmapT :: (forall b. Data b => b -> b) -> Meet a -> Meet a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Meet a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Meet a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Meet a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Meet a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Meet a -> m (Meet a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Meet a -> m (Meet a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Meet a -> m (Meet a) #

Ord a => Ord (Meet a) # 

Methods

compare :: Meet a -> Meet a -> Ordering #

(<) :: Meet a -> Meet a -> Bool #

(<=) :: Meet a -> Meet a -> Bool #

(>) :: Meet a -> Meet a -> Bool #

(>=) :: Meet a -> Meet a -> Bool #

max :: Meet a -> Meet a -> Meet a #

min :: Meet a -> Meet a -> Meet a #

Read a => Read (Meet a) # 
Show a => Show (Meet a) # 

Methods

showsPrec :: Int -> Meet a -> ShowS #

show :: Meet a -> String #

showList :: [Meet a] -> ShowS #

Generic (Meet a) # 

Associated Types

type Rep (Meet a) :: * -> * #

Methods

from :: Meet a -> Rep (Meet a) x #

to :: Rep (Meet a) x -> Meet a #

MeetSemiLattice a => Semigroup (Meet a) # 

Methods

(<>) :: Meet a -> Meet a -> Meet a #

sconcat :: NonEmpty (Meet a) -> Meet a #

stimes :: Integral b => b -> Meet a -> Meet a #

BoundedMeetSemiLattice a => Monoid (Meet a) # 

Methods

mempty :: Meet a #

mappend :: Meet a -> Meet a -> Meet a #

mconcat :: [Meet a] -> Meet a #

Universe a => Universe (Meet a) # 

Methods

universe :: [Meet a] #

Finite a => Finite (Meet a) # 

Methods

universeF :: [Meet a] #

type Rep (Meet a) # 
type Rep (Meet a) = D1 (MetaData "Meet" "Algebra.Lattice" "lattices-1.5.0-ECh8t5rN0CBIWPDq3FdlHg" True) (C1 (MetaCons "Meet" PrefixI True) (S1 (MetaSel (Just Symbol "getMeet") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

newtype Join a #

Monoid wrapper for JoinSemiLattice

Constructors

Join 

Fields

Instances

Monad Join # 

Methods

(>>=) :: Join a -> (a -> Join b) -> Join b #

(>>) :: Join a -> Join b -> Join b #

return :: a -> Join a #

fail :: String -> Join a #

Functor Join # 

Methods

fmap :: (a -> b) -> Join a -> Join b #

(<$) :: a -> Join b -> Join a #

Applicative Join # 

Methods

pure :: a -> Join a #

(<*>) :: Join (a -> b) -> Join a -> Join b #

(*>) :: Join a -> Join b -> Join b #

(<*) :: Join a -> Join b -> Join a #

MonadZip Join # 

Methods

mzip :: Join a -> Join b -> Join (a, b) #

mzipWith :: (a -> b -> c) -> Join a -> Join b -> Join c #

munzip :: Join (a, b) -> (Join a, Join b) #

Bounded a => Bounded (Join a) # 

Methods

minBound :: Join a #

maxBound :: Join a #

Eq a => Eq (Join a) # 

Methods

(==) :: Join a -> Join a -> Bool #

(/=) :: Join a -> Join a -> Bool #

Data a => Data (Join a) # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Join a -> c (Join a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Join a) #

toConstr :: Join a -> Constr #

dataTypeOf :: Join a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Join a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Join a)) #

gmapT :: (forall b. Data b => b -> b) -> Join a -> Join a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Join a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Join a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Join a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Join a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Join a -> m (Join a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Join a -> m (Join a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Join a -> m (Join a) #

Ord a => Ord (Join a) # 

Methods

compare :: Join a -> Join a -> Ordering #

(<) :: Join a -> Join a -> Bool #

(<=) :: Join a -> Join a -> Bool #

(>) :: Join a -> Join a -> Bool #

(>=) :: Join a -> Join a -> Bool #

max :: Join a -> Join a -> Join a #

min :: Join a -> Join a -> Join a #

Read a => Read (Join a) # 
Show a => Show (Join a) # 

Methods

showsPrec :: Int -> Join a -> ShowS #

show :: Join a -> String #

showList :: [Join a] -> ShowS #

Generic (Join a) # 

Associated Types

type Rep (Join a) :: * -> * #

Methods

from :: Join a -> Rep (Join a) x #

to :: Rep (Join a) x -> Join a #

JoinSemiLattice a => Semigroup (Join a) # 

Methods

(<>) :: Join a -> Join a -> Join a #

sconcat :: NonEmpty (Join a) -> Join a #

stimes :: Integral b => b -> Join a -> Join a #

BoundedJoinSemiLattice a => Monoid (Join a) # 

Methods

mempty :: Join a #

mappend :: Join a -> Join a -> Join a #

mconcat :: [Join a] -> Join a #

Universe a => Universe (Join a) # 

Methods

universe :: [Join a] #

Finite a => Finite (Join a) # 

Methods

universeF :: [Join a] #

type Rep (Join a) # 
type Rep (Join a) = D1 (MetaData "Join" "Algebra.Lattice" "lattices-1.5.0-ECh8t5rN0CBIWPDq3FdlHg" True) (C1 (MetaCons "Join" PrefixI True) (S1 (MetaSel (Just Symbol "getJoin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

Fixed points of chains in lattices

lfp :: (Eq a, BoundedJoinSemiLattice a) => (a -> a) -> a #

Implementation of Kleene fixed-point theorem http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem. Forces the function to be monotone.

lfpFrom :: (Eq a, BoundedJoinSemiLattice a) => a -> (a -> a) -> a #

Implementation of Kleene fixed-point theorem http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem. Forces the function to be monotone.

unsafeLfp :: (Eq a, BoundedJoinSemiLattice a) => (a -> a) -> a #

Implementation of Kleene fixed-point theorem http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem. Assumes that the function is monotone and does not check if that is correct.

gfp :: (Eq a, BoundedMeetSemiLattice a) => (a -> a) -> a #

Implementation of Kleene fixed-point theorem http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem. Forces the function to be antinone.

gfpFrom :: (Eq a, BoundedMeetSemiLattice a) => a -> (a -> a) -> a #

Implementation of Kleene fixed-point theorem http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem. Forces the function to be antinone.

unsafeGfp :: (Eq a, BoundedMeetSemiLattice a) => (a -> a) -> a #

Implementation of Kleene fixed-point theorem http://en.wikipedia.org/wiki/Kleene_fixed-point_theorem. Assumes that the function is antinone and does not check if that is correct.