lean_check
Checks Lean 4 proofs with Mathlib for compilation errors, unsolved sorry, and nonstandard axioms, rejecting executable code, new axioms, and native_decide within 60 seconds.
Instructions
Check a formal proof in Lean 4 with Mathlib. Returns whether it compiles without errors, without sorry and with only the standard axioms, with Lean messages. Code that runs programs (#eval, run_cmd, elab, macro), new axioms and native_decide are rejected. 60 s limit.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "lean_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Lean 4 source, max 20000 characters. 'import Mathlib' is added if no import is present. | |
| allow_sorry | No |