HeadlinesBriefing favicon HeadlinesBriefing.com

MathCode: Frontier Math Coding Agent

Hacker News •
×

MathCode is a terminal AI coding assistant with a built-in math formalization engine. It converts plain-language math problems into Lean 4 theorems and attempts formal proofs using a persistent Lean REPL, reusable theorem libraries, and an Obsidian knowledge graph. Key features include persistent Lean REPL (compile checks in ~0.4s), Theorem Library (auto-named, importable theorems), and Obsidian Theorem Graph (visual dependency mapping).

The tool supports Agent-Mode Proving, where the AI interactively writes proofs, reads errors, and recompiles. Complex theorems are decomposed via Tree-of-Subgoals for parallel solving. Multi-Planner runs diverse proof strategies concurrently. Setup requires macOS (arm64) or Linux (x86_64), with CLI tools for Lean toolchain integration.

MathCode emphasizes reproducibility. Every proved theorem is stored and reusable, while axioms are review-checked. It integrates with Lean LSP for lemma searches and repairs. The system is based on the AUTOLEAN project. Usage in research requires citation to Team Math-AI’s 2026 paper.

A browser UI and CLI tools enable accessibility. Outputs are saved in Lean Formalizations/, and the Obsidian graph aids knowledge management. MathCode targets researchers and developers needing rigorous mathematical reasoning.