Proofs: Block Wiedemann algorithm
These are the human proofs of Block Wiedemann algorithm, at full length.
Block Wiedemann returns kernel vectors, and its generators are generators full
This proof shows: correctness, termination.
Let be an matrix over , the block width, , , and for . Write , an matrix of polynomials.
Claim. (1) The algorithm stops. (2) Every vector it returns is a nonzero with ; in particular, for a nonsingular it returns FAIL. (3) Every pair produced by line L5 satisfies for . (4) If a pair satisfies the stronger condition and , where is the least index with , then lines L8 to L10 return a kernel vector.
(1) Termination. The loops of lines L3 and L5 have steps, M-Basis has rounds over rows, there are at most pairs in line L6, and the loop of line L8 has steps.
(2) Returned vectors. Line L9 returns only after line L8 checked and line L9 checked . A nonsingular matrix has no such .
(3) The M-Basis invariant. Let be the matrix with on top of , and let be the polynomial matrix of the method, with rows , , and counters . We show that before round (for ):
- (I1) ;
- (I2) and for each .
At , and : (I1) is empty, and row is a unit vector of degree in the part where its counter allows it. Assume (I1) and (I2) before round , and let be the coefficient of in . The rows are treated in increasing order of . When row is reduced by a pivot row , row came earlier, so , and still satisfies (I2) with the counter . The same operation applied to keeps equal to the coefficient of in the new , and it keeps (I1), since both rows satisfy it. After all rows are treated, the rows that are not pivots have zero rows in , so they satisfy . Each pivot row is multiplied by and its counter is increased by , which keeps (I2). Its product with was by (I1), so after the multiplication it is . So (I1) and (I2) hold before round .
At the end, (I1) with says for each row. Fix a row with , write and , and set for , as line L5 does. For , the coefficient of in is by (I2), so the coefficient of in is :
with . All indices lie in . Putting , which runs over , gives (3).
(4) Extraction. Suppose . Since and for ,
Line L7 computes this , by accumulating with the block updated by one product per step. If , let be the largest index with ; it exists because and . Then . The loop of line L8 visits in turn and returns the first that is nonzero with , which happens for some , within the steps.
What is not proved here. Statement (3) is a condition on the projected sequence only. That a generator of small degree also satisfies the stronger condition of (4), and that , holds with high probability over random and ; this is the probabilistic analysis of Kaltofen (1995) for large fields and of Villard (1997) for small ones. The implementation does not rely on it, since it checks every candidate, and it repeats with new random blocks when all candidates fail.