The bounded long-division step #
Inserting one coefficient raises the stored degree by at most one. The single XOR cancellation removes its possible leading term, giving the unique monic remainder while restoring the fixed state width.
theorem
Complexity.BitPolynomial.Internal.remainderStep_correct
(modulus : List Bool)
(bit : Bool)
(state : List Bool)
(hm : 0 < significantLength modulus)
(hs : state.length = significantLength modulus - 1)
: