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 HaskellSafe
LanguageHaskell2010

Algebra.PartialOrd

Contents

Description

 

Synopsis

Partial orderings

class Eq a => PartialOrd a where Source

A partial ordering on sets: http://en.wikipedia.org/wiki/Partially_ordered_set

This can be defined using either joinLeq or meetLeq, or a more efficient definition can be derived directly.

Reflexive:     a leq a
Antisymmetric: a leq b && b leq a ==> a == b
Transitive:    a leq b && b leq c ==> a leq c

The superclass equality (which can be defined using partialOrdEq) must obey these laws:

Reflexive:  a == a
Transitive: a == b && b == c ==> a == b

Methods

leq :: a -> a -> Bool Source

Instances

PartialOrd IntSet Source 

Methods

leq :: IntSet -> IntSet -> Bool Source

PartialOrd v => PartialOrd (IntMap v) Source 

Methods

leq :: IntMap v -> IntMap v -> Bool Source

Ord a => PartialOrd (Set a) Source 

Methods

leq :: Set a -> Set a -> Bool Source

PartialOrd a => PartialOrd (Op a) Source 

Methods

leq :: Op a -> Op a -> Bool Source

Ord a => PartialOrd (Ordered a) Source 

Methods

leq :: Ordered a -> Ordered a -> Bool Source

(PartialOrd a, PartialOrd b) => PartialOrd (a, b) Source 

Methods

leq :: (a, b) -> (a, b) -> Bool Source

(Ord k, PartialOrd v) => PartialOrd (Map k v) Source 

Methods

leq :: Map k v -> Map k v -> Bool Source

(PartialOrd k, PartialOrd v) => PartialOrd (Lexicographic k v) Source 

Methods

leq :: Lexicographic k v -> Lexicographic k v -> Bool Source

partialOrdEq :: PartialOrd a => a -> a -> Bool Source

The equality relation induced by the partial-order structure

Fixed points of chains in partial orders

lfpFrom :: PartialOrd a => a -> (a -> a) -> a Source

Least point of a partially ordered monotone function. Checks that the function is monotone.

unsafeLfpFrom :: Eq a => a -> (a -> a) -> a Source

Least point of a partially ordered monotone function. Does not checks that the function is monotone.

gfpFrom :: PartialOrd a => a -> (a -> a) -> a Source

Greatest fixed point of a partially ordered antinone function. Checks that the function is antinone.

unsafeGfpFrom :: Eq a => a -> (a -> a) -> a Source

Greatest fixed point of a partially ordered antinone function. Does not check that the function is antinone.