{
  "id": 22574627,
  "title": "A green Lean build can still hide a sorry. I built a one-command audit for your proof artifact.",
  "url": "https://urgent.news/2026/11/29/a-green-lean-build-can-still-hide-a-sorry-i-built-a-one-command-audit",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-29T12:20:30.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/techdevfun/a-green-lean-build-can-still-hide-a-sorry-i-built-a-one-command-audit-for-your-proof-artifact-1d5c"
  },
  "original_language": null,
  "account": "Proof assistants can certify a proof as correct, yet the proof may be incorrect in its actual content. A file may build cleanly even if it contains a flaw, relies on undisclosed axioms, or proves a less ambitious statement than advertised. To address this, I created a single command audit tool for Lean 4 proof artifacts. This tool, named proofcheck, is a TypeScript command line interface (CLI) that can be run on any machine with Node.js 20 or later.\n\nBefore trusting a Lean proof, the audit checks seven distinct criteria - all accessible through five commands:\n\n1. init: Generates a configuration file along with the theorem statement.\n2. audit: Performs the full audit and prints a verdict - VERIFIED, NEEDS-REVIEW, or NOT-CHECKED - along with an exit code suitable for CI systems.\n3. check: Provides a concise one-line verdict and exit code, ideal for CI pipelines.\n4. diff: Compares the proof artifact against a known good baseline.\n5. explain: Breaks down each audit rule, including relevant sources and dates.\n\nTo run an audit, a claim.json file must first be created, outlining the theorem, its announced statement, required Lean version, associated math library version, permitted axioms, and additional metadata. The seven audit rules are:\n\n1. NO-SORRY: Ensures no 'sorry', 'admit', or 'sorryAx' keywords appear in non-ignored files.\n2. NO-NATIVE-DECIDE: Checks for misuse of 'native_decide' and related macros unless explicitly disclosed.\n3. AXIOM-INVENTORY: Verifies the absence of undisclosed axioms and validates those used against a standard set.\n4. STATEMENT-MATCHES-CLAIM: Confirms the theorem statement in the proof matches the one specified in claim.json.\n5. TOOLCHAIN-PINNED: Validates that the Lean toolchain matches the version declared in claim.json and specifies a pinned Mathlib revision.\n6. CHECKER-VERSION-KNOWN-BUGS: Issues a warning if the Lean version has a reported soundness bug, but does not fail the audit.\n7. NO-CUSTOM-AXIOM-DECL: Disallows self-declared axioms in the proof unless explicitly allowed in the claim or configuration.\n\nThe audit concludes with one of three outcomes: VERIFIED (no issues found), NEEDS-REVIEW (only medium-severity issues), or NOT-CHECKED (high-severity issues). The verdict is strictly based on static analysis of the proof artifact, without executing any code. This approach ensures that any suspicious elements in a proof are brought to light before it is accepted.\n\nVerifying a proof with proofcheck is straightforward. Given a claim.json file and a Lean proof artifact, simply run \"proofcheck audit my-proof\" in the terminal. This command will scan the artifact, evaluate the seven rules, and output the verdict along with an exit code that CI systems can interpret. The tool provides a comprehensive audit without requiring any additional dependencies, making it an efficient and reliable way to ensure the integrity of Lean proofs.",
  "summary": "A proof assistant can say a proof is correct and still be wrong about what was proved. A file can build green while it contains a sorry , rests on an axiom nobody disclosed, or proves a weaker statement than the one announced. I built a one-command check that audits a Lean 4 proof artifact before you trust it. Why a green build is not enough Three facts, all verified live on 2026-11-29:…",
  "summary_source": "publisher",
  "key_points": [
    "Proofcheck tool audits Lean proof artifacts with seven criteria",
    "Init command generates configuration file and theorem statement",
    "VERIFIED outcome indicates no issues found in proof"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}