Documentation

LeanPool.ThreeGap.EuclideanFiveDistanceSharpArith

Toward arithmetic sharpness of g₂ ≤ 5: five distances are attained (dynamics-free route) #

nnDistE_count_le_five proves the upper bound (≤ 5 distinct nearest-neighbour distances). Sharpness — that 5 distinct distances are actually attained — is, in Haynes–Marklof, a homogeneous-dynamics (equidistribution) statement. This file develops an elementary, dynamics-free route to a concrete witness, discovered by unfolding the repo's own definitions.

The structural bypass #

nnDistE α N q = inf_{1 ≤ d ≤ max(q, N−q)} deltaN (euclNorm 2) α d (= gapVal (deltaE α) N q, already in the repo). This prefix-minimum is non-increasing in the cutoff D = max(q, N−q), which ranges over [⌈N/2⌉, N] as q ranges over {0,…,N}. It drops exactly at the best-approximation records (whose defects strictly decrease). Hence

number of distinct distances = 1 + #{record denominators in (⌈N/2⌉, N]}.

So sharpness ↔ four record denominators in the doubling window (⌈N/2⌉, N] — the extremal case of the proven growth 2qₙ ≤ q_{n+4} (euclidean_growth_four). No dynamics.

The concrete witness (verified numerically; integer/modular, exactly certifiable) #

α* = (3/29, 8/29), N = 11. Because ℤ² is a product and the norm is Euclidean, deltaN (euclNorm 2) α* d = √(r(3d)² + r(8d)²) / 29, where r(m) is the balanced residue of m mod 29 (in [−14,14]) — coordinatewise, no 2-D lattice search. The squared scaled defects K_d = r(3d)² + r(8d)² for d = 1,…,11 are

[73, 205, 106, 153, 317, 221, 68, 61, 200, 50, 17],

with record minima at d = 1, 7, 8, 10, 11 (values 73 > 68 > 61 > 50 > 17). The records inside (⌈11/2⌉, 11] = (6, 11] are 7, 8, 10, 11 — four — giving the five distinct distances √73, √68, √61, √50, √17 all over 29, realized at q = 5, 4, 3, 1, 0 (cutoffs D = 6,7,8,10,11).

Remaining atoms (each elementary, no research gap) #

five_le_card_image_of_strictAnti_chain below is the foundational R3 step (axiom-clean).

theorem ThreeGap.EuclideanRecords.sq_residue_le (m r a : ℤ) (hm : 0 < m) (h2r : 2 * |r| ≤ m) (hcong : m ∣ a - r) (k : ℤ) :
r ^ 2 ≤ (a - m * k) ^ 2

Per-coordinate integer minimum (R4 crux). If r is the balanced residue of a mod m (m ∣ a − r and 2|r| ≤ m), then r² is the minimum of (a − m·k)² over all integers k — the nearest multiple of m to a is at distance |r|. This is the coordinatewise core of the defect lower bound deltaN α* d ≥ √(r(3d)²+r(8d)²)/29: since ℤ² is a product and the norm Euclidean, the nearest lattice point is coordinatewise nearest.

noncomputable def ThreeGap.EuclideanRecords.astar :
Fin 2 → ℝ

The rational witness α* = (3/29, 8/29).

Equations
Instances For
    theorem ThreeGap.EuclideanRecords.euclNorm_two (x : Fin 2 → ℝ) :
    SimApprox.euclNorm 2 x = √(x 0 ^ 2 + x 1 ^ 2)

    euclNorm 2 of an explicit plane vector is √(x₀² + x₁²).

    theorem ThreeGap.EuclideanRecords.deltaN_eq_of (α : Fin 2 → ℝ) (q : ℤ) (c : ℝ) (hattain : ∃ (p : Fin 2 → ℤ), SimApprox.euclNorm 2 (SimApprox.rem α q p) = c) (hlb : ∀ (p : Fin 2 → ℤ), c ≤ SimApprox.euclNorm 2 (SimApprox.rem α q p)) :

    Defect by attainment + lower bound. If some translate realizes value c and c bounds all translates below, the defect equals c.

    theorem ThreeGap.EuclideanRecords.deltaN_astar (d n₀ n₁ r₀ r₁ : ℤ) (hr0 : 3 * d = r₀ + 29 * n₀) (hr1 : 8 * d = r₁ + 29 * n₁) (hb0 : 2 * |r₀| ≤ 29) (hb1 : 2 * |r₁| ≤ 29) :
    SimApprox.deltaN (SimApprox.euclNorm 2) astar d = √(↑r₀ ^ 2 + ↑r₁ ^ 2) / 29

    The witness defect is coordinatewise-exact (R4b). With α* = (3/29, 8/29), balanced residues 3d ≡ r₀, 8d ≡ r₁ (mod 29) give deltaN α* d = √(r₀² + r₁²)/29. Upper bound at the rounding (n₀,n₁); lower bound coordinatewise via sq_residue_le.

    The eleven witness defects deltaN α* d = √(K_d)/29, d = 1,…,11, with K_d = [73,205,106,153,317,221,68,61,200,50,17] — verified by deltaN_astar at the balanced residues of 3d, 8d mod 29.

    theorem ThreeGap.EuclideanRecords.sqrt_div_lt {a b : ℝ} (ha : 0 ≤ a) (hab : a < b) :
    √a / 29 < √b / 29

    Comparison of two √K/29 defects reduces to comparing the integers K.

    The record chain deltaN α* 1 > deltaN α* 7 > deltaN α* 8 > deltaN α* 10 > deltaN α* 11 (√73 > √68 > √61 > √50 > √17, all over 29) — the four record drops giving five distances.

    theorem ThreeGap.EuclideanRecords.five_le_card_image_of_strictAnti_chain {N : ℕ} (f : ℕ → ℝ) {q₀ q₁ q₂ q₃ q₄ : ℕ} (m₀ : q₀ ∈ Finset.range (N + 1)) (m₁ : q₁ ∈ Finset.range (N + 1)) (m₂ : q₂ ∈ Finset.range (N + 1)) (m₃ : q₃ ∈ Finset.range (N + 1)) (m₄ : q₄ ∈ Finset.range (N + 1)) (h01 : f q₁ < f q₀) (h12 : f q₂ < f q₁) (h23 : f q₃ < f q₂) (h34 : f q₄ < f q₃) :

    Five strictly-decreasing sample values force ≥ 5 distinct images. If f takes five values f q₀ > f q₁ > f q₂ > f q₃ > f q₄ at points of Finset.range (N+1), then the image of Finset.range (N+1) under f has at least five elements. The combinatorial heart of arithmetic sharpness: exhibiting five strictly-decreasing nearest-neighbour distances.

    theorem ThreeGap.EuclideanRecords.nnDistE_eq_inf (α : Fin 2 → ℝ) {q : ℕ} (hq : q ≤ 11) (hne : (Finset.Icc 1 (max q (11 - q))).Nonempty) :
    nnDistE α 11 q = (Finset.Icc 1 (max q (11 - q))).inf' hne fun (n : ℕ) => SimApprox.deltaN (SimApprox.euclNorm 2) α ↑n

    nnDistE as a prefix-minimum of the defect. nnDistE α 11 q is the infimum of deltaN (euclNorm 2) α d over d ∈ [1, max(q, 11−q)] (via the repo's gapVal_eq_nnDistC).

    theorem ThreeGap.EuclideanRecords.inf_lt_inf (f : ℕ → ℝ) {a b : ℕ} (m : ℕ) (hm : m ∈ Finset.Icc 1 b) (hnea : (Finset.Icc 1 a).Nonempty) (hneb : (Finset.Icc 1 b).Nonempty) (hlt : ∀ n ∈ Finset.Icc 1 a, f m < f n) :
    (Finset.Icc 1 b).inf' hneb f < (Finset.Icc 1 a).inf' hnea f

    A strictly larger prefix has a strictly smaller infimum once a new element m beats the whole shorter prefix.

    card ≥ 5 from the four record drops (R4b-finish). If the defect drops strictly below the whole preceding prefix at d = 7, 8, 10, 11, then the five nnDistE α 11 q at q = 5,4,3,1,0 are strictly decreasing, so the image has ≥ 5 elements.

    The witness realizes ≥ 5 distinct distances (R4b complete, rational α*). The orbit of α* = (3/29, 8/29) to N = 11 has at least five distinct Euclidean nearest-neighbour distances — the four record drops of card_ge_five discharged by the dstar defect values.

    R5: rational → irrational upgrade by Lipschitz-openness #

    deltaN · d is |d|-Lipschitz in α. (Both are distances to the lattice; perturbing α by α − β moves d·α by d·(α−β).)

    noncomputable def ThreeGap.EuclideanRecords.aprt (s : ℝ) :
    Fin 2 → ℝ

    The perturbed witness α* + (s, 0) = (3/29 + s, 8/29).

    Equations
    Instances For
      theorem ThreeGap.EuclideanRecords.sqrt_gap (a b : ℝ) (ha : 0 ≤ a) (h1 : a + 1 ≤ b) (hb : b ≤ 317) :
      1 ≤ (√b - √a) * (2 * √317)

      A uniform gap between two distinct square roots in [0, 317]: √b − √a ≥ 1/(2√317), in the clearing-denominators form 1 ≤ (√b − √a)·2√317.

      theorem ThreeGap.EuclideanRecords.gap_ok (c Km Kn s : ℝ) (hs0 : 0 ≤ s) (hc : c ≤ 22) (hKa : 0 ≤ Km) (hK : Km + 1 ≤ Kn) (hKb : Kn ≤ 317) (hsmall : 1276 * s * √317 < 1) :
      29 * (c * s) < √Kn - √Km

      The gap inequality 29·(c·s) < √Kn − √Km holds once s is small (1276·s·√317 < 1), for any coefficient c ≤ 22 and integer gap Km + 1 ≤ Kn ≤ 317.

      theorem ThreeGap.EuclideanRecords.transport (s : ℝ) (hs0 : 0 ≤ s) (m n : ℤ) (Km Kn : ℝ) (hm : SimApprox.deltaN (SimApprox.euclNorm 2) astar m = √Km / 29) (hn : SimApprox.deltaN (SimApprox.euclNorm 2) astar n = √Kn / 29) (hgap : 29 * ((|↑m| + |↑n|) * s) < √Kn - √Km) :

      Transport an inequality from α* to the perturbed witness.

      theorem ThreeGap.EuclideanRecords.Hpair (s : ℝ) (hs0 : 0 ≤ s) (hsmall : 1276 * s * √317 < 1) (m n : ℤ) (Km Kn : ℝ) (hm : SimApprox.deltaN (SimApprox.euclNorm 2) astar m = √Km / 29) (hn : SimApprox.deltaN (SimApprox.euclNorm 2) astar n = √Kn / 29) (hc : |↑m| + |↑n| ≤ 22) (hKa : 0 ≤ Km) (hK : Km + 1 ≤ Kn) (hKb : Kn ≤ 317) :

      Bundles transport + gap_ok for the perturbed witness: a defect comparison transports from α* once s is small.

      theorem ThreeGap.EuclideanRecords.H1_aprt (s : ℝ) (hs0 : 0 ≤ s) (hsmall : 1276 * s * √317 < 1) (n : ℕ) :
      theorem ThreeGap.EuclideanRecords.H2_aprt (s : ℝ) (hs0 : 0 ≤ s) (hsmall : 1276 * s * √317 < 1) (n : ℕ) :
      theorem ThreeGap.EuclideanRecords.H3_aprt (s : ℝ) (hs0 : 0 ≤ s) (hsmall : 1276 * s * √317 < 1) (n : ℕ) :
      theorem ThreeGap.EuclideanRecords.H4_aprt (s : ℝ) (hs0 : 0 ≤ s) (hsmall : 1276 * s * √317 < 1) (n : ℕ) :
      theorem ThreeGap.EuclideanRecords.sharp_attained :
      ∃ (α : Fin 2 → ℝ), (∃ (k : Fin 2), Irrational (α k)) ∧ ∃ (N : ℕ), 2 ≤ N ∧ (Finset.image (nnDistE α N) (Finset.range (N + 1))).card = 5

      Arithmetic sharpness of g₂ ≤ 5 (R5 / final). There is a Kronecker vector α with an irrational coordinate and an N ≥ 2 for which the orbit {0, α, …, Nα} on 𝕋² realizes exactly five distinct Euclidean nearest-neighbour distances — so the bound nnDistE_count_le_five is sharp. The witness is α = (3/29 + s, 8/29) for a small irrational s: card ≥ 5 transports from the rational α* (Lipschitz), card ≤ 5 is the five-distance theorem itself.