Urgent.News

What's breaking now, across hundreds of outlets.

Tech

A green Lean build can still hide a sorry. I built a one-command audit for your proof artifact.

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:…

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.

Before trusting a Lean proof, the audit checks seven distinct criteria - all accessible through five commands:

1. init: Generates a configuration file along with the theorem statement.

2. audit: Performs the full audit and prints a verdict - VERIFIED, NEEDS-REVIEW, or NOT-CHECKED - along with an exit code suitable for CI systems.

3. check: Provides a concise one-line verdict and exit code, ideal for CI pipelines.

4. diff: Compares the proof artifact against a known good baseline.

5. explain: Breaks down each audit rule, including relevant sources and dates.

To 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:

1. NO-SORRY: Ensures no 'sorry', 'admit', or 'sorryAx' keywords appear in non-ignored files.

2. NO-NATIVE-DECIDE: Checks for misuse of 'native_decide' and related macros unless explicitly disclosed.

3. AXIOM-INVENTORY: Verifies the absence of undisclosed axioms and validates those used against a standard set.

4. STATEMENT-MATCHES-CLAIM: Confirms the theorem statement in the proof matches the one specified in claim.json.

5. TOOLCHAIN-PINNED: Validates that the Lean toolchain matches the version declared in claim.json and specifies a pinned Mathlib revision.

6. CHECKER-VERSION-KNOWN-BUGS: Issues a warning if the Lean version has a reported soundness bug, but does not fail the audit.

7. NO-CUSTOM-AXIOM-DECL: Disallows self-declared axioms in the proof unless explicitly allowed in the claim or configuration.

The 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.

Verifying 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.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Build Your Own Whale 🐳, Custom Images with Dockerfile

Introduction Yesterday I ran pre-built containers from Docker Hub. Today, I stepped up from user to creator by packaging my own HTML webpage into a custom Docker image using a Dockerfile , running it…

  • Docker images are read-only blueprints containing app and dependencies
  • Dockerfile is plain-text recipe dictating custom image build
  • Image changes require rebuilding and starting new container

I built a 90-second football manager game (Next.js, no backend)

I wanted a football game that takes 90 seconds, needs no sign-up, and feels like the worst minute of a manager's week. So I built The Manager's Dilemma .

  • "The Manager's Dilemma" is a 90-second football management game
  • No sign-up required, no backend needed
  • Daily scores and streaks stored in local storage

More from Sunday, 29 November 2026 →