| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
This is https://coq.inria.fr/bugs/show_bug.cgi?id=4165, context
replacement is broken (in the presence of [let]).
|
|
|
|
| |
Also use it to implement Montgomery reduction and Barrett reduction.
|
|
|
|
|
|
| |
From http://cacr.uwaterloo.ca/hac/about/chap14.pdf
This should take care of most of #43, at least the specification on Z
part of it.
|
|
|
|
|
|
|
|
|
| |
In this version, we split up the integer division so that we are less
likely to overflow in intermediate computations.
This is still not the version in HAC 14.42; that version also does early
reduction modulo b^(k+1).
This is work towards #43
|
|
|
|
|
|
| |
In particular, we do equality reasoning in one place and inequality
reasoning in another. This makes it very clear how the inequality
reasoning follows from the equality reasoning.
|
|
Implement and prove Barrett reduction on Z
This will serve as the high-level algorithm for modular reduction.
We follow Wikipedia very closely, except where we can do better (I
believe @jadephilipoom is updating Wikipedia).
|