simple induction w; simpl in |- *;
(repeat exists 0; auto; fail) ||
(intros w' Hrec; elim Hrec; intros p' Hex; elim Hex; intros q' Heq;
rewrite Heq).
exists (p' + S q'); exists q'; auto.
exists p'; exists (p' + S q'); auto.
Qed.
Fixpoint Qpositive_c (p q n : nat) {struct n} : Qpositive :=
match n with
| O => One
| S n' =>
match p - q with
| O => match q - p with
| O => One
| v => dL (Qpositive_c p v n')
end
| v => nR (Qpositive_c v q n')
end
end.

(* Specifications: *)
Theorem minus_O_le : forall n m : nat, n - m = 0 -> n <= m.
intros n; elim n; clear n.