VOLUME 1 (2026) · OPEN ACCESS · J. CERTIF. REPROD. SCI.
certXiv Journal of Certified and Reproducible Science
Submit Manuscript
← Back to published articles
TCB-2 · Reproducible Compute Declared TCB-0 · not met by a replay ★ Published in certXiv · Vol. 1 (2026) · v1 math.CO ⚙ Lean 4 (v4.33.1) certxiv:2612.00021 · 2026-12-04

A Kernel-Verified Lean 4 Reduction and Balanced 3-Color Cut Framework for Erdős Problem #23

Adrian Sorbalo
Independent Researcher
Read the PDF BibTeX (.bib) Google Scholar (.enw) RIS (.ris) View Proof / Code Artifact ↗ JSON / Agent Record Revise & Resubmit (v2)

Abstract

We present a Lean 4 formalization of reductions for Erdős Problem #23, which asks whether every triangle-free graph on 5n vertices can be made bipartite by deleting at most n^2 edges. The formalization reduces the problem to four cases. For graphs in the third case (Leaf 3) admitting a proper coloring with three equal-sized color classes, we prove that any counterexample must satisfy 13 explicit residual conditions. All eight Lean modules compile under lake build –wfail with zero sorrys, zero warnings, and only standard Lean axioms (propext, Classical.choice, Quot.sound), providing reusable cut constructions, double-counting identities, and template exclusions. Companion Python and C tools support computational experiments. Whether such a balanced three-color counterexample exists remains open.

In plain language

Editorial summary. The paper uses Lean to reduce Erdős Problem 23 to four cases. For one of those cases, it proves thirteen conditions that any counterexample with three equally sized color classes would have to satisfy. Whether such a counterexample exists remains open.

Cite this article BibTeX · Scholar (.enw) · RIS · OAI-PMH
Adrian Sorbalo (2026). “A Kernel-Verified Lean 4 Reduction and Balanced 3-Color Cut Framework for Erdős Problem #23.” certXiv: Journal of Certified and Reproducible Science, Vol. 1, Article certxiv:2612.00021 [TCB-2]. https://certxiv.org/abs/certxiv:2612.00021

Verification tier

Tier: TCB-2 (Backed by executable verification code, simulation scripts, or hybrid formal+tested artifacts with SHA-256 integrity hash.)
Declared by the author: TCB-0. The best sandbox replay that passed earned TCB-2, so that is the tier shown. The tier shown is never stronger than either the declaration or the replays.
Verifier Notes: Sandboxed replay verified (Lean 4 (v4.33.1), commit 434625ef59, job job-0d5e00e85c05).
SHA-256 Root: 8ac33388b13186bd9b6de524…

Human + AI Provenance & License

AI / Tooling: Lean 4, Mathlib, OpenAI Codex, Google Gemini
Human Accountability: I directed the problem decomposition and proof strategy, audited the exported scope, and locally verified all eight Lean 4 modules with lake build --wfail and axiom checks, as well as the Python solver self-tests.
Distribution License: CC BY 4.0 (Canonical Publisher: certXiv Archive)

Embed Verification Shield in GitHub README

certXiv TCB-2 badge

What was machine-checked, and what was not

Checked

  • The linked repository was replayed in certXiv's sandbox, with no network access, on 2026-12-04 at commit 434625ef59, and met the requirements for TCB-2 (Lean 4 (v4.33.1)).
  • 15 formal claims are recorded for this article and listed below.

Not checked

  • No machine-readable reference list was supplied with this article, so its references were not checked.
  • Its authors declared TCB-0. The best replay that passed supports TCB-2, so that is the tier shown.
  • That the code implements the method the article describes, or that the method is right. A replay shows that the code reproduces its own reported output.
  • Novelty and importance. No human expert reviewed this article; the AI review is a language model's assessment and can be wrong.

AI review (rubric v1.0)

Model: gpt-6.2-astra (codex-cli, repository read at commit 434625ef598d) · Version v1
Score: 37.0 / 100 · Unsubstantiated — Fundamental Rework (<50) v1 ✓ Private author coaching emailed 2026-12-04T18:50:42+00:00

Major revision. The artifact for certxiv:2612.00021 v1 supports meaningful partial reductions and several explicit cut theorems. The main publication issue is the scope of “kernel-verified.” The export contains the common reduction steps and the lower-density branch, while the README places the full composition upstream. The supplied balanced-module excerpt ends before the headline theorem, and the structured claims do not identify it. I assessed the supplied sources and recorded outputs without executing Lean, Python, or C. The weighted rubric score is 1.85/5.

Problem Formulation 2 / 5
`Erdos23/Statements.lean` precisely defines the finite graph, triangle-free hypothesis, bipartite subgraph, and deletion budget. The manuscript leaves its own principal objects, especially Leaf 3 and the residual predicate for a chosen coloring, undefined.
Methodological Soundness 2 / 5
The visible proofs construct cuts and count their deleted edges under precise hypotheses. Two substantial steps remain unaudited at the claimed scope: composing both density branches into the advertised four-leaf theorem and deriving the full residual conjunction under the exact Leaf 3 hypotheses.
Evidence Reproducibility 2 / 5
The toolchain, dependency revisions, build targets, proof sources, and benchmark inputs provide substantial evidence for individual components. The 15 structured records cover helper declarations. The evidence supplied for review does not connect the two headline claims to their exact theorem types, composition, and axiom reports.
Literature Grounding 1 / 5
A source comment credits the classical neighborhood-cut argument, and the repository credits upstream formalization work. The manuscript has no bibliography and omits the published density bounds that explain its own subcase interval.
Originality Significance 3 / 5
The formal cut constructions, independent-set bound, and conditional block-cover exclusion make a useful nontrivial formalization. The submission leaves the mathematical advance over existing bounds and the division of work with the upstream project unclear.
Clarity Calibration 1 / 5
The abstract correctly leaves the balanced case open. The complete body repeats the abstract, so readers never see the four cases, the 13 conditions, or the restriction on the exported reduction that the README acknowledges.

Strengths

  • `Erdos23/Statements.lean` faithfully encodes the problem on 5n vertices. In `OMAReductions/R_Erdos23_erdos_23_R2.lean`, `cut_graph` identifies the deleted edges with the same-side edges of a partition, and `dense` handles e ≥ 5n², including n=0. The maximal-extension argument explicitly transfers the cut bound back to the original graph.
  • The visible portion of `Erdos23/erdos23-3col-balanced-master.lean` contains substantive mathematics. `three_choice_bipartite_le` gives a deletion cost at most ⌊e/3⌋ for any proper three-partition. `ns_bipartite_le` constructs a neighborhood cut and assigns vertices of the remaining independent class to their cheaper side. The codegree bounds show how triangle-freeness enters the subsequent counting argument.
  • `Erdos23/erdos23-leaf3-subcase.lean` contains a result worth stating separately. `indep_cut_295` proves the target when 20|I| ≥ 59n for an independent set I, without a density hypothesis. The same file gives explicit five-cut certificates for the Clebsch and Wagner templates and explicit maps for Petersen and Grötzsch. In `Erdos23/erdos23-edge-block-cover.lean`, `density_of_r4_template` forces e ≥ 4n²+4 under the disjoint-block hypothesis, which excludes that template in the stated Leaf 3 range.
  • `lean-toolchain`, `lake-manifest.json`, and `lakefile.toml` identify Lean 4.33.1, pin Mathlib and its dependencies, and target both source trees. The abstract accurately presents the central balanced claim as a necessary condition for a hypothetical counterexample.

Technical Critiques & Open Questions

  • The four-leaf claim needs an end-to-end theorem. `R_Erdos23_erdos_23_R2.main` takes a middle-density proposition and a half-cut proposition as premises. Later `OMAReductions` modules split at e=3n²+2. The last exported `main` refines only the lower branch, with a further split at 2e=5n² and lower threshold 200e>443n². The higher branch still appears as a single obligation in the visible chain. `README.md` locates the combined proof in `scratch/erdos23-full-composed.lean`, outside the 22-file export. The issue is coverage of the reduction, not the fact that a reduction has open leaves.
  • The balanced theorem cannot be matched field by field to the abstract. Only 60,000 of 350,631 bytes of `erdos23-3col-balanced-master.lean` are shown. Its header names `BalancedLeaf3OpenResidual` and locates exact Leaf 3 signature compatibility in a separate, unlisted `scratch/erdos23-3col-h1-compat.lean`. `tools/leaf3_alternating_stress_results.json` lists 13 filter names, but names alone leave their formulas, quantifiers, and correspondence to the Lean conjunction undetermined.
  • The 15 `lean4-ast` records run from `fin3_distinct` through `ns_bipartite_le`. Several names, including `cut_graph` and `tri`, occur in multiple namespaces. The records share an artifact digest and give bare declaration names. None identifies the composed reduction or the theorem forcing the residual predicate. The README reports eight clean builds and three standard axioms. The visible `#print axioms` commands document intended checks, but the supplied material contains no corresponding headline-theorem transcript. A conditional theorem can use only standard axioms while still requiring substantial mathematical premises.
  • Prior art materially affects the interpretation of the constants. The classical neighborhood estimate and induced-bipartite extension principle appear in Erdős–Faudree–Pach–Spencer. Balogh–Clemen–Lidický’s Theorem 2 gives the sharp deletion target in the density tails at 0.2486 and 0.3197 for sufficiently large order, using e/binom(N,2). Under 2e/N² with N=5n, those constants correspond to 3.1075n² and 3.99625n². A finite-order comparison needs the density convention and blow-up transfer. Ferudun’s 2026 preprint also reports the target for 1≤n≤40. The paper should identify which results are new finite graph bounds and which contribute formal proofs of known arguments. [Erdős et al.](https://www.renyi.hu/ p_erdos/1988-12.pdf) · [Balogh et al., Theorem 2](https://arxiv.org/pdf/2103.14179) · [Ferudun, Theorem 1.1](https://arxiv.org/abs/2606.28041)
  • The companion tools support exploration with distinct evidentiary limits. `tools/leaf3_cs_benchmarks.py` uses exact fractions for selected examples and floating point for its 7,013-record scan. `tools/leaf3_cs_sdp_solver.py` checks numerical tolerances, and the rational coefficients in `tools/leaf3_cs_sos_lib.py` still require a dual certificate to establish an SDP bound. The README places the exact certification driver outside the export. `tools/leaf3_disjoint_exact.c` searches labelings of one supplied weighted template with fixed-width integer arithmetic. The separate shared-neighbor JSON reports 70 checked cases, zero passing the disjoint-block condition, and zero full survivors. Those counts do not test the residual implication on a graph satisfying all its hypotheses.
I think the AI got this wrong

This goes to the journal's editor, not back to the AI. Nothing on this page changes unless the editor decides it should.

Machine-Readable Claims & Declarations (15)

✓ Verified by replay fin3_distinct lean4-ast Lean: fin3_distinct
Verified Lean declaration `fin3_distinct` in commit 434625ef59
✓ Verified by replay fin3_exhaust lean4-ast Lean: fin3_exhaust
Verified Lean declaration `fin3_exhaust` in commit 434625ef59
✓ Verified by replay fin3_step lean4-ast Lean: fin3_step
Verified Lean declaration `fin3_step` in commit 434625ef59
✓ Verified by replay univ_fin3 lean4-ast Lean: univ_fin3
Verified Lean declaration `univ_fin3` in commit 434625ef59
✓ Verified by replay sum_fin3 lean4-ast Lean: sum_fin3
Verified Lean declaration `sum_fin3` in commit 434625ef59
✓ Verified by replay same_mk lean4-ast Lean: same_mk
Verified Lean declaration `same_mk` in commit 434625ef59
✓ Verified by replay cut_graph lean4-ast Lean: cut_graph
Verified Lean declaration `cut_graph` in commit 434625ef59
✓ Verified by replay tri lean4-ast Lean: tri
Verified Lean declaration `tri` in commit 434625ef59
✓ Verified by replay card_filter_edges_eq_eAB lean4-ast Lean: card_filter_edges_eq_eAB
Verified Lean declaration `card_filter_edges_eq_eAB` in commit 434625ef59
✓ Verified by replay edgeFinset_card_three_part lean4-ast Lean: edgeFinset_card_three_part
Verified Lean declaration `edgeFinset_card_three_part` in commit 434625ef59
✓ Verified by replay cut_two_part_eq_eAB lean4-ast Lean: cut_two_part_eq_eAB
Verified Lean declaration `cut_two_part_eq_eAB` in commit 434625ef59
✓ Verified by replay three_choice_bipartite_le lean4-ast Lean: three_choice_bipartite_le
Verified Lean declaration `three_choice_bipartite_le` in commit 434625ef59
✓ Verified by replay cCodeg_le_dAB lean4-ast Lean: cCodeg_le_dAB
Verified Lean declaration `cCodeg_le_dAB` in commit 434625ef59
✓ Verified by replay card_Rset_filter_adj lean4-ast Lean: card_Rset_filter_adj
Verified Lean declaration `card_Rset_filter_adj` in commit 434625ef59
✓ Verified by replay ns_bipartite_le lean4-ast Lean: ns_bipartite_le
Verified Lean declaration `ns_bipartite_le` in commit 434625ef59

Containerized & Cloud Sandbox Replay Jobs (1)

VERIFIED job-0d5e00e85c05 · Runner: container-sandbox · Commit 434625ef59 · Earned TCB-2 Full JSON Report ↗
Commit: 434625ef598d0483d746ec0b7b25eadff661eba1
Files hashed: 21 · SHA-256 Merkle Root: 8ac33388b13186bd9b6de5245a8716afc38ecee66e41817472ca1ad7ca99e267
Host Lean build disabled for security isolation; static sorry/axiom AST scan completed (full kernel replay delegated to ephemeral GitHub Actions runner).
No standalone verify*.py scripts found; skipped Python execution.

Citation Impact & Cited-By Ledger (0)

Deduplicated across certXiv Cross-Citation Graph, OpenAlex, Semantic Scholar, Crossref / OpenCitations COCI, DataCite / Zenodo, and Europe PMC.
certXiv citation count badge for certxiv:2612.00021 [![certXiv Cited By](https://certxiv.org/badge/citations/certxiv:2612.00021.svg)](https://certxiv.org/abs/certxiv:2612.00021#cited-by)
Total Citations
0
Independent (Non-Self)
0
In certXiv Graph
0
External Indices (Max)
OA 0 · S2 0 · DC 0 · OC 0

No incoming citations recorded yet. Citations from new certXiv articles are indexed automatically on publication; external citations from OpenAlex, Semantic Scholar, DataCite, and OpenCitations sync continuously.

Upgrade Verification Tier for certxiv:2612.00021

Attach a Lean 4, Rocq, Isabelle, or SAT/SMT certificate repository that formalizes or certifies claims in this paper.

Public GitHub, GitLab, or Zenodo URL containing the formalization or certificate.