lattices-1.7.1.1: 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 HaskellSafe
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 Source #

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 Source #

join :: a -> a -> a Source #

Deprecated: Use \/ infix operator

Instances
JoinSemiLattice Bool Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

join :: Bool -> Bool -> Bool Source #

JoinSemiLattice () Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

JoinSemiLattice Void Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

join :: Void -> Void -> Void Source #

JoinSemiLattice All Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

join :: All -> All -> All Source #

JoinSemiLattice Any Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

join :: Any -> Any -> Any Source #

JoinSemiLattice IntSet Source # 
Instance details

Defined in Algebra.Lattice

JoinSemiLattice a => JoinSemiLattice (Identity a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

JoinSemiLattice a => JoinSemiLattice (Endo a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

JoinSemiLattice v => JoinSemiLattice (IntMap v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

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

Defined in Algebra.Lattice

Methods

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

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

(Eq a, Hashable a) => JoinSemiLattice (HashSet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

Ord a => JoinSemiLattice (Ordered a) Source # 
Instance details

Defined in Algebra.Lattice.Ordered

Methods

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

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

MeetSemiLattice a => JoinSemiLattice (Op a) Source # 
Instance details

Defined in Algebra.Lattice.Op

Methods

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

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

JoinSemiLattice a => JoinSemiLattice (Lifted a) Source # 
Instance details

Defined in Algebra.Lattice.Lifted

Methods

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

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

JoinSemiLattice a => JoinSemiLattice (Levitated a) Source # 
Instance details

Defined in Algebra.Lattice.Levitated

JoinSemiLattice (FreeLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

JoinSemiLattice (FreeJoinSemiLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

JoinSemiLattice a => JoinSemiLattice (Dropped a) Source # 
Instance details

Defined in Algebra.Lattice.Dropped

Methods

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

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

Integral a => JoinSemiLattice (Divisibility a) Source # 
Instance details

Defined in Algebra.Lattice.Divisibility

JoinSemiLattice v => JoinSemiLattice (k -> v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

(JoinSemiLattice a, JoinSemiLattice b) => JoinSemiLattice (a, b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

JoinSemiLattice (Proxy a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

join :: Proxy a -> Proxy a -> Proxy a Source #

(Ord k, JoinSemiLattice v) => JoinSemiLattice (Map k v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

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

Defined in Algebra.Lattice

Methods

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

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

(PartialOrd k, JoinSemiLattice k, BoundedJoinSemiLattice v) => JoinSemiLattice (Lexicographic k v) Source # 
Instance details

Defined in Algebra.Lattice.Lexicographic

JoinSemiLattice a => JoinSemiLattice (Const a b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

JoinSemiLattice a => JoinSemiLattice (Tagged t a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

class MeetSemiLattice a where Source #

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 Source #

meet :: a -> a -> a Source #

Deprecated: Use /\ infix operator

Instances
MeetSemiLattice Bool Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

meet :: Bool -> Bool -> Bool Source #

MeetSemiLattice () Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

MeetSemiLattice Void Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

meet :: Void -> Void -> Void Source #

MeetSemiLattice All Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

meet :: All -> All -> All Source #

MeetSemiLattice Any Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

meet :: Any -> Any -> Any Source #

MeetSemiLattice IntSet Source # 
Instance details

Defined in Algebra.Lattice

MeetSemiLattice a => MeetSemiLattice (Identity a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

MeetSemiLattice a => MeetSemiLattice (Endo a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

MeetSemiLattice v => MeetSemiLattice (IntMap v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

meet :: IntMap v -> IntMap v -> IntMap v Source #

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

Defined in Algebra.Lattice

Methods

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

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

(Eq a, Hashable a) => MeetSemiLattice (HashSet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

Ord a => MeetSemiLattice (Ordered a) Source # 
Instance details

Defined in Algebra.Lattice.Ordered

Methods

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

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

JoinSemiLattice a => MeetSemiLattice (Op a) Source # 
Instance details

Defined in Algebra.Lattice.Op

Methods

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

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

MeetSemiLattice a => MeetSemiLattice (Lifted a) Source # 
Instance details

Defined in Algebra.Lattice.Lifted

Methods

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

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

MeetSemiLattice a => MeetSemiLattice (Levitated a) Source # 
Instance details

Defined in Algebra.Lattice.Levitated

MeetSemiLattice (FreeLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

MeetSemiLattice (FreeMeetSemiLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

MeetSemiLattice a => MeetSemiLattice (Dropped a) Source # 
Instance details

Defined in Algebra.Lattice.Dropped

Methods

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

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

Integral a => MeetSemiLattice (Divisibility a) Source # 
Instance details

Defined in Algebra.Lattice.Divisibility

MeetSemiLattice v => MeetSemiLattice (k -> v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

(MeetSemiLattice a, MeetSemiLattice b) => MeetSemiLattice (a, b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

MeetSemiLattice (Proxy a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

meet :: Proxy a -> Proxy a -> Proxy a Source #

(Ord k, MeetSemiLattice v) => MeetSemiLattice (Map k v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

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

Defined in Algebra.Lattice

Methods

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

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

(PartialOrd k, MeetSemiLattice k, BoundedMeetSemiLattice v) => MeetSemiLattice (Lexicographic k v) Source # 
Instance details

Defined in Algebra.Lattice.Lexicographic

MeetSemiLattice a => MeetSemiLattice (Const a b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

MeetSemiLattice a => MeetSemiLattice (Tagged t a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

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

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 Source # 
Instance details

Defined in Algebra.Lattice

Lattice () Source # 
Instance details

Defined in Algebra.Lattice

Lattice Void Source # 
Instance details

Defined in Algebra.Lattice

Lattice All Source # 
Instance details

Defined in Algebra.Lattice

Lattice Any Source # 
Instance details

Defined in Algebra.Lattice

Lattice IntSet Source # 
Instance details

Defined in Algebra.Lattice

Lattice a => Lattice (Identity a) Source # 
Instance details

Defined in Algebra.Lattice

Lattice a => Lattice (Endo a) Source # 
Instance details

Defined in Algebra.Lattice

Lattice v => Lattice (IntMap v) Source # 
Instance details

Defined in Algebra.Lattice

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

Defined in Algebra.Lattice

(Eq a, Hashable a) => Lattice (HashSet a) Source # 
Instance details

Defined in Algebra.Lattice

Ord a => Lattice (Ordered a) Source # 
Instance details

Defined in Algebra.Lattice.Ordered

Lattice a => Lattice (Op a) Source # 
Instance details

Defined in Algebra.Lattice.Op

Lattice a => Lattice (Lifted a) Source # 
Instance details

Defined in Algebra.Lattice.Lifted

Lattice a => Lattice (Levitated a) Source # 
Instance details

Defined in Algebra.Lattice.Levitated

Lattice (FreeLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

Lattice a => Lattice (Dropped a) Source # 
Instance details

Defined in Algebra.Lattice.Dropped

Integral a => Lattice (Divisibility a) Source # 
Instance details

Defined in Algebra.Lattice.Divisibility

Lattice v => Lattice (k -> v) Source # 
Instance details

Defined in Algebra.Lattice

(Lattice a, Lattice b) => Lattice (a, b) Source # 
Instance details

Defined in Algebra.Lattice

Lattice (Proxy a) Source # 
Instance details

Defined in Algebra.Lattice

(Ord k, Lattice v) => Lattice (Map k v) Source # 
Instance details

Defined in Algebra.Lattice

(Eq k, Hashable k, Lattice v) => Lattice (HashMap k v) Source # 
Instance details

Defined in Algebra.Lattice

(PartialOrd k, Lattice k, BoundedLattice v) => Lattice (Lexicographic k v) Source # 
Instance details

Defined in Algebra.Lattice.Lexicographic

Lattice a => Lattice (Const a b) Source # 
Instance details

Defined in Algebra.Lattice

Lattice a => Lattice (Tagged t a) Source # 
Instance details

Defined in Algebra.Lattice

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

The partial ordering induced by the join-semilattice structure

joins1 :: (JoinSemiLattice a, Foldable1 f) => f a -> a Source #

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

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

The partial ordering induced by the meet-semilattice structure

meets1 :: (MeetSemiLattice a, Foldable1 f) => f a -> a Source #

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

Bounded lattices

class JoinSemiLattice a => BoundedJoinSemiLattice a where Source #

A join-semilattice with an identity element bottom for \/.

Identity: x \/ bottom == x

Minimal complete definition

bottom

Methods

bottom :: a Source #

Instances
BoundedJoinSemiLattice Bool Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Bool Source #

BoundedJoinSemiLattice () Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: () Source #

BoundedJoinSemiLattice All Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: All Source #

BoundedJoinSemiLattice Any Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Any Source #

BoundedJoinSemiLattice IntSet Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: IntSet Source #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Identity a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Identity a Source #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Endo a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Endo a Source #

JoinSemiLattice v => BoundedJoinSemiLattice (IntMap v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: IntMap v Source #

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

Defined in Algebra.Lattice

Methods

bottom :: Set a Source #

(Eq a, Hashable a) => BoundedJoinSemiLattice (HashSet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: HashSet a Source #

(Ord a, Bounded a) => BoundedJoinSemiLattice (Ordered a) Source # 
Instance details

Defined in Algebra.Lattice.Ordered

Methods

bottom :: Ordered a Source #

BoundedMeetSemiLattice a => BoundedJoinSemiLattice (Op a) Source # 
Instance details

Defined in Algebra.Lattice.Op

Methods

bottom :: Op a Source #

JoinSemiLattice a => BoundedJoinSemiLattice (Lifted a) Source # 
Instance details

Defined in Algebra.Lattice.Lifted

Methods

bottom :: Lifted a Source #

JoinSemiLattice a => BoundedJoinSemiLattice (Levitated a) Source # 
Instance details

Defined in Algebra.Lattice.Levitated

Methods

bottom :: Levitated a Source #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (FreeLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (FreeJoinSemiLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Dropped a) Source # 
Instance details

Defined in Algebra.Lattice.Dropped

Methods

bottom :: Dropped a Source #

Integral a => BoundedJoinSemiLattice (Divisibility a) Source # 
Instance details

Defined in Algebra.Lattice.Divisibility

BoundedJoinSemiLattice v => BoundedJoinSemiLattice (k -> v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: k -> v Source #

(BoundedJoinSemiLattice a, BoundedJoinSemiLattice b) => BoundedJoinSemiLattice (a, b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: (a, b) Source #

BoundedJoinSemiLattice (Proxy a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Proxy a Source #

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

Defined in Algebra.Lattice

Methods

bottom :: Map k v Source #

(Eq k, Hashable k, JoinSemiLattice v) => BoundedJoinSemiLattice (HashMap k v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: HashMap k v Source #

(PartialOrd k, BoundedJoinSemiLattice k, BoundedJoinSemiLattice v) => BoundedJoinSemiLattice (Lexicographic k v) Source # 
Instance details

Defined in Algebra.Lattice.Lexicographic

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Const a b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Const a b Source #

BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Tagged t a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

bottom :: Tagged t a Source #

class MeetSemiLattice a => BoundedMeetSemiLattice a where Source #

A meet-semilattice with an identity element top for /\.

Identity: x /\ top == x

Minimal complete definition

top

Methods

top :: a Source #

Instances
BoundedMeetSemiLattice Bool Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Bool Source #

BoundedMeetSemiLattice () Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: () Source #

BoundedMeetSemiLattice All Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: All Source #

BoundedMeetSemiLattice Any Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Any Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Identity a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Identity a Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Endo a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Endo a Source #

(Ord a, Finite a) => BoundedMeetSemiLattice (Set a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Set a Source #

(Eq a, Hashable a, Finite a) => BoundedMeetSemiLattice (HashSet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: HashSet a Source #

(Ord a, Bounded a) => BoundedMeetSemiLattice (Ordered a) Source # 
Instance details

Defined in Algebra.Lattice.Ordered

Methods

top :: Ordered a Source #

BoundedJoinSemiLattice a => BoundedMeetSemiLattice (Op a) Source # 
Instance details

Defined in Algebra.Lattice.Op

Methods

top :: Op a Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Lifted a) Source # 
Instance details

Defined in Algebra.Lattice.Lifted

Methods

top :: Lifted a Source #

MeetSemiLattice a => BoundedMeetSemiLattice (Levitated a) Source # 
Instance details

Defined in Algebra.Lattice.Levitated

Methods

top :: Levitated a Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (FreeLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

Methods

top :: FreeLattice a Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (FreeMeetSemiLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

MeetSemiLattice a => BoundedMeetSemiLattice (Dropped a) Source # 
Instance details

Defined in Algebra.Lattice.Dropped

Methods

top :: Dropped a Source #

BoundedMeetSemiLattice v => BoundedMeetSemiLattice (k -> v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: k -> v Source #

(BoundedMeetSemiLattice a, BoundedMeetSemiLattice b) => BoundedMeetSemiLattice (a, b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: (a, b) Source #

BoundedMeetSemiLattice (Proxy a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Proxy a Source #

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

Defined in Algebra.Lattice

Methods

top :: Map k v Source #

(Eq k, Hashable k, Finite k, BoundedMeetSemiLattice v) => BoundedMeetSemiLattice (HashMap k v) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: HashMap k v Source #

(PartialOrd k, BoundedMeetSemiLattice k, BoundedMeetSemiLattice v) => BoundedMeetSemiLattice (Lexicographic k v) Source # 
Instance details

Defined in Algebra.Lattice.Lexicographic

Methods

top :: Lexicographic k v Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Const a b) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Const a b Source #

BoundedMeetSemiLattice a => BoundedMeetSemiLattice (Tagged t a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

top :: Tagged t a Source #

class (Lattice a, BoundedJoinSemiLattice a, BoundedMeetSemiLattice a) => BoundedLattice a Source #

Lattices with both bounds

Instances
BoundedLattice Bool Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice () Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice All Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice Any Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice a => BoundedLattice (Identity a) Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice a => BoundedLattice (Endo a) Source # 
Instance details

Defined in Algebra.Lattice

(Ord a, Finite a) => BoundedLattice (Set a) Source # 
Instance details

Defined in Algebra.Lattice

(Eq a, Hashable a, Finite a) => BoundedLattice (HashSet a) Source # 
Instance details

Defined in Algebra.Lattice

(Ord a, Bounded a) => BoundedLattice (Ordered a) Source # 
Instance details

Defined in Algebra.Lattice.Ordered

BoundedLattice a => BoundedLattice (Op a) Source # 
Instance details

Defined in Algebra.Lattice.Op

BoundedLattice a => BoundedLattice (Lifted a) Source # 
Instance details

Defined in Algebra.Lattice.Lifted

Lattice a => BoundedLattice (Levitated a) Source # 
Instance details

Defined in Algebra.Lattice.Levitated

BoundedLattice a => BoundedLattice (FreeLattice a) Source # 
Instance details

Defined in Algebra.Lattice.Free

BoundedLattice a => BoundedLattice (Dropped a) Source # 
Instance details

Defined in Algebra.Lattice.Dropped

BoundedLattice v => BoundedLattice (k -> v) Source # 
Instance details

Defined in Algebra.Lattice

(BoundedLattice a, BoundedLattice b) => BoundedLattice (a, b) Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice (Proxy a) Source # 
Instance details

Defined in Algebra.Lattice

(Ord k, Finite k, BoundedLattice v) => BoundedLattice (Map k v) Source # 
Instance details

Defined in Algebra.Lattice

(Eq k, Hashable k, Finite k, BoundedLattice v) => BoundedLattice (HashMap k v) Source # 
Instance details

Defined in Algebra.Lattice

(PartialOrd k, BoundedLattice k, BoundedLattice v) => BoundedLattice (Lexicographic k v) Source # 
Instance details

Defined in Algebra.Lattice.Lexicographic

BoundedLattice a => BoundedLattice (Const a b) Source # 
Instance details

Defined in Algebra.Lattice

BoundedLattice a => BoundedLattice (Tagged t a) Source # 
Instance details

Defined in Algebra.Lattice

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

The join of a list of join-semilattice elements

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

The meet of a list of meet-semilattice elements

Monoid wrappers

newtype Meet a Source #

Monoid wrapper for MeetSemiLattice

Constructors

Meet 

Fields

Instances
Monad Meet Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

return :: a -> Meet a #

fail :: String -> Meet a #

Functor Meet Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

Applicative Meet Source # 
Instance details

Defined in Algebra.Lattice

Methods

pure :: a -> Meet a #

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

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

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

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

MonadZip Meet Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

Methods

minBound :: Meet a #

maxBound :: Meet a #

Eq a => Eq (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

Data a => Data (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

Show a => Show (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

show :: Meet a -> String #

showList :: [Meet a] -> ShowS #

Generic (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

Methods

mempty :: Meet a #

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

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

Universe a => Universe (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

universe :: [Meet a] #

Finite a => Finite (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

universeF :: [Meet a] #

(Eq a, MeetSemiLattice a) => PartialOrd (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

leq :: Meet a -> Meet a -> Bool Source #

comparable :: Meet a -> Meet a -> Bool Source #

type Rep (Meet a) Source # 
Instance details

Defined in Algebra.Lattice

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

newtype Join a Source #

Monoid wrapper for JoinSemiLattice

Constructors

Join 

Fields

Instances
Monad Join Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

return :: a -> Join a #

fail :: String -> Join a #

Functor Join Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

Applicative Join Source # 
Instance details

Defined in Algebra.Lattice

Methods

pure :: a -> Join a #

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

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

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

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

MonadZip Join Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

Methods

minBound :: Join a #

maxBound :: Join a #

Eq a => Eq (Join a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

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

Data a => Data (Join a) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

Show a => Show (Join a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

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

show :: Join a -> String #

showList :: [Join a] -> ShowS #

Generic (Join a) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

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) Source # 
Instance details

Defined in Algebra.Lattice

Methods

mempty :: Join a #

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

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

Universe a => Universe (Join a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

universe :: [Join a] #

Finite a => Finite (Join a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

universeF :: [Join a] #

(Eq a, JoinSemiLattice a) => PartialOrd (Join a) Source # 
Instance details

Defined in Algebra.Lattice

Methods

leq :: Join a -> Join a -> Bool Source #

comparable :: Join a -> Join a -> Bool Source #

type Rep (Join a) Source # 
Instance details

Defined in Algebra.Lattice

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

Fixed points of chains in lattices

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

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 Source #

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 Source #

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 Source #

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 Source #

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 Source #

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.