These are the human proofs of Seysen reduction, at full length.
Seysen's algorithm returns a Seysen-reduced basis of the same lattice after at most S_0 det(G) updates full
This proof shows: correctness, termination, time.worst.
Setting. The input is a list of linearly independent rows b1,…,bn∈Qm, the matrix B with these rows, G=BBT, H=G−1 and D=HB with rows d1,…,dn. We write Eji for the matrix with a single 1 in row j and column i, and ⌈x⌋=⌊x+1/2⌋. The line numbers refer to the main block of the page.
Lemma 1 (the dual basis).DBT=I, that is ⟨dk,bl⟩=1 if k=l and 0 otherwise, and DDT=H. The rows of D are the only vectors in the row space of B with the first property.
Proof.DBT=HBBT=HG=I and DDT=HGH=H. If d lies in the row space, d=yB, and ⟨d,bl⟩=(yG)l; so prescribing these values fixes y, as G is invertible. □
Lemma 2 (one update). Let i=j, λ∈Z, and T=I+λEji, so that B′=TB replaces bj by bj+λbi. Then B′ is a basis of the same lattice, its Gram matrix is G′=TGTT, its dual basis is D′=T−TD, which replaces di by di−λdj, and the dual Gram matrix is H′=T−THT−1. Line L9 computes G′ and H′.
Proof.T is an integer matrix with detT=1 and integer inverse T−1=I−λEji (as Eji2=0), so B and B′ generate the same lattice. G′=TBBTTT. The rows of T−TD lie in the row space and satisfy T−TDBTTT=T−TTT=I, so by Lemma 1 they are the dual basis of B′; T−T=I−λEij subtracts λ times row j from row i. Multiplying G on the left by T adds λ times row i to row j, and on the right by TT adds λ times column i to column j; likewise for H with −λ and the roles of i and j exchanged. These are the four operations of line L9. □
Lemma 3 (the change of S). With S=∑kGkkHkk, the update of Lemma 2 changes S by
Proof. Only bj and di change, so only the terms k=i and k=j change, and in them ∥bi∥2=Gii and ∥dj∥2=Hjj stay fixed. Now ∥bj+λbi∥2=Gjj+2λGij+λ2Gii and ∥di−λdj∥2=Hii−2λHij+λ2Hjj. Hence
Lemma 4 (the best integer). Let f(λ)=λ2−2λλ∗=(λ−λ∗)2−(λ∗)2. If ∣λ∗∣≤1/2 then f(λ)≥0 for all integers λ. If ∣λ∗∣>1/2 then f(⌈λ∗⌋)<0, and ⌈λ∗⌋ minimizes f over the integers.
Proof.f(λ)<0 means ∣λ−λ∗∣<∣λ∗∣. If ∣λ∗∣≤1/2, every integer λ=0 has ∣λ−λ∗∣≥∣λ∣−∣λ∗∣≥1−1/2≥∣λ∗∣, and f(0)=0. If ∣λ∗∣>1/2, then ∣⌈λ∗⌋−λ∗∣≤1/2<∣λ∗∣. The nearest integer to λ∗ minimizes (λ−λ∗)2. □
Theorem 1 (correctness). If the algorithm returns, the output is a basis of the input lattice and it is Seysen-reduced: for all i=j and all integers λ, replacing bj by bj+λbi does not lower S. Equivalently ∣λij∗∣≤1/2 for all ordered pairs.
Proof. By Lemma 2, by induction over the updates, the rows stay a basis of L and G, H are the Gram matrices of the current basis and its dual. Line L7 tests f(⌈λ∗⌋)<0, which by Lemma 3 is ΔS<0, as GiiHjj>0. The algorithm returns after a pass in which no test succeeds, and during that pass the matrices did not change, so at the end every pair has f(⌈λij∗⌋)≥0. By Lemma 4 this gives ∣λij∗∣≤1/2, and then f(λ)≥0 for all integers λ, that is ΔS≥0 for every update. □
Theorem 2 (termination and the number of updates). Let the input rows be integer vectors, S0 the initial measure and Send the final one. Then the number of updates satisfies K≤(S0−Send)det(G)≤S0det(G)≤nXn, where X bounds the squared lengths of the input rows. For a rational input, scaling all rows by a common denominator changes neither the tests nor S, so the same bound holds for the scaled basis.
Proof.detG′=det(T)2detG=detG, so Δ:=detG is a fixed positive integer. Since H=adj(G)/Δ, we have SΔ=∑kGkkadj(G)kk, an integer, at every moment, as G stays an integer matrix by Lemma 2. Each update lowers S strictly (Lemma 3 and line L7), so it lowers SΔ by at least 1; hence K≤(S0−Send)Δ. Finally adj(G)kk is the Gram determinant of the rows other than bk, at most ∏l=kGll≤Xn−1 by Hadamard's inequality, and Gkk≤X, so S0Δ≤nXn. Scaling the rows by q multiplies G by q2 and H by q−2, which leaves λ∗ and S unchanged. □
Theorem 3 (cost). The algorithm takes O(n3+n2m+(n2+m)K) arithmetic operations. For an integer input, every number it stores is an integer or a rational with denominator dividing detG, of O(nlogX) digits, assuming X≥2.
Proof. Line L1 computes G with O(n2m) operations and H by Gauss-Jordan elimination with O(n3). A pass runs line L5 to L7 for n(n−1) pairs at O(1) each. An update costs O(m) at line L8 and O(n) at line L9. Every pass but the last makes at least one update, so there are at most K+1 passes, and the total is O(n2m+n3+n2(K+1)+(n+m)K).
For the sizes: at every moment SΔ≤S0Δ≤nXn. Both Gkk and adj(G)kk=ΔHkk are positive integers (Gram determinants of integer vectors), and their product is at most SΔ, so each is at most nXn. By Cauchy-Schwarz for the positive definite matrices G and adj(G), ∣Gkl∣≤GkkGll and the same for adj(G). The basis entries satisfy ∣bjt∣≤∥bj∥≤(nXn)1/2. So all these integers have O(logn+nlogX)=O(nlogX) digits, and the entries of H are such integers over Δ≤Xn. The values λ∗ and λ are computed from them, and ∣λ∣≤∣λ∗∣+1/2 is bounded by the same sizes. The intermediate values of the Gauss-Jordan elimination are ratios of minors of G, of the same size by Hadamard's inequality. □