Definition oZ1 (x : Option positive) :=
  match x with
  | None => 0%Z
  | Some z => Zpos z
  end.(* We use the  function Pdiv function to build our Zquotient*)
 
Definition Zquotient (n m : Z) :=
  match n, m with
  | Z0, _ => 0%Z
  | _, Z0 => 0%Z
  | Zpos x, Zpos y => match Pdiv x y with
                      | (x, _) => oZ1 x
                      end
  | Zneg x, Zneg y => match Pdiv x y with
                      | (x, _) => oZ1 x
                      end
  | Zpos x, Zneg y => match Pdiv x y with
                      | (x, _) => (- oZ1 x)%Z
                      end
  | Zneg x, Zpos y => match Pdiv x y with
                      | (x, _) => (- oZ1 x)%Z
                      end
  end.

(* Specifications: *)
Theorem inj_oZ1 : forall z, oZ1 z = Z_of_nat (oZ z).
Theorem Zero_le_oZ : forall z, 0 <= oZ z.
Theorem ZquotientProp : forall m n : Z, n <> 0%Z -> ex (fun r : Z => m = (Zquotient m n * n + r)%Z /\ (Zabs (Zquotient m n * n) <= Zabs m)%Z /\ (Zabs r < Zabs n)%Z).
Theorem ZquotientPos : forall z1 z2 : Z, (0 <= z1)%Z -> (0 <= z2)%Z -> (0 <= Zquotient z1 z2)%Z.