Lemma 3.2 — the first non-orthogonal decides the sign of
ProvedDiophantinePreprocessing.FrankTardos.sign_first_nonzeroLet be an integer and let where , the are integral, and the decomposition satisfies condition (iii) with . Let be an integer vector with
Then:
- if is the smallest index with (that is, for and ), then
- if for every , then .
Because the coefficients decrease fast, the vectors do not interact when is tested against a small integer vector : the sign is decided by the first term that sees. This is what lets the preprocessing algorithm replace the real coefficients by integer powers of a single number.
Formalization Note The sign function takes values (SignType.sign), so equality of signs includes the case of zero. is stated explicitly (for no satisfies the hypothesis). No bound on and no is assumed, as on the page.
import Mathlib import Definitions.Def_DiophantinePreprocessing_FrankTardos_CondIII
namespace DiophantinePreprocessing.FrankTardos
/-- Frank–Tardos, Lemma 3.2 (pp. 54–55): for a decomposition `w = ∑_{i=1}^k λ_i v_i` with
`λ_i > 0`, integer `v_i` and condition (iii), and an integer `b` with `‖b‖₁ ≤ N - 1`,
`sign (b · w) = sign (b · v_j)` for the smallest `j` with `b · v_j ≠ 0`, and `b · w = 0`
if `b · v_i = 0` for every `i`. -/
theorem sign_first_nonzero (n N k : ℕ) (hN : 1 ≤ N) (w : Fin n → ℝ)
(v : ℕ → Fin n → ℤ) (lam : ℕ → ℝ)
(hlam : ∀ i ∈ Finset.Icc 1 k, 0 < lam i)
(hw : ∀ l, w l = ∑ i ∈ Finset.Icc 1 k, lam i * (v i l : ℝ))
(hIII : CondIII N k lam v)
(b : Fin n → ℤ) (hb : ∑ l, |b l| ≤ (N : ℤ) - 1) :
(∀ j ∈ Finset.Icc 1 k,
(∀ i ∈ Finset.Ico 1 j, ∑ l, b l * v i l = 0) → ∑ l, b l * v j l ≠ 0 →
SignType.sign (∑ l, (b l : ℝ) * w l) = SignType.sign ((∑ l, b l * v j l : ℤ) : ℝ)) ∧
((∀ i ∈ Finset.Icc 1 k, ∑ l, b l * v i l = 0) → ∑ l, (b l : ℝ) * w l = 0) := by sorry
end DiophantinePreprocessing.FrankTardos
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
This is a theorem. It uses the integer sup-norm (a natural number, when ). Here takes values in , and .
Hypotheses. Let be natural numbers with . Let , let be integer vectors in , and let be real numbers. Assume:
- for ;
- for every coordinate ;
- for every with :
Nothing here requires .
Let satisfy
This inequality is computed in the integers.
Conclusion. Write , which is an integer, and , which is real. Two things hold:
- For every with : if for all with , and , then
- If for every with , then .
Degenerate cases.
- : the bound forces . Every is then , so part 1 is vacuous and part 2 is immediate.
- : the hypotheses force . Part 1 is vacuous and part 2 says .
- : has no coordinates, so all dot products are . The CondIII hypothesis can then only hold if .
- Unsatisfiable hypotheses: if the CondIII inequalities cannot hold together with , the theorem is vacuous for those data. For example, with makes impossible.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.