Lean4.ai

A curated collection of resources for learning Lean 4 and applying it to AI research

Getting Started with Lean 4

Lean 4 Official Site

The official Lean 4 homepage with downloads, documentation, and news.

Official

Lean 4 Documentation

Comprehensive reference manual for the Lean 4 language and its features.

Docs

Mathlib4 Docs

API documentation for Mathlib4, the community math library for Lean 4.

Library

Theorem Proving in Lean 4

The standard textbook for learning theorem proving in Lean 4. Start here.

Book

Functional Programming in Lean

Learn Lean 4 as a general-purpose functional programming language.

Book

Mathematics in Lean

An interactive tutorial on formalizing mathematics in Lean 4 with Mathlib.

Tutorial

Natural Number Game

A fun, interactive browser game that teaches Lean 4 proof tactics through natural number proofs.

Interactive

Lean 4 Playground

Try Lean 4 directly in your browser -- no installation required.

Interactive

AI for Lean / Lean for AI

LeanDojo

An open-source playground for LLM-based theorem proving in Lean. Provides tooling, data extraction, and interaction with Lean.

Framework

ReProver

A retrieval-augmented LLM-based prover for Lean 4, from the LeanDojo team.

Prover

llmstep

An LLM-based tactic suggestion tool that integrates directly into Lean 4's VS Code extension.

Tool

nLIR

Natural Language Interaction with Lean 4. Use natural language to guide proofs.

Tool

lean-auto

Automated reasoning tactic for Lean 4 that uses a portfolio of strategies.

Tactic

Lean REPL / Gym

Tools for programmatically interacting with Lean 4 from Python for reinforcement learning setups.

Framework

Datasets & Benchmarks

Lean-Workbook

A large-scale dataset of Lean 4 problems for training and evaluating AI provers.

Dataset

LeanDojo Benchmark

Benchmark datasets extracted from Mathlib for evaluating theorem provers.

Benchmark

Mathlib4

The Lean 4 math library itself -- a massive corpus of formalized mathematics with 100k+ theorems.

Corpus

miniF2F

A cross-system benchmark of formalized math olympiad problems, available in Lean 4.

Benchmark

Lean Search

Natural language search for Lean theorems and lemmas. Describe what you need in English.

Search

Loogle

Search Mathlib by type signature -- like Haskell's Hoogle but for Lean 4.

Search

Mathlib4 API Search

Browse and search the full Mathlib4 API documentation.

Docs

Lean Reservoir

A package index for the Lean 4 ecosystem. Find and discover Lean libraries.

Packages

Community

Lean Zulip Chat

The primary community hub. Active discussions on Lean, Mathlib, tactics, and AI.

Chat

Lean Community Website

Community-maintained guides, tutorials, installation instructions, and contribution info.

Community

Lean 4 GitHub

The official Lean 4 repository. Report issues, track development, and contribute.

Source

Mathlib4 GitHub

The community math library. One of the largest formalized math projects in the world.

Source

Key Papers

LeanDojo: Theorem Proving with Retrieval-Augmented Language Models

Yang et al., 2023. Introduces LeanDojo and ReProver for LLM-based proving.

NeurIPS 2023

Draft, Sketch, and Prove

Jiang et al., 2023. Combines informal and formal reasoning for theorem proving.

ICLR 2023

Generative Language Modeling for Automated Theorem Proving

Polu & Sutskever, 2020. The GPT-f paper that started the LLM+theorem proving wave.

Foundational

DeepSeek-Prover

Xin et al., 2024. Advancing LLM-based theorem proving with proof search and RL.

2024

LEGO-Prover

Xin et al., 2023. Growing a library of lemmas for LLM-based theorem proving.

2023

Lean Copilot

Song et al., 2024. Running LLMs natively in Lean 4 for proof automation.

2024