Fixpoint Qpositive_inv (w : Qpositive) : Qpositive :=
  match w with
  | One => One
  | nR w' => dL (Qpositive_inv w')
  | dL w' => nR (Qpositive_inv w')
  end.

(* Specifications: *)
Theorem inv_correct : forall (w : Qpositive) (p q : nat), Qpositive_i w = (p, q) -> Qpositive_i (Qpositive_inv w) = (q, p).
Theorem interp_non_zero : forall w : Qpositive, exists p : nat, (exists q : nat, Qpositive_i w = (S p, S q)).