| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Agda.Utils.PartialOrd
Contents
Synopsis
- data PartialOrdering
- leqPO :: PartialOrdering -> PartialOrdering -> Bool
- oppPO :: PartialOrdering -> PartialOrdering
- orPO :: PartialOrdering -> PartialOrdering -> PartialOrdering
- seqPO :: PartialOrdering -> PartialOrdering -> PartialOrdering
- fromOrdering :: Ordering -> PartialOrdering
- fromOrderings :: [Ordering] -> PartialOrdering
- toOrderings :: PartialOrdering -> [Ordering]
- type Comparable a = a -> a -> PartialOrdering
- class PartialOrd a where
- comparableOrd :: Ord a => Comparable a
- related :: PartialOrd a => a -> PartialOrdering -> a -> Bool
- newtype Pointwise a = Pointwise {
- pointwise :: a
- newtype Inclusion a = Inclusion {
- inclusion :: a
Documentation
data PartialOrdering #
The result of comparing two things (of the same type).
Constructors
| POLT | Less than. |
| POLE | Less or equal than. |
| POEQ | Equal |
| POGE | Greater or equal. |
| POGT | Greater than. |
| POAny | No information (incomparable). |
Instances
leqPO :: PartialOrdering -> PartialOrdering -> Bool #
Comparing the information content of two elements of
PartialOrdering. More precise information is smaller.
Includes equality: x .leqPO x == True
oppPO :: PartialOrdering -> PartialOrdering #
Opposites.
related a po b iff related b (oppPO po) a.
orPO :: PartialOrdering -> PartialOrdering -> PartialOrdering #
Combining two pieces of information (picking the least information). Used for the dominance ordering on tuples.
orPO is associative, commutative, and idempotent.
orPO has dominant element POAny, but no neutral element.
seqPO :: PartialOrdering -> PartialOrdering -> PartialOrdering #
Chains (transitivity) x R y S z.
seqPO is associative, commutative, and idempotent.
seqPO has dominant element POAny and neutral element (unit) POEQ.
fromOrdering :: Ordering -> PartialOrdering #
Embed Ordering.
fromOrderings :: [Ordering] -> PartialOrdering #
Represent a non-empty disjunction of Orderings as PartialOrdering.
toOrderings :: PartialOrdering -> [Ordering] #
A PartialOrdering information is a disjunction of Ordering informations.
Comparison with partial result
type Comparable a = a -> a -> PartialOrdering #
class PartialOrd a where #
Decidable partial orderings.
Minimal complete definition
Methods
comparable :: Comparable a #
Instances
| PartialOrd Int # | |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable Int # | |
| PartialOrd Integer # | |
Defined in Agda.Utils.PartialOrd Methods | |
| PartialOrd () # | |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable () # | |
| PartialOrd PartialOrdering # | Less is ``less general'' (i.e., more precise). |
Defined in Agda.Utils.PartialOrd Methods | |
| PartialOrd Relevance # | More relevant is smaller. |
Defined in Agda.Syntax.Common Methods | |
| PartialOrd Quantity # | |
Defined in Agda.Syntax.Common Methods | |
| PartialOrd Modality # | Dominance ordering. |
Defined in Agda.Syntax.Common Methods | |
| PartialOrd Order # | Information order: When having comparable call-matrices, we keep the lesser one. Call graph completion works toward losing the good calls, tending towards Unknown (the least information). |
Defined in Agda.Termination.Order Methods | |
| PartialOrd a => PartialOrd (Maybe a) # |
Partial ordering for |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Maybe a) # | |
| Ord a => PartialOrd (Inclusion [a]) # | Sublist for ordered lists. |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Inclusion [a]) # | |
| Ord a => PartialOrd (Inclusion (Set a)) # | Sets are partially ordered by inclusion. |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Inclusion (Set a)) # | |
| PartialOrd a => PartialOrd (Pointwise [a]) # | The pointwise ordering for lists of the same length. There are other partial orderings for lists, e.g., prefix, sublist, subset, lexicographic, simultaneous order. |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Pointwise [a]) # | |
| PartialOrd (CallMatrixAug cinfo) # | |
Defined in Agda.Termination.CallMatrix Methods comparable :: Comparable (CallMatrixAug cinfo) # | |
| PartialOrd a => PartialOrd (CallMatrix' a) # | |
Defined in Agda.Termination.CallMatrix Methods comparable :: Comparable (CallMatrix' a) # | |
| (PartialOrd a, PartialOrd b) => PartialOrd (Either a b) # | Partial ordering for disjoint sums: |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Either a b) # | |
| (PartialOrd a, PartialOrd b) => PartialOrd (a, b) # | Pointwise partial ordering for tuples.
|
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (a, b) # | |
| (Ord i, PartialOrd a) => PartialOrd (Matrix i a) # | Pointwise comparison. Only matrices with the same dimension are comparable. |
Defined in Agda.Termination.SparseMatrix Methods comparable :: Comparable (Matrix i a) # | |
comparableOrd :: Ord a => Comparable a #
Any Ord is a PartialOrd.
related :: PartialOrd a => a -> PartialOrdering -> a -> Bool #
Are two elements related in a specific way?
related a o b holds iff comparable a b is contained in o.
Totally ordered types.
Generic partially ordered types.
Pointwise comparison wrapper.
Instances
| Functor Pointwise # | |
| Eq a => Eq (Pointwise a) # | |
| Show a => Show (Pointwise a) # | |
| PartialOrd a => PartialOrd (Pointwise [a]) # | The pointwise ordering for lists of the same length. There are other partial orderings for lists, e.g., prefix, sublist, subset, lexicographic, simultaneous order. |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Pointwise [a]) # | |
Inclusion comparison wrapper.
Instances
| Functor Inclusion # | |
| Eq a => Eq (Inclusion a) # | |
| Ord a => Ord (Inclusion a) # | |
Defined in Agda.Utils.PartialOrd | |
| Show a => Show (Inclusion a) # | |
| Ord a => PartialOrd (Inclusion [a]) # | Sublist for ordered lists. |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Inclusion [a]) # | |
| Ord a => PartialOrd (Inclusion (Set a)) # | Sets are partially ordered by inclusion. |
Defined in Agda.Utils.PartialOrd Methods comparable :: Comparable (Inclusion (Set a)) # | |