finish carry proof

This commit is contained in:
2025-06-21 07:50:20 +00:00
parent f462570ccd
commit 0656f30a16
4 changed files with 171 additions and 39 deletions

View File

@ -21,6 +21,12 @@ Local Open Scope sac.
Module Aux.
Lemma Z_mod_add_carry: forall (a b m: Z),
m > 0 -> 0 <= a < m -> 0 <= b < m ->
(a + b) mod m < b ->
a + b = (a + b) mod m + m.
Proof. Admitted.
Lemma Z_of_nat_succ: forall (n: nat),
Z.of_nat (S n) = Z.of_nat n + 1.
Proof. lia. Qed.