Documentation

LeanPool.DistinctDistances.EntropyCensus

Entropy-census formalization checkpoints #

This module packages the finite, data-driven facts that are stable enough to formalize after the entropy-census experiments.

The results here do not improve the ESGK bound. They formalize reusable bookkeeping:

Collision-energy and cap-only bookkeeping #

Distance energy is the generic multiplicity collision energy of the ordered distance multiplicities.

theorem Esgk.multiplicityEnergy_le_cap_mul_mass {α : Type u_1} (s : Finset α) (m : α → ℕ) (B : ℕ) (hcap : ∀ a ∈ s, m a ≤ B) :

A pointwise multiplicity cap gives the cap-only second-moment bound sum m_i^2 <= B * sum m_i. This is the formal histogram-only no-go: without additional geometric co-realizability information, the second moment is controlled only by the cap times total mass.

theorem Esgk.all_eq_cap_of_sum_sq_eq_cap_mul_sum {α : Type u_1} (s : Finset α) (m : α → ℕ) (cap : ℕ) (hpos : ∀ a ∈ s, 0 < m a) (hcap : ∀ a ∈ s, m a ≤ cap) (heq : ∑ a ∈ s, m a ^ 2 = cap * ∑ a ∈ s, m a) (a : α) :
a ∈ s → m a = cap

Equality case of the cap-only collision bound. If every multiplicity is positive and at most cap, and sum m^2 = cap * sum m, then every multiplicity equals cap.

def Esgk.MultiplicityCapDefect {α : Type u_1} (s : Finset α) (m : α → ℕ) (cap : ℕ) :

Total slack in the cap-only collision inequality, written as the sum of pointwise weighted deficits m(a) * (cap - m(a)).

Equations
Instances For
    theorem Esgk.multiplicityEnergy_add_capDefect_eq_cap_mul_mass {α : Type u_1} (s : Finset α) (m : α → ℕ) (cap : ℕ) (hcap : ∀ a ∈ s, m a ≤ cap) :

    Exact cap-defect identity sum m^2 + sum m(cap-m) = cap * sum m.

    theorem Esgk.threshold_mul_bad_mass_le_capDefect {α : Type u_1} (s : Finset α) (m : α → ℕ) (cap threshold : ℕ) :
    threshold * MultiplicityMass ({a ∈ s | threshold ≤ cap - m a}) m ≤ MultiplicityCapDefect s m cap

    Thresholded mass form of Markov's inequality for cap deficits. Distance classes whose deficit is at least threshold carry at most total cap defect divided by threshold mass, stated without division.

    theorem Esgk.threshold_mul_bad_count_le_sum {α : Type u_1} (s : Finset α) (defect : α → ℕ) (threshold : ℕ) :
    threshold * {a ∈ s | threshold ≤ defect a}.card ≤ ∑ a ∈ s, defect a

    Thresholded count form of Markov's inequality for arbitrary natural-number deficits.

    theorem Esgk.threshold_mul_filtered_defect_le_weighted_sum {α : Type u_1} (s : Finset α) (weight defect : α → ℕ) (threshold : ℕ) :
    threshold * ∑ a ∈ s with threshold ≤ weight a, defect a ≤ ∑ a ∈ s, weight a * defect a

    A weighted threshold inequality: on terms whose weight is at least threshold, the total defect is controlled by the global weighted-defect sum.

    Cap-only distance-energy bound, before using the GP-specific cap.

    In general position, the cap-only theorem specializes to the 3*n bound. This is the reusable Lean form of "the cap alone reaches only the cubic endpoint".

    If the distance-energy cap inequality is an equality, every realized ordered distance multiplicity reaches the cap.

    Exact ordered-energy form of the elementary cap. Unlike the older 3*n^3 packaging, this retains the exact off-diagonal mass n*(n-1).

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

    Cap defect for ordered distance multiplicities under the GP cap 3*n.

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

      Total number of missing local degree incidences from degree three in one distance graph. Under general position every summand is an honest deficit in {0,1,2,3}.

      Equations
      Instances For

        The global multiplicity deficit 3*n-M_r is exactly the sum of the local degree-three deficits in the distance-r graph.

        The multiplicity cap defect is exactly the multiplicity-weighted sum of the local degree-three deficits.

        Exact distance specialization of the cap-defect identity.

        If energy is within additive deficit delta of the exact cap, then the total weighted multiplicity defect is at most delta.

        theorem Esgk.threshold_mul_underfullDistanceMass_le_of_near_cap {n delta threshold : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hnear : 3 * n ^ 2 * (n - 1) ≤ DistanceEnergy p + delta) :
        threshold * MultiplicityMass ({r ∈ OrderedDistanceValues p | threshold ≤ 3 * n - OrderedMultiplicity p r}) (OrderedMultiplicity p) ≤ delta

        Explicit SR1 multiplicity cleanup bound. If energy is within delta of the cap, the total ordered-pair mass in distance classes whose multiplicity is at least threshold below 3*n is at most delta / threshold, stated in division-free product form.

        theorem Esgk.threshold_mul_richDistanceLocalDegreeDefect_le_of_near_cap {n delta threshold : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hnear : 3 * n ^ 2 * (n - 1) ≤ DistanceEnergy p + delta) :
        threshold * ∑ r ∈ OrderedDistanceValues p with threshold ≤ OrderedMultiplicity p r, DistanceLocalDegreeDefect p r ≤ delta

        Explicit SR1 local-incidence cleanup bound. Among distance classes of ordered multiplicity at least threshold, the total number of incidences missing from degree three is at most delta / threshold, stated without division.

        noncomputable def Esgk.RichDistanceVertexDegreeDefect {n : ℕ} (p : Config n) (classThreshold : ℕ) (i : Fin n) :

        At one vertex, total local degree-three defect over the distance classes whose ordered multiplicity is at least classThreshold.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem Esgk.sum_richDistanceVertexDegreeDefect_eq_sum_localDegreeDefect {n : ℕ} (p : Config n) (classThreshold : ℕ) :
          ∑ i : Fin n, RichDistanceVertexDegreeDefect p classThreshold i = ∑ r ∈ OrderedDistanceValues p with classThreshold ≤ OrderedMultiplicity p r, DistanceLocalDegreeDefect p r

          Double-count the missing rich-class degree incidences, first by vertices and then by distance classes.

          theorem Esgk.richDistance_exceptionalVertex_count_product_le_of_near_cap {n delta classThreshold vertexThreshold : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hnear : 3 * n ^ 2 * (n - 1) ≤ DistanceEnergy p + delta) :
          classThreshold * vertexThreshold * {i : Fin n | vertexThreshold ≤ RichDistanceVertexDegreeDefect p classThreshold i}.card ≤ delta

          Explicit SR1 exceptional-vertex bound. A vertex is exceptional when its total missing degree over the rich distance classes is at least vertexThreshold. The product form preserves both threshold parameters.

          The exact ordered-energy cap is never attained by a general-position configuration with at least four points. Equality would force every realized distance graph to be spanning 3-regular; constant squared-distance row sums would then force the configuration to be cocircular. This strict finite inequality is not a uniform-density or asymptotic saving.

          Combining the cap-only theorem with the total ordered-pair mass bound gives the existing cubic endpoint.

          Rich-band consequence #

          theorem Esgk.collisionEnergy_forces_heavyDistanceValues {n : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hn : 0 < n) (K : ℕ) {eta : ℝ} (heta_nonneg : 0 ≤ eta) (henergy : eta * ↑(3 * n) * ↑n ^ 2 ≤ ↑(DistanceEnergy p)) (hK : ↑K ≤ eta / 2 * ↑(3 * n)) :
          eta / 2 * ↑(OrderedDistanceMass p) ≤ ↑(3 * n) * ↑(HeavyDistanceValues p K).card

          Product-form rich-band consequence. This restates the existing DistanceDesign theorem in the entropy-census vocabulary: high collision energy under the GP cap forces many ordered edges to lie in linear-rich distance classes.

          Cherry saturation bookkeeping #

          theorem Esgk.sum_sq_eq_sum_falling_add_sum {α : Type u_1} (s : Finset α) (degree : α → ℤ) :
          ∑ a ∈ s, degree a ^ 2 = ∑ a ∈ s, degree a * (degree a - 1) + ∑ a ∈ s, degree a

          Summed form of d^2 = d * (d - 1) + d. This is the algebraic bridge from degree squares to doubled cherry counts and total degree mass.

          theorem Esgk.degreeSquareMass_eq_two_mul_cherry_add_mass {α : Type u_1} (s : Finset α) (degree : α → ℤ) (cherry mass : ℤ) (hcherry : ∑ a ∈ s, degree a * (degree a - 1) = 2 * cherry) (hmass : ∑ a ∈ s, degree a = mass) :
          ∑ a ∈ s, degree a ^ 2 = 2 * cherry + mass

          If the falling-factorial sum is twice the cherry count and the degree sum is the total incidence mass, then the degree-square mass is their stated sum.

          theorem Esgk.energyDefect_four_mul_decomposition (n energy cherry degreeSquareMass : ℤ) (hdegree : degreeSquareMass = 2 * cherry + n * (n - 1)) :
          3 * n ^ 2 * (n - 1) - 4 * energy = n * degreeSquareMass - 4 * energy + 2 * n * (n * (n - 1) - cherry)

          Integer-scaled form of the exact energy-defect decomposition. The input degreeSquareMass = 2 * cherry + n * (n - 1) is the summed identity d^2 = d + 2 * binom(d,2) for a complete edge coloring. Scaling by four keeps every term integral.

          theorem Esgk.energyDefect_four_mul_nonneg (n energy cherry degreeSquareMass : ℤ) (hn : 0 ≤ n) (hdegree : degreeSquareMass = 2 * cherry + n * (n - 1)) (hcauchy : 4 * energy ≤ n * degreeSquareMass) (hcherry : cherry ≤ n * (n - 1)) :
          0 ≤ 3 * n ^ 2 * (n - 1) - 4 * energy

          Nonnegativity consequence of the exact defect decomposition. The two hypotheses are precisely nonnegativity of the Cauchy slack and of the cherry defect.

          theorem Esgk.sum_int_defect_eq_card_mul_sub_sum {α : Type u_1} (s : Finset α) (w : α → ℕ) (cap : ℕ) :
          ∑ a ∈ s, (↑cap - ↑(w a)) = ↑cap * ↑s.card - ∑ a ∈ s, ↑(w a)

          A sum of pointwise integer deficits is the cap times the number of terms minus the observed total. This is the common finite identity behind both the pair-witness and local degree-packing forms of the cherry defect.

          theorem Esgk.collinear_subset_perpBisector {a b : Point} {s : Set Point} [Finite ↑s] (hab : a ≠ b) (hs : s ⊆ ↑(AffineSubspace.perpBisector a b)) :

          The perpendicular bisector of two distinct points in the plane is collinear. This helper packages the finite-dimensional part of the cherry bound: the bisector direction is the orthogonal complement of a nonzero one-dimensional subspace of ℝ², hence has dimension at most one.

          noncomputable def Esgk.EquidistantWitnesses (P : Finset Point) (a b : Point) :

          Equal-distance cherry witnesses for a base pair {a,b} inside a finite point set. The witnesses are not required to exclude a or b; when a ≠ b those two endpoints are not members anyway.

          Equations
          Instances For

            Cherry bound: in a general-position finite point set, at most two points are equidistant from a fixed distinct pair {a,b}. All witnesses lie on the perpendicular bisector of ab, which is collinear; three witnesses would contradict the no-three-collinear part of InGeneralPosition.

            General-position consumer of the GP3-only perpendicular-bisector bound.

            Indexed-configuration form of the cherry bound.

            noncomputable def Esgk.IndexedEquidistantWitnesses {n : ℕ} (p : Config n) (i j : Fin n) :

            Index-level equidistant witnesses for an ordered base pair. This is the shape needed to reindex witness counts against local distance degrees.

            Equations
            Instances For

              Injectivity maps index-level witnesses into the point-finset witness set.

              Index-level cherry bound for distinct ordered base indices.

              General-position consumer of the GP3-only indexed cherry bound.

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

              Total witness count over ordered off-diagonal base pairs.

              Equations
              Instances For
                noncomputable def Esgk.ApexEqualDistancePairs {n : ℕ} (p : Config n) (x : Fin n) :

                Ordered equal-distance base pairs seen from one apex, with the apex removed from the base vertex set.

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

                  Local falling-degree mass summed over all distance values and apexes.

                  Equations
                  Instances For

                    At a fixed apex, the falling-degree mass counts ordered equal-distance base pairs.

                    Reindex ordered-pair witness total by its witness/apex coordinate.

                    The local falling-degree mass and ordered pair-witness total are the same finite equal-distance triple count.

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

                    Total ordered-base-pair witness defect from the cap two.

                    Equations
                    Instances For
                      noncomputable def Esgk.ExceptionalOrderedPairsByWitnessDefect {n : ℕ} (p : Config n) (threshold : ℕ) :

                      Ordered base pairs whose witness defect is at least threshold.

                      Equations
                      Instances For

                        Conditional SR1 pair-witness cleanup: exceptional pair count is controlled by total pair-witness defect. The remaining bridge is to bound OrderedPairWitnessDefect by the energy defect.

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

                        Sum of squared local distance degrees.

                        Equations
                        Instances For

                          Local degree-square mass splits into falling-degree mass plus total ordered distance mass.

                          Cauchy-Schwarz on the degree sequence of every distance graph, summed over all realized distances.

                          Ordered witness total plus ordered witness defect is twice the number of ordered off-diagonal base pairs.

                          Concrete ordered normalization of the energy/cherry defect inequality: energy plus n times the pair-witness defect is at most the exact cap.

                          Near-cap energy bounds total pair-witness defect.

                          theorem Esgk.n_mul_threshold_mul_exceptionalPair_count_le_of_near_cap {n delta threshold : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hnear : 3 * n ^ 2 * (n - 1) ≤ DistanceEnergy p + delta) :
                          n * threshold * (ExceptionalOrderedPairsByWitnessDefect p threshold).card ≤ delta

                          Explicit SR1 pair-witness cleanup. Ordered base pairs with witness defect at least threshold are bounded in division-free product form.

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

                          Ordered base pairs that do not have exactly two equidistant witnesses.

                          Equations
                          Instances For

                            Under the cherry cap, non-two-regular ordered pairs are exactly the pairs with witness defect at least one.

                            Near the energy cap, all but at most delta/n ordered base pairs have exactly two witnesses, stated without division.

                            theorem Esgk.nearCap_stability_product_bounds {n delta underfullThreshold classThreshold vertexThreshold : ℕ} {p : Config n} (hp : Function.Injective p) (hgp : EuclideanGeometry.InGeneralPosition p.toFinset) (hnear : 3 * n ^ 2 * (n - 1) ≤ DistanceEnergy p + delta) :
                            underfullThreshold * MultiplicityMass ({r ∈ OrderedDistanceValues p | underfullThreshold ≤ 3 * n - OrderedMultiplicity p r}) (OrderedMultiplicity p) ≤ delta ∧ classThreshold * ∑ r ∈ OrderedDistanceValues p with classThreshold ≤ OrderedMultiplicity p r, DistanceLocalDegreeDefect p r ≤ delta ∧ classThreshold * vertexThreshold * {i : Fin n | vertexThreshold ≤ RichDistanceVertexDegreeDefect p classThreshold i}.card ≤ delta ∧ n * (BadOrderedPairsByWitnessCount p).card ≤ delta

                            Bundled division-free SR1 cleanup theorem. Near-cap energy simultaneously controls underfull-class pair mass, missing local degree incidences in rich classes, vertices with large rich-class degree defect, and ordered pairs that are not cherry-2-regular. The thresholds remain explicit so downstream asymptotic packaging can choose their scale.

                            theorem Esgk.all_eq_two_of_sum_eq_two_mul_card {α : Type u_1} (s : Finset α) (w : α → ℕ) (hle : ∀ a ∈ s, w a ≤ 2) (hsum : ∑ a ∈ s, w a = 2 * s.card) (a : α) :
                            a ∈ s → w a = 2

                            If a nonnegative integer witness count is bounded by 2 at every pair, and its total count saturates the bound 2 * #pairs, then every pair has exactly two witnesses. This is the finite counting core behind the cherry-saturation diagnostic.

                            theorem Esgk.witnessMap_bijective_of_injective_of_card_eq {pairs : Type u_2} {witnesses : Type u_3} [Fintype pairs] [Fintype witnesses] (f : pairs → witnesses) (hinj : Function.Injective f) (hcard : Fintype.card pairs = Fintype.card witnesses) :

                            If the witness map sends each pair to its two-witness set, then two-regularity plus injectivity makes the witness map a bijection whenever the source and target finite sets have the same cardinality. This isolates the finite combinatorial content of the "witness map is a bijection at saturation" observation; the geometric proof of injectivity belongs to the perpendicular bisector layer.

                            Integer power-probe no-go under a cap #

                            def Esgk.MultiplicityPowerEnergy {α : Type u_1} (s : Finset α) (m : α → ℕ) (k : ℕ) :

                            Integer power energy sum m_i^k. This is the exact finite object behind integer p-energy probes; fractional Renyi monotonicity is not needed for this cap-only obstruction.

                            Equations
                            Instances For
                              theorem Esgk.multiplicityPowerEnergy_le_cap_pow_mul_mass {α : Type u_1} (s : Finset α) (m : α → ℕ) (B k : ℕ) (hk : 1 ≤ k) (hcap : ∀ a ∈ s, m a ≤ B) :

                              Pointwise cap control of integer power energies: for 1 <= k, m_i^k <= B^(k-1) m_i, hence the whole power-energy probe is bounded by the same cap-only data.

                              The same cap-only control for ordered distance multiplicities.

                              K5 twin-opposite algebraic obstruction #

                              theorem Esgk.k5_twin_opposite_normal_form_unsat {X Y Z h : ℝ} (hh : 0 < h) (hYZ : (Y - Z) ^ 2 = h ^ 2 + X ^ 2) (hXZ : (X - Z) ^ 2 = h ^ 2 + Y ^ 2) (hXY : (X - Y) ^ 2 = h ^ 2 + Z ^ 2) :

                              Algebraic normal form of the K5 twin-opposite triangle atom. In the normal form, h is half the distance between the two twin vertices, and X,Y,Z are signed coordinates of the three opposite vertices on the perpendicular bisector. The three equal-length constraints are inconsistent when h > 0.

                              This theorem is the proof-grade core of the finite atom recorded in docs/results/forbidden-subdesign-library.md.