Proofs: Fincke-Pohst enumeration
These are the human proofs of Fincke-Pohst enumeration, at full length.
Fincke-Pohst enumeration lists exactly the lattice vectors in the ball, and its search tree has at most the product of the Gram-Schmidt ratios as nodes per level full
This proof shows: correctness, termination, time.worst.
Setting. The input is linearly independent rows , a target and a rational . We write for the Gram-Schmidt vectors, , , , and , the component of orthogonal to the span. Indices are here; the implementation counts from 0. For an integer vector define, for ,
Note that and depend only on (and only on ).
Lemma 1 (the distance splits). For every , .
Proof. Since ,
so . The vectors are pairwise orthogonal, and Pythagoras gives the claim.
Lemma 2 (pruning is safe). . So if , then for every .
Proof. Each step adds a nonnegative term .
Call a tuple of integers feasible if , and call it a node of level . By Lemma 2, every prefix , , of a feasible tuple is feasible.
Lemma 3 (the candidates for one coordinate form an interval). Fix a feasible , or the empty tuple when and . The integers that make feasible are exactly the integers in the interval , and there are at most of them.
Proof. Feasibility means , and does not depend on . An interval of length contains at most that many plus one integers.
Lemma 4 (the loop is a depth-first traversal). The loop at lines L4 to L10 visits the feasible tuples in the following order. When it enters level with new set (line L5), it computes and sets to the smallest feasible value, using the exact search for the smallest integer with . Line L6 moves to the next integer. Line L7 leaves level as soon as leaves the interval of Lemma 3, and lines L8 to L10 record and descend, or output at level 1.
Proof. By Lemma 3 the feasible form a run of consecutive integers, so starting at the smallest and incrementing until the first infeasible value visits exactly that run, in increasing order. Returning to level with new cleared resumes the run at that level with the next value. Each visit of a feasible at level descends to level with new set, which recomputes from the current . Hence, by induction from level down, every feasible tuple is visited exactly once, prefixes in lexicographic order of .
Correctness. If , no lattice vector is within the radius by Lemma 1 and Lemma 2, and line L2 correctly returns the empty list. Otherwise, by Lemma 4, line L9 outputs exactly the feasible tuples of level 1, each once and in lexicographic order of , and by Lemma 1 these are exactly the with .
Lemma 5 (the size of the tree). The number of nodes of level is at most .
Proof. By induction on from down. Every node of level extends a node of level , its prefix, and by Lemma 3 a node of level has at most extensions.
Termination and cost. Let be the total number of nodes. Every pass through the loop either accepts a value at line L8, which creates a node, or goes up at line L7. Going up from level happens once for each node of level , and once for the root when , so the loop runs at most times and terminates. Computing costs arithmetic operations, the search for the first integer of the interval costs operations plus one integer square root, and the other lines cost . Gram-Schmidt at line L1 costs . The total is arithmetic operations, with by Lemma 5.
Corollary (LLL preprocessing). If the basis is LLL-reduced with and , then , so and .
Proof. The Lovász condition with size reduction gives . Insert into Lemma 5.
Theorem. On every valid input the algorithm outputs exactly the integer vectors with , each once, in lexicographic order of , and it uses arithmetic operations, where the number of tree nodes satisfies the bound of Lemma 5.