Word-sized quadratic Hensel doubling step over WordMod at working modulus
m*m, taken when m*m fits an odd machine word, 1 < m*m, and the divisor g
is monic of positive degree. Byte-identical to quadraticHenselStepBignum under
that guard; declines (none) otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One quadratic Hensel correction step from modulus m to modulus m^2.
Inputs: the target polynomial f, the current monic factor g, the
complementary factor h, and the Bezout witnesses s, t for the current
factorisation. Preconditions consumed by the correctness theorems below are g
monic, g * h ≡ f (mod m), and s * g + t * h ≡ 1 (mod m); the returned
QuadraticLiftResult then satisfies the same conjuncts modulo m^2.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runtime shape of the bignum quadratic step: the target is narrowed to the step's own modulus before the residual is formed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Proof-backed compiled implementation of the bignum quadratic step.
Guarded selection: the word-sized step when its guard holds, else the bignum step.
Equations
- Hex.ZPoly.quadraticHenselStep m f g h s t = match Hex.ZPoly.quadraticHenselStepWord? m f g h s t with | some result => result | none => Hex.ZPoly.quadraticHenselStepBignum m f g h s t
Instances For
Bignum factor-only quadratic step, omitting the final Bezout correction.
Public, unlike its word-sized sibling, because its compiled implementation is
swapped by a @[csimp] theorem, and csimp lemmas must be public.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runtime shape of the bignum factor-only step, narrowing the target to the step's own modulus before the residual is formed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Proof-backed compiled implementation of the bignum factor-only step.
Update only the two factors in one quadratic Hensel step. The result is
byte-identical to the g and h fields of quadraticHenselStep, while the
final Bezout update is skipped.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The factor-only step agrees exactly with the factor fields of the full quadratic step.
Every component of one quadratic Hensel step is canonical modulo the step's
working modulus m², on both the word and the bignum path.
The factor-only step inherits the same coefficient-range invariant.
The monic factor remains monic after the quadratic correction.
After a quadratic Hensel step, both the updated leading factor r.g and the
updated complementary factor r.h are congruent to the corresponding input
factors modulo m. The quadratic correction only touches the data modulo
m^2 beyond what is already determined modulo m, so the input
factorisation is preserved at the base modulus.