"The Truth Mines were a honeycomb of abstract constructs..." — Greg Egan, Diaspora
An interactive gallery of formal mathematics — annotated Lean 4 proofs with line-by-line explanations, plus tooling for AI-assisted formalization of open problems.
- Formalize the Erdős Problems in Lean 4
- Build infrastructure for human-AI collaborative proof development
- Create an accessible gallery for exploring verified mathematics
See ROADMAP.md for current plans.
| Metric | Count |
|---|---|
| Lean proof files | 999 |
| Gallery proofs | 969 |
| Erdős problems formalized | 320 |
| Research problems tracked | 341 |
- Enhancement agents: Parallel workers improving problem formalizations
- Aristotle integration: Proof search via Harmonic's Aristotle
- Loom orchestration: Multi-agent coordination via GitHub labels
- Docker builds: Memory-safe Lean compilation
| Project | Focus |
|---|---|
| erdosproblems.com | Canonical Erdős problem database |
| Mathlib | Lean 4 mathematical library |
| Erdosproblems-LLM-Hunter | Tracking informal LLM solution attempts |
Frontend
- React 19 + TypeScript
- Vite
- Tailwind CSS 4
- Radix UI primitives
- KaTeX for math rendering
- React Router
Backend
- Cloudflare Workers
- Cloudflare D1 (SQLite)
- Drizzle ORM
- Node.js 18+
- pnpm
- Wrangler CLI (for backend development)
pnpm installStart the frontend dev server:
pnpm devpnpm buildpnpm lintsrc/
├── components/ # React components
│ ├── auth/ # Authentication (login, signup, profile)
│ ├── comments/ # Threaded discussion system
│ ├── proof/ # Proof viewer and annotations
│ └── ui/ # Shared UI primitives
├── contexts/ # React contexts (auth)
├── data/proofs/ # Proof content (Lean source, annotations, metadata)
├── lib/ # Utilities (Lean tokenizer, etc.)
├── pages/ # Route pages
└── types/ # TypeScript types
functions/ # Cloudflare Workers API endpoints
shared/ # Shared code between frontend and backend
drizzle/ # Database migrations
scripts/ # Build and import scripts
Lean proofs are in the proofs/ directory, a Lean 4 project with Mathlib.
proofs/
├── Proofs/ # Individual Lean proof files
├── Proofs.lean # Main import file
├── lakefile.toml # Mathlib @ 05147a76b4
├── lean-toolchain # Lean 4.10.0
└── scripts/ # Build and extraction scripts
cd proofs
./scripts/setup.sh # First-time setup
lake build # Build all proofsAfter running LeanInk on a proof, import the tactic states:
# List available proofs
node scripts/import-proof.cjs --list
# Import a specific proof
node scripts/import-proof.cjs Sqrt2Irrational
# Import all proofs with LeanInk output
node scripts/import-proof.cjs --all- Create the Lean proof in
proofs/Proofs/YourProof.lean - Regenerate imports:
./.lean/scripts/generate-proofs-imports.sh - Build:
cd proofs && lake build - Run LeanInk:
./scripts/extract-proof-info.sh Proofs/YourProof.lean - Create the frontend structure in
src/data/proofs/your-proof/:meta.json- Proof metadata, sections, overviewannotations.json- Line-by-line annotationsindex.ts- Import fromproofs/Proofs/YourProof.lean
- Run
node scripts/import-proof.cjs YourProofto import tactic states - Add to
src/data/proofs/index.ts