Proofs: Schnorr-Euchner enumeration
These are the human proofs of Schnorr-Euchner enumeration, at full length.
Schnorr-Euchner enumeration returns a shortest nonzero vector after a bounded number of nodes full
This proof shows: correctness, termination, time.worst.
Setting. The input is a list of linearly independent rows . We write for their Gram-Schmidt vectors, , for , and for the orthogonal projection onto . For integers , let and , with . Both depend only on (and only on ). The line numbers refer to the main block of the page.
Lemma 1 (the identity). For , ; in particular .
Proof. Substitute :
The projection keeps the terms with index at least and removes the others, and the are pairwise orthogonal, so .
Lemma 2 (the order at one level). Fix , so is fixed. The values produced at level , starting from at line L7 (or at line L3) and continuing by line L12, are distinct integers in order of nondecreasing , and so of nondecreasing . In the symmetric case (all of zero, so ) they are , which is every integer in order of nondecreasing .
Proof. Let , so , and let if and otherwise. Then lies between and . The sequence is . Write . The distances are , that is and for the values and ; since , , so the sequence of distances is nondecreasing. It lists every integer once. Finally with and fixed. In the symmetric case line L12 adds 1 each time and .
Lemma 3 (the invariant of the result). At every moment, the pair (best, ) satisfies best and . Moreover never increases.
Proof. At line L2, best and . Line L9 is the only line that changes them; it runs at a leaf with and , and sets best and by Lemma 1, which is smaller than before.
Lemma 4 (the shape of the search). The loop is a depth-first search of the tree whose nodes at level are the tuples it produces. At a node of level that passes the test at line L6, the search descends to level , tries values there in the order of Lemma 2 (with fixed), processing the subtree of each value that passes, and returns to level exactly when a value at level fails. At level 1, a passing value is a leaf, after which the next value is tried.
Proof. Line L7 descends and sets the first value; line L5 evaluates the node. If it passes and , line L7 descends again. If it passes at , lines L8 and L9 handle the leaf and line L12 moves to the next value at the same level. If it fails, line L10 goes up one level and line L12 moves to the next value there. The variables for above the current level are not changed while the search is below them, so they stay fixed during a subtree.
Theorem 1 (termination). The loop terminates.
Proof. At a fixed level with fixed higher coordinates, the values tried are distinct (Lemma 2), so along them and ; since by Lemma 3, a failing value comes after finitely many values. So each node has finitely many children that pass, plus one that fails. The depth is . By König's lemma for this finitely branching tree of finite depth, the tree is finite, and the depth-first search of Lemma 4 visits each node once; it ends when the level fails and becomes at line L11.
Theorem 2 (correctness). The returned best is a nonzero vector of minimal length: .
Proof. By Lemma 3, the output is a nonzero lattice vector of squared length , the final radius. Suppose a nonzero had . Let be the largest index with ; replacing by we may assume . By Lemma 1, for every and every moment, by Lemma 3.
We show by induction on that the search visits the node and that this node passes. At level , the values are tried in the order of Lemma 2 (symmetric case, , and because either and or ). Level is left only after a value fails, that is ; so , and by the nondecreasing order was tried before . When it was tried it passed, since . The step from to is the same: after the node passes, by Lemma 4 the search tries values at level with until one fails. If , the higher coordinates are not all zero, so the full zig-zag order of Lemma 2 is used and contains ; if , the symmetric order is used, and (it is above and positive at ). In both cases the failing value has , so it comes after , which was tried and passed.
So the leaf is reached and passes, with , and line L9 sets . Since never increases, the final radius is at most , a contradiction.
Theorem 3 (CVP). With the centers , where , without the symmetry rule and the test , and started from Babai's vector with , the search returns minimizing .
Proof. Write with orthogonal to . As in Lemma 1, , so and the partial sums are nondecreasing as decreases. Lemmas 2 to 4 and Theorem 1 hold unchanged, using the full zig-zag order at every level. If some had , the induction of Theorem 2 (without the sign normalization) shows that its leaf is reached and passes, and line L9 would lower below ; so the result, which is or a later leaf, minimizes , hence the distance.
Theorem 4 (the number of nodes). The number of executions of line L5 satisfies
where is the number of passing nodes. If the basis is -LLL-reduced with and , then , and the total cost is arithmetic operations.
Proof. Every node either passes or fails. By Lemma 4, a failing node at level ends the trial of values below a passing node of level , and each passing node of level has exactly one failing child; at level exactly one node fails, the last one. So the number of failing nodes is at most , and .
A passing node has , by Lemma 3. Given , the number of integers with is at most , as they lie in an open interval of length . Multiplying over the levels bounds the passing nodes at level by , and summing over bounds .
For a -LLL-reduced basis, (consequence (a) on LLL-reduced basis), so each factor is at most , as . The product over is at most , and there are values of .
For the cost: line L1 takes operations; at each node line L5 takes operations, the center at line L7 takes , and lines L9 and L12 take (copying best, testing and the symmetric case, which an implementation can also maintain in by tracking the highest nonzero index). So the search takes .