#[global]
Instance lt_compat : Proper (eq==>eq==>iff) lt.
#[global]
Instance lt_strorder : StrictOrder lt.
Fixpoint compare x y :=
match x, y with
| x~1, y~1 => compare x y
| _~1, _ => Gt
| x~0, y~0 => compare x y
| _~0, _ => Lt
| 1, _~1 => Lt
| 1, 1 => Eq
| 1, _~0 => Gt
end.

(* Specifications: *)
Lemma compare_spec : forall x y, CompSpec eq lt x y (compare x y).
End PositiveOrderedTypeBits.