Formalizing Extended Complex Numbers, Mobius Transformations, and Cross Ratio in Lean 4
Fubin Yan, Kenneth W. Shum
math.CV
Jun 18, 2026 · v2
cs.MS
TL;DR
Formalizes the extended complex plane, Mobius transformations, and the cross ratio in Lean 4 using Mathlib.
Abstract
The extended complex plane is a fundamental object in complex analysis, hyperbolic geometry, and mathematical physics. Its geometry is governed by Möbius transformations, with the cross ratio serving as a central invariant. We present a formalization of these concepts in the Lean4 theorem prover. The extended complex plane is represented using Mathlib's Option type over $\mathbb{C}$, where the additional element represents the point at infinity. On this foundation, we define Möbius transformations, their action on the extended complex plane, and the cross ratio. We formalize several basic properties of Möbius transformations, including their group structure, and identify them with a projective general linear group. We also prove the uniqueness of a Möbius transformation mapping any three distinct points to any other three distinct points, and the invariance of the cross ratio. All proofs are machine-checked in Lean 4. The complete development comprises approximately 6,000 lines of Lean code, including about 40 definitions and 150 lemmas and theorems. This work provides a verified foundation for future formalizations of conformal geometry, hyperbolic models, modular forms, and applications in mathematical physics.
Problem
The extended complex plane and Mobius transformations underpin complex analysis, hyperbolic geometry, and mathematical physics, but lacked a verified foundation in Lean.
Approach
The extended complex plane is represented as Mathlib's Option type over the complex numbers, with the extra element as the point at infinity. On this they define Mobius transformations, their action, and the cross ratio, prove the group structure, and identify the transformations with a projective general linear group. They also prove uniqueness of the Mobius transformation sending any three distinct points to three others and invariance of the cross ratio.
Results
The development is about 6,000 lines of Lean with roughly 40 definitions and 150 lemmas and theorems, all machine-checked in Lean 4.