#[global]
Instance quotsSpec : BinOpSpec quots :=
{| BPred := fun x d r : Z =>
((x = -4611686018427387904 /\ d = -1 /\ r = -4611686018427387904)
\/ ((x <> -4611686018427387904 \/ d <> -1) /\ r = Z.quot x d))%Z;
BSpec := quots_spec |}.
Add Zify BinOpSpec quotsSpec.
#[global]
Instance Op_of_Z : UnOp of_Z :=
{ TUOp := fun x => cmodwB x; TUOpInj := of_Z_spec }.
Add Zify UnOp Op_of_Z.
#[global]
Instance Op_to_Z : UnOp to_Z :=
{ TUOp := fun x => x ; TUOpInj := fun x : int => eq_refl }.
Add Zify UnOp Op_to_Z.

(* Specifications: *)
Lemma is_zeroE : forall n : int, is_zero n = (to_Z n =? 0)%Z.
#[global]
Instance Op_is_zero : UnOp is_zero :=
{ TUOp := (Z.eqb 0) ; TUOpInj := is_zeroE }.