Skip to content

Commit

Permalink
For temptative Coq PR #11429
Browse files Browse the repository at this point in the history
Explicitly clear useless arithmetic section variables
that are eagerly used by zify.
  • Loading branch information
fajb authored and JasonGross committed Jan 31, 2020
1 parent 8b457ef commit 9f3ae14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/Arithmetic/BarrettReduction.v
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ Module Fancy.
Local Notation w := (uweight width). Local Notation eval := (Positional.eval w).
Context (mut Mt : list Z) (mut_correct : mut = Partition.partition w (sz+1) mu) (Mt_correct : Mt = Partition.partition w sz M).
Context (mu_eq : mu = 2 ^ (2 * k) / M) (muHigh_one : mu / w sz = 1) (M_range : 2^(k-1) < M < 2^k).

Local Lemma wprops : @weight_properties w. Proof. apply uwprops; auto with lia. Qed.
Local Lemma wprops : @weight_properties w. Proof using width_ok. clear - width_ok. apply uwprops ; lia. Qed.
Local Hint Resolve wprops : core.
Hint Rewrite mut_correct Mt_correct : pull_partition.

Expand Down
1 change: 1 addition & 0 deletions src/Arithmetic/WordByWordMontgomery.v
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ Module WordByWordMontgomery.
Lemma fst_redc_body_mod_N
: (eval (fst (redc_body A_S))) mod (eval N) = ((eval (fst A_S) - a)*ri) mod (eval N).
Proof using small_S small_A ri_correct lgr_big S_bound.
clear R_numlimbs_nz.
rewrite fst_redc_body.
etransitivity; [ eapply Z.div_to_inv_modulo; try eassumption; lia | ].
unfold a, A_a, A.
Expand Down

0 comments on commit 9f3ae14

Please sign in to comment.