intros n'; Case' (Qpositive_le_dec n' n').
case (Qpositive_eq_dec n' n'); auto.
intros H; elim H; auto.
intros H; elim H; auto.
intros n'; Case' (Qpositive_le_dec n' n').
case (Qpositive_eq_dec n' n'); auto.
intros H; elim H; auto.
intros H; elim H; auto.
Qed.
Definition Q_eq (n m : Q) :=
match n, m with
| Zero, Zero => true
| Qpos n', Qpos m' =>
match Qpositive_eq_dec n' m' with
| left h => true
| right h => false
end
| Qneg n', Qneg m' =>
match Qpositive_eq_dec n' m' with
| left h => true
| right h => false
end
| _, _ => false
end.

(* Specifications: *)
Theorem Q_eq_prop : forall x y : Q, Q_eq x y = true -> x = y.
intros x y Htrue; generalize Htrue; clear Htrue.