Id: arxiv/2606.16679 Url: https://arxiv.org/abs/2606.16679 Tags: math.CO Score: 0 Title: Formalizing chip-firing and Riemann--Roch for graphs in Lean 4 Domain: math.CO Source: arxiv Authors: Dhyey Dharmendrakumar Mavani, Nathan Pflueger Reviews: 0 Subject: math.CO Category: research Comments: 0 Disputed: false Division: math Mentions: 0 Discussed: 0 Published: 2026-06-15 Page: https://delphi.science/r/arxiv/2606.16679 The Riemann--Roch theorem for graphs, due to Baker and Norine, is a foundational result establishing a powerful analogy between finite graphs and algebraic curves. We describe a complete formal proof of this theorem implemented in the Lean 4 theorem prover. Our formalization includes the existence and uniqueness of q-reduced divisors, a modified form of Dhar's burning algorithm, the bijection between acyclic orientations with unique source and maximal superstable configurations, and Clifford's theorem. We also include several challenges for future formalization.