| Copyright | (C) 2010-2015 Maximilian Bolingbroke |
|---|---|
| License | BSD-3-Clause (see the file LICENSE) |
| Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Algebra.PartialOrd
Description
- class Eq a => PartialOrd a where
- partialOrdEq :: PartialOrd a => a -> a -> Bool
- lfpFrom :: PartialOrd a => a -> (a -> a) -> a
- unsafeLfpFrom :: Eq a => a -> (a -> a) -> a
- gfpFrom :: PartialOrd a => a -> (a -> a) -> a
- unsafeGfpFrom :: Eq a => a -> (a -> a) -> a
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: aleqa Antisymmetric: aleqb && bleqa ==> a == b Transitive: aleqb && bleqc ==> aleqc
The superclass equality (which can be defined using partialOrdEq) must obey these laws:
Reflexive: a == a Transitive: a == b && b == c ==> a == b
Instances
| PartialOrd IntSet | |
| PartialOrd v => PartialOrd (IntMap v) | |
| Ord a => PartialOrd (Set a) | |
| (PartialOrd v, Finite k) => PartialOrd (k -> v) | |
| (PartialOrd a, PartialOrd b) => PartialOrd (a, b) | |
| (Ord k, PartialOrd v) => PartialOrd (Map k v) |
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.