Skip to content

Commit

Permalink
try to fix build on coq master
Browse files Browse the repository at this point in the history
  • Loading branch information
jadephilipoom committed Apr 9, 2018
1 parent c326ec6 commit adf8863
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Arithmetic/BarrettReduction/Generalized.v
Expand Up @@ -145,7 +145,10 @@ Section barrett.
autorewrite with push_Zmul. ring_simplify.
replace (a / n * m * n) with (m * n * (a / n)) by ring.
assert (a/n < b ^ k) by auto using Z.div_lt_upper_bound with zarith.
assert (b ^ (2 * k) - m * n = b ^ (2 * k) mod n) by (subst m; rewrite Z.mul_div_eq'; auto with zarith).
assert (b ^ (2 * k) - m * n = b ^ (2 * k) mod n).
{ subst m.
rewrite Z.mul_div_eq' by (auto using Z.lt_gt with zarith).
auto with zarith. }
assert (0 < b ^ (k - offset)) by auto with zarith.
assert (b ^ (2*k) = b ^ (k - offset) * b ^ (k + offset)) by (rewrite <-Z.pow_add_r; auto with zarith).
pose proof (Z.mod_pos_bound (b ^ (2*k)) n ltac:(lia)).
Expand Down

0 comments on commit adf8863

Please sign in to comment.