FormalConjectures/ErdosProblems/90.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

10 declarations, 5 contain sorry, 0 declared as axioms

Erdős Problem 90: The unit distance problem

Reference: erdosproblems.com/90

The conjecture asks whether every set of $n$ points in $\mathbb{R}^2$ determines at most $n^{1 + O(1/\log\log n)}$ unit distances. It was disproved in May 2026: an internal model at OpenAI produced a construction beating the conjectured bound, with the proof digested and human-verified in two arXiv papers:

This file records the main statement (erdos_90), the two constructive disproof variants, the logical implications between them, and the load-bearing reductions of Sawin's proof (sawin_lattice_reduction and sawin_totally_real_tower) as further benchmark challenges.

Imports (1)
  1. def Erdos90.unitDistanceCounts The set of all possible numbers of unit distances for a configuration of $n$ points line 52 source

    Source documentation

    The set of all possible numbers of unit distances for a configuration of $n$ points.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Set

    Proof uses: Set.ofPred, Exists, Finset, EuclideanSpace, Real, Fin, OfNat.ofNat, Eq, Finset.card, unitDistNum, ENNReal

    10 instances, coercions and auxiliary constants left out.

    noncomputable def unitDistanceCounts (n : ℕ) : Set ℕ :=
    …
  2. theorem Erdos90.unitDistanceCounts_BddAbove This lemma confirms that the set of possible unit distance counts is bounded above, which ensures that taking the supremum (sSup) is a well-defined operation line 61 source

    Source documentation

    This lemma confirms that the set of possible unit distance counts is bounded above, which ensures that taking the supremum (sSup) is a well-defined operation. The trivial upper bound is the total number of pairs of points, $\binom{n}{2}$.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, BddAbove, Erdos90.unitDistanceCounts

    Proof uses: Exists.intro, Membership.mem, Set, upperBounds, Nat.choose, OfNat.ofNat, Finset, EuclideanSpace, Real, Fin, Exists, Eq, Finset.card, unitDistNum, ENNReal, LE.le, unitDistNum_le_choose_two

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

    Open to load the checked before-and-after goal states.

    theorem unitDistanceCounts_BddAbove (n : ℕ) : BddAbove <| unitDistanceCounts n := by
    …

    Mentions: Erdos90.unitDistanceCounts

  3. def Erdos90.maxUnitDistances The maximum number of unit distances determined by any set of $n$ points in the plane line 71 source

    Source documentation

    The maximum number of unit distances determined by any set of $n$ points in the plane. This function is often denoted as $u(n)$ in combinatorics.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat

    Proof uses: SupSet.sSup, Erdos90.unitDistanceCounts

    1 instances, coercions and auxiliary constants left out.

    noncomputable def maxUnitDistances (n : ℕ) : ℕ :=
    …
  4. theorem Erdos90.erdos_90 Does every set of $n$ distinct points in $\mathbb{R}^2$ contain at most $n^{1+O(\frac{1}{\log\log n})}$ many pairs which are distance $1$ apart? sorry line 86 source

    Source documentation

    Does every set of $n$ distinct points in $\mathbb{R}^2$ contain at most $n^{1+O(\frac{1}{\log\log n})}$ many pairs which are distance $1$ apart?

    This was disproved by an internal model at OpenAI, which constructed (for infinitely many $n$) a set $P$ of $n$ points in $\mathbb{R}^2$ such that the number of unit distance pairs in $P$ is at least $n^{1+c}$, where $c > 0$ is an absolute constant.

    L4DEL explanation

    Does every set of $n$ distinct points in $\mathbb{R}^2$ contain at most $n^{1+O(\frac{1}{\log\log n})}$ many pairs which are distance $1$ apart? This was disproved by an internal model at OpenAI, which constructed (for infinitely many $n$) a set $P$ of $n$ points in $\mathbb{R}^2$ such that the number of unit distance pairs in $P$ is at least $n^{1+c}$, where $c > 0$ is an absolute constant.

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Iff, False, Exists, Nat, Real, Asymptotics.IsBigO, Filter.atTop, HDiv.hDiv, OfNat.ofNat, Real.log, Filter.EventuallyEq, Erdos90.maxUnitDistances, HPow.hPow, HAdd.hAdd

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    27 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_90 : answer(False) ↔ ∃ (O : ℕ → ℝ) (hO : O =O[atTop] (fun n => 1 / (n : ℝ).log.log)),
        (fun n => (maxUnitDistances n : ℝ)) =ᶠ[atTop] fun (n : ℕ) => (n : ℝ) ^ (1 + O n) := by
    …

    Mentions: Erdos90.maxUnitDistances

  5. theorem Erdos90.erdos_90.variants.polynomial_lower_bound sorry line 102 source

    depends on sorry what this means

    Statement uses: Exists, Real, And, GT.gt, OfNat.ofNat, Set.Infinite, Nat, Set.ofPred, LE.le, HPow.hPow, HAdd.hAdd, Erdos90.maxUnitDistances

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    25 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  6. theorem Erdos90.erdos_90.variants.sawin_explicit Sawin's explicit exponent sorry line 114 source

    Source documentation

    Sawin's explicit exponent. The constructive disproof can be realised with $c \ge 0.014114$ (absorbing the implicit constant $C$ of Sawin's Theorem 1 into a slightly smaller exponent for all large enough $n$). Reference: Theorem 1 of Sawin, arXiv:2605.20579 (2026).

    L4DEL explanation

    Sawin's explicit exponent. The constructive disproof can be realised with $c \ge 0.014114$ (absorbing the implicit constant $C$ of Sawin's Theorem 1 into a slightly smaller exponent for all large enough $n$). Reference: Theorem 1 of Sawin, arXiv:2605.20579 (2026).

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Set.Infinite, Nat, Set.ofPred, LE.le, Real, HPow.hPow, OfScientific.ofScientific, Bool.true, Erdos90.maxUnitDistances

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_90.variants.sawin_explicit :
        {n : ℕ | (n : ℝ) ^ (1.014114 : ℝ) ≤ (maxUnitDistances n : ℝ)}.Infinite := by
    …

    Mentions: Erdos90.maxUnitDistances

  7. theorem Erdos90.erdos_90.variants.sawin_explicit_implies_polynomial_lower_bound Sawin's explicit bound implies the qualitative polynomial lower bound, by taking $c = 0.014114$ line 121 source

    Source documentation

    Sawin's explicit bound implies the qualitative polynomial lower bound, by taking $c = 0.014114$.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Set.Infinite, Nat, Set.ofPred, LE.le, Real, HPow.hPow, OfScientific.ofScientific, Bool.true, Erdos90.maxUnitDistances, Exists, And, GT.gt, OfNat.ofNat, HAdd.hAdd

    Proof uses: Exists.intro, And.intro, Mathlib.Meta.NormNum.isNNRat_lt_true, Mathlib.Meta.NormNum.IsNat.to_isNNRat, Mathlib.Meta.NormNum.isNat_ofNat, Nat.cast_zero, Mathlib.Meta.NormNum.isNNRat_ofScientific_of_true, Mathlib.Meta.NormNum.isNNRat_nnratCast, NNRat.divNat, Mathlib.Meta.NormNum.isNNRat_divNat, Mathlib.Meta.NormNum.IsNat.raw_refl, Mathlib.Meta.NormNum.isNat_pow, Eq.refl, Mathlib.Meta.NormNum.IsNatPowT.run, Mathlib.Meta.NormNum.IsNatPowT.trans, Eq, Nat.pow, Mathlib.Meta.NormNum.IsNatPowT.bit1, Mathlib.Meta.NormNum.IsNatPowT.bit0, Mathlib.Meta.NormNum.isNNRat_div and 21 more

    65 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_90.variants.sawin_explicit_implies_polynomial_lower_bound :
        type_of% erdos_90.variants.sawin_explicit →
        type_of% erdos_90.variants.polynomial_lower_bound := by
    …

    Mentions: Erdos90.erdos_90.variants.sawin_explicit, Erdos90.erdos_90.variants.polynomial_lower_bound

  8. theorem Erdos90.erdos_90.variants.polynomial_lower_bound_implies_erdos_90 The polynomial lower bound implies the answer to Erdős 90 is False: a fixed positive exponent $c$ is incompatible with the conjectured $O(1 / \log \log n)$ growth line 130 source

    Source documentation

    The polynomial lower bound implies the answer to Erdős 90 is False: a fixed positive exponent $c$ is incompatible with the conjectured $O(1 / \log \log n)$ growth.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Exists, Real, And, GT.gt, OfNat.ofNat, Set.Infinite, Nat, Set.ofPred, LE.le, HPow.hPow, HAdd.hAdd, Erdos90.maxUnitDistances, Iff, False, Asymptotics.IsBigO, Filter.atTop, HDiv.hDiv, Real.log, Filter.EventuallyEq

    Proof uses: Iff.intro, False.elim, Filter.Tendsto, nhds, Eq.mpr, Inv.inv, id, Eq, congrFun', Filter, congrArg, funext, one_div, Filter.Tendsto.comp, tendsto_inv_atTop_zero, Real.tendsto_log_atTop, tendsto_natCast_atTop_atTop, Iff.mp, Asymptotics.IsLittleO, Asymptotics.isLittleO_one_iff and 66 more

    146 instances, coercions and auxiliary constants left out.

    Tactic trace: 15 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_90.variants.polynomial_lower_bound_implies_erdos_90 :
        type_of% erdos_90.variants.polynomial_lower_bound →
        type_of% erdos_90 := by
    …

    Mentions: Erdos90.erdos_90.variants.polynomial_lower_bound, Erdos90.erdos_90

  9. theorem Erdos90.sawin_lattice_reduction Sawin's Lemma 2: lattice geometry of unit distances (Sawin, arXiv:2605.20579) sorry line 168 source

    Source documentation

    Sawin's Lemma 2: lattice geometry of unit distances (Sawin, arXiv:2605.20579).

    Let $d \ge 1$, $R > 1$, and suppose $\Lambda \subset \mathbb{R}^{2d}$ is an additive subgroup all of whose nonzero vectors have norm at least $\rho > 0$ (so $\Lambda$ is a lattice; Sawin takes $\rho$ to be the norm of a shortest nonzero vector of $\Lambda$), equipped with an additive embedding $\pi : \Lambda \to \mathbb{R}^2$. Suppose $S \subseteq \Lambda$ is a finite set of "matching" vectors satisfying $\|v\| \le 1$ and $\|\pi v\| = 1$ for every $v \in S$. Then there is a finite point set $U \subset \mathbb{R}^2$ of size $\#U \le (2R/\rho + 1)^{2d}$ whose unit-distance density is at least $(1 - 1/R)^{2d}\,\#S$, i.e. $(1-1/R)^{2d}\,\#S\,\#U \le \#\{(u_1, u_2) \in U^2 : |u_1 - u_2| = 1\}$. The right-hand side counts ordered pairs, so it equals twice unitDistNum U.

    This pure geometry-of-numbers reduction is the elementary heart of the disproof.

    L4DEL explanation

    Sawin's Lemma 2: lattice geometry of unit distances (Sawin, arXiv:2605.20579). Let $d \ge 1$, $R > 1$, and suppose $\Lambda \subset \mathbb{R}^{2d}$ is an additive subgroup all of whose nonzero vectors have norm at least $\rho > 0$ (so $\Lambda$ is a lattice; Sawin takes $\rho$ to be the norm of a shortest nonzero vector of $\Lambda$), equipped with an additive embedding $\pi : \Lambda \to \mathbb{R}^2$. Suppose $S \subseteq \Lambda$ is a finite set of "matching" vectors satisfying $\|v\| \le 1$ and $\|\pi v\| = 1$ for every $v \in S$. Then there is a finite point set $U \subset \mathbb{R}^2$ of size $\#U \le (2R/\rho + 1)^{2d}$ whose unit-distance density is at least $(1 - 1/R)^{2d}\,\#S$, i.e. $(1-1/R)^{2d}\,\#S\,\#U \le \#\{(u_1, u_2) \in U^2 : |u_1 - u_2| = 1\}$. The right-hand side counts ordered pairs, so it equals twice unitDistNum U. This pure geometry-of-numbers reduction is the elementary heart of the disproof.

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    depends on sorry what this means

    Statement uses: Nat, LE.le, OfNat.ofNat, Real, LT.lt, Submodule, Int, EuclideanSpace, Fin, HMul.hMul, ENNReal, Subtype, Membership.mem, Ne, Norm.norm, AddMonoidHom, Function.Injective, Finset, Eq, Exists and 7 more

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    116 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem sawin_lattice_reduction
        (d : ℕ) (hd : 1 ≤ d) (R : ℝ) (hR : 1 < R)
        (Λ : Submodule ℤ (EuclideanSpace ℝ (Fin (2*d))))
        (ρ : ℝ) (hρ : 0 < ρ) (hΛ : ∀ v : Λ, v ≠ 0 → ρ ≤ ‖(v : EuclideanSpace ℝ (Fin (2*d)))‖)
        (π : Λ →+ ℝ²) (hπ : Function.Injective π)
        (S : Finset Λ)
        (hS_norm : ∀ v ∈ S, ‖(v : EuclideanSpace ℝ (Fin (2*d)))‖ ≤ 1)
        (hS_proj : ∀ v ∈ S, ‖π v‖ = 1) :
        ∃ U : Finset ℝ², 0 < U.card ∧ (U.card : ℝ) ≤ (2 * R / ρ + 1) ^ (2*d) ∧
          ((1 : ℝ) - 1/R) ^ (2*d) * (S.card : ℝ) * (U.card : ℝ) ≤
            2 * (unitDistNum U : ℝ) := by
    …

    Mentions: unitDistNum

  10. theorem Erdos90.sawin_totally_real_tower sorry line 203 source

    depends on sorry what this means

    Statement uses: Exists, Real, Set, Nat, And, Set.Infinite, Membership.mem, Nat.Prime, Eq, HMod.hMod, OfNat.ofNat, Field, CharZero, NumberField, NumberField.IsTotallyReal, LE.le, Module.finrank, Rat, HPow.hPow, abs and 7 more

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    80 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.