Definition Qinv (x : Q) :=
  match x with
  | Qpos x => Qpos (Qpositive_inv x)
  | Qneg x => Qneg (Qpositive_inv x)
  | Zero => Zero
  end.

(* Specifications: *)
Theorem Qinv_def : forall x : Q, x <> Zero -> Qmult x (Qinv x) = Qpos One.
Theorem Q_integral : forall x y : Q, Qmult x y = Zero -> x = Zero \/ y = Zero.