intros (x1,x2) (y1,y2).
destruct (O1.compare x1 y1).
- apply LT; unfold lt; auto.
- destruct (O2.compare x2 y2).
+ apply LT; unfold lt; auto.
+ apply EQ; unfold eq; auto.
+ apply GT; unfold lt; auto with ordered_type.
- apply GT; unfold lt; auto.
Defined.
Definition eq_dec : forall x y : t, {eq x y} + {~ eq x y}.

(* Specifications: *)
Lemma lt_trans : forall x y z : t, lt x y -> lt y z -> lt x z.
Lemma bits_lt_antirefl : forall x : positive, ~ bits_lt x x.
Lemma lt_not_eq : forall x y : t, lt x y -> ~ eq x y.
Definition compare : forall x y : t, Compare lt eq x y.
Lemma eq_dec (x y: positive): {x = y} + {x <> y}.
End PositiveOrderedTypeBits.