Documentation

CslibFrontier.Algorithms.LatticeReduction.NearestPlane

Babai's nearest-plane bound #

Let b : Fin n → E be a family in a real inner product space with Gram–Schmidt vectors b*ⱼ = gramSchmidt ℝ b j, and let x ∈ E be a target. Babai's nearest-plane algorithm ([Bab86]; [Reg04], Lecture 3, §1) outputs a point y of the integer span of b whose difference with the target has every Gram–Schmidt coordinate in [-1/2, 1/2]: |⟪b*ⱼ, x - y⟫| ≤ ‖b*ⱼ‖² / 2 for every j (Cslib.Algorithms.LatticeReduction.IsNearestPlane b x y).

If b : Fin (n + 1) → E is δ-reduced with 1/4 < δ ≤ 1, every such y satisfies ‖x - y‖² ≤ (∑_{i ≤ n} αⁱ) ‖x - v‖² for every v in the integer span of b, where α = 4/(4δ - 1) (Cslib.Algorithms.LatticeReduction.IsNearestPlane.norm_sq_le). For δ = 3/4, ∑_{i ≤ n} 2ⁱ < 2ⁿ⁺¹, so ‖x - y‖ ≤ 2^{d/2} ‖x - v‖ for d vectors (Cslib.Algorithms.LatticeReduction.IsNearestPlane.norm_le_sqrt_two_pow_mul), which is Lemma 6 of [Reg04], Lecture 3: y solves the closest vector problem within a factor 2^{d/2}. [Reg04] attributes the factor 2 (2/√3)ᵈ to [Bab86]. For a 1-reduced basis, the general bound at δ = 1 gives ‖x - y‖² ≤ 3 ((4/3)ᵈ - 1) ‖x - v‖² ≤ 4 (4/3)ᵈ⁻¹ ‖x - v‖², i.e. that factor (with exponent d - 1). What is not provided is an executable reduction with δ near 1: Cslib.Algorithms.LatticeReduction.lll fixes δ = 3/4.

The proof is not the inductive one of [Reg04]. Write T_j(z) = ⟪b*ⱼ, z⟫² / ‖b*ⱼ‖², so that ‖z‖² = ‖z - Pz‖² + ∑ⱼ T_j(z) with P z = ∑ⱼ (⟪b*ⱼ, z⟫ / ‖b*ⱼ‖²) b*ⱼ the orthogonal projection onto the span of b. The residual z - Pz is unchanged by lattice translations, so it suffices to compare the sums. The projection is a private helper in this explicit Gram–Schmidt form (rather than Mathlib's starProjection) because the proof works coordinate by coordinate. If k is the largest index where the coefficients of y and v differ, then T_j(x - y) = T_j(x - v) for j > k, T_k(x - v) ≥ ‖b*ₖ‖² / 4, and T_j(x - y) ≤ ‖b*ⱼ‖² / 4 ≤ αᵏ⁻ʲ ‖b*ₖ‖² / 4 for j ≤ k.

The statements hold in any real inner product space and do not assume that b is linearly independent.

Main definitions #

Main results #

References #

The output condition of Babai's nearest-plane algorithm ([Bab86]; [Reg04], Lecture 3, §1): y lies in the integer span of b, and every Gram–Schmidt coordinate of x - y lies in [-1/2, 1/2], stated without division as |⟪b*ⱼ, x - y⟫| ≤ ‖b*ⱼ‖² / 2.

theorem Cslib.Algorithms.LatticeReduction.IsNearestPlane.norm_sq_le {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {n : ℕ} {δ : ℝ} {b : Fin (n + 1) → E} (hb : IsReduced δ b) (hδ : 1 / 4 < δ) (hδ1 : δ ≤ 1) {x y : E} (hy : IsNearestPlane b x y) {v : E} (hv : v ∈ Submodule.span ℤ (Set.range b)) :
‖x - y‖ ^ 2 ≤ (∑ i ∈ Finset.range (n + 1), (4 / (4 * δ - 1)) ^ i) * ‖x - v‖ ^ 2

Babai's nearest-plane bound for a δ-reduced family b : Fin (n + 1) → E with 1/4 < δ ≤ 1: if y satisfies the nearest-plane condition for x, then ‖x - y‖² ≤ (∑_{i ≤ n} αⁱ) ‖x - v‖² for every v in the integer span of b, where α = 4/(4δ - 1). This is the general-δ form of [Reg04], Lecture 3, Lemma 6.

theorem Cslib.Algorithms.LatticeReduction.IsNearestPlane.norm_sq_le_two_pow_mul {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {n : ℕ} {b : Fin n → E} (hb : IsReduced (3 / 4) b) {x y : E} (hy : IsNearestPlane b x y) {v : E} (hv : v ∈ Submodule.span ℤ (Set.range b)) :
‖x - y‖ ^ 2 ≤ 2 ^ n * ‖x - v‖ ^ 2

Babai's nearest-plane bound for δ = 3/4, squared: if b : Fin n → E is 3/4-reduced and y satisfies the nearest-plane condition for x, then ‖x - y‖² ≤ 2ⁿ ‖x - v‖² for every v in the integer span of b.

theorem Cslib.Algorithms.LatticeReduction.IsNearestPlane.norm_le_sqrt_two_pow_mul {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {n : ℕ} {b : Fin n → E} (hb : IsReduced (3 / 4) b) {x y : E} (hy : IsNearestPlane b x y) {v : E} (hv : v ∈ Submodule.span ℤ (Set.range b)) :
‖x - y‖ ≤ √2 ^ n * ‖x - v‖

Babai's nearest-plane bound for δ = 3/4 ([Reg04], Lecture 3, Lemma 6): if b : Fin n → E is 3/4-reduced and y satisfies the nearest-plane condition for x, then ‖x - y‖ ≤ (√2)ⁿ ‖x - v‖ for every v in the integer span of b.