Definition modz (m d : int) : int := m - divz m d * d.Notation "m <> n %[mod d ]" := (modz m d <> modz n d) : int_scope.(** Divisibility **)

Fact dvdz_key d : pred_key (dvdz d).Canonical dvdz_keyed d := KeyedPred (dvdz_key d).Fact dvdz_zmod_closed d : zmod_closed (dvdz d).Canonical dvdz_addPred d := AddrPred (dvdz_zmod_closed d).Canonical dvdz_oppPred d := OpprPred (dvdz_zmod_closed d).Canonical dvdz_zmodPred d := ZmodPred (dvdz_zmod_closed d).

Lemma gcdzC : commutative gcdz.