Documentation

LeanPool.DistinctDistances.AnnularClosePairCounting

Finite close-pair counting in a planar annulus #

Formalizes the finite counting section of docs/results/annulus-atomic-limit-2026-10-13.md.

GP4 bounds each distance degree by three. GP3 separately bounds the number of apexes that can charge a fixed distinct base pair by two. Thresholds are squared distances. No measure-limit classification or quantitative distance improvement is asserted here.

theorem Esgk.point_dist_sq_coordinates (p q : Point) :
dist p q ^ 2 = (p.ofLp 0 - q.ofLp 0) ^ 2 + (p.ofLp 1 - q.ofLp 1) ^ 2

Squared Euclidean distance written in the two real coordinates.

theorem Esgk.point_norm_sq_coordinates (p : Point) :
‖p‖ ^ 2 = p.ofLp 0 ^ 2 + p.ofLp 1 ^ 2

Squared norm written in the two real coordinates.

theorem Esgk.exists_apex_frame (p : Point) (q : Fin 3 → Point) (ha0 : ‖p‖ ≠ 0) :
∃ (u : Fin 3 → ℝ) (v : Fin 3 → ℝ), (∀ (i : Fin 3), u i ^ 2 + v i ^ 2 = ‖q i‖ ^ 2) ∧ (∀ (i j : Fin 3), (u i - u j) ^ 2 + (v i - v j) ^ 2 = dist (q i) (q j) ^ 2) ∧ ∀ (i : Fin 3), (u i - ‖p‖) ^ 2 + v i ^ 2 = dist p (q i) ^ 2

The orthonormal frame with the apex p at (‖p‖, 0): coordinates u, v of three points, with their squared norms, mutual squared distances, and squared distances to the apex.

theorem Esgk.annular_equidistant_triple_close_pair (p : Point) (q : Fin 3 → Point) {x : ℝ} (hx : 0 ≤ x) (hx34 : x ≤ 3 / 4) (hp : 1 - x ≤ ‖p‖ ^ 2) (hlo : ∀ (i : Fin 3), 1 - x ≤ ‖q i‖ ^ 2) (hhi : ∀ (i : Fin 3), ‖q i‖ ^ 2 ≤ 1) (heq : ∀ (i j : Fin 3), dist p (q i) = dist p (q j)) :
∃ (i : Fin 3) (j : Fin 3), i ≠ j ∧ dist (q i) (q j) ^ 2 ≤ 4 * x

The merged coordinate lemma in an arbitrary planar frame.

theorem Esgk.scaled_annular_equidistant_triple_close_pair (c p : Point) (q : Fin 3 → Point) {ρ x : ℝ} (hρ : 0 < ρ) (hx : 0 ≤ x) (hx34 : x ≤ 3 / 4) (hp : ρ ^ 2 * (1 - x) ≤ dist p c ^ 2) (hlo : ∀ (i : Fin 3), ρ ^ 2 * (1 - x) ≤ dist (q i) c ^ 2) (hhi : ∀ (i : Fin 3), dist (q i) c ^ 2 ≤ ρ ^ 2) (heq : ∀ (i j : Fin 3), dist p (q i) = dist p (q j)) :
∃ (i : Fin 3) (j : Fin 3), i ≠ j ∧ dist (q i) (q j) ^ 2 ≤ 4 * x * ρ ^ 2

Translation and positive scaling of the arbitrary-frame close-pair lemma. The original-coordinate squared threshold is 4*x*ρ².

noncomputable def Esgk.SaturatedDistanceIncidences {n : ℕ} (p : Config n) :

Saturated apex/palette incidences; the radius is a distance, not its square.

