Discrete Mathematics · arXiv:2612.04412 v1 · submitted 1 Dec 2026 · 30 references
Small Ramsey numbers in Lean
The paper says
“We present a Lean 4 development, built on Mathlib, that proves the small two-colour Ramsey numbers R(3, 3) = 6, R(3, 4) = 9, R(3, 5) = 14, R(4, 4) = 18 and R(3, 3, 3) = 17 from the definition, together with R(3, 6) = 18, which to our knowledge had not been formalized before - its upper bound is proved without any computer search, by a variant of Cariolaro's argument.”
The abstract
We present a Lean 4 development, built on Mathlib, that proves the small two-colour Ramsey numbers R(3, 3) = 6, R(3, 4) = 9, R(3, 5) = 14, R(4, 4) = 18 and R(3, 3, 3) = 17 from the definition, together with R(3, 6) = 18, which to our knowledge had not been formalized before - its upper bound is proved without any computer search, by a variant of Cariolaro's argument. We formalize the Graver-Yackel edge-counting method, which yields 131 non-trivial minimum-edge bounds for triangle-free graphs automatically, show that counting alone cannot prove R(3, 7) ≤ 23, and formalize Graver and Yackel's proof of R(3, 7) = 23 except for its two long parts, which enter as explicit hypotheses. For lower bounds, a clique search with a machine-checked soundness proof lets the Lean kernel, using only Lean's three standard axioms, check seven published witness graphs on up to 58 vertices; compiled evaluation checks eleven more, on up to 173 vertices, including recent graphs found by AlphaEvolve. Finally, we record a series of inexpensive experiments aimed at improving published lower bounds, from sweeps of Cayley graphs to random geometric and Hermitian unital graphs. Although none succeeded, we report their scale and limits so that they need not be repeated blindly. All code and data are public.
from the abstract
Pith says
Holds up, with conditions. A Lean 4 formalization proves R(3, 6) = 18 without computer search and provides kernel-checked lower-bound witnesses, with a conditional proof of R(3, 7) = 23 that isolates the two remaining unformalized parts.
Machine review · 4 Dec 2026 · Full text · 3 minor
How this review was made
Machine review · deepseek-v4-flash · 4 Dec 2026 · read the full text (68,345 characters) · not checked by a person
The reviewer was given the whole text, 68,345 characters. Not checked: figures, code, what the 30 references say.
How the review went
5 passes by deepseek-v4-flash · 4 Dec 2026
- Reader holds up, with conditions
- Skeptic concern withdrawn: Pith's reviewer misread the paper
- Referee 3 minor
- Check against the paper kept 0 of 1 objection
- Editor wrote the verdict above
Not run on this paper: the simulated authors' defence.
Pith's passes raised 1 objection. A check against the paper's text kept 0 and withdrew 1 (1 Pith's reviewer misread the paper).
The test under “What would settle it” is from Pith's summary of the paper.
What would settle it
For the unconditional results, one could run the Lean code and verify that it compiles with the stated axioms and that the theorems are accepted by the kernel. For the conditional proof of R(3, 7) = 23, one would need to either prove hypotheses (E) and (L) or find a counterexample to the claim that every (3,6)-graph on 17 vertices has at least 40 edges or that every 6-regular (3,7)-graph on 23 vertices has at least four 3-points.
3 minor objections
- 3.2 In the proof of Theorem 1 (R(3,6)=18), Step 4 states 'A short count using these facts gives two vertices u1,u2...' without showing the count. While the Lean proof supplies the details, the mathematical exposition would benefit from a brief justification of why such u1,u2 exist, to make the argument self-contained for a reader not running the code.
- 5.2 Table 1 includes a note (e) for the kernel check of R(3,12) that describes memory paging. This operational detail is more appropriate for a footnote than the main table caption, as it does not affect the mathematical claim.
- 3.1 The paper uses the Lean command `lean{}` for code snippets. For readers unfamiliar with Lean, a brief note in the appendix or a footnote explaining that this denotes a Lean identifier would improve accessibility.
A machine wrote this review. Check any line against the paper. If a line is wrong, say so, and the correction goes on the record.
Are you an author of this paper?
Reply on the record, clarify a point, or challenge an error.
A reply is published word for word beside the review once Pith has verified that the paper is yours. Until then, what you write is kept in this browser.
The review in full
The review in brief
This paper does two things well. First, it gives the first formal proof of R(3, 6) = 18 in a proof assistant, and the upper bound is proved without any computer search—just a variant of Cariolaro's argument written out in Lean. Second, it builds a clique search whose soundness is proved in Lean, then uses it to turn published witness graphs into kernel-checked theorems for lower bounds up to about 50 vertices, and compiled-checked theorems for graphs up to about 170 vertices. The trust model is unusually explicit: every theorem reports exactly which axioms it uses, and kernel-checked and compiled-checked results are kept separate throughout. The paper also formalizes the Graver–Yackel edge-counting method and gives a conditional proof of R(3, 7) = 23 that reduces the problem to two stated hypotheses, (E) and (L), which are the parts of the published proof that remain unformalized. The negative experiments in the last section are honestly reported with their scale and limits, so that others need not repeat them blindly. The paper claims no new mathematical bound, and it does not oversell what it has done. The soft spots are the ones the authors themselves name: the proof of R(3, 7) = 23 is conditional on two hypotheses that are cited but not proved here, and the kernel-checked witness verification runs into memory limits around 60 vertices. Neither is a flaw in the paper—they are stated limitations. The paper is written for the formal-verification community and for Ramsey theorists who care about how much of the known small-value theory can be placed on a small trusted base. It deserves a serious referee: the claims are precise, the code is public, and the development is careful enough that a referee can check the main results by reading the paper and inspecting the repository.
The stress test's concern
Withdrawn: Pith's reviewer misread the paper.
The paper says
“Because G is triangle-free, every neighbourhood is independent.”
The referee's report
The paper makes a significant contribution to the formal verification of combinatorial results. It places several well-known Ramsey numbers on a minimal trusted base (Lean's kernel with only three axioms), provides the first formal proof of R(3, 6) = 18 without computer search, and gives a conditional formalization of R(3, 7) = 23 that isolates the remaining unformalized parts. The verified clique search for lower-bound witnesses is a practical tool, and the honest reporting of negative experiments may prevent redundant effort. The work is careful about trust levels and limitations, setting a high standard for formalization papers.
Pith's reading
The paper presents a Lean 4 formalization of several small two-colour Ramsey numbers, proving exact values for R(3,3), R(3,4), R(3,5), R(4,4), R(3,3,3), and R(3,6) from the definition. The proof of R(3, 6) = 18 is notable because it uses no computer search, relying instead on a variant of Cariolaro's argument. For R(3, 7) = 23, the formalization is conditional on two hypotheses from the literature that are not proved in the paper. The paper also provides a verified clique search that checks lower-bound witnesses, and reports a series of negative experiments that did not improve any published bound.
What carries the argument. The central objects are the Lean 4 proof assistant with its kernel, the Graver–Yackel edge-counting method for triangle-free graphs, a variant of Cariolaro's argument for R(3,6) that avoids uniqueness results, and a clique search algorithm proved sound in Lean that checks lower-bound witnesses by kernel or compiled evaluation.
Core claim. The paper reports a Lean 4 formalization, built on Mathlib, that proves the exact values R(3, 3) = 6, R(3, 4) = 9, R(3, 5) = 14, R(4, 4) = 18, R(3, 3, 3) = 17, and R(3, 6) = 18 from the definition. The upper bound of R(3,6) is proved without any computer search, using a variant of Cariolaro's argument. For R(3, 7) = 23, the formalization is conditional on two hypotheses (E) and (L) from Graver and Yackel and Kalbfleisch, which are not proved in the paper. The paper also provides a verified clique search that turns published witness graphs into Lean theorems, checked either by the kernel or by compiled evaluation, establishing lower bounds for several larger Ramsey numbers.
The premise it rests on. For the unconditional results, the load-bearing premise is that the Lean kernel is correct and that the three standard axioms (propext, Classical.choice, Quot.sound) are consistent. For the conditional proof of R(3, 7) = 23, the weakest additional assumption is that every (3,6)-graph on 17 vertices has at least 40 edges (hypothesis E) and that every 6-regular (3,7)-graph on 23 vertices has at least four 3-points (hypothesis L).
If the paper is right
The formalization provides a trusted, kernel-checked base for these small Ramsey numbers, which can be used in further formal developments.
The proof of R(3, 6) = 18 without computer search demonstrates that some classical Ramsey bounds can be formalized with purely human-readable arguments.
The conditional formalization of R(3, 7) = 23 isolates exactly what remains to be formalized (hypotheses E and L), clarifying the path to a complete formal proof.
The verified clique search allows future lower-bound witnesses to be checked inside Lean with minimal trust assumptions.
The negative experimental results record that simple algebraic families and heuristic searches did not improve any published bound, which may guide future search efforts.
The method used for R(3,6) might be adaptable to other small Ramsey numbers where a short human proof exists, such as R(3,7) if the missing hypotheses are supplied.
The conditional proof of R(3,7) highlights that the full Graver–Yackel argument contains parts that are not fully written out in the literature, suggesting that a complete formalization would require either new exposition or a verified enumeration.
The negative experiments suggest that simple algebraic families (Cayley graphs, circulants) and random geometric graphs are unlikely to yield new lower bounds for small Ramsey numbers, so future searches should focus on more sophisticated constructions or larger scales.
The verified clique search, while limited to about 50 vertices for kernel checks and about 170 vertices for compiled checks, provides a blueprint for checking larger combinatorial certificates in Lean.
Check this review
What was read
The passes were given all 68,345 characters of the paper's LaTeX source.
Fingerprint of that text (SHA-256): 3062f1732e3df768ed8b214a719c8765af4c5a29484ef2c26fdcda34ac89bd78
Pith does not keep that text. Rebuilt from the paper's source or PDF by the same code, it has this fingerprint if it is the same text. From a copy of Pith's code:
PYTHONPATH=. python scripts/review_input_check.py 2612.04412
The passes, in the order they ran
- Reader deepseek-v4-flash · medium effort · $0.0045 · instructions of the Reader, fingerprint f9ead7300382…
- Skeptic deepseek-v4-flash · medium effort · $0.0029 · instructions of the Skeptic, fingerprint 8f88c0f61488…
- Referee deepseek-v4-flash · medium effort · $0.0023 · instructions of the Referee, fingerprint a852d99aea0d…
- Check against the paper deepseek-v4-flash · medium effort · $0.0031 · instructions of the Check against the paper, fingerprint 6c7a6883d551…
- Editor deepseek-v4-flash · medium effort · $0.0022 · instructions of the Editor, fingerprint e7211f6a3d27…
- Circularity check deepseek-v4-flash · medium effort · $0.0022 · instructions of the Circularity check, fingerprint e9946e39d67b…
- Summary for the page deepseek-v4-flash · medium effort · temperature 0.2 · $0.0025 · instructions of the Summary for the page, fingerprint e4f56bf568e7…
The passes cost $0.020 in model calls together.
Version stamped on this review: pith-pipeline@v1.4.1-daily-deepseek-or-medium+deepseek/deepseek-v4-flash+p.d60f54226f00
Each link opens a pass's instructions as plain text, the exact bytes its fingerprint was taken over. Every stored set of instructions.
curl -s https://pith.science/methodology/prompts/f9ead730038216984cfb56d7cb34332bdf691828296a1de4245f3d6667d4bf56 | sha256sum
prints the fingerprint of the reader's instructions. The same works for every pass.
The receipt
The review's fingerprint was taken on 4 Dec 2026. The review you are reading still matches it.
Fingerprint of the review (SHA-256): 86cc398616af53b3f4f8410349cc07402f7b095fc438c1577fa8b2ed55bae322
curl -s 'https://pith.science/api/v1/verdicts/2612.04412?form=canonical' | sha256sum
prints the fingerprint of the review as it stands now. The rule, in four steps.
A matching fingerprint shows the review has not changed since that date. It does not show that the review is right.
Reviews like this one: written by deepseek-v4-flash, from the paper's LaTeX source.
No person has reviewed this paper on Pith yet. A scientist listed on Pith can review it for a fee, and the review is published here whatever it concludes. Request a human review
The paper
Abstract
We present a Lean 4 development, built on Mathlib, that proves the small two-colour Ramsey numbers R(3, 3) = 6, R(3, 4) = 9, R(3, 5) = 14, R(4, 4) = 18 and R(3, 3, 3) = 17 from the definition, together with R(3, 6) = 18, which to our knowledge had not been formalized before - its upper bound is proved without any computer search, by a variant of Cariolaro's argument. We formalize the Graver-Yackel edge-counting method, which yields 131 non-trivial minimum-edge bounds for triangle-free graphs automatically, show that counting alone cannot prove R(3, 7) ≤ 23, and formalize Graver and Yackel's proof of R(3, 7) = 23 except for its two long parts, which enter as explicit hypotheses. For lower bounds, a clique search with a machine-checked soundness proof lets the Lean kernel, using only Lean's three standard axioms, check seven published witness graphs on up to 58 vertices; compiled evaluation checks eleven more, on up to 173 vertices, including recent graphs found by AlphaEvolve. Finally, we record a series of inexpensive experiments aimed at improving published lower bounds, from sweeps of Cayley graphs to random geometric and Hermitian unital graphs. Although none succeeded, we report their scale and limits so that they need not be repeated blindly. All code and data are public.
A classifier labelled each sentence of the abstract by the part it plays in the paper. The labels are kept beside the review and separate from it: the review read the paper's text, and these labels cover the abstract only. Every quoted sentence is the authors' own. No sentence in this record was written by a model.
abstract compiled · 4 Dec 2026
The main claim
“We present a Lean 4 development, built on Mathlib, that proves the small two-colour Ramsey numbers R(3, 3) = 6, R(3, 4) = 9, R(3, 5) = 14, R(4, 4) = 18 and R(3, 3, 3) = 17 from the definition, together with R(3, 6) = 18, which to our knowledge had not been formalized before - its upper bound is proved without any computer search, by a variant of Cariolaro's argument.”
Stated as asserted.
The abstract, sentence by sentence
This table labels the abstract only (arXiv listing abstract v1). The number is the probability the classifier gave the label.
| Sentence | Role | The authors' own work | States the main conclusion | Strength |
|---|---|---|---|---|
| We present a Lean 4 development, built on Mathlib, that proves the small two-colour Ramsey numbers R(3, 3) = 6, R(3, 4) = 9, R(3, 5) = 14, R(4, 4) = 18 and R(3, 3, 3) = 17 from the definition, together with R(3, 6) = 18, which to our knowledge had not been formalized before - its upper bound is proved without any computer search, by a variant of Cariolaro's argument. | contribution 0.90 | 0.96 | 0.75 | asserted 1.00 |
| We formalize the Graver-Yackel edge-counting method, which yields 131 non-trivial minimum-edge bounds for triangle-free graphs automatically, show that counting alone cannot prove R(3, 7) ≤ 23, and formalize Graver and Yackel's proof of R(3, 7) = 23 except for its two long parts, which enter as explicit hypotheses. | contribution 0.94 | 0.90 | 0.13 | asserted 1.00 |
| For lower bounds, a clique search with a machine-checked soundness proof lets the Lean kernel, using only Lean's three standard axioms, check seven published witness graphs on up to 58 vertices; compiled evaluation checks eleven more, on up to 173 vertices, including recent graphs found by AlphaEvolve. | contribution 0.55 | 0.89 | 0.07 | asserted 1.00 |
| Finally, we record a series of inexpensive experiments aimed at improving published lower bounds, from sweeps of Cayley graphs to random geometric and Hermitian unital graphs. | contribution 0.89 | 0.94 | 0.03 | asserted 0.98 |
| Although none succeeded, we report their scale and limits so that they need not be repeated blindly. | limitation 0.50 | 0.90 | 0.05 | asserted 0.99 |
| All code and data are public. | contribution 0.76 | 0.52 | 0.03 | asserted 1.00 |
What kind of paper the classifier reports this is: method or tool 0.81 · evidence from proof or derivation 0.97
What was examined, and what was not
These lists are about the sentence labels. What the review read is said with the review.
Read
- arXiv listing abstract v1
Not read
- full text
- figures and tables
- references and citing sentences
- relations to other papers
Labelled
- abstract
Not labelled
- sections
- body sentences
- citations
- cross-paper relations
The main claim, as probabilities
picked as the main claim 1.00 · how strongly it is stated 1.00
What the abstract itself states, as probabilities
claims first 0.51 · states limitation 0.96 · human participants 0.03 · controlled comparison 0.03 · randomized assignment 0.01 · states quantitative result 0.98 · compares with prior results 0.91 · mentions code or data availability 0.99
How the labels were made
Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-12-04: 1 request, 5,347 input tokens.
This record as JSON, with every label and the probability the classifier gave it.
References (30)
- [1] Leaps in bounds: Repository of progress on mathematical unknowns.https:// leapsinbounds.org; source athttps://github.com/daniel-munro/leaps-in-bounds. Accessed 1 December 2026 on Pith
- [2] V. Angeltveit.R(3,10)≤41.Electronic Journal of Combinatorics, 32(4):P4.30, 2025. arXiv:2401.00392 on PithPith's reviewarXiv
- [3] M. Campos, S. Griffiths, R. Morris, and J. Sahasrabudhe. An exponential improvement for diagonal Ramsey.Annals of Mathematics, 203(3), 2026 on Pith
- [4] D. Cariolaro. On the Ramsey numberR(3,6).Australasian Journal of Combinatorics, 37:301–304, 2007 on Pith
- [5] E. Davies, M. Jenssen, W. Perkins, and B. Roberts. On the average size of independent sets in triangle-free graphs.Proceedings of the American Mathematical Society, 146(1):111–124, 2018 on Pith
- [6] P. Erd˝ os and G. Szekeres. A combinatorial problem in geometry.Compositio Mathematica, 2:463–470, 1935 on Pith
- [7] G. Exoo. Ramsey numbers.http://cs.indstate.edu/ge/RAMSEY/. Accessed 28 November 2026 on Pith
- [8] T. Gauthier and C. E. Brown. A formal proof ofR(4,5) = 25. In15th International Conference on Interactive Theorem Proving (ITP 2024), volume 309 ofLIPIcs, 2024. Paper 16.arXiv:2404.01761 on PithPith's reviewarXiv
- [9] J. Goedgebeur and S. P. Radziszowski. New computational upper bounds for Ramsey numbersR(3, k).Electronic Journal of Combinatorics, 20(1):P30, 2013 on Pith
- [10] Google Research. Ramsey number bounds.https://github.com/google-research/ google-research/tree/master/ramsey_number_bounds, 2026. Commit 0d94f8c4d92678ce5f7a0eacae725f79174cfb03, 22 October 2026 on Pith
- [11] J. E. Graver and J. Yackel. Some graph theoretic results associated with Ramsey’s theorem. Journal of Combinatorial Theory, 4:125–175, 1968 on Pith
- [12] R. E. Greenwood and A. M. Gleason. Combinatorial relations and chromatic graphs.Cana- dian Journal of Mathematics, 7:1–7, 1955 on Pith
- [13] C. Grinstead and S. Roberts. On the Ramsey numbersR(3,8) andR(3,9).Journal of Combinatorial Theory, Series B, 33:27–51, 1982 on Pith
- [14] G. Jeong, S. Park, J. Hyun, S. Oum, and H. Yang. Formalizing flag algebras in Lean, 2026. arXiv:2607.23500 on PithPith's reviewarXiv
- [15] James Grant Kalbfleisch. Chromatic graphs and Ramsey’s theorem. 2002. 16 MAYANK KEJRIW AL on Pith
- [16] Gerzson K´ ery. On a theorem of Ramsey.Mat. Lapok, 15:204–224, 1964 on Pith
- [17] Z. Li, C. Duggan, C. Bright, and V. Ganesh. Verified certificates via SAT and computer algebra systems for the RamseyR(3,8) andR(3,9) problems. InProceedings of the 34th International Joint Conference on Artificial Intelligence (IJCAI 2025), pages 2619–2627, 2025.arXiv:2502.06055 on PitharXiv
- [18] J. Ma, W. Shen, and S. Xie. An exponential improvement for Ramsey lower bounds. Inventiones Mathematicae, 245:1059–1115, 2026.arXiv:2507.12926 on PithPith's reviewarXiv
- [19] S. Mattheus and J. Verstra¨ ete. The asymptotics ofr(4, t).Annals of Mathematics, 199(2):919–941, 2024 on Pith
- [20] B. D. McKay and Ke Min Zhang. The value of the Ramsey numberR(3,8).Journal of Graph Theory, 16:99–105, 1992 on Pith
show 10 more
- [21] B. Mehta. exponential-ramsey.https://github.com/b-mehta/exponential-ramsey, 2023 on Pith
- [22] A. Nagda, P. Raghavan, and A. Thakurta. Reinforced generation of combinatorial struc- tures: Ramsey numbers, 2026. Version 5, 21 April 2026.arXiv:2603.09172 on PithPith's reviewarXiv
- [23] D. E. Narv´ aez, C. Song, and N. Zhang. Formalizing finite Ramsey theory in Lean 4. InIn- telligent Computer Mathematics (CICM 2024), volume 14960 ofLecture Notes in Computer Science (LNAI), pages 91–108. Springer, 2024 on Pith
- [24] S. P. Radziszowski. Small Ramsey numbers. Electronic Journal of Combinatorics, Dynamic Survey DS1, revision 18, 2026. 24 April 2026 on Pith
- [25] F. P. Ramsey. On a problem of formal logic.Proceedings of the London Mathematical Society (2), 30:264–286, 1930.doi:10.1112/plms/s2-30.1.264 on Pithdoi:10.1112/plms/s2-30.1.264
- [26] J. B. Shearer. A note on the independence number of triangle-free graphs, II.Journal of Combinatorial Theory, Series B, 53:300–307, 1991 on Pith
- [27] C. Song and D. E. Narv´ aez. RamseyLemmas. Lean 4 project and blueprint,https: //github.com/cruisesong7/RamseyLemmas, 2026. Blueprint dated 9 January 2026; last commit 5 April 2026; accessed 30 November 2026 on Pith
- [28] S. Szeider. Streaming LRAT certificates into Lean theorems, 2026. Version 2, 7 September 2026; version 1 (1 July 2026) was titled “LRAT-Catcher: importing SAT solver certificates into Lean 4 by reflection”.arXiv:2607.00815 on PithPith's reviewarXiv
- [29] C. Toledo. AlphaEvolve’s Ramsey lower bounds: the 18 released graphs decided. cert- machine report,https://carlostoledo.co/reports/ramsey-graphs.html, 2026. Find- ings dated 23 October 2026; accessed 30 November 2026 on Pith
- [30] ZestyWombat854. Independent verification of the nine AlphaEvolve Ramsey lower-bound records. GitHub repository,https://github.com/ZestyWombat854/ ramsey-lower-bound-records-alphaevolve-verification, 2026. 13 August 2026. AppendixA.Definitions and background For completeness we... on Pith
Challenges and discussion
Disagree with the review, or know something it missed? Leave a comment, or challenge this review formally: a challenge becomes a permanent entry in this paper's record, and its decision is published here.
The week in your field, by email.
A short list of the week's newly reviewed papers. Nothing is sent until you confirm from your inbox, and every email has a link that stops it. No account. No tracking pixel.
No comments yet.
Sign in to comment