← All papers
First page of Elements of Differential Geometry in Lean: A Report for Mathematicians

Elements of Differential Geometry in Lean: A Report for Mathematicians

Anthony Bordg, Nicolò Cavalleri

cs.LO Aug 1, 2021 · v1
Formalizes Lie groups, vector bundles, and Lie algebras in Lean's mathlib.
We report on our experience formalizing differential geometry with mathlib, the Lean mathematical library. Our account is geared towards geometers with no knowledge of type theory, but eager to learn more about the formalization of mathematics and maybe curious enough to give Lean a try in the future. To this effect, we stress the possibly surprising difference between the formalization and its pen-and-paper counterpart arising from Lean's treatment of equality. Our three case studies are Lie groups, vector bundles and the Lie algebra of a Lie group.

Formalizing differential geometry in a proof assistant presents challenges that differ from pen-and-paper mathematics, particularly around Lean's treatment of equality, and these challenges are not well documented for working geometers.

The authors report on formalizing differential geometry in Lean's Mathlib, targeting geometers with no type theory background. They highlight differences between formalization and pen-and-paper proofs arising from Lean's handling of equality. Three case studies are presented: Lie groups, vector bundles, and the Lie algebra of a Lie group.

The formalization reveals that definitional equality in Lean forces choices that have no pen-and-paper analogue, particularly around bundled vs. unbundled structures. The case studies demonstrate working solutions for key differential geometry concepts in Mathlib.