Equations
Instances For
    theorem Esgk.saturated_incidence_increasing_pair_of_triple {n : ℕ} {p : Config n} {t : ℝ} {ir : Fin n × ℝ} (hir : ir ∈ SaturatedDistanceIncidences p) (htriple : ∀ (f : Fin 3 → Fin n), (∀ (i : Fin 3), dist (p ir.1) (p (f i)) = ir.2) → ∃ (i : Fin 3) (j : Fin 3), i ≠ j ∧ dist (p (f i)) (p (f j)) ^ 2 ≤ t) :
    ∃ (a : Fin n) (b : Fin n), a ∈ DistanceOutNeighborsAtValue p ir.1 ir.2 ∧ b ∈ DistanceOutNeighborsAtValue p ir.1 ir.2 ∧ a < b ∧ dist (p a) (p b) ^ 2 ≤ t

    A saturated incidence carries an increasing pair below t whenever every indexed triple on its circle has a pair below t.

    noncomputable def Esgk.OrderedClosePairs {n : ℕ} (p : Config n) (t : ℝ) :

    Ordered distinct pairs below an inclusive squared-distance threshold.

    Equations
    Instances For
      noncomputable def Esgk.IncreasingClosePairs {n : ℕ} (p : Config n) (t : ℝ) :

      Each unordered close pair is represented once, with increasing indices.

      Equations
      Instances For

        The ordered count is twice the increasing-index count, including empty cases.

        theorem Esgk.saturatedDistanceIncidences_lower_bound {n : ℕ} {p : Config n} (hn : 0 < n) (hcap : ∀ (i : Fin n) (r : ℝ), (DistanceOutNeighborsAtValue p i r).card ≤ 3) :

        Degree cap alone forces many saturated incidences. The real subtraction keeps the conclusion valid when n-1-2D is negative.

        theorem Esgk.saturated_incidence_has_close_pair {n : ℕ} {p : Config n} {x : ℝ} (hx : 0 ≤ x) (hx34 : x ≤ 3 / 4) (hlo : ∀ (i : Fin n), 1 - x ≤ ‖p i‖ ^ 2) (hhi : ∀ (i : Fin n), ‖p i‖ ^ 2 ≤ 1) {ir : Fin n × ℝ} (hir : ir ∈ SaturatedDistanceIncidences p) :
        ∃ (a : Fin n) (b : Fin n), a ∈ DistanceOutNeighborsAtValue p ir.1 ir.2 ∧ b ∈ DistanceOutNeighborsAtValue p ir.1 ir.2 ∧ a < b ∧ dist (p a) (p b) ^ 2 ≤ 4 * x

        A saturated incidence contains a distinct close pair in the normalized annulus.

        Charging one increasing-index pair per saturated incidence loses at most two apexes per pair. GP3 is the only geometric assumption in this count.

        theorem Esgk.annular_close_pairs_lower_bound {n : ℕ} {p : Config n} (hp : Function.Injective p) (hgp3 : EuclideanGeometry.NonTrilinear ↑p.toFinset) (hgp4 : ∀ T ⊆ p.toFinset, T.card = 4 → ¬EuclideanGeometry.Cospherical ↑T) (hn : 0 < n) {x : ℝ} (hx : 0 ≤ x) (hx34 : x ≤ 3 / 4) (hlo : ∀ (i : Fin n), 1 - x ≤ ‖p i‖ ^ 2) (hhi : ∀ (i : Fin n), ‖p i‖ ^ 2 ≤ 1) :
        ↑n * (↑n - 1 - 2 * ↑(NumDistances p)) ≤ ↑(OrderedClosePairs p (4 * x)).card

        Complete finite normalized close-pair bridge, with GP3 and GP4 explicit.

        theorem Esgk.saturated_incidence_has_close_pair_of_scaled_annulus {n : ℕ} {p : Config n} (c : Point) {ρ x : ℝ} (hρ : 0 < ρ) (hx : 0 ≤ x) (hx34 : x ≤ 3 / 4) (hlo : ∀ (i : Fin n), ρ ^ 2 * (1 - x) ≤ dist (p i) c ^ 2) (hhi : ∀ (i : Fin n), dist (p i) c ^ 2 ≤ ρ ^ 2) {ir : Fin n × ℝ} (hir : ir ∈ SaturatedDistanceIncidences p) :
        ∃ (a : Fin n) (b : Fin n), a ∈ DistanceOutNeighborsAtValue p ir.1 ir.2 ∧ b ∈ DistanceOutNeighborsAtValue p ir.1 ir.2 ∧ a < b ∧ dist (p a) (p b) ^ 2 ≤ 4 * x * ρ ^ 2

        Scaled-annulus incidence geometry, charged in the original configuration.

        theorem Esgk.thin_annulus_close_pairs_lower_bound {n : ℕ} {p : Config n} (hp : Function.Injective p) (hgp3 : EuclideanGeometry.NonTrilinear ↑p.toFinset) (hgp4 : ∀ T ⊆ p.toFinset, T.card = 4 → ¬EuclideanGeometry.Cospherical ↑T) (hn : 2 ≤ n) {δ : ℝ} (hD : ↑(NumDistances p) ≤ (1 / 3 + δ) * ↑n) (hx34 : 12 * δ + 4 / ↑n ≤ 3 / 4) :
        ↑n * (↑n - 1 - 2 * ↑(NumDistances p)) ≤ ↑(OrderedClosePairs p (4 * (12 * δ + 4 / ↑n) * distanceAnnulusRadius p ^ 2)).card

        The complete finite bridge from the merged annulus theorem and few distinct distances. GP3 is explicit and separate from raw GP4.

        theorem Esgk.thin_annulus_close_pair_density {n : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hn : 2 ≤ n) {δ : ℝ} (hD : ↑(NumDistances p) ≤ (1 / 3 + δ) * ↑n) (hx34 : 12 * δ + 4 / ↑n ≤ 3 / 4) :
        (1 / 3 - 2 * δ - 1 / ↑n) * ↑n ^ 2 ≤ ↑(OrderedClosePairs p (4 * (12 * δ + 4 / ↑n) * distanceAnnulusRadius p ^ 2)).card

        Density form without division: the finite interface for a weak-limit consumer. The ordered count excludes the diagonal and uses squared distance.