The LLL potential and the bound on exchange steps #
The LLL algorithm ([LLL82], (1.15)–(1.21)) changes a family
b : Fin n → E by two kinds of steps:
- a size-reduction step
bᵢ ← bᵢ - r bⱼwithj < iandr ∈ ℤ(Cslib.Algorithms.LatticeReduction.IsSizeStep); - an exchange step that swaps
bᵢandbᵢ₊₁when the exchange condition (1.5) fails ati(Cslib.Algorithms.LatticeReduction.IsSwapStep).
Both steps preserve the integer span and linear independence. Size reduction leaves all
Gram–Schmidt vectors unchanged, and rounding μᵢⱼ makes |μᵢⱼ| ≤ 1/2
(Cslib.Algorithms.LatticeReduction.abs_gramSchmidtCoeff_round_le). An exchange step changes
the i-th Gram–Schmidt vector to b*ᵢ₊₁ + μᵢ₊₁,ᵢ b*ᵢ
(Cslib.Algorithms.LatticeReduction.gramSchmidt_swap_self, (1.22)).
The termination argument of (1.23) and (1.26) uses the prefix Gram determinants
dₖ = ∏_{j<k} ‖b*ⱼ‖² = det (⟪bᵢ, bⱼ⟫)_{i,j<k}
(Cslib.Algorithms.LatticeReduction.gramPrefixDet,
Cslib.Algorithms.LatticeReduction.gramPrefixDet_eq_det) and the potential
D = ∏_{k<n} dₖ (Cslib.Algorithms.LatticeReduction.potential). Size-reduction steps do not
change D, and an exchange step multiplies it by less than δ
(Cslib.Algorithms.LatticeReduction.IsSwapStep.potential_lt). When all inner products
⟪bᵢ, bⱼ⟫ are integers (Cslib.Algorithms.LatticeReduction.HasIntegralGram, as for bᵢ ∈ ℤᵐ)
and b is linearly independent, each dₖ is a positive integer, so D ≥ 1. If moreover
‖bᵢ‖² ≤ B, then D ≤ B^{n(n-1)/2}. Hence along any run of such steps the number s of
exchange steps satisfies (1/δ)ˢ ≤ B^{n(n-1)/2}
(Cslib.Algorithms.LatticeReduction.inv_pow_swapCount_le), i.e.
s ≤ (n(n-1)/2) log B / log (1/δ) (Cslib.Algorithms.LatticeReduction.swapCount_le).
This bounds exchange steps only. An executable LLL algorithm, the bound on the arithmetic operations and bit sizes of (1.26), and a polynomial-time statement are not formalized here.
Main definitions #
Cslib.Algorithms.LatticeReduction.gramPrefixDet,Cslib.Algorithms.LatticeReduction.potential: the quantitiesdₖandDof (1.23)–(1.24).Cslib.Algorithms.LatticeReduction.HasIntegralGram: integral inner products.Cslib.Algorithms.LatticeReduction.IsSizeStep,Cslib.Algorithms.LatticeReduction.IsSwapStep: the two kinds of LLL steps.Cslib.Algorithms.LatticeReduction.swapCount: the number of exchange steps in a run.
Main results #
Cslib.Algorithms.LatticeReduction.IsSwapStep.potential_lt: an exchange step decreasesDby a factor less thanδ.Cslib.Algorithms.LatticeReduction.one_le_potential,Cslib.Algorithms.LatticeReduction.potential_le:1 ≤ D ≤ B^{n(n-1)/2}.Cslib.Algorithms.LatticeReduction.inv_pow_swapCount_le,Cslib.Algorithms.LatticeReduction.swapCount_le: the bound on the number of exchange steps.
References #
The prefix Gram determinant dₖ = ∏_{j<k} ‖b*ⱼ‖² of [LLL82], (1.24)–(1.25).
The product runs over the indices j < k of Fin n.
The potential D = ∏_{k<n} dₖ of [LLL82], (1.23). The factor d₀ is 1.
For linearly independent b, every dₖ is positive.
For linearly independent b, the potential is positive.
dₖ is the Gram determinant of b₀, …, bₖ₋₁ ([LLL82], (1.24)–(1.25)).
All inner products ⟪bᵢ, bⱼ⟫ are integers, as for a basis of a sublattice of ℤᵐ.
With integral inner products, every dₖ with k ≤ n is an integer.
With integral inner products and linear independence, 1 ≤ dₖ for k ≤ n.
With integral inner products and linear independence, 1 ≤ D
([LLL82], (1.26)).
If ‖bᵢ‖² ≤ B for all i, then dₖ ≤ Bᵏ for k ≤ n.
Integral inner products pass from a generating family b to any pair of vectors in its
integer span Submodule.span ℤ (Set.range b).
Integral inner products pass to families inside the integer span.
A size-reduction step bᵢ ← bᵢ - r bⱼ with j < i and r ∈ ℤ.
A size-reduction step leaves every Gram–Schmidt vector unchanged.
A size-reduction step preserves the integer span.
A size-reduction step leaves the potential unchanged.
A size-reduction step preserves linear independence.
After bᵢ ← bᵢ - r bⱼ with j < i, the coefficients of row i become μᵢₗ - r μⱼₗ
(as in [LLL82], (1.18)).
Subtracting round μᵢⱼ times bⱼ makes |μᵢⱼ| ≤ 1/2, provided b*ⱼ ≠ 0.
Subtracting round μᵢⱼ times bⱼ makes |μᵢⱼ| ≤ 1/2, for linearly independent b.
An exchange step: swap bᵢ and bᵢ₊₁ when condition (1.5) fails at i. This allows any
such i, so it is more general than Case 1 of [LLL82], which swaps only at the
current stage and after (1.18); the potential argument needs only the failure of (1.5).
An exchange step preserves the integer span.
An exchange step preserves linear independence.
Swapping bᵢ and bᵢ₊₁ leaves the Gram–Schmidt vectors before i unchanged.
After swapping bᵢ and bᵢ₊₁, the new i-th Gram–Schmidt vector is
b*ᵢ₊₁ + μ (i+1) i • b*ᵢ ([LLL82], (1.22)).
An exchange step at i makes ‖b*ᵢ‖² smaller than δ times its old value.
dₗ₊₁ = dₗ ‖b*ₗ‖².
Swapping bᵢ and bᵢ₊₁ leaves dₘ unchanged for m ≤ i.
Swapping bᵢ and bᵢ₊₁ leaves dₘ unchanged for i + 1 < m ≤ n.
An exchange step decreases the potential by a factor less than δ
([LLL82], (1.23)).
A size-reduction step preserves integral inner products.
An exchange step preserves integral inner products.
One step of the LLL algorithm: a size-reduction step or an exchange step.
The number of exchange steps among the first T steps of a run b.
Unfolding swapCount by one step.
Bound on the number of exchange steps ([LLL82], proof of (1.26)): along
any run of T size-reduction and exchange steps from a linearly independent b₀ with integral
inner products and ‖b₀ᵢ‖² ≤ B, the number s of exchange steps satisfies
(1/δ)ˢ ≤ B^{n(n-1)/2}.
Logarithmic form: at most (n(n-1)/2) log B / log (1/δ) exchange steps, i.e.
O(n² log B) for fixed δ < 1.