Raw Univariate Polynomial Proofs #
Proofs about operations on raw computable univariate polynomials.
Coefficient of an untrimmed addRaw accumulator fold: the same statement as
coeff_foldl_add, but the partial sums are combined with addRaw (no per-step
trim). This is what mulRaw folds with.
mul agrees with the trimmed-add convolution fold (the previous definition of
mul). mul now folds with the untrimmed addRaw and trims once at the end;
this lemma is the bridge that lets the existing coefficient and equivalence
proofs go through unchanged.
Low-product backend using the coefficient convolution formula.
Instances For
Low-product backend using ordinary multiplication followed by truncation.
Instances For
The quotient produced by the monic long-division recursion is canonical regardless of input:
each non-base step accumulates via Raw.add (which trims), and the base case returns 0.
The remainder produced by the monic long-division recursion is canonical when the input is.
Each recursive step feeds the next call a trimmed (p - q').trim, and the base case returns the
input unchanged.
The remainder-only long-division recursion preserves canonicality of p.
Raw.modByMonicByReversal returns a canonical polynomial when p is canonical.
Either branch ends in a result whose trim is itself: the reversal branch ends with Raw.sub
(which trims), and the fallback uses modByMonicRemainderOnly.
powBySq agrees with pow (repeated squaring = repeated multiplication).
powBySq accumulates intermediate squarings with the untrimmed mulRaw and trims
once at the end, so the proof bridges through mul_trim_eq_mul to relate each
mulRaw step back to the spec pow.