(**  There follows the boilerplate to use the proof GI_subring in order to canonically provide a subring structure to the predicate gaussInteger.  *)
Canonical GI_keyed := KeyedQualifier GI_key.
Canonical GI_opprPred := OpprPred GI_subring.
Canonical GI_addrPred := AddrPred GI_subring.
Canonical GI_mulrPred := MulrPred GI_subring.
Canonical GI_zmodPred := ZmodPred GI_subring.
Canonical GI_semiringPred := SemiringPred GI_subring.
Canonical GI_smulrPred := SmulrPred GI_subring.
Canonical GI_subringPred := SubringPred GI_subring.
(**  Finally, we define the type of Gauss Integer, as a sigma type of algebraic numbers. We soon prove that this is in fact a sub type.  *)
Record GI := GIof {
algGI : algC;
algGIP : algGI \is a gaussInteger }.
(** We make the defining property of GI a Hint *)
Hint Resolve algGIP.
(**  We provide the subtype property.  - This makes it possible to use the generic operator "val" to get an algC from a Gauss Integer.  *)
Canonical GI_subType := [subType for algGI].

(* Specifications: *)
(** We deduce that the real and imaginary parts of a GI are integers *)
Lemma GIRe (x : GI) : 'Re (val x) \in Cint.
Fact unitGIP (x y : GI) : y * x = 1 -> unitGI x.