proposition: Lemma eqmod_add_idemp_l n i j k : (k + i) mod n = (k + j) mod n <-> i mod n = j mod n.
proof: Proof. destruct (eqP n 0). { clarify; simpl; lia. } desf. rewrite !(Nat.add_mod k); try done. split; [intro L|by intros ->]. rewrite !(Nat.add_mod_idemp_r) in L; try done. apply f_equal with (f := fun x => ((n - k mod n) + x) mod n) in L. rewrite !Nat.add_mod_idemp_r, !Nat.add_assoc, !Nat.sub_add in L; eauto using Nat.mod_upper_bound, Nat.lt_le_incl. do 2 (rewrite Nat.add_mod, Nat.mod_same, Nat.add_0_l, Nat.mod_mod in L; try done). Qed.
imports: Arith micromega.Lia HahnBase HahnList HahnRelationsBasic HahnRewrite