← All papers
First page of Capturing properties of planar diagrams in Lean proof assistant software

Capturing properties of planar diagrams in Lean proof assistant software

Alastair Litterick, Alexei Vernitski, Billy Woods

math.CO Nov 17, 2025 · v1
Formalizes orientation-preserving mappings of planar diagrams in Lean 4 with mathlib to verify subtle combinatorial claims.
Automated proof assistants are a technology pre-empting mistakes in mathematics. In our practice we have seen that reasoning about planar diagrams is difficult to both humans and computers. One example that has led to wrong statements in publications is that an orientation-preserving mapping is not always defined by how it acts on triples of elements. In this paper we formalise orientation-preserving mappings in proof assistant software Lean and report on our take-aways.

Reasoning about planar diagrams is error-prone for both humans and computers, and has led to incorrect statements in publications. In particular, an orientation-preserving mapping is not always determined by how it acts on triples of elements.

The authors formalize orientation-preserving mappings in the Lean proof assistant. They encode cyclic order preservation on finite sets and verify properties that have previously led to errors in published work, using Lean to ensure correctness of claims about when mappings on planar diagrams are or are not determined by their action on triples.

The formalization confirms that orientation-preserving mappings are not in general determined by their action on triples, providing a machine-checked counterexample to an assumption that has caused errors in prior publications.