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

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