Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(1.23), p. 522 — along any run from k = 2, case 2 is passed at most n − 1 more times than case 1

Proved
LLLFactor.Reduction.case2_count_le

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

algorithmlattice-basis-reductionlllp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1termination

Let n≥1n\ge1n≥1 and b1,…,bn∈Rnb_1,\dots,b_n\in\mathbb R^nb1​,…,bn​∈Rn. Let s0,s1,…,sTs_0,s_1,\dots,s_Ts0​,s1​,…,sT​ be a run of the algorithm (1.15) started at s0=(b,2)s_0=(b,2)s0​=(b,2), i.e. each st+1s_{t+1}st+1​ arises from sts_tst​ by one step, for t<Tt<Tt<T. Let c1c_1c1​ and c2c_2c2​ be the numbers of t<Tt<Tt<T at which the step is of case 1, resp. case 2. Then

c2 ≤ c1+(n−1).c_2\ \le\ c_1+(n-1).c2​ ≤ c1​+(n−1).

This is the counting argument of (1.23): case 1 lowers kkk by 111, case 2 raises it by 111, kkk starts at 222 and never exceeds n+1n+1n+1. Combined with the bound on the number of case-1 steps, it bounds the length of every run.

Preamble
import Mathlib
import Definitions.Def_LLLFactor_Reduction_Algorithm
Formal statement
namespace LLLFactor.Reduction

open Classical in
theorem case2_count_le {n : ℕ} (hn : 0 < n) (b : Fin n → LLLFactor.RedBasis.Vec n)
    (s : ℕ → State n) (T : ℕ) (hs0 : s 0 = (b, 2))
    (hrun : ∀ t < T, Step (s t) (s (t + 1))) :
    ((Finset.range T).filter (fun t => Case2 (s t) (s (t + 1)))).card ≤
      ((Finset.range T).filter (fun t => Case1 (s t) (s (t + 1)))).card + (n - 1) := by sorry

end LLLFactor.Reduction
Source
Lenstra, Lenstra, Lovász, Factoring polynomials with rational coefficients, Math. Ann. 261 (1982), p. 522, (1.23)
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