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.

Theorem construct_correct2' : forall n p q : nat, 1 <= p -> 1 <= q -> p + q <= n -> exists d : nat, p = fst (Qpositive_i (Qpositive_c p q n)) * S d /\ q = snd (Qpositive_i (Qpositive_c p q n)) * S d.