Idris2Doc : Control.Order

Control.Order

An order is a particular kind of binary relation. The order
relation is intended to proceed in some direction, though not
necessarily with a unique path.

Orders are often defined simply as bundles of binary relation
properties.

A prominent example of an order relation is LTE over Nat.

Definitions

interfacePreorder : (ty : Type) -> (ty->ty->Type) ->Type
  A preorder is reflexive and transitive.

Parameters: ty, rel
Constraints: Reflexive ty rel, Transitive ty rel
Implementation: 
PreorderNatLTE
interfacePartialOrder : (ty : Type) -> (ty->ty->Type) ->Type
  A partial order is an antisymmetrics preorder.

Parameters: ty, rel
Constraints: Preorder ty rel, Antisymmetric ty rel
Implementation: 
PartialOrderNatLTE
interfaceConnex : (ty : Type) -> (ty->ty->Type) ->Type
  A relation is connex if for any two distinct x and y, either x ~ y or y ~ x.

This can also be stated as a trichotomy: x ~ y or x = y or y ~ x.

Parameters: ty, rel
Methods:
connex : Not (x=y) ->Either (relxy) (relyx)

Implementation: 
ConnexNatLTE
connex : Connextyrel=>Not (x=y) ->Either (relxy) (relyx)
Visibility: public export
interfaceStronglyConnex : (ty : Type) -> (ty->ty->Type) ->Type
  A relation is strongly connex if for any two x and y, either x ~ y or y ~ x.

Parameters: ty, rel
Methods:
order : (x : ty) -> (y : ty) ->Either (relxy) (relyx)
order : StronglyConnextyrel=> (x : ty) -> (y : ty) ->Either (relxy) (relyx)
Visibility: public export
interfaceLinearOrder : (ty : Type) -> (ty->ty->Type) ->Type
  A linear order is a connex partial order.

Parameters: ty, rel
Constraints: PartialOrder ty rel, Connex ty rel
Implementation: 
LinearOrderNatLTE
leftmost : (0rel : (ty->ty->Type)) ->StronglyConnextyrel=>ty->ty->ty
  Gives the leftmost of a strongly connex relation among the given two elements, generalisation of `min`.

That is, leftmost x y ~ x and leftmost x y ~ y, and `leftmost x y` is either `x` or `y`

Visibility: public export
rightmost : (0rel : (ty->ty->Type)) ->StronglyConnextyrel=>ty->ty->ty
  Gives the rightmost of a strongly connex relation among the given two elements, generalisation of `max`.

That is, x ~ rightmost x y and y ~ rightmost x y, and `rightmost x y` is either `x` or `y`

Visibility: public export
leftmostRelL : (0rel : (ty->ty->Type)) ->Reflexivetyrel=> {auto{conArg:2893} : StronglyConnextyrel} -> (x : ty) -> (y : ty) ->rel (leftmostrelxy) x
Visibility: export
leftmostRelR : (0rel : (ty->ty->Type)) ->Reflexivetyrel=> {auto{conArg:2963} : StronglyConnextyrel} -> (x : ty) -> (y : ty) ->rel (leftmostrelxy) y
Visibility: export
leftmostPreserves : (0rel : (ty->ty->Type)) -> {auto{conArg:3030} : StronglyConnextyrel} -> (x : ty) -> (y : ty) ->Either (leftmostrelxy=x) (leftmostrelxy=y)
Visibility: export
leftmostIsRightmostLeft : (0rel : (ty->ty->Type)) -> {auto{conArg:3113} : StronglyConnextyrel} -> (x : ty) -> (y : ty) -> (z : ty) ->relzx->relzy->relz (leftmostrelxy)
Visibility: export
rightmostRelL : (0rel : (ty->ty->Type)) ->Reflexivetyrel=> {auto{conArg:3188} : StronglyConnextyrel} -> (x : ty) -> (y : ty) ->relx (rightmostrelxy)
Visibility: export
rightmostRelR : (0rel : (ty->ty->Type)) ->Reflexivetyrel=> {auto{conArg:3258} : StronglyConnextyrel} -> (x : ty) -> (y : ty) ->rely (rightmostrelxy)
Visibility: export
rightmostPreserves : (0rel : (ty->ty->Type)) -> {auto{conArg:3325} : StronglyConnextyrel} -> (x : ty) -> (y : ty) ->Either (rightmostrelxy=x) (rightmostrelxy=y)
Visibility: export
rightmostIsLeftmostRight : (0rel : (ty->ty->Type)) -> {auto{conArg:3408} : StronglyConnextyrel} -> (x : ty) -> (y : ty) -> (z : ty) ->relxz->relyz->rel (leftmostrelxy) z
Visibility: export