proposition: Lemma inj_mod a a' : N.to_nat (a mod a') = N.to_nat a mod N.to_nat a'.
proof: Proof. destruct a' as [|a']; [now destruct a|]. apply Nat.mod_unique with (N.to_nat (a / (N.pos a'))). - apply Nat.compare_lt_iff. rewrite <- inj_compare. now apply N.mod_lt. - now rewrite <- inj_mul, <- inj_add, <- N.div_mod. Qed.
imports: BinPos BinNat PeanoNat Pnat