Library Coq.Arith.NatOrderedType
Module Nat_as_UBE <: UsualBoolEq.
Definition t := nat.
Definition eq := @eq nat.
Definition eqb := beq_nat.
Definition eqb_eq := beq_nat_true_iff.
End Nat_as_UBE.
Module Nat_as_DT <: UsualDecidableTypeFull := Make_UDTF Nat_as_UBE.
Note that the last module fulfills by subtyping many other
interfaces, such as DecidableType or EqualityType.
Module Nat_as_OT <: OrderedTypeFull.
Include Nat_as_DT.
Definition lt := lt.
Definition le := le.
Definition compare := nat_compare.
Instance lt_strorder : StrictOrder lt.
Instance lt_compat : Proper (Logic.eq==>Logic.eq==>iff) lt.
Definition le_lteq := le_lt_or_eq_iff.
Definition compare_spec := nat_compare_spec.
End Nat_as_OT.
Note that Nat_as_OT can also be seen as a UsualOrderedType
and a OrderedType (and also as a DecidableType).
Note that nat_order is domain-agnostic: it will not prove
1<=2 or x<=x+x, but rather things like x<=y -> y<=x -> x=y.
