Exact Enumeration and Structure of Corner-to-Corner Grid Hamiltonian Paths: A Formally Verified Recursive Equivalence in Lean 4
We present a self-contained, kernel-verified Lean 4 proof (OMA.solution for OMA.S_mo_480706.main, addressing the Lean 4 formalization by Marcus Buffett of MathOverflow Question 480706 posed by Nate River) establishing the exact bijective identity between the extensional set CornerPaths n of opposite-corner Hamiltonian paths on the (n+1) x (n+1) square lattice graph and the recursive state-space counter continuations. Proof Architecture: The 126-line (5,844-byte) Lean 4.33.1 + Mathlib formalization (4 theorems/lemmas, 1 definition; zero sorry, zero axiom, zero native_decide) lifts the grid problem to a general finite-graph theorem (card_contList) valid for any decidable relation adj on a finite-pool type V, arbitrary step budget k, start u, destination dest, and unvisited vertex pool S. It certifies finiteness via an explicit injection into Fin k -> S (finite_contList) and constructs an explicit dependent-sum type equivalence decomposing (k+1)-step paths by their first step into filtered neighbors and erased vertex pools, recovering OMA.solution without even invoking the odd-side parity hypothesis (since both sides vanish identically on even grids by checkerboard bipartiteness). Independent Verification & Structural Analysis: A standalone pure-stdlib Python verifier independently validates static Lean hygiene, cross-checks verbatim continuations recursion against exhaustive path enumeration for 1x1 through 5x5 grids and general directed/undirected test graphs, computes exact structural invariants on 3x3 (2 paths) and 5x5 (104 paths: 52 East + 52 North, 30 Klein-four orbits = 8 size-2 centrally symmetric orbits + 22 size-4 orbits, turn distribution spanning 8 to 18 bends), and verifies five odd square-grid terms of OEIS A001184 up to 9x9 (1, 2, 104, 111712, 2688307514) plus the 6x6 rectangular table (OEIS A333580) via an independent plug-connectivity frontier transfer-matrix engine in 0.634 seconds. Verification, Scope Audit & AI Assistance Disclosure Catalog Tier: Tier 3 — Literal-Statement Disproof / Technical Note (Litang Academic Club Curated Archive) (Curated Index · llms.txt) Frozen Third-Party Statement: lean/OMAStatements/S_mo_480706.lean (authored by Marcus Buffett in lefttosolve2/open-math-agents; SHA-256 7e0281f8c61f2dc3…, Git blob SHA-1 ce425b16b678e9fb…) Scope & Deviations Audit: SCOPE CAVEAT: Proves equivalence between corner-to-corner grid Hamiltonian paths and the recursive continuation count; closed-form/asymptotic constant remains open. (Full audit: DEVIATIONS.md) Live Lean 4.33.1 Kernel CI: Continuously typechecked on GitHub-hosted Ubuntu runners against the frozen target statement (runtime audit nonce, zero sorry/axiom/native_decide/metaprogramming tokens, standard axioms propext/Classical.choice/Quot.sound only): lean-verify.yml AI Assistance & Publication Disclosure: Problem exploration, proof decomposition, Lean 4 formalization, and manuscript drafting involved AI/LLM workflows under human curation and verification. Mathematical correctness does not rely on any LLM output and rests strictly on Lean 4.33.1 kernel verification and the independent zero-dependency Python verifier. This open-access Zenodo preprint has not yet undergone traditional journal peer review; linked upstream benchmark PRs on lefttosolve2/open-math-agents are currently open pending maintainer review and cited solely as timestamped provenance.
Authors
- YAN SANG (ORCID: https://orcid.org/0009-0001-8935-8572)
- Jasm1ne (ORCID: https://orcid.org/0009-0002-4589-3749)
- hanhai bei (ORCID: https://orcid.org/0009-0002-3372-995X)
- litangking (ORCID: https://orcid.org/0009-0004-8721-354X)
- 12gg (ORCID: https://orcid.org/0009-0001-2046-7703)
- JKLORI (ORCID: https://orcid.org/0009-0003-8860-3972)
- zorda (ORCID: https://orcid.org/0009-0003-7762-847X)
- yv bian (ORCID: https://orcid.org/0009-0002-6149-1264)
- freeman (ORCID: https://orcid.org/0009-0004-0913-7297)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24774117
- Primary Topic
- Advanced Combinatorial Mathematics
- Type
- preprint