(** Basic facts about [compare] *)

(* Specifications: *)
Lemma compare_eq_iff p q : (p ?= q) = Eq <-> p = q.
Lemma compare_antisym p q : (q ?= p) = CompOpp (p ?= q).
Lemma compare_lt_iff p q : (p ?= q) = Lt <-> p < q.
Lemma gt_lt p q : p > q -> q < p.
Lemma lt_gt p q : p < q -> q > p.
Lemma ge_le_iff p q : p >= q <-> q <= p.
Lemma ge_le p q : p >= q -> q <= p.
Lemma le_ge p q : p <= q -> q >= p.
(** ** Comparison and the successor *)
Lemma compare_succ_r p q :
switch_Eq Gt (p ?= succ q) = switch_Eq Lt (p ?= q).
Lemma compare_succ_l p q :
switch_Eq Lt (succ p ?= q) = switch_Eq Gt (p ?= q).
Theorem lt_succ_r p q : p < succ q <-> p <= q.
Lemma lt_succ_diag_r p : p < succ p.
Lemma compare_succ_succ p q : (succ p ?= succ q) = (p ?= q).
(** ** 1 is the least positive number *)
Lemma le_1_l p : 1 <= p.
Lemma nlt_1_r p : ~ p < 1.
Lemma lt_1_succ p : 1 < succ p.
(** ** Properties of the order *)
Lemma le_nlt p q : p <= q <-> ~ q < p.
Lemma lt_nle p q : p < q <-> ~ q <= p.
Lemma lt_le_incl p q : p<q -> p<=q.
Lemma lt_lt_succ n m : n < m -> n < succ m.
Lemma succ_lt_mono n m : n < m <-> succ n < succ m.
Lemma succ_le_mono n m : n <= m <-> succ n <= succ m.
Lemma lt_trans n m p : n < m -> m < p -> n < p.
Theorem lt_ind : forall (A : positive -> Prop) (n : positive),
A (succ n) ->
(forall m : positive, n < m -> A m -> A (succ m)) ->
forall m : positive, n < m -> A m.