Section ZmodQuotient.
Variables (R : zmodType) (I : {pred R})
(zmodI : zmodPred I) (kI : keyed_pred zmodI).
Definition equiv (x y : R) := (x - y) \in kI.
Canonical equiv_equiv := EquivRelPack equiv_is_equiv.
Canonical equiv_encModRel := defaultEncModRel equiv.
Definition type := {eq_quot equiv}.
Definition type_of of phant R := type.
Canonical rquot_quotType := [quotType of type].
Canonical rquot_eqType := [eqType of type].
Canonical rquot_choiceType := [choiceType of type].
Canonical rquot_eqQuotType := [eqQuotType equiv of type].

Lemma idealrBE x y : (x - y) \in kI = (x == y %[mod type]).