End ALMOST_RING.
Variable Rth : ring_theory 0 1 radd rmul rsub ropp req.
Let ARth := Rth_ARth Rsth Reqe Rth.
Add Morphism rsub with signature (req ==> req ==> req) as rsub_ext4.

(* Specifications: *)
Lemma gen_Zeqb_ok : forall x y,
Zeq_bool x y = true -> [x] == [y].
Lemma gen_phiZ1_pos_sub : forall x y,
gen_phiZ1 (Z.pos_sub x y) == gen_phiPOS1 x + -gen_phiPOS1 y.
Lemma gen_phiZ_add : forall x y, [x + y] == [x] + [y].
Lemma gen_phiZ_mul : forall x y, [x * y] == [x] * [y].
Lemma gen_phiZ_ext : forall x y : Z, x = y -> [x] == [y].
End ZMORPHISM.
(** N is a semi-ring and a setoid*)
Lemma Nsth : Setoid_Theory N (@eq N).
Proof (Eqsth N).
Lemma Nseqe : sring_eq_ext N.add N.mul (@eq N).
Proof (Eq_s_ext N.add N.mul).
Lemma Nth : semi_ring_theory 0%N 1%N N.add N.mul (@eq N).
Definition Nsub := SRsub N.add.