audit-lean-axioms

audit-lean-axioms is a command for Claude Code from vince-gonzalez/gonzalgo. It costs 25 tokens per session (470 once invoked), scanned A, original, Apache-2.0.

A reporting command for Lean 4 projects, where Lean 4 is a programming language and proof system. It traces which theorems depend on unfinished proofs, built-in proof shortcuts, or other axioms—assumptions accepted without being proved.

In plain words
What is it for?
Use it to build and inspect a project, report trusted dependencies, estimate the limit of removable classical assumptions, and explain notable dependencies for specific declarations.
Why use it?
It shows how much a project relies on trusted assumptions and identifies where those dependencies enter the proof chain. This helps distinguish a genuinely checked proof from one resting on an inherited gap.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the lean-axiom-provenance plugin — 2 skills, 2 commands, 1 MCP server shipped together

Good fit Use it to build and inspect a project, report trusted dependencies, estimate the limit of removable classical assumptions, and explain notable dependencies for specific declarations.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vince-gonzalez/gonzalgo/audit-lean-axioms
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/vince-gonzalez/gonzalgo

Made for: Claude Code.

Or install lean-axiom-provenance, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-lean-axioms

README.md
[![agentmods](https://agentmods.dev/badge/commands/vince-gonzalez/gonzalgo/audit-lean-axioms/github.svg)](https://agentmods.dev/commands/vince-gonzalez/gonzalgo/audit-lean-axioms)
Your own site
<a href="https://agentmods.dev/commands/vince-gonzalez/gonzalgo/audit-lean-axioms"><img src="https://agentmods.dev/badge/commands/vince-gonzalez/gonzalgo/audit-lean-axioms/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-lean-axioms

Your own site · 80×15
<a href="https://agentmods.dev/commands/vince-gonzalez/gonzalgo/audit-lean-axioms"><img src="https://agentmods.dev/badge/commands/vince-gonzalez/gonzalgo/audit-lean-axioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00470
Opus 5 $0.00013 $0.00235
Sonnet 5 $0.00005 $0.00094
Haiku 4.5 $0.00003 $0.00047

Measured 11d ago against content hash df0c7e6f1262, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

audit-lean-axioms scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/audit-lean-axioms.md · 37 lines

What it actually says

Use the lean-axiom-provenance skill to report what the Lean 4 project at $ARGUMENTS rests on. That skill is the single source for the commands and, more importantly, for how to read what they return — follow it end to end.

Order of work:

  1. Build the environment and generate a dump. Run gonzalgo check on it and do not proceed until it passes; a dump written without allowOpaque reads every theorem's proof as empty and every statement-versus-proof figure computed from it will be wrong rather than imprecise.
  2. gonzalgo trust — every theorem reaching a sorry anywhere upstream, and everything carrying Lean.ofReduceBool / Lean.ofReduceNat. Where you find sorryAx, say which kind it is: a sorry somebody typed, or a proof that failed to elaborate and was admitted anyway. If you cannot tell them apart from the evidence, say that instead of guessing.
  3. gonzalgo eligible — the ceiling on removable classical dependence. Report it as a ceiling. A theorem with a choice-free statement can still need excluded middle.
  4. For anything notable, gonzalgo why on the specific declaration, and quote the labelled path rather than paraphrasing it.

Honor a --axiom in $ARGUMENTS if one is given; the default target is Classical.choice.

Finish with a plain verdict — CLEAN / INHERITED-SORRY / COMPILER-TRUSTED / CLASSICAL-ONLY — the counts behind it, and the exact Lean and Mathlib versions measured. A count with no version attached goes stale silently.

Do not call a proof wrong because it depends on Classical.choice. Nearly all of Mathlib does, and for most theorems the statement requires it. The finding worth reporting is dependence the proof introduced.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 37 lines · 25 tokens per session scan A df0c7e6f1262

Subscribe to this mod's changes

audit-lean-axioms is a command published in the GitHub repository vince-gonzalez/gonzalgo (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 25 tokens to every session and 470 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.