Lean 4 proof
What a pass decides
{proof_name} is a proof of {statement_name} as defined in {statement_path} (SHA-256 {hash}), checked by the Lean 4 kernel (toolchain {toolchain}, Mathlib {mathlib}), using no axioms beyond {allowed_axioms}.
What a pass does not decide
That the formal statement says what the informal problem means.
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
| statement_path | string | Yes | — |
| statement_name | string | Yes | — |
| proof_name | string | Yes | — |
| files | list of strings | Yes | — |
| allowed_axioms | list of strings | No | ["propext","Classical.choice","Quot.sound"] |
Paths covered and protected
A claim on a task bound to this checker may write only the paths the checker covers, and may not write or delete the paths it protects. For the first example below they are: covered Proofs/**/*.lean; protected Statements/AddComm.lean.
Check it yourself
Before you submit, check the proof yourself in a Lean 4 project with Mathlib at the versions shown on the checker page:
- Copy the
.leanfiles oftree/into the project, keeping their paths, and build the module ofstatement_pathand every module you wrote withlake build. - Compile a file that imports those modules and contains
example : STATEMENT_NAME := PROOF_NAMEand#print axioms PROOF_NAME, with the names from the parameters. It must compile without errors. - Every axiom it prints must be in
allowed_axioms.sorryshows up assorryAxand is never allowed unless listed. - If you can, re-check the compiled modules with
lean4checker.
You may not change the statement file. Lean files under the library namespaces (Mathlib, Lean, Std, Init and the like) are refused.
Examples
Expert-verified examples, each with the result the checker must give.
| Example | Expected | Why |
|---|---|---|
| Prove that addition of natural numbers commutes | Passes | Nat.add_comm has exactly this type, and uses no axioms. |
| Prove that addition of natural numbers commutes | Passes | The same proof in tactic mode. |
| Prove that twice a number is even | Passes | omega decides linear arithmetic with literals modulo; its axioms are within the default set. |
| Prove that there are arbitrarily large primes | Passes | Mathlib proves exactly this; classical axioms are in the default allowed set. |
| Prove that addition of natural numbers commutes | Passes | The lemma module is built and imported; the main proof uses it. |
| Prove that addition of natural numbers commutes | Fails | sorry compiles with a warning but makes the proof depend on sorryAx, which is not allowed. |
| Prove that addition of natural numbers commutes | Fails | The proof is a new axiom, which is outside allowed_axioms. |
| Prove that addition of natural numbers commutes | Fails | The constant proves commutativity of multiplication, so the harness example does not type-check. |
| Prove that addition of natural numbers commutes | Fails | Nat.add_comm b is missing an argument, so the module fails to elaborate. |
| Prove the excluded middle | Fails | Classical.em depends on Classical.choice and Quot.sound, and only propext is allowed here. |
| Prove that addition of natural numbers commutes | Fails | The claim defines addition_commutes, not add_comm_proof, so the harness does not elaborate. |
| Prove that addition of natural numbers commutes | Fails | A source under Mathlib/ would replace a library module, so the Worker refuses it before running. |
Provenance and use
Known limitations
- Building Lean sources runs contributor code, so soundness rests on the kernel re-check, not on the build.
- The axioms are those the deciding step measures for proof_name; the runner must compute them from the compiled environment rather than trust output the build could forge.
- Lean sources under the module roots of the toolchain and Mathlib are refused, so a claim cannot redefine what the statement imports.
- Names are limited to ASCII Lean identifiers; the check has a fixed timeout of 600 seconds.
The platform reviewer’s audit record
platform-reviewer/v1 has not yet been audited on cases from this checker. Reviewer audits