ReasBook is a Lean 4 project for formalizing mathematics from textbooks and research papers. The goal is to preserve the structure of original references while producing machine-checkable proofs. We welcome collaboration from researchers, students, and practitioners.
ReasBook is generated using the tool: M2F.
Note:
Documentationis currently maintained and validated for Tao's Analysis II. For other books, full aggregation inDocumentationmay temporarily cause naming conflicts.
- Terence Tao, Analysis II, 4th ed., Hindustan Book Agency / Springer, Singapore, 2022, ISBN 978-981-19-7284-3.
- Contributors: Chenyi Li, Min Cui, Qiming Dai, Shu Miao, Wanli Ma, Yi Yuan, Zichen Wang, Ziyu Wang.
- Links: Documentation | Lean source | Verso
- R. Tyrrell Rockafellar, Convex Analysis, Princeton University Press, Princeton, 1970, ISBN 0-691-08069-0.
- Contributors: Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwan Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang.
- Links: Documentation | Lean source | Verso
- Jiri Lebl, Introduction to Real Analysis, Volume I, version 6.2, May 23, 2025, (TBD: publisher/city), (TBD: ISBN).
- Contributors: Zichen Wang.
- Links: Documentation | Lean source | Verso
- Michele Conforti, Gerard Cornuejols, Giacomo Zambelli, Integer Programming, Graduate Texts in Mathematics 271, Springer, 2014, ISBN 978-3-319-11007-3.
- Contributors: Binghe Huang, Chenglin Li, Chenrui Yang, Chenxi Liu, Congyuan Lei, Dongye Song, Fuzhi Wang, Haodong Zhang, Jiangnan Song, Jinmin Song, Junze Qiao, Junzhe Lai, Kaiwen He, Liming Han, Lurong Yang, Meng Zhou, Pengqi Lei, Renran Luo, Siyan Chen, Wangqi Liu, Wenxin Zeng, Wanli Ma, Wenxuan Wu, Xinru Zhu, Xu Han, Xutianshi Tao, Yichao Guo, Youyou Qin, Yuhan Zhang, Yushen Guo, Yutong Zhang, Ze Zhai, Zheng Ma, Zhiyong Chen, Zichen Wang, Zichen Xu, Zihao Liu.
- Links: Documentation | Lean source | Verso
- Yurii Nesterov, "Smooth minimization of non-smooth functions," Mathematical Programming, Ser. A 103, 127-152, 2005, DOI: 10.1007/s10107-004-0552-5.
- Contributors: Wanli Ma, Zichen Wang.
- Links: Documentation | Lean source | Verso
- Mohamad Maassarani, "On Some Local Rings," arXiv:2512.19197v1 [math.AC], 2025.
- Contributors: Liang Xiao, Haochen Ju, Zichen Wang.
- Links: Documentation | Lean source | Verso
The repository keeps a shared Lean source tree (ReasBook/) and a single Verso website project (ReasBookWeb/):
ReasBook/
├── ReasBook/ # Main Lean project (books + papers)
│ ├── Books/
│ ├── Papers/
│ ├── ReasBook.lean
│ ├── LiterateExtract.lean
│ ├── lakefile.lean
│ ├── lake-manifest.json
│ └── lean-toolchain
├── ReasBookWeb/ # Verso website project
│ ├── ReasBookSite/
│ ├── static_files/
│ ├── scripts/gen_sections.py
│ ├── ReasBookSite.lean
│ ├── lakefile.lean
│ ├── lake-manifest.json
│ └── lean-toolchain
├── .github/workflows/deploy_pages.yml
├── build.sh
├── build-web.sh
├── serve.py
└── scripts/cleanup-generated.sh
Top-level content directories use:
<Title>_<AuthorLastName>_<Year>
Examples:
ConvexAnalysis_Rockafellar_1970SmoothMinimization_Nesterov_2004OnSomeLocalRings_Maassaran_2025
From the repository root:
BUILD_DOCS=0 ./build.sh
./scripts/build_reasbook_web.sh
python3 serve.py 18000Open:
http://127.0.0.1:18000/ReasBook/
./build-web.sh
python3 serve.py 18000This path is much slower than the fast preview mode.
If generated artifacts were previously committed, untrack them (without deleting local files):
./scripts/cleanup-generated.sh- Beijing International Center for Mathematical Research, Peking University
- Sino-Russian Mathematics Center
- Great Bay University
- National Natural Science Foundation of China
- ReasLab
- An online Lean formalization platform for collaborative theorem development and verification.
- Optlib
- A Lean4 library for mathematical optimization, covering convex analysis, optimality conditions, and algorithm convergence.
- ReasBook
- A Lean4 project for textbook and paper formalization, including both theorem proving and computational problems.
- AMBER
- A Lean4 benchmark for applied mathematics formalization including proving and computational problems.
-
- A toolkit for converting natural-language mathematical textbooks into formalization-ready Lean projects.
-
- A structure-to-instance autoformalization framework for generating Lean definitions/theorems with verification feedback.
- Chenyi Li, Ziyu Wang, Wanyi He, Yuxuan Wu, Shengyang Xu, Zaiwen Wen. Formalization of Complexity Analysis of the First-order Optimization Algorithms, Journal of Automated Reasoning. (Paper)
- Chenyi Li, Zichen Wang, Yifan Bai, Yunxi Duan, Yuqing Gao, Pengfei Hao, Zaiwen Wen. Formalization of Algorithms for Optimization with Block Structures, Science in China Series A: Mathematics. (Paper)
- Chenyi Li, Shengyang Xu, Chumin Sun, Li Zhou, Zaiwen Wen. Formalization of Optimality Conditions for Smooth Constrained Optimization Problems. (Paper)
- Chenyi Li, Zaiwen Wen. An Introduction to Mathematics Formalization Based on Lean. (Paper)
- Ziyu Wang, Bowen Yang, Chenyi Li, Yuan Zhang, Shihao Zhou, Bin Dong, Zaiwen Wen. Translating Informal Proofs into Formal Proofs Using a Chain of States. (Paper)
- Chenyi Li, Wanli Ma, Zichen Wang, Zaiwen Wen. SITA: A Framework for Structure-to-Instance Theorem Autoformalization, AAAI 2026. (Paper)
- Chenyi Li, Yanchen Nie, Zhenyu Ming, Gong Zhang, Kun Yuan, Zaiwen Wen. OptProver: Bridging Olympiad and Optimization through Continual Training in Formal Theorem Proving.
- Zichen Wang, Wanli Ma, Zhenyu Ming, Gong Zhang, Kun Yuan, Zaiwen Wen. M2F: Automated Formalization of Mathematical Literature at Scale. (Paper)
- Zichen Wang, Anjie Dong, Zaiwen Wen. Tree-Based Premise Selection for Lean4, NeurIPS 2025. (Paper)
- Shu Miao, Zichen Wang, Anjie Dong, Yishan Wu, Weixi Zhang, Zaiwen Wen. Directed Multi-Relational GCNs for Premise Selection.
- Bowen Yang, Yi Yuan, Chenyi Li, Ziyu Wang, Liangqi Li, Bo Zhang, Zhe Li, Zaiwen Wen. Construction-Verification: A Benchmark for Formalizing Applied Mathematics in Lean 4. (Paper)
- Chenyi Li, School of Mathematical Sciences, Peking University, China (
lichenyi@stu.pku.edu.cn) - Wanli Ma, Beijing International Center for Mathematical Research, Peking University, China (
wlma@pku.edu.cn) - Zichen Wang, School of Mathematical Sciences, Peking University, China (
zichenwang25@stu.pku.edu.cn) - Ziyu Wang, School of Mathematical Sciences, Peking University, China (
wangziyu-edu@stu.pku.edu.cn) - Zaiwen Wen, Beijing International Center for Mathematical Research, Peking University, China (
wenzw@pku.edu.cn) - Yifan Bai, Anjie Dong, Yunxi Duan, Xinyi Guo, Pengfei Hao, Yuhao Jiang, Gongxun Li, Zebo Liu, Zhenxi Liu, Siyuan Ma, Guangxuan Pan, Siyuan Shao, Weiran Shi, Junren Si, Xuran Sun, Xuan Tang, Yijie Wang, Zhiyan Wang, Zixi Wang, Suwan Wu, Mingyue Xu, Yunfei Zhang, Changyun Zou
Released under the Apache 2.0 license. See LICENSE for details.