Library Coq.Structures.Orders
Ordered types
First, signatures with only the order relations
Versions with nice notations
Versions with logical specifications
Versions with a decidable ternary comparison
NB: in
OrderedType, an
eq_dec could be deduced from
compare.
But adding this redundant field allows to see an
OrderedType as a
DecidableType.
Versions with eq being the usual Leibniz equality of Coq
NB: in UsualOrderedType, the field lt_compat is
useless since eq is Leibniz, but it should be
there for subtyping.
Conversions
From
compare to
eqb, and then
eq_dec
From OrderedType To OrderedTypeFull (adding <=)
From computational to logical versions
Versions with boolean comparisons
This style is used in
Mergesort
For stating properties like transitivity of
leb,
we coerce
bool into
Prop.
Grouping all boolean comparison functions
From OrderedTypeFull to TotalTransitiveLeBool
From TotalTransitiveLeBool to OrderedTypeFull
le is
leb ... = true.
eq is
le /\ swap le.
lt is
le /\ ~swap le.