Skip to content

optpku/ReasBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

123 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReasBook

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.

Current Coverage

Note: Documentation is currently maintained and validated for Tao's Analysis II. For other books, full aggregation in Documentation may temporarily cause naming conflicts.

Books

Papers

Repository Layout

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

Naming Convention

Top-level content directories use:

<Title>_<AuthorLastName>_<Year>

Examples:

  • ConvexAnalysis_Rockafellar_1970
  • SmoothMinimization_Nesterov_2004
  • OnSomeLocalRings_Maassaran_2025

Build

Fast preview (Verso-only, recommended)

From the repository root:

BUILD_DOCS=0 ./build.sh
./scripts/build_reasbook_web.sh
python3 serve.py 18000

Open:

  • http://127.0.0.1:18000/ReasBook/

Full build (complete pipeline)

./build-web.sh
python3 serve.py 18000

This 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

Sponsors

  • Beijing International Center for Mathematical Research, Peking University
  • Sino-Russian Mathematics Center
  • Great Bay University
  • National Natural Science Foundation of China

Lean Projects

Formalization Platform

  • ReasLab
    • An online Lean formalization platform for collaborative theorem development and verification.

Formalization Projects

  • 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.

Benchmark

  • AMBER
    • A Lean4 benchmark for applied mathematics formalization including proving and computational problems.

Autoformalization and Theorem Proving Systems

  • M2F

    • A toolkit for converting natural-language mathematical textbooks into formalization-ready Lean projects.
  • SITA

    • A structure-to-instance autoformalization framework for generating Lean definitions/theorems with verification feedback.

Publications

Formalization of Optimization

  • 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)

Autoformalization and Automated Theorem Proving

  • 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)

Premise Selection

  • 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.

Benchmark

  • 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)

Contributors

  • 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

License

Released under the Apache 2.0 license. See LICENSE for details.

About

ReasBook main branch mirror for self-hosted CI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages