A kitchen-style hierarchy of AI agents brainstorms, plans, formalizes and repairs mathematical proofs — and a Lean 4 proof assistant alone decides what counts as proved. Agents propose; the verifier disposes.
sorrys, whole-file re-check, axiom audit.Type any mathematical claim. The model reads it (unlike a canned demo), the JS skeptic checks what it honestly can, and the whole kitchen run is played out below. First use downloads the model once (it's cached afterwards). Needs a WebGPU-capable browser — recent Chrome or Edge on a desktop.
The design answers one question: how do you get honest mathematics out of models that are rewarded for sounding right? By never letting them grade themselves.
A lemma is VERIFIED only after Lean compiles its proof with zero errors and zero sorries.
PROVED requires the assembled file to re-verify as a whole, with no axioms beyond propext, Classical.choice, Quot.sound.
Provers submit tactic bodies only. Echoing a different, easier theorem gets stripped — the pinned statement is what Lean sees.
sorry, admit, axiom, native_decide, unsafe: rejected before the verifier is even consulted.
Before any proving, a Skeptic hunts for numeric counterexamples with sympy — against the main claim and every planned lemma. Falsification is cheap; verification is expensive; Brigade spends each where it belongs. In strategic mode, sibling lemmas' first proofs share one Lean compilation and a warm REPL keeps Mathlib loaded — speed without ever weakening acceptance.
This is the recorded event stream of an actual job through the real orchestrator in its deterministic test harness — the same acceptance path as production. Watch the statement gate catch a broken formalization, a failed proof get repaired, a stuck lemma get decomposed, and the axiom audit gate the final verdict.
Three ingredients: this repo, your own Anthropic API key (Settings panel in the app), and a local Lean 4 + Mathlib install (one script, ~5–10 GB). Only then does "proved" mean what it should.
git clone https://github.com/ysmouhib/brigade cd brigade pip install -e server/ bash scripts/setup_lean.sh # the Lean 4 + Mathlib verifier (skippable to look around) cd server && python -m uvicorn app.main:app --port 8811 # open http://localhost:8811 — add your key in Settings, pick "Claude + Lean"
Windows: powershell -ExecutionPolicy Bypass -File scripts\windows_demo.ps1,
then WINDOWS_GUIDE.md in the repo walks every remaining step, WSL included.
Inside the app, the third engine is a scripted replay of the recording above —
it's labeled as such and refuses custom input, on purpose.