"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.
Live site: leangenius.org
- Formalize the Erdos 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 | 2,400+ |
| Gallery proofs | 2,000+ |
| Erdos problems formalized | 1,200+ |
| Research problems tracked | 1,100+ |
- Multi-agent orchestration: Autonomous researcher, enricher, auditor, and deployer agents
- Aristotle integration: Automated proof search via Harmonic's Aristotle
- Smart account management: Load balancing across multiple OAuth accounts with usage-aware scheduling
- Docker builds: Memory-safe Lean compilation (direct
lake buildcan consume 100GB+) - Continuous deployment: Automated PR merging, data sync, and Cloudflare deployment
| Project | Focus |
|---|---|
| erdosproblems.com | Canonical Erdos 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
Proofs
- Lean 4.26.0
- Mathlib
- Node.js 18+
- pnpm
- Docker (for building proofs)
- 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
proofs/
├── Proofs/ # Individual Lean proof files
├── lakefile.toml # Lean 4 project config (Mathlib dependency)
├── lean-toolchain # Lean version pin
└── scripts/ # Build and extraction scripts
functions/ # Cloudflare Workers API endpoints
shared/ # Shared code between frontend and backend
drizzle/ # Database migrations
scripts/ # Build, agent, and deployment scripts
research/ # Research problem tracking and state
Lean proofs are in the proofs/ directory, a Lean 4 project with Mathlib.
Always use the Docker wrapper — direct lake build can consume 100GB+ memory and crash the host.
# Build a specific proof
./proofs/scripts/docker-build.sh Proofs.YourProof
# Build with custom memory limit (default: 32GB)
LEAN_MEMORY_LIMIT=8192 ./proofs/scripts/docker-build.sh Proofs.YourProof- Create the Lean proof in
proofs/Proofs/YourProof.lean - Build:
./proofs/scripts/docker-build.sh Proofs.YourProof - Create gallery data in
src/data/proofs/your-proof/:meta.json— Proof metadata, sections, overviewannotations.json— Line-by-line annotations
- Verify:
pnpm build