Validity of the executable LLLState against its Gram-Schmidt
interpretation: ofBasis_valid, the scaled-coefficient identification
lllState_ν_eq_coeffs, and the integer Lovász test as the rational
isLLLReduced Lovász clause.
The canonical LLLState constructor packages the executable Gram-Schmidt
data. Lives on the Mathlib side because the diagonal Gram-determinant
identification (gramDetVec_eq_gramDet) consumes a StepWitness b, which is
supplied by StepWitness.ofGram.
Mathlib-side correspondence from the executable LLL state scaled-coefficient certificate to the rational Gram-Schmidt coefficient relation.
Integer Lovász check ↔ rational Lovász condition at pair (k - 1, k).
Hex.Internal.lllLoop dispatches on the integer comparison
δ.den * (d[k+1] * d[k-1] + ν[k][k-1]²) ≥ δ.num * d[k]²
while Hex.isLLLReduced quantifies the rational Lovász condition
δ * ‖b*[i]‖² ≤ ‖b*[i+1]‖² + μ[i+1][i]² · ‖b*[i]‖²
over every adjacent pair (i, i+1). Under s.Valid and s.b.independent,
the two formulations agree at pair (k - 1, k): the integer scaled
Gram-Schmidt data carried by s faithfully encodes the rational Lovász
predicate at that position. This bridges the loop's executable check to the
specification side of isLLLReduced so the loop-invariant proof can read off
"the loop advances ⇒ Lovász holds at this pair."