Every Tree with at Most Five Leaves Is Graceful: A Machine-Checked Proof in Lean 4

Result: Proves in Lean 4 that every finite tree with at most five leaves is graceful, for every order, arm length and branch topology. This extends Huang, Kotzig and Rosa's 1982 four-leaf theorem and Panpa, Imnang and Wasuanankul's 2025 five-legged-spider theorem; no refereed proof for general five-leaf trees was located. The key new ingredient is an exact characterization of internal-zero three-arm spiders: S(a, b, m+c) has a graceful labeling with 0 at distance m along the third arm iff (a, b, m, c) ≠ (1, 1, 1, 2). The Graceful Tree Conjecture (usually attributed to Ringel and Kotzig; graceful labelings are Rosa's 1967 β-valuations) asserts that every finite tree T with q edges admits a vertex bijection into {0, 1, ..., q} whose induced edge differences equal {1, ..., q}. Huang, Kotzig, and Rosa proved in 1982 that every tree with at most four leaves is graceful, and Panpa, Imnang, and Wasuanankul proved in 2025 that every spider with at most five legs is graceful. We are not aware of a refereed proof for general five-leaf trees. An October 2026 preprint by Jiang et al. (arXiv:2610.02945) lists an AI-proposed argument for all trees with at most seven leaves that, according to its authors, has not been checked by a person or formalized in Lean. We prove in pure-stdlib Lean 4.34.0 that every finite tree with at most five leaves is graceful, with no restriction on order, arm lengths, or branch topology. A branch-degree classification reduces all five-leaf trees to five-legged spiders, degree-(4,3) double-hub trees, and degree-(3,3,3) triple-hub trees. The core is a constructive characterization of the internal-zero three-arm spider problem: S(a, b, m+c) admits a graceful labeling placing 0 at distance m along the third arm if and only if (a, b, m, c) ≠ (1, 1, 1, 2). It is established by ten constructive families, a 180-formula modulo-4 case cover verified with omega, and 22 kernel-checked finite residuals, and then combined with spine extraction and α-amalgamation across all triple-hub trees. The Lean development also reproves the four-leaf and five-legged-spider theorems (formalizations of known results). Later additions include a Lean proof that trees of diameter at most four are graceful (a known theorem of Zhao, 1989) and some lobster and transfer families, for which no novelty is claimed. Credits: Four-leaf theorem: Huang, Kotzig, and Rosa (1982). Five-legged spiders: A. Panpa, S. Imnang, and T. Wasuanankul (2025, doi:10.1155/jama/5826777). Diameter-four theorem: S.-L. Zhao (1989). Subdivision theorem: Burzio and Ferrarese (1998). The Lean proofs of these known results are formalizations. No third-party Lean code was adapted. The Lean development and scripts were produced with AI coding agents operated by the author; the agent and model were not recorded.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-03
DOI
https://doi.org/10.5281/zenodo.24765081
Primary Topic
Graph Labeling and Dimension Problems
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Every Tree with at Most Five Leaves Is Graceful: A Machine-Checked Proof in Lean 4

Ali Uyar
Zenodo (CERN European Organization for Nuclear Research)
Graph Labeling and Dimension Problems
preprint

Every Tree with at Most Five Leaves Is Graceful: A Machine-Checked Proof in Lean 4

Ali Uyar
preprint en

Abstract

Result: Proves in Lean 4 that every finite tree with at most five leaves is graceful, for every order, arm length and branch topology. This extends Huang, Kotzig and Rosa's 1982 four-leaf theorem and Panpa, Imnang and Wasuanankul's 2025 five-legged-spider theorem; no refereed proof for general five-leaf trees was located. The key new ingredient is an exact characterization of internal-zero three-arm spiders: S(a, b, m+c) has a graceful labeling with 0 at distance m along the third arm iff (a, b, m, c) ≠ (1, 1, 1, 2). The Graceful Tree Conjecture (usually attributed to Ringel and Kotzig; graceful labelings are Rosa's 1967 β-valuations) asserts that every finite tree T with q edges admits a vertex bijection into {0, 1, ..., q} whose induced edge differences equal {1, ..., q}. Huang, Kotzig, and Rosa proved in 1982 that every tree with at most four leaves is graceful, and Panpa, Imnang, and Wasuanankul proved in 2025 that every spider with at most five legs is graceful. We are not aware of a refereed proof for general five-leaf trees. An October 2026 preprint by Jiang et al. (arXiv:2610.02945) lists an AI-proposed argument for all trees with at most seven leaves that, according to its authors, has not been checked by a person or formalized in Lean. We prove in pure-stdlib Lean 4.34.0 that every finite tree with at most five leaves is graceful, with no restriction on order, arm lengths, or branch topology. A branch-degree classification reduces all five-leaf trees to five-legged spiders, degree-(4,3) double-hub trees, and degree-(3,3,3) triple-hub trees. The core is a constructive characterization of the internal-zero three-arm spider problem: S(a, b, m+c) admits a graceful labeling placing 0 at distance m along the third arm if and only if (a, b, m, c) ≠ (1, 1, 1, 2). It is established by ten constructive families, a 180-formula modulo-4 case cover verified with omega, and 22 kernel-checked finite residuals, and then combined with spine extraction and α-amalgamation across all triple-hub trees. The Lean development also reproves the four-leaf and five-legged-spider theorems (formalizations of known results). Later additions include a Lean proof that trees of diameter at most four are graceful (a known theorem of Zhao, 1989) and some lobster and transfer families, for which no novelty is claimed. Credits: Four-leaf theorem: Huang, Kotzig, and Rosa (1982). Five-legged spiders: A. Panpa, S. Imnang, and T. Wasuanankul (2025, doi:10.1155/jama/5826777). Diameter-four theorem: S.-L. Zhao (1989). Subdivision theorem: Burzio and Ferrarese (1998). The Lean proofs of these known results are formalizations. No third-party Lean code was adapted. The Lean development and scripts were produced with AI coding agents operated by the author; the agent and model were not recorded.

Zenodo (CERN European Organization for Nuclear Research)
Graph Labeling and Dimension Problems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon