Section ZmodQuot.
Variable (T : Type).
Variable eqT : rel T.
Variables (zeroT : T) (oppT : T -> T) (addT : T -> T -> T).
Record zmod_quot_mixin_of (Q : Type) (qc : quot_class_of T Q)
(zc : GRing.Zmodule.class_of Q) := ZmodQuotMixinPack {
zmod_eq_quot_mixin :> eq_quot_mixin_of eqT qc zc;
_ : \pi_(QuotTypePack qc) zeroT = 0 :> GRing.Zmodule.Pack zc;
_ : {morph \pi_(QuotTypePack qc) : x /
oppT x >-> @GRing.opp (GRing.Zmodule.Pack zc) x};
_ : {morph \pi_(QuotTypePack qc) : x y /
addT x y >-> @GRing.add (GRing.Zmodule.Pack zc) x y}
}.
Record zmod_quot_class_of (Q : Type) : Type := ZmodQuotClass {
zmod_quot_quot_class :> quot_class_of T Q;
zmod_quot_zmod_class :> GRing.Zmodule.class_of Q;
zmod_quot_mixin :> zmod_quot_mixin_of
zmod_quot_quot_class zmod_quot_zmod_class
}.
Structure zmodQuotType : Type := ZmodQuotTypePack {
zmod_quot_sort :> Type;
_ : zmod_quot_class_of zmod_quot_sort;
}.
Implicit Type zqT : zmodQuotType.
Definition zmod_quot_class zqT : zmod_quot_class_of zqT :=
let: ZmodQuotTypePack _ cT as qT' := zqT return zmod_quot_class_of qT' in cT.
Definition zmod_eq_quot_class zqT (zqc : zmod_quot_class_of zqT) :
eq_quot_class_of eqT zqT := EqQuotClass zqc.
Canonical zmodQuotType_eqType zqT := Equality.Pack (zmod_quot_class zqT).
Canonical zmodQuotType_choiceType zqT :=
Choice.Pack (zmod_quot_class zqT).
Canonical zmodQuotType_zmodType zqT :=
GRing.Zmodule.Pack (zmod_quot_class zqT).
Canonical zmodQuotType_quotType zqT := QuotTypePack (zmod_quot_class zqT).
Canonical zmodQuotType_eqQuotType zqT := EqQuotTypePack
(zmod_eq_quot_class (zmod_quot_class zqT)).
Coercion zmodQuotType_eqType : zmodQuotType >-> eqType.
Coercion zmodQuotType_choiceType : zmodQuotType >-> choiceType.
Coercion zmodQuotType_zmodType : zmodQuotType >-> zmodType.
Coercion zmodQuotType_quotType : zmodQuotType >-> quotType.
Coercion zmodQuotType_eqQuotType : zmodQuotType >-> eqQuotType.
Definition ZmodQuotType_pack Q :=
fun (qT : quotType T) (zT : zmodType) qc zc
of phant_id (quot_class qT) qc & phant_id (GRing.Zmodule.class zT) zc =>
fun m => ZmodQuotTypePack (@ZmodQuotClass Q qc zc m).
Definition ZmodQuotMixin_pack Q :=
fun (qT : eqQuotType eqT) (qc : eq_quot_class_of eqT Q)
of phant_id (eq_quot_class qT) qc =>
fun (zT : zmodType) zc of phant_id (GRing.Zmodule.class zT) zc =>
fun e m0 mN mD => @ZmodQuotMixinPack Q qc zc e m0 mN mD.
Definition ZmodQuotType_clone (Q : Type) qT cT
of phant_id (zmod_quot_class qT) cT := @ZmodQuotTypePack Q cT.

Lemma idealr0 : 0 \in kI. Proof. exact: rpred0. Qed.