(* Useful tactics *)
  Add Parametric Relation : R req
    reflexivity  proved by (@Equivalence_Reflexive _ _ Rsth)
    symmetry     proved by (@Equivalence_Symmetric _ _ Rsth)
    transitivity proved by (@Equivalence_Transitive _ _ Rsth)
   as R_set1.Add Morphism radd with signature (req ==> req ==> req) as radd_ext.Add Morphism rmul with signature (req ==> req ==> req) as rmul_ext.Add Morphism ropp with signature (req ==> req) as ropp_ext.Add Morphism rsub with signature (req ==> req ==> req) as rsub_ext.Ltac rsimpl := gen_srewrite Rsth Reqe ARth.Definition triv_div x y :=
   if ceqb x y then (cI, cO)
   else (cO, x).Ltac Esimpl :=repeat (progress (
   match goal with
   | |- context [phi cO] => rewrite (morph0 morph)
   | |- context [phi cI] => rewrite (morph1 morph)
   | |- context [phi (cadd ?x  ?y)] => rewrite ((morph_add morph) x y)
   | |- context [phi (cmul ?x  ?y)] => rewrite ((morph_mul morph) x y)
   | |- context [phi (csub ?x  ?y)] => rewrite ((morph_sub morph) x y)
   | |- context [phi (copp ?x)] => rewrite ((morph_opp morph) x)
   end)).

(* Specifications: *)
Lemma triv_div_th : Ring_theory.div_theory req cadd cmul phi triv_div.
Lemma Ztriv_div_th : div_theory req Z.add Z.mul zphi Z.quotrem.
Lemma Ntriv_div_th : div_theory req N.add N.mul nphi N.div_eucl.