proposition: Lemma modNat_plus : forall n1 n2 p, (modNat (n1 + n2) p = modNat ((modNat n1 p) + n2) p)%nat.
proof: Proof. unfold modNat. intuition. rewrite Nnat.Nat2N.inj_add. rewrite <- N.add_mod_idemp_l. f_equal. rewrite <- (Nnat.Nat2N.id n2) at 2. rewrite Nnat.Nat2N.inj_add. repeat rewrite Nnat.N2Nat.id. trivial. destruct p. simpl. destruct x; simpl. lia. apply Npos_nz. Qed.
imports: Arith micromega.Lia Coq.NArith.BinNat