Documentation

LeanPool.DistinctDistances.FarPairApexCount

Apex deficiency of far pairs #

Formalizes the apex count of the Lean route in docs/results/explicit-constant-gain-2026-10-18.md. Let s ≥ 0 be a distance threshold such that no distance lies in (s, 2s] and no four points are pairwise farther than s. Under no three collinear points and the degree cap three, the number of ordered pairs farther than s is at most 3 n Q, where Q = 3D - n + 1.

noncomputable def Esgk.FarOrderedPairs {n : ℕ} (p : Config n) (s : ℝ) :

Ordered pairs of distinct indices at distance greater than s.

Equations
Instances For
    theorem Esgk.three_mul_card_filter_product_le_of_triangleFree {α : Type u_1} (S : Finset α) (R : α → α → Prop) [DecidableRel R] (hirr : ∀ (a : α), ¬R a a) (hsymm : ∀ (a b : α), R a b → R b a) (hS : S.card ≤ 3) (htri : ∀ a ∈ S, ∀ b ∈ S, ∀ c ∈ S, R a b → R b c → R a c → False) :
    3 * {ab ∈ S ×ˢ S | R ab.1 ab.2}.card ≤ 4 * S.card

    A triangle-free symmetric irreflexive relation on at most three elements has at most four ordered edges per three elements.

    The palette size bounds the ordered witness total from below: d (d - 1) ≥ 4 d - 6 for every local distance degree d.

    theorem Esgk.dist_mem_orderedDistanceValues_of_ne {n : ℕ} {p : Config n} {a b : Fin n} (h : a ≠ b) :

    The distance between distinct indices is an ordered distance value.

    theorem Esgk.three_mul_apexPairs_card_le {n : ℕ} {p : Config n} (hcap : ∀ (i : Fin n) (r : ℝ), (DistanceOutNeighborsAtValue p i r).card ≤ 3) (R : Fin n → Fin n → Prop) [DecidableRel R] (hirr : ∀ (a : Fin n), ¬R a a) (hsymm : ∀ (a b : Fin n), R a b → R b a) (G : ℝ → Prop) [DecidablePred G] (hG0 : ¬G 0) (hrad : ∀ (z a b : Fin n), R a b → dist (p z) (p a) = dist (p z) (p b) → G (dist (p z) (p a))) (htri : ∀ (z a b c : Fin n), dist (p z) (p a) = dist (p z) (p b) → dist (p z) (p a) = dist (p z) (p c) → G (dist (p z) (p a)) → R a b → R b c → R a c → False) (z : Fin n) :
    3 * {ab ∈ Finset.univ.offDiag | R ab.1 ab.2 ∧ dist (p z) (p ab.1) = dist (p z) (p ab.2)}.card ≤ 4 * {q : Fin n | G (dist (p z) (p q))}.card

    Per-apex count with a radius predicate. Let R be a symmetric irreflexive relation such that every apex z of an R-pair sees it at a radius in G, and no circle about z of such a radius carries an R-triangle. With the degree cap three, three times the number of ordered R-pairs equidistant from z is at most four times the number of points q with G |zq|.

    theorem Esgk.farOrderedPairs_card_eq_sum {n : ℕ} {p : Config n} {s : ℝ} (hs : 0 ≤ s) :
    (FarOrderedPairs p s).card = ∑ a : Fin n, {q : Fin n | s < dist (p a) (p q)}.card

    The far ordered pairs are counted row by row.

    theorem Esgk.farOrderedPairs_card_le {n : ℕ} {p : Config n} (hp : Function.Injective p) (hgp3 : EuclideanGeometry.NonTrilinear ↑p.toFinset) (hcap : ∀ (i : Fin n) (r : ℝ), (DistanceOutNeighborsAtValue p i r).card ≤ 3) {s : ℝ} (hs : 0 ≤ s) (hgap : ∀ (a b : Fin n), dist (p a) (p b) ≤ 2 * s → dist (p a) (p b) ≤ s) (hfour : ∀ (a b c d : Fin n), s < dist (p a) (p b) → s < dist (p a) (p c) → s < dist (p a) (p d) → s < dist (p b) (p c) → s < dist (p b) (p d) → s < dist (p c) (p d) → False) :
    ↑(FarOrderedPairs p s).card ≤ 3 * ↑n * (3 * ↑(NumDistancesOrdered p) - ↑n + 1)

    Far-pair apex count. A far pair has no apex within distance s of its ends, so the at most three points on a circle about an apex contain no far triangle; hence each apex sees at most 4/3 far pairs per far point.