Diameter of the two-color necklace swap graph
- Kind
- Theorem (Lean 4 + Mathlib proof and exact computational checks)
- Status
- Proved and verified in Lean 4 + Mathlib (3 of 3 main results, 15 audited declarations, zero sorry, zero native_decide, standard axioms only); unrefereed
- Headline in Lean
- Unconditionally proved in Lean 4 + Mathlib (3/3 main results in pure-kernel Lean 4 across `lean/DiameterOfTheTwoColorNecklaceSwapGraph/`, 15 audited declarations, zero sorry, zero native_decide, standard axioms only).
- Lean share
- 3 of 3 main results in Lean (100%) · 3 of 3 abstract claims (100%) · 3 of 8 all paper claims (38%)
- Preprint DOI
- 10.5281/zenodo.24733290 (Zenodo / CERN preprint, v3: 10.5281/zenodo.24733291)
- Prior work
- Not found in the searches logged; credited prior work includes G. T. Toussaint, "A comparison of rhythmic similarity measures," *Proc. 5th Int. Conf. Music Information Retrieval (ISMIR...
The statement
Place black and white beads on a circle up to rotation, joining a pair of necklaces when exchanging one pair of neighboring opposite-colored beads turns one into the other. For all positive integers and , we prove this swap graph is connected with diameter , where . The two-run necklace is always an endpoint of a diametral pair at distance . When and are both even, an ordered pair lies at distance if and only if one endpoint is and the other admits a repeated-half representative . The proofs reduce swap distance to cyclic transport, average over rotations, and build explicit farthest partners. All main theorems are verified in pure-kernel Lean 4 with Mathlib. Exhaustive breadth-initial search across all 153 contents up to 18 beads agrees with every theorem. Searches logged did not find the all-content diameter formula; the two-token case ( or ) specializes earlier cycle token-graph work.
Check it yourself
- Replay from the archive: unpack the downloadable archive (
checker.zip) and, from the folder it unpacks into, runpython3 papers/diameter-of-the-two-color-necklace-swap-graph/draft3/compute.pyto reproduce the computational checks, or buildlean/DiameterOfTheTwoColorNecklaceSwapGraph/directly in Lean 4. - Lean 4 kernel verification: the archive contains the Lean 4 sources (
lean/DiameterOfTheTwoColorNecklaceSwapGraph/), axiom audit output, and trust-boundary manifest linking every paper claim to its Lean declaration.
Status and who checked it
- Verified in Lean 4 + Mathlib. Verified unconditionally in Lean 4 + Mathlib (15 audited declarations, zero sorry, zero native_decide, standard axioms only, library
lean/DiameterOfTheTwoColorNecklaceSwapGraph/): 3 of 3 main results proved in the pure Lean kernel. - Unrefereed. All automated manuscript, citation, and statement-fidelity checks passed on the 6-page preprint. No human mathematician has yet refereed the proof.
Prior work
Searches run. Prior-work searches and full-text citation checks were logged alongside the preprint. The result was not found in the searches logged.
Credited. G. T. Toussaint, "A comparison of rhythmic similarity measures," Proc. 5th Int. Conf. Music Information Retrieval (ISMIR 2004) / Technical Report SOCS-TR-2004.6 (2004), doi:10.5281/zenodo.1416812; G. T. Toussaint, "The geometry of musical rhythm," Discrete and Computational Geometry (JCDCG 2004), Lecture Notes in Comput. Sci. 3742, Springer (2005), 198–212, doi:10.1007/11589440_20; Y. J. Pinzón Ardila, R. Clifford, and M. Mohamed, "Necklace swap problem for rhythmic similarity measures," String Processing and Information Retrieval (SPIRE 2005), Lecture Notes in Comput. Sci. 3772, Springer (2005), 234–245, doi:10.1007/11575832_27; Y. J. Pinzón Ardila, R. Clifford, C. S. Iliopoulos, G. M. Landau, and M. Mohamed, "Necklace swap problem for rhythmic similarity measures," Int. J. Comput. Methods 05 (2008), no. 3, 351–363, doi:10.1142/S0219876208001583; D. Bremner, T. M. Chan, E. D. Demaine, J. Erickson, F. Hurtado, J. Iacono, S. Langerman, M. Pătraşcu, and P. Taslakian, "Necklaces, convolutions, and X+Y," Algorithmica 69 (2014), 294–314, doi:10.1007/s00453-012-9734-3, arXiv:1212.4771v1; R. Fabila-Monroy, D. Flores-Peñaloza, C. Huemer, F. Hurtado, J. Urrutia, and D. R. Wood, "Token graphs," Graphs Combin. 28 (2012), 365–380, arXiv:0910.4774v1; M. A. Reyes, C. Dalfó, M. A. Fiol, and A. Messegué, "A general method to find the spectrum and eigenspaces of the k-token of a cycle, and 2-token through continuous fractions," arXiv:2403.20148v1 (2024); OEIS Foundation Inc., "Quarter-squares: ," Entry A002620 in The On-Line Encyclopedia of Integer Sequences, `.
Still owed. MathSciNet, zbMATH, books in print, and paywalled journal articles not reachable in open-access full text.
Further reading
- G. T. Toussaint, "A comparison of rhythmic similarity measures," Proc. 5th Int. Conf. Music Information Retrieval (ISMIR 2004) / Technical Report SOCS-TR-2004.6 (2004),
doi:10.5281/zenodo.1416812 - G. T. Toussaint, "The geometry of musical rhythm," Discrete and Computational Geometry (JCDCG 2004), Lecture Notes in Comput. Sci. 3742, Springer (2005), 198–212,
doi:10.1007/11589440_20 - Y. J. Pinzón Ardila, R. Clifford, and M. Mohamed, "Necklace swap problem for rhythmic similarity measures," String Processing and Information Retrieval (SPIRE 2005), Lecture Notes in Comput. Sci. 3772, Springer (2005), 234–245,
doi:10.1007/11575832_27 - Y. J. Pinzón Ardila, R. Clifford, C. S. Iliopoulos, G. M. Landau, and M. Mohamed, "Necklace swap problem for rhythmic similarity measures," Int. J. Comput. Methods 05 (2008), no. 3, 351–363,
doi:10.1142/S0219876208001583 - D. Bremner, T. M. Chan, E. D. Demaine, J. Erickson, F. Hurtado, J. Iacono, S. Langerman, M. Pătraşcu, and P. Taslakian, "Necklaces, convolutions, and X+Y," Algorithmica 69 (2014), 294–314,
doi:10.1007/s00453-012-9734-3,arXiv:1212.4771v1 - R. Fabila-Monroy, D. Flores-Peñaloza, C. Huemer, F. Hurtado, J. Urrutia, and D. R. Wood, "Token graphs," Graphs Combin. 28 (2012), 365–380,
arXiv:0910.4774v1 - M. A. Reyes, C. Dalfó, M. A. Fiol, and A. Messegué, "A general method to find the spectrum and eigenspaces of the k-token of a cycle, and 2-token through continuous fractions,"
arXiv:2403.20148v1(2024) - [OEIS Foundation Inc., "Quarter-squares: ," Entry A002620 in The On-Line Encyclopedia of Integer Sequences,
](https://oeis.org/A002620) - The mathlib Community, "The Lean mathematical library," Proc. 9th ACM SIGPLAN Int. Conf. Certified Programs and Proofs (CPP 2020), ACM (2020), 367–381,
doi:10.1145/3372885.3373824,arXiv:1910.09336v2