Formalizing Computational Paths and Fundamental Groups in Lean
Microsoft(微软);Centro de Informática, Universidade Federal de Pernambuco(巴西伯南布哥联邦大学计算机中心);Departamento de Matemática, Universidade Federal Rural de Pernambuco(巴西伯南布哥联邦农村大学数学系)
Arthur F. Ramos, Anjolina G. de Oliveira, Ruy J. G. B. de Queiroz, Tiago M. L. de Veras
备注:
27 pages, 2 figures. All definitions and proofs are available in the ComputationalPathsLean GitHub repository
Computational paths treat propositional equality as explicit paths built from labelled deduction steps and rewrite rules. This view originates in work by de Queiroz and collaborators [1] and yields a weak groupoid structure for equality, together with a computational account of homotopy inspired by homotopy type theory. In this paper we present a complete mechanization of this framework in Lean 4 and show how it supports concrete homotopy theoretic computations. Our contributions are threefold. First, we formalize the theory of computational paths in Lean, including path formation, composition, inverses, and a rewrite system that identifies redundant or trivial paths. We prove that equality types with computational paths carry a weak groupoid structure in the sense of the original theory. Second, we organize this material into a reusable Lean library, ComputationalPathsLean, which exposes an interface for paths, rewrites, and loop spaces. This library allows later developments to treat computational paths as a drop-in replacement for propositional equality when reasoning about homotopical structure. Third, we apply the library to six canonical examples in algebraic topology. We give Lean proofs that the fundamental group of the circle is isomorphic to the integers, the cylinder and Mobius band also have fundamental group isomorphic to the integers (via retraction to the circle), the fundamental group of the torus is isomorphic to the product of two copies of the integers, the fundamental group of the Klein bottle is isomorphic to the semidirect product Z cross Z, and the fundamental group of the real projective plane is isomorphic to Z_2. These case studies demonstrate that the computational paths approach scales to nontrivial homotopical computations in a modern proof assistant. All the definitions and proofs described here are available in an open-source Lean 4 repository.
Princeton University(普林斯顿大学);University of Bonn(波恩大学);University of Rennes(雷恩大学);Utrecht University(乌得勒支大学);Harmonic(哈莫尼克);The Hague(海牙);Eindhoven University of Technology(埃因霍温理工大学);University of Massachusetts Lowell(马萨诸塞大学洛厄尔分校);Baruch College(巴鲁克学院);National University of Singapore(新加坡国立大学)
Shandong University(山东大学);Academy of Mathematics and Systems Science, University of Chinese Academy of Science(中国科学院数学与系统科学研究院);Sun Yat-sen University(中山大学)
From Lecture Notes to Lean: Formalizing a Textbook on Probability Theory
School of Data Science, The Chinese University of Hong Kong, Shenzhen(香港中文大学深圳数据科学学院);School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen(香港中文大学深圳科学与工程学院)
Formalizing $A_1^{(1)}$ Curve Neighborhoods in Lean 4
University of Chinese Academy of Sciences(中国科学院大学);Academy of Mathematics and Systems Science, University of Chinese Academy of Sciences(中国科学院数学与系统科学研究院);Imperial College London(帝国理工学院)
Topological Computational Paths: Presentation Invariance and Observable Quotients
Microsoft, USA(微软);Centro de Informática, Universidade Federal de Pernambuco, Brazil(伯南布哥联邦大学信息学院);Departamento de Matemática, Universidade Federal Rural de Pernambuco, Brazil(伯南布哥联邦农村大学数学系)
The Seifert-van Kampen Theorem via Computational Paths: A Formalized Approach to Computing Fundamental Groups
Microsoft(微软);Departamento de Matemática, Universidade Federal Rural de Pernambuco(伯南布哥联邦农村大学数学系);Centro de Informática, Universidade Federal de Pernambuco(伯南布哥联邦大学信息学中心)