(*****************************************************)
(**                     Order                        *)

Definition ltb (m : N.t) : N.t -> bool :=
recursion
  (if_zero false true)
  (fun _ f n => recursion false (fun n' _ => f n') n)
  m.Local Infix "<<" := ltb (at level 70, no associativity).#[global]
Instance ltb_wd : Proper (N.eq ==> N.eq ==> Logic.eq) ltb.

(* Specifications: *)
Theorem ltb_base : forall n, 0 << n = if_zero false true n.
Theorem ltb_step : forall m n, S m << n = recursion false (fun n' _ => m << n') n.
Theorem ltb_0 : forall n, n << 0 = false.
Theorem ltb_0_succ : forall n, 0 << S n = true.
Theorem succ_ltb_mono : forall n m, (S n << S m) = (n << m).
Theorem ltb_lt : forall n m, n << m = true <-> n < m.
Theorem ltb_ge : forall n m, n << m = false <-> n >= m.