Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of (1.11) and (1.13): last nonzero coordinate

Proved
LLLFactor.RedBasis.norm_sq_ge_gs_of_last

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

latticelattice-basis-reductionlllp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let b1,…,bnb_1,\ldots,b_nb1​,…,bn​ be linearly independent vectors in Rn\mathbb R^nRn (n≥1n\ge1n≥1) with Gram–Schmidt vectors bi∗b_i^*bi∗​, and let x=∑l=1nrlblx=\sum_{l=1}^n r_lb_lx=∑l=1n​rl​bl​ with integers rlr_lrl​. If iii is the largest index with ri≠0r_i\neq0ri​=0, then

∣x∣2 ≥ ∣bi∗∣2.|x|^2\ \ge\ |b_i^*|^2 .∣x∣2 ≥ ∣bi∗​∣2.

Indeed, writing x=∑lrl′bl∗x=\sum_l r_l'b_l^*x=∑l​rl′​bl∗​, the coefficient ri′r_i'ri′​ equals the integer ri≠0r_i\ne0ri​=0, so ∣x∣2≥ri′2∣bi∗∣2≥∣bi∗∣2|x|^2\ge r_i'^2|b_i^*|^2\ge|b_i^*|^2∣x∣2≥ri′2​∣bi∗​∣2≥∣bi∗​∣2. This is the step of the proof of Proposition (1.11) that the proof of (1.12) reuses as (1.13): a nonzero lattice vector is at least as long as the Gram–Schmidt vector at its last nonzero coordinate.

Formalization Note "iii is the largest index with ri≠0r_i\ne0ri​=0" is stated as ri≠0r_i\ne0ri​=0 and rl=0r_l=0rl​=0 for every l>il>il>i. Lean indexes the basis by {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, so the paper's bib_ibi​ is Lean's b ⟨i-1, _⟩; a paper exponent 2i−12^{i-1}2i−1 at index iii becomes 2 ^ (i : ℕ) at the Lean index. Reducedness is not used by this step and is not assumed.

Preamble
import Mathlib
import Definitions.Def_LLLFactor_RedBasis_Setting
Formal statement
namespace LLLFactor.RedBasis

theorem norm_sq_ge_gs_of_last {n : ℕ} (hn : 0 < n) (b : Fin n → Vec n)
  (hb : LinearIndependent ℝ b) (r : Fin n → ℤ) (i : Fin n)
  (hri : r i ≠ 0) (hlast : ∀ l, i < l → r l = 0) :
  ‖gs b i‖ ^ 2 ≤ ‖∑ l : Fin n, ((r l : ℤ) : ℝ) • b l‖ ^ 2 := by sorry
end LLLFactor.RedBasis
Source
Lenstra, Lenstra, Lovász, Factoring polynomials with rational coefficients, Math. Ann. 261 (1982), p. 518, proof of (1.11), reused at (1.13); DOI: https://doi.org/10.1007/BF01457454
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me