Fast Mulders-Storjohann Reduction Agrees With the Direct Definition #
The fast reducer caches shifted leading positions once per conflict scan and
cancels leading terms through the fused rowSubScaledShift update. This file
proves it extensionally equal to muldersStorjohannReduce, so every
correctness result transfers, and packages it as a certified
ShiftedRowReducerContext.
Row-level cancellation #
theorem
CompPoly.PolynomialMatrix.rowSubScaledShift_size
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
(a : PolynomialRow F)
(c : F)
(d : ℕ)
(b : PolynomialRow F)
:
theorem
CompPoly.PolynomialMatrix.rowGet_rowSubScaledShift
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
(a : PolynomialRow F)
(c : F)
(d : ℕ)
(b : PolynomialRow F)
(j : ℕ)
:
theorem
CompPoly.PolynomialMatrix.rowSubScaledShift_eq
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
(a : PolynomialRow F)
(c : F)
(d : ℕ)
(b : PolynomialRow F)
:
theorem
CompPoly.PolynomialMatrix.cancelShiftedLeadingTermFast_eq
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
(target reducer : PolynomialRow F)
(shift : Array ℕ)
:
Cached conflict scan #
theorem
CompPoly.PolynomialMatrix.rowLeadingPositions_size
{F : Type u_1}
[Field F]
[BEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
:
theorem
CompPoly.PolynomialMatrix.rowLeadingPositions_getD
{F : Type u_1}
[Field F]
[BEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
{i : ℕ}
(hi : i < Array.size M)
:
theorem
CompPoly.PolynomialMatrix.cachedLeadingConflictInRowStep?_eq
{F : Type u_1}
[Field F]
[BEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
{i j : ℕ}
(hi : i < Array.size M)
(hj : j < Array.size M)
(found : Option (ℕ × ℕ))
:
cachedLeadingConflictInRowStep? (M.rowLeadingPositions shift) i found j = M.shiftedLeadingConflictInRowStep? shift i found j
theorem
CompPoly.PolynomialMatrix.cachedLeadingConflictInRow?_eq
{F : Type u_1}
[Field F]
[BEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
{i : ℕ}
(hi : i < Array.size M)
(found : Option (ℕ × ℕ))
:
cachedLeadingConflictInRow? (M.rowLeadingPositions shift) i found = M.shiftedLeadingConflictInRow? shift i found
theorem
CompPoly.PolynomialMatrix.cachedLeadingConflict?_eq
{F : Type u_1}
[Field F]
[BEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
:
Step, loop, and reducer #
theorem
CompPoly.PolynomialMatrix.muldersStorjohannStepFast_eq
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
(i j : ℕ)
:
theorem
CompPoly.PolynomialMatrix.muldersStorjohannReduceWithFuelFast_eq
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
(fuel : ℕ)
(M : PolynomialMatrix F)
(shift : Array ℕ)
:
theorem
CompPoly.PolynomialMatrix.muldersStorjohannReduceFast_eq
{F : Type u_1}
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
(M : PolynomialMatrix F)
(shift : Array ℕ)
:
Certified context #
def
CompPoly.PolynomialMatrix.muldersStorjohannFastReducerContext
(F : Type u_2)
[Field F]
[BEq F]
[LawfulBEq F]
[DecidableEq F]
:
Certified fast Mulders-Storjohann shifted row-reducer context. The
implementation caches leading positions per scan and uses fused row
cancellation; correctness transfers along muldersStorjohannReduceFast_eq.