Proofs: XL algorithm
These are the human proofs of XL algorithm, at full length.
Correctness of XL with field equations full
This proof shows: correctness.
We prove that one XL step returns only true information about the first coordinates of the solutions, that at the full degree it returns the exact projection, and that the solver returns exactly the solutions in .
Setting. is a prime, , and . Every element of has a unique representative in which every exponent is at most (reduce to while ; uniqueness follows from Lemma 1 by counting dimensions). The code works with these representatives. For , let and . Let be the span of , the univariate part.
Lemma 1 (functions). Evaluation gives an isomorphism of with the ring of all functions , and .
Proof. For , by Fermat's little theorem, so evaluation at is a well-defined ring map on . For the element takes the value at and elsewhere, again by Fermat. So evaluation is onto the -dimensional space of functions, and the reduced monomials, of them, span ; hence the map is bijective and the reduced representatives are unique. Every vanishes on . Conversely, let vanish on . For some , and as functions, so . Then .
Lemma 2 (echelon form). Let be the reduced row echelon form of a matrix whose columns are split into a left block and a right block . Then the vectors of the row space with zero entries in are exactly the combinations of the rows of that are zero in .
Proof. Such combinations are in the row space and are zero in . Conversely, let be zero in . A row that is not zero in has its pivot, its first nonzero entry, in , and in reduced form the pivot column of is zero in every other row. So at that column equals , and . Hence is a combination of the rows that are zero in .
Theorem 1 (one step). Let XL-STEP run with the columns of the univariate monomials last.
- (a) If it returns "none", then .
- (b) If it returns univariate polynomials , then for every .
- (c) If , the step returns "fail" exactly when , and otherwise the common roots of the are exactly , or it returns "none" exactly when .
Proof. Every row is a reduced product , an element of , and so is every row of the echelon form. A row with zero entries outside the univariate block is an element . (a) A nonzero constant in vanishes on by Lemma 1 and is nowhere zero, so is empty. (b) Each vanishes on , so .
(c) For this every reduced monomial satisfies , so the rows span . By Lemma 2 the rows found at line L4 span . By Lemma 1, is the set of univariate of degree less than that vanish on . If , then , and the reduced echelon form of a space containing the constant has the constant row , so the answer is "none"; if , no constant is in and the answer is not "none". If , a univariate of degree less than vanishing on all of is , so no row is found and the answer is "fail". Otherwise, for the element is in and equals at ; it is a combination of the , so some . With (b), the common roots are exactly , and since the span is nonzero, "fail" is not returned.
Theorem 2 (solver). XL-SOLVE terminates and returns exactly .
Proof. Termination: the inner loop raises at most up to the full degree of Theorem 1 (c). Each stack entry with free variables pushes at most entries with , so at most entries are processed.
We show by induction on that an entry adds to the output exactly the points , where is the set of common zeros of . For each is a constant, and the prefix is output exactly when all are . If has no nonzero polynomial, every point is a zero, and the code outputs them all. Otherwise the loop stops at the first with a non-"fail" answer, or at the full degree. If the answer is "none", by (a). If it returns univariate polynomials, their common roots contain by (b). If it returns "fail" at the full degree, by (c), and the code tries all values. So the tried values contain every first coordinate of a point of . For a tried value , the substituted system has zero set , and by induction the child entry outputs this set. The union over the tried values is , because values outside contribute nothing. The first entry has empty prefix, and , so the output is . Distinct entries have distinct prefixes, so no point is output twice.