Repository navigation
Formalize the geometric 3-chain support theorem for planar point sets - #345
Conversation
Greptile SummaryThe PR adds a self-contained Lean formalization ruling out geometric ratio-three chains as the complete non-diameter squared-distance support of sufficiently large planar point sets.
|
| Filename | Overview |
|---|---|
| LeanPool/Erdos132ThreeChain/Statement.lean | States the headline theorem with quantifiers and definitions matching the project-card description. |
| LeanPool/Erdos132ThreeChain/FourPoints.lean | Formalizes the four-point chain classification and its seven labelled patterns. |
| LeanPool/Erdos132ThreeChain/FivePoints.lean | Derives the five-point obstruction from the planar Gram identities and four-point classification. |
| LeanPool/Erdos132ThreeChain/HopfPannwitz.lean | Supplies the diameter-graph degree bound used by the headline theorem. |
| LeanPool/Erdos132ThreeChain/CaroWei.lean | Proves the independence bound and specializes it to obtain five independent vertices. |
| LeanPool/Erdos132ThreeChain/Witnesses.lean | Provides non-vacuity witnesses for the chain configurations discussed by the project. |
| LeanPool/Erdos132ThreeChain.lean | Defines the project entry module and exposes the headline, supporting bound, and witnesses. |
| LeanPool/projects.yml | Registers the formalization, provenance, prior-art disclosure, and exact informal headline. |
| LeanPool.lean | Adds the project and all of its modules to the aggregate library entry point. |
Reviews (10): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
Proof profile (new / modified Lean files)
This build covers the changed modules and their dependency cones on top of the restored cache. The serial per-file sums below are useful for ranking slow files, not as a build budget. Total heartbeats: 190 maxHeartbeats units across 11 files (1,595 added LOC). Sum of Count-heartbeats wall-clock total: 120.04 s. Repeated import cost inside Heartbeat values come from Mathlib's LOC counts added lines in the profiled Lean files from this PR diff.
Aggregate phase totals
Slowest changed modules (from
|
| Changed module | Lake time |
|---|---|
LeanPool.Erdos132ThreeChain.Witnesses |
102.00 s |
LeanPool.Erdos132ThreeChain.HopfPannwitz |
7.10 s |
LeanPool.Erdos132ThreeChain.CaroWei |
4.40 s |
LeanPool.Erdos132ThreeChain.FourPoints |
4.30 s |
LeanPool.Erdos132ThreeChain.PowerThree |
4.20 s |
LeanPool.Erdos132ThreeChain.Plane |
4.10 s |
LeanPool.Erdos132ThreeChain.Basic |
3.70 s |
LeanPool.Erdos132ThreeChain.Support |
3.00 s |
LeanPool.Erdos132ThreeChain.FivePoints |
1.90 s |
LeanPool.Erdos132ThreeChain |
1.80 s |
LeanPool.Erdos132ThreeChain.Statement |
1.30 s |
Per-file `lean --profile` output
LeanPool/Erdos132ThreeChain.lean
import took 1.53s
cumulative profiling times:
elaboration 0.164ms
import 1.53s
initialization 30.3ms
interpretation 168ms
linting 0.293ms
module linting 0.00171ms
overlappingInstancesLinter 0.547ms
parsing 0.0325ms
tacticAnalysis 2.33ms
real 2.54
user 1.44
sys 1.11
LeanPool/Erdos132ThreeChain/Basic.lean
import took 1.08s
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 106ms
cumulative profiling times:
attribute application 0.363ms
blocked (unaccounted) 382ms
compilation (IR) 0.105ms
compilation (LCNF base) 2.09ms
compilation (LCNF impure) 1.28ms
compilation (LCNF mono) 1.55ms
congr simp thm 1.22ms
elaboration 34.2ms
fix level params 0.571ms
import 1.08s
initialization 36.5ms
instantiate metavars 1.22ms
interpretation 477ms
let-to-have transformation 0.129ms
linting 7.05ms
module linting 0.0017ms
norm_num 10.3ms
overlappingInstancesLinter 3.88ms
parsing 5.74ms
process pre-definitions 6.13ms
ring 37.8ms
share common exprs 9.06ms
simp 18.2ms
tactic execution 33.6ms
tacticAnalysis 16.2ms
type checking 30.1ms
typeclass inference 120ms
real 2.40
user 1.68
sys 0.94
LeanPool/Erdos132ThreeChain/CaroWei.lean
import took 1.06s
cumulative profiling times:
attribute application 0.0497ms
compilation (IR) 0.0571ms
compilation (LCNF base) 0.451ms
compilation (LCNF impure) 0.238ms
compilation (LCNF mono) 0.452ms
congr simp thm 6ms
elaboration 27.2ms
fix level params 1.94ms
import 1.06s
initialization 31ms
instantiate metavars 3.03ms
interpretation 540ms
let-to-have transformation 0.0674ms
linting 25ms
module linting 0.0015ms
norm_num 84.5ms
overlappingInstancesLinter 3.92ms
parsing 10.3ms
process pre-definitions 12.5ms
ring 29.8ms
share common exprs 10.1ms
simp 188ms
tactic execution 182ms
tacticAnalysis 30.5ms
type checking 55ms
typeclass inference 240ms
real 2.65
user 2.33
sys 0.94
LeanPool/Erdos132ThreeChain/FivePoints.lean
import took 1.07s
cumulative profiling times:
attribute application 0.055ms
congr simp thm 0.552ms
elaboration 30ms
fix level params 1.12ms
import 1.07s
initialization 32.4ms
instantiate metavars 3.33ms
interpretation 358ms
let-to-have transformation 0.0957ms
linting 22.1ms
module linting 0.00141ms
norm_num 73.3ms
overlappingInstancesLinter 2.11ms
parsing 7.72ms
process pre-definitions 12.2ms
ring 72ms
share common exprs 15.6ms
simp 2.94ms
tactic execution 126ms
tacticAnalysis 23ms
type checking 67.6ms
typeclass inference 162ms
real 2.34
user 1.90
sys 0.90
LeanPool/Erdos132ThreeChain/FourPoints.lean
import took 1.06s
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 446ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 298ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 251ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 166ms
cumulative profiling times:
attribute application 0.182ms
blocked (unaccounted) 0.77ms
congr simp thm 2.27ms
elaboration 129ms
fix level params 3.9ms
import 1.06s
initialization 36.3ms
instantiate metavars 12.1ms
interpretation 1.98s
let-to-have transformation 0.368ms
linting 90.1ms
module linting 0.0017ms
norm_num 21.9ms
overlappingInstancesLinter 6.2ms
parsing 29.6ms
process pre-definitions 39.4ms
ring 263ms
share common exprs 92.3ms
simp 80.2ms
tactic execution 675ms
tacticAnalysis 86.1ms
type checking 279ms
typeclass inference 594ms
real 3.45
user 5.26
sys 0.88
LeanPool/Erdos132ThreeChain/HopfPannwitz.lean
import took 1.06s
ring took 201ms
share common exprs took 140ms
type checking took 185ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 301ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 767ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 649ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 477ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 1.12s
cumulative profiling times:
attribute application 0.456ms
congr simp thm 2.56ms
elaboration 181ms
fix level params 13.2ms
import 1.06s
initialization 31.1ms
instantiate metavars 7.75ms
interpretation 3.96s
let-to-have transformation 0.26ms
linting 69.9ms
module linting 0.00206ms
norm_num 15.5ms
overlappingInstancesLinter 7.17ms
parsing 22.6ms
process pre-definitions 106ms
ring 410ms
share common exprs 218ms
simp 49.6ms
tactic execution 351ms
tacticAnalysis 68.5ms
type checking 411ms
typeclass inference 549ms
real 5.82
user 7.31
sys 0.92
LeanPool/Erdos132ThreeChain/Plane.lean
import took 1.03s
ring took 289ms
share common exprs took 162ms
type checking took 208ms
ring took 241ms
share common exprs took 134ms
type checking took 210ms
cumulative profiling times:
attribute application 0.122ms
compilation (IR) 0.328ms
compilation (LCNF base) 8.11ms
compilation (LCNF impure) 1.43ms
compilation (LCNF mono) 3.81ms
congr simp thm 0.641ms
elaboration 227ms
fix level params 17.4ms
import 1.03s
initialization 30.7ms
instantiate metavars 0.841ms
interpretation 336ms
let-to-have transformation 0.168ms
linting 7.97ms
module linting 0.00164ms
norm_num 13.1ms
overlappingInstancesLinter 3.14ms
parsing 7.34ms
process pre-definitions 134ms
ring 706ms
share common exprs 357ms
simp 16.8ms
tactic execution 13.6ms
tacticAnalysis 17.8ms
type checking 570ms
typeclass inference 127ms
real 3.06
user 3.42
sys 0.93
LeanPool/Erdos132ThreeChain/PowerThree.lean
import took 1.05s
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 258ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 323ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 132ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 592ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 369ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 156ms
cumulative profiling times:
attribute application 0.193ms
blocked (unaccounted) 0.899ms
congr simp thm 1.05ms
elaboration 84.8ms
fix level params 2.67ms
import 1.05s
initialization 30.3ms
instantiate metavars 12.8ms
interpretation 2.56s
let-to-have transformation 0.245ms
linting 45.2ms
module linting 0.00163ms
norm_num 36.1ms
overlappingInstancesLinter 5.28ms
parsing 15.8ms
process pre-definitions 31.8ms
ring 317ms
share common exprs 77.7ms
simp 84.4ms
tactic execution 262ms
tacticAnalysis 38.9ms
type checking 370ms
typeclass inference 820ms
real 3.52
user 5.61
sys 0.91
LeanPool/Erdos132ThreeChain/Statement.lean
import took 1.06s
cumulative profiling times:
attribute application 0.0217ms
elaboration 5.04ms
fix level params 0.0527ms
import 1.06s
initialization 30.3ms
instantiate metavars 0.141ms
interpretation 162ms
let-to-have transformation 0.023ms
linting 2.64ms
module linting 0.00166ms
overlappingInstancesLinter 1.42ms
parsing 2.05ms
process pre-definitions 0.79ms
share common exprs 0.264ms
tactic execution 12.1ms
tacticAnalysis 8.33ms
type checking 7.86ms
typeclass inference 2.91ms
real 1.94
user 1.08
sys 0.91
LeanPool/Erdos132ThreeChain/Support.lean
import took 1.06s
interpretation of Mathlib.Tactic.Tauto._aux_Mathlib_Tactic_Tauto___elabRules_Mathlib_Tactic_Tauto_tauto_1._boxed took 229ms
interpretation of Mathlib.Tactic.Tauto._aux_Mathlib_Tactic_Tauto___elabRules_Mathlib_Tactic_Tauto_tauto_1._boxed took 364ms
cumulative profiling times:
attribute application 0.0568ms
congr simp thm 2.45ms
elaboration 28ms
fix level params 1.08ms
import 1.06s
initialization 30.2ms
instantiate metavars 7.02ms
interpretation 888ms
let-to-have transformation 0.103ms
linting 23.7ms
module linting 0.00153ms
norm_num 2.24ms
overlappingInstancesLinter 2.96ms
parsing 11.8ms
process pre-definitions 14.4ms
ring 5.72ms
share common exprs 7.94ms
simp 83.7ms
tactic execution 738ms
tacticAnalysis 37.4ms
type checking 64.1ms
typeclass inference 142ms
real 3.32
user 2.95
sys 0.90
LeanPool/Erdos132ThreeChain/Witnesses.lean
import took 1.52s
ring took 11.4s
share common exprs took 13.9s
fix level params took 1s
process pre-definitions took 18s
elaboration took 7.36s
type checking took 20.1s
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 126ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 129ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 131ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 131ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 115ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 121ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 124ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 106ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 106ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 110ms
tactic execution of Lean.Parser.Tactic.exact took 690ms
tactic execution of Lean.Parser.Tactic.exact took 694ms
tactic execution of Lean.Parser.Tactic.exact took 606ms
tactic execution of Lean.Parser.Tactic.exact took 413ms
tactic execution of Lean.Parser.Tactic.exact took 412ms
tactic execution of Lean.Parser.Tactic.exact took 409ms
tactic execution of Lean.Parser.Tactic.exact took 411ms
tactic execution of Lean.Parser.Tactic.exact took 407ms
tactic execution of Lean.Parser.Tactic.exact took 414ms
tactic execution of Lean.Parser.Tactic.exact took 416ms
tactic execution of Lean.Parser.Tactic.exact took 409ms
tactic execution of Lean.Parser.Tactic.exact took 417ms
cumulative profiling times:
attribute application 0.105ms
compilation (IR) 0.24ms
compilation (LCNF base) 6.96ms
compilation (LCNF impure) 0.782ms
compilation (LCNF mono) 3.34ms
congr simp thm 3.82ms
elaboration 7.43s
fix level params 1s
import 1.52s
initialization 31.1ms
instantiate metavars 3.41ms
interpretation 2.46s
let-to-have transformation 0.193ms
linting 14.4ms
module linting 0.00167ms
norm_num 759ms
overlappingInstancesLinter 3.03ms
parsing 10.9ms
process pre-definitions 18.1s
ring 11.6s
share common exprs 14s
simp 101ms
tactic execution 5.97s
tacticAnalysis 31.8ms
type checking 20.2s
typeclass inference 782ms
real 74.65
user 82.87
sys 1.88
Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.
🤖 LLM review (
|
| Rubric | Verdict | Bottom line |
|---|---|---|
| Faithfulness | ✅ pass |
Each listed declaration matches its card informal, and the main theorem is unconditional beyond the explicitly stated geometric and cardinality hypotheses. |
| Novelty | 🤔 discuss |
No headline duplicate is identified, but Mathlib prior art is unverifiable for seven of the eight headlines because their searches failed. |
| Significance | ✅ pass |
The project is a research-level discrete-geometry development with a clear 13-point support theorem, a four-point classification, and a five-point obstruction. |
| Sources | ✅ pass |
The cited Erdős problem is explicitly identified as ambient context rather than the source of the new 3-chain result, and the disclosed classical and prior Lean results are credited. |
| Code quality (advisory) | ✅ pass |
The Lean is modular, with reusable geometric and arithmetic lemmas and the finite case analyses localized to classification and witness proofs. |
| Aspect | Value |
|---|---|
| Proves the claim | ✅ proves_it |
| Assumed, not proved | The headline assumes 13 ≤ n, 0 < a, X.card = n, and IsSqDiameter X D; the card states all four, and the supporting results introduce no undisclosed mathematical inputs. |
| Matches cited source | ➖ not_a_known_result |
| Fit | ✅ good_fit |
| Level | research |
| Branch | discrete geometry |
| Mode | theory_building |
| Code quality | 4 / 5 |
Statement check: The main theorem proves that for 13 ≤ n, 0 < a, X.card = n, and IsSqDiameter X D, the set nonDiameterSqDists X D differs from chain a h for every natural-number chain length h.
It proves an unconditional obstruction to geometric 3-chain distance spectra in planar point sets, supported by a classification of four-point configurations and the theorem that no five-point planar set has all squared distances in one such chain.
Novelty findings (1)
- prior-art-unchecked — PR-wide
Mathlib novelty is unchecked forErdos132ThreeChain.nonDiameterSqDists_ne_chain,Erdos132ThreeChain.pair_classification,Erdos132ThreeChain.no_five_chain_finset,Erdos132ThreeChain.no_four_on_circle,Erdos132ThreeChain.carowei,Erdos132ThreeChain.exists_independent_five, andErdos132ThreeChain.chainTwo_nonDiameter_support. The completed search forErdos132ThreeChain.four_chain_adjacentreturned only unrelated declarations.
Evidence: The supplied Prior art section marks the Mathlib search as failed for each of those seven declarations, so no existing declaration is available for comparison.
Tokens: 218,315 in / 10,579 out across 5 rubric calls · Tier: flex · Effort: xhigh · Cost: $0.7045
Each rubric is an independent review against .github/review-rubrics/ on top of .github/REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.
bc896d9 to
219cfd4
Compare
|
Thanks — all six findings are addressed at the new head
The card sentence that identified the theorem chainTwo_nonDiameter_support :
∃ X : Finset Point, X.card = 5 ∧ IsSqDiameter X 4 ∧ nonDiameterSqDists X 4 = chain 1 2The set is
It is reproved rather than imported because no project in the pool imports
theorem nonDiameterSqDists_ne_chain {X : Finset Point} {D a : ℝ} {n h : ℕ}
(hn : 13 ≤ n) (ha : 0 < a) (hcard : X.card = n) (hD : IsSqDiameter X D) :
nonDiameterSqDists X D ≠ chain a hand
Receipts at the new head. |
219cfd4 to
da7defb
Compare
|
The theorem diameterEdges_card_le
(P : Configuration ι) (S : Finset ι) {d : ℝ}
(hd : 0 < d)
(hmax : ∀ f ∈ pairs S, P.pairDistance f ≤ d) :
(diameterEdges P S d).card ≤ S.cardfrom theorem hopfPannwitz {X : Finset Point} {D : ℝ} (hD : IsSqDiameter X D) :
∑ v ∈ X, degree (DiameterAdj D) X v ≤ 2 * X.cardwith Checking the rest of the card for the same gap turned up two more named theorem cm4_sqDist_eq_zero (a b c d : Plane) :
cm4 (sqDist a b) (sqDist a c) (sqDist a d)
(sqDist b c) (sqDist b d) (sqDist c d) = 0from theorem schoenberg {D : Matrix (Fin n) (Fin n) ℝ} (hD : IsPreDistMatrix D) :
EmbedsIn D k ↔ (centeredGram D).PosSemidef ∧ (centeredGram D).rank ≤ kfrom Every quoted block was checked back against its source file, line breaks Receipts at |
Adds LeanPool/Erdos132ThreeChain, a self-contained formalization about
finite planar point sets whose non-diameter squared distances are
confined to a geometric progression of ratio three.
- nonDiameterSqDists_ne_chain: the main declaration. For n >= 13 and
a > 0, an n-point planar set with squared diameter D never has its set
of non-diameter squared distances equal to {a * 3^j : j < h}, for any
chain length h. threeChain_support_empty is the thin 2 <= h wrapper
kept for statement fidelity.
- four_chain_adjacent: the chain-quadruple theorem. The six pairwise
squared distances of a planar chain quadruple all lie in one adjacent
pair {r, 3r} of the chain, with r itself in the chain, so no such
quadruple spans two chain steps. pair_classification refines this to
the seven labelled patterns of the inductive ChainPattern, which are
the 6 + 4 = 10 labelled assignments per adjacent pair once the choice
of shortest edge is dropped.
- no_five_chain_finset: the five-point obstruction. No five-element
planar set has all ten of its pairwise squared distances inside such a
chain. The obstruction is a Gram/PSD failure written as a sum of
squares equal to -2c^3, the scale-free form of the -27r^4 determinant
recorded in symDet4_chain_five.
- carowei and exists_independent_five: the Caro-Wei independence bound by
minimum-degree induction, plus the tangent-line estimate that turns a
degree-sum bound into an independent five-set at n >= 13.
- hopfPannwitz: a supporting lemma, not a result of this project. The
same diameter bound already exists in the pool as
LeanPool.Erdos132N14.diameterEdges_card_le, proved by Perles charging
over an injective map from a linearly ordered index type into the
complex plane and stated as a bound on the cardinality of a Finset of
unordered pairs. It is reproved here over a Finset of points of the
real plane, in squared distances and handshake degree-sum form, only
because pool projects do not import one another; the card discloses the
overlap with both statements verbatim and does not list it among the
main results. The proof needs neither segment crossings nor angular
betweenness: Cramer's rule in the plane, Z * B = Y * A + X * C for the
cross products of the vectors to three points at squared distance D,
turns maximality of D into Z < X + Y, and pairing that identity with a
candidate partner of the middle point forces the partner to be the
centre. sum_degree_le proves the bound for any D that dominates the
squared distances of X, without needing D to be attained.
- Witnesses: chainTwo_nonDiameter_support exhibits a five-point set whose
squared diameter is 4 and whose non-diameter squared-distance support
is exactly chain 1 2 = {1, 3}, so the forbidden configuration is
realisable below the n >= 13 threshold at chain length two;
rhombus_nonDiameter_support is the same at chain length one;
rhombus_chain_config and centroid_chain_config exhibit the two planar
patterns of the catalogue; symDet4_chain_five records the exact
-27r^4 determinant.
All planar input is polynomial: Heron's formula as (z-x-y)^2 <= 4xy, the
anchored Cayley-Menger determinant for coplanarity, the singular Gram
matrices, and Cramer's rule, each proved by ring from coordinates. No
square roots enter the arguments and no principal-minor enumeration is
needed.
There is no prior write-up behind the 3-chain statement; it was produced
by the author's automated research pipeline in August 2026. The cited
source poses the ambient Erdos problem and states nothing about geometric
3-chains, and this does not resolve that problem. Descriptive labels in
the docstrings are internal names for results of this development.
da7defb to
7581200
Compare
|
Card. Its theorem exists_independent_five (adj : α → α → Prop) [DecidableRel adj]
(hsymm : ∀ a b, adj a b → adj b a) (hirr : ∀ a, ¬ adj a a) (V : Finset α)
(hcard : 13 ≤ V.card) (hdeg : ∑ v ∈ V, degree adj V v ≤ 2 * V.card) :
∃ S ⊆ V, S.card = 5 ∧ ∀ p ∈ S, ∀ q ∈ S, ¬ adj p q
Code. The theorem stays where it is, because the proof of the headline needs PR body. The headline block now lists two theorems, not three. The lift is Receipts at |
Vilin97
left a comment
There was a problem hiding this comment.
I reviewed head 7581200d429415ca8aecf5da2520707702513514 through the diameter-graph/Caro–Wei reduction, the four-point classification, the five-point obstruction, and the nonvacuity witnesses.
The formal mathematics checks out. The headline is unconditional, the h = 2 witness addresses the obvious vacuity concern, and I found no existing Mathlib/Lean Pool formalization of either the ratio-three headline or the general Caro–Wei lemma. The disclosed Hopf–Pannwitz and Cayley–Menger overlap is accurate. CI is green.
I am requesting changes for a severe avoidable compile cost. Witnesses.lean:30–57 is an unused expanded symDet4* appendix. CI attributes 84.0s profile time (82.5s excluding imports) to Witnesses.lean, versus at most 7.5s for every other module; the changed-module build spent 102s there. A focused cached run also peaked around 6.6 GB RSS. The determinant expansion and ring proof do not feed the headline, and no_four_on_circle already supplies the equivalent obstruction used by the development. Remove this appendix or refactor it substantially before imposing that cost on every pool build.
There is also a documentation error at Witnesses.lean:85–88: the rhombus has h = 1, so it cannot witness threeChain_support_empty, whose wrapper assumes 2 ≤ h. It witnesses the hypotheses of nonDiameterSqDists_ne_chain instead.
On fit, my opinion is borderline but favorable if the cost is fixed. This is substantial original discrete geometry, and Caro–Wei is genuinely reusable, but the ratio 3 is currently an ad hoc restriction with no prior write-up; the cited source does not state it and it does not resolve Erdős #132. Much of the remaining infrastructure is specialized, while roughly 300 lines reprove an existing pool diameter bound. I would accept it as a medium-sized research formalization, but the card should continue to be as explicit as it currently is about that limited relationship to the ambient problem.
# Conflicts: # LeanPool/projects.yml
…o lyfar/erdos132-3chain-empty
|
Both fixed, and the cost item is measured rather than asserted. 1. Measured by elaborating the module out of tree,
Two caveats so the numbers are comparable to yours. My before/after are whole-module wall times on one 2. 3. Card. Unchanged and re-checked: ratio 3 is still called ad hoc, still noted as absent from the
|
Vilin97
left a comment
There was a problem hiding this comment.
Rereviewed at 6401538d.
The earlier requested changes are resolved. The unused expanded symDet4* appendix is gone; a fresh targeted build completed all 11 modules in 16.85s wall time at 2.67 GB peak RSS, and profiling Witnesses.lean took 6.50s rather than the previous 84s / roughly 6.6 GB. The rhombus documentation now correctly says that it has h = 1, cannot witness the 2 ≤ h wrapper, and deliberately fails the cardinality regime.
The substantive assessment passes. The headline theorem faithfully proves the card claim and has a genuine five-point, chain-length-two nonvacuity witness. I found no Mathlib or pool theorem subsuming the ratio-three classification or five-point obstruction; the closest overlaps are accurately disclosed. Fit is borderline but favorable: the ratio-three restriction is ad hoc and does not solve Erdős 132, but this is still research-level discrete geometry with a substantial classification/obstruction, plus reusable relation-level carowei and exists_independent_five infrastructure. The 308-line Hopf–Pannwitz reproof is disclosed and acceptable under the self-contained-project convention. Code organization and current compile cost are good for Lean Pool.
One small source-attribution blocker remains. In LeanPool/projects.yml, the cited source is “Erdos Problem #132” and its author list contains only Paul Erdős, but the cited page explicitly says “Asked by Erdős and Pach.” Please add János Pach to source.authors. After that citation correction and a green exact-head build, I would approve.
Vilin97
left a comment
There was a problem hiding this comment.
Maintainer follow-up at 05938920: the remaining citation issue is fixed by crediting both Paul Erdős and János Pach, and the compilation path has been materially optimized. The unused rhombus_nonDiameter_support theorem was removed; the retained chain-length-two witness now uses deterministic simplification instead of backtracking; and the lightweight diameter/support definitions moved into Basic without changing their names or types, allowing Witnesses to compile independently of the full theorem DAG. Independent measurements show Witnesses.lean at 6.39s → 3.30s median wall time and the registered witness at 5.954s → 0.318s. A current-main targeted build, declaration linter, style linter, generated-index check, and diff check all pass. Approved pending exact-head CI.
This adds
LeanPool/Erdos132ThreeChain: a self-contained, unconditionalformalization about finite planar point sets whose non-diameter squared
distances are confined to a geometric progression of ratio three.
Two theorems carry it:
The lift from five points to
n ≥ 13isexists_independent_five, the Caro–Weibound specialized to a degree-sum hypothesis. That hypothesis is the
Hopf–Pannwitz edge bound, which
hopfPannwitzsupplies. Hopf–Pannwitz is notclaimed as new here: the same bound is already in the pool as
LeanPool.Erdos132N14.diameterEdges_card_le, and this project reproves it in itsown model only because pool projects do not import one another. It is a
supporting lemma, and it is not listed among the card's main results. The
overlap is set out with both statements verbatim under Prior art.
Provenance and scope
the author's automated research pipeline in August 2026.
states nothing about geometric 3-chains. This PR does not resolve that
problem: its distance spectra need not be geometric 3-chains.
"five-point obstruction" — are internal names for results of this development.
They do not refer to a numbered result anywhere else. The earlier draft of
this PR used "Theorem 4" / "Theorem 5" and spoke of "the source's" determinant
and counts; that numbering was internal and the phrasing was wrong, and both
are gone.
version in Mathlib or the pool, so it is proved here. Hopf–Pannwitz does have
one in the pool, and the copy here is a self-containment lemma, not a claim
(see Prior art).
provenance: AI).Prior art
Commands were run against the pinned Mathlib
(
.lake/packages/mathlib/Mathlib,v4.34.0-rc1) and againstLeanPool/, withgrep -rEil <pattern>. Counts are files matched.caro.?weihopf.?pannwitz|pannwitzLeanPool/Erdos132N14/{HopfPannwitz,HopfPannwitzGeometry,DiameterDescent,Main,PublishedInputs}.leandiameter.?graph,diameterEdgesLeanPool/Erdos132N14/HopfPannwitz.leanfew.?distance,two.?distance.?set,three.?distance.?setLeanPool/Erdos132N14/PublishedInputs.lean(multiplicity inputs, not a distance-set classification)cayley.?mengerLeanPool/DistanceGeometry/CayleyMengerVolume.lean,LeanPool/Erdos97ConvexOctagon/CayleyMenger.leanschoenbergLeanPool/DistanceGeometry/Schoenberg.leangeometric.?progression.*distance,distanceSet,distanceSpectrumindependenceNumber|indepNumMathlib/Combinatorics/SimpleGraph/Clique.leanisTuranMaximalMathlib/Combinatorics/SimpleGraph/Extremal/Turan.leanWhat the hits are, declaration by declaration:
hopfPannwitzduplicatesLeanPool.Erdos132N14.diameterEdges_card_le, andis not claimed as new. The two statements, verbatim:
Same mathematical content — a positive maximal distance is realised at most as
often as there are points. The existing one is stated for a
Configuration ι(an injective map from a
LinearOrderindex type intoℂ) and bounds thecardinality of a
Finsetof unordered pairs, proved by Perles charging. Theversion here works over a
Finset (ℝ × ℝ), in squared distances, in handshakeform, by pendant-deletion induction driven by Cramer's rule. Neither statement
is an instance of the other without a model bridge (a
LinearOrderonℝ × ℝ, adist-to-sqDisttransfer, and a handshake lemma). It is reprovedrather than imported because no project in the pool imports another —
CONTRIBUTING.mdstates the projects are independent, and a check of everyimport LeanPool.*line inLeanPool/finds zero cross-project imports today.It is a supporting lemma of this development and is deliberately absent from
the card's
main_results.Erdos97ConvexOctagon.cm4_sqDist_eq_zerois the same four-pointCayley–Menger vanishing as
Erdos132ThreeChain.gramDet_eq_zero, overEuclideanSpace ℝ (Fin 2)rather thanℝ × ℝ. Both are one-lineringidentities; the same independence reason applies.
DistanceGeometry.schoenbergcharacterizes Euclidean distance matrices ingeneral dimension. This project never invokes Schoenberg: the four-point
condition is used directly as a
ringidentity, and the five-pointobstruction is a sum-of-squares contradiction.
SimpleGraph.indepNumis a definition plus complement lemmas; it carriesno lower bound, so it cannot supply Caro–Wei.
isTuranMaximalis theextremal-graph characterization, not an independence-number bound.
No Mathlib match was found for the remaining headline notions
(
nonDiameterSqDists_ne_chain,four_chain_adjacent,pair_classification,no_four_on_circle,carowei,exists_independent_five,chainTwo_nonDiameter_support). The patterns searched are the onestabulated above; a zero count is a zero count, not a claim that no
reformulation exists.
Structure
Basic.leanPoint = ℝ × ℝ,sqDist,chain a h,IsChainValuePlane.lean3 × 3Gram (Cayley–Menger) determinant vanishing for four coplanar points, the3-vector Gram determinant, the expanded square of a linear combinationPowerThree.lean3^ℓ = 4·3^j − 1;(3^j − 3^ℓ)² − 3·3^ℓ + 3 = 0;3^ℓ ∉ {4, 7})FourPoints.leanChainPos, the inductiveChainPattern, the structureChainQuadruple, andpair_classificationFivePoints.leanno_five_chain_pointsSupport.leanfour_chain_adjacentandno_five_chain_finsetCaroWei.leanexists_independent_fiveHopfPannwitz.leanIsSqDiameter, the diameter graph, and the Hopf–Pannwitz edge boundStatement.leannonDiameterSqDists_ne_chain, and the2 ≤ hwrapperWitnesses.lean−27 r⁴determinant recordHow the geometry is done
Everything planar reduces to polynomial identities in point coordinates, so
ringdischarges them and no square roots appear:(z − x − y)² ≤ 4xy, i.e. Heron's formula4xy − (z−x−y)² = 4·(2·area)²;determinant
H_ij = d_{0i} + d_{0j} − d_{ij},H_ii = 2 d_{0i};cfrom a common centre with pairwise squared distances in{c, 3c}givevectors with
⟪uᵢ,uⱼ⟫ = ±c/2; singularity of every3-vector Gram forces eachtriple product to be
−c³/8, and the explicit combinationc·u₁ − 2⟪u₁,u₂⟫·u₂ − 2⟪u₁,u₃⟫·u₃ − 2⟪u₁,u₄⟫·u₄has squared length−2c³ < 0.A sum-of-squares contradiction cannot miss a principal minor the way an
enumerated PSD test can. The equivalent determinant value is recorded as
symDet4_chain_five(−27 r⁴) alongsidesymDet4_dotp_eq_zero.How the supporting Hopf–Pannwitz proof goes
The textbook proof argues that two diameter segments must intersect, then that a
vertex of degree
≥ 3has a degree-1neighbour by an angular argument on the60°arc. Neither step is needed here.sum_degree_ledeletes a pendant vertex using one identity. LetA,B,Cbethe vectors from a point
vto three points at squared distanceD, and letX = A × B,Y = B × C,Z = A × Cbe the plane cross products. Cramer's ruleis the polynomial identity
Z • B = Y • A + X • C, and comparing squared lengthsturns maximality of
DintoZ < X + Y. IfX, Y > 0— that is, ifBliesstrictly between
AandC, whichexists_middlealways arranges for one ofthe three — then any
wwithsqDist b w = Dsatisfies⟪B, w−v⟫ = |w−v|²/2while
⟪A, w−v⟫and⟪C, w−v⟫are at least that, purely becauseDdominatesevery squared distance. Pairing Cramer's identity with
w − vgives(X + Y − Z)·|w−v|² ≤ 0, hencew = v. Induction on#Xremoves that pendantvertex, which costs exactly two from the degree sum.
sum_degree_leis stated for anyD > 0dominating the squared distances ofX; it never needsDto be attained.hopfPannwitzis the corollary for anactual squared diameter.
Non-vacuity
chainTwo_nonDiameter_supportis a five-point set — the rhombus of two gluedequilateral triangles together with the reflection of one vertex, at
(0,0),(1,0),(−½, √3/2),(½, √3/2),(0, √3)— whose squared diameteris
4and whose non-diameter squared-distance set is exactlychain 1 2 = {1, 3}. So the configuration the headline forbids forn ≥ 13isrealisable at
n = 5withh = 2: the theorem is not vacuous inside its ownh ≥ 2regime, and the bound onnis doing the work.rhombus_nonDiameter_supportis the same kind of witness at chain length one,and
rhombus_chain_config/centroid_chain_configexhibit the two planarpatterns the chain-quadruple theorem classifies.
Card metadata
source.github_repois set tolyfar/lean-pool. This formalization has noupstream project — the Lean was written directly for the pool — but
quality.pyrequires the field, so it points at the fork the branch lives in.The partial-port audit that consumes it is advisory.
Receipts
On
upstream/main3fc79f0a, toolchain and Mathlibv4.34.0-rc1.lake exe mk_all --check—No update necessarylake build LeanPool—Build completed successfully (8906 jobs), zeroerror:/warning:lines in the log (whole pool)lake build LeanPool Challenge Solution—Build completed successfully (8928 jobs); the only warnings are the threedeclaration uses 'sorry'linesfrom the pre-existing
Challenge/statementslake exe runLinter LeanPool.Erdos132ThreeChain—Linting passedlake exe lint-style LeanPool— exit 0, no findingspython -m lean_pool.quality --repo ..—Quality checks passed.grep -nE '\b(sorry|admit|axiom|native_decide|unsafe|partial|opaque|constant|set_option|nolint|#check|#print|#eval|#reduce|#guard_msgs|#lint)\b'over the namespace — no matches; no bare
import Mathlib; every line ≤ 100characters; all eleven files carry the four-line header
#print axiomsonnonDiameterSqDists_ne_chain,threeChain_support_empty,four_chain_adjacent,pair_classification,no_five_chain_finset,no_five_chain_points,no_four_on_circle,carowei,exists_independent_five,hopfPannwitz,sum_degree_le,exists_pendant,middle_no_other_neighbour,chainTwo_nonDiameter_support,chainTwo_config,rhombus_nonDiameter_support,symDet4_chain_five,rhombus_chain_config,centroid_chain_config— every one is exactly[propext, Classical.choice, Quot.sound]1713 lines of Lean across eleven files.
Known gaps
sum_degree_leproves the Hopf–Pannwitz edge bound, not the extremalcharacterization (odd cycles with pendant trees).
pair_classificationexports the seven labelled patterns relative to ashortest edge; dropping the choice of shortest edge these are the
6 + 4 = 10labelled assignments per adjacent pair, i.e.
10(h−1)over a chain of lengthh. A labelling-free set-level restatement of that count is not exported;four_chain_adjacentexports only the coarser "all six lie in{r, 3r}".🤖 Generated with Claude Code