Reports what a checked Lean 4 or Metamath proof rests on: inherited sorry, compiler trust, axioms.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
#print axioms tells you whether one theorem depends on an axiom. It cannot
tell you where an axiom is spent rather than inherited, how far that spending
reaches, how much of it could be avoided, or β for a given theorem β which step
introduced it. This does.
Works on Lean 4 / Mathlib and on Metamath databases (set.mm,
iset.mm, nf.mm), by one program, so two foundations are compared under
identical definitions rather than by analogy.
That runs the moment it's installed β no Lean, no build, no files. Everything below needs a Lean project.
Pure Python. macOS, Windows, Linux. numpy is the only dependency.
How do I know if my Lean proof depends on a sorry?
Lean warns once, on the line you typed it. It does not warn you about the theorem
three files later that uses that lemma and is therefore not proved either. Run
gonzalgo trust and it reports every theorem that reaches a sorry anywhere
upstream, however far.
How do I find a sorry I inherited from a dependency?
Same command. The audit is over the whole environment, so a sorry in a library
you import is reported exactly like one in your own file.
Does my project use native_decide anywhere?
native_decide results are obtained by compiling and running code and believing
the answer β the compiler and runtime are trusted, not the kernel, and soundness
bugs have been found there. gonzalgo trust reports Lean.ofReduceBool and
Lean.ofReduceNat, the axioms it emits, and how many theorems inherit them.
What axioms does this Lean theorem actually depend on, and why?
#print axioms tells you whether. gonzalgo why <decl> -a <axiom> gives the
shortest path from the theorem to the axiom, labelling each step as a statement
dependency or a proof dependency β so you can see which step introduced it and
whether it is reroutable.
Can I fail CI when a proof rests on something unfinished?
Yes. --fail-on-trust, or the GitHub Action below.
If I change this definition, what breaks?
gonzalgo impact splits dependents into those that name it in a statement β
whose meaning changes with it β and those that only use it in a proof, which
merely rebuild.
kernel > sorry
Pointed at Lean 4.32.1 with Mathlib β 790,171 declarations, 30 million dependency edges β the funnel from "the whole library" down to "provably removable" runs like this:
That single tactic is omega, which supplies the Decidable arguments of
six helper lemmas as a hardcoded Classical.propDecidable and never attempts
instance synthesis β so proofs as elementary as a - b = 0 β a β€ b over Nat
rest on the axiom of choice with no need. Filed upstream; the fix is one file.
Add to your MCP client's configuration:
Ten tools: audit_trust, why, impact, axiom_reach, metamath_audit,
kernel_index, plus the plumbing to produce a dump from a project.
There's also a scope tool that reports what gonzalgo can't do β read a paper,
mark homework, judge whether text is any good. It's there so a model asked "is
this proof correct?" about a page of prose doesn't grab the nearest proof-shaped
tool and return something meaningless. Every other tool restates the
precondition in its description.
The case it's built for: a generated Lean proof that fails to compile is easy to
spot. One that compiles while resting on a sorry three lemmas upstream isn't,
and Lean only mentions it once, in a warning, at the site.
kernel_index runs with no files and no network, so a model can call it cold for
figures on known libraries.
Three lines in any Lean 4 project. Every commit is checked for theorems resting on an unfinished proof or on trusting the compiler rather than the kernel.
Then the badge, which is just the workflow's own status β no extra service:
What the badge actually certifies. Not that the proofs are correct β Lean
already checks that. That no theorem in the project is standing on a sorry
somewhere upstream, and that none of them were decided by compiling and running
code instead of by the kernel.
Lean warns about the sorry you just typed. It says nothing about the theorem
three files later that quietly inherits it. In the worked example under
examples/dirty, Lean reports one warning and the audit finds two
contaminated theorems.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gonzalgo)<a href="https://allmcps.com/mcp/gonzalgo"><img src="https://allmcps.com/api/badge/gonzalgo?style=directory" alt="Gonzalgo on AllMCPs" /></a>