Canonical GI_idomainType :=
Eval hnf in IdomainType GI GI_idomainAxiom.
Fact divGI_subproof (x y : int) : x%:~R + 'i * y%:~R \is a gaussInteger.

(* Specifications: *)
Lemma div0GI y : 0 %/ y = 0.
Lemma divGI1 x : x %/ 1 = x.
Lemma divGIxx (x : GI) : x != 0 -> x %/ x = 1.
Definition modGI (x y : GI) : GI := x - (x %/ y)%GI * y.