axiom-lean-prover
БесплатноЗапускает вложенные скриптыНе проверенFormally verify Lean 4 proofs against Mathlib using the hosted Axiom AXLE API — no local Lean toolchain. Use in the mathematics_lean domain, when a proof…
от ChicagoHAI★ 164 звезды на GitHubОб этом скилле
Axiom Lean Prover (AXLE)
Formal proof verification with Lean 4 + Mathlib, checked by the hosted Axiom AXLE
API (https://axle.axiommath.ai). There is no local Lean install, no lake, and
no Mathlib cache — .lean files are sent as text to AXLE, which checks them against
a preloaded full Mathlib and returns structured errors/warnings with source positions.
This is the cloud-verified counterpart of the lean-prover skill. If you want a local
lake build workflow instead, use lean-prover. Do not mix them in one workspace.
When to Use
- Working in the
mathematics_leanresearch domain - Verifying proofs without provisioning a multi-GB local Lean/Mathlib toolchain
- Translating an informal proof into formally verified Lean 4 code
- Checking whether a mathematical statement is provable / type-checks
Setup
Almost none. You need:
AXLE_API_KEYin the environment (already passed through from the project.env). Verify with:echo "${AXLE_API_KEY:0:6}..."(should printpk_...).- Python 3.10+ (already present). The verifier uses only the standard library.
Create a directory for your proof files (any name; proofs/ by convention):
mkdir -p proofs
That's it — no elan, no lake, no lake exe cache get, no initial build.
The Verifier: axle_check.py
lake build is replaced by this one script (the ground truth for this domain):
python .claude/skills/axiom-lean-prover/scripts/axle_check.py proofs/MyProof.lean
| Invocation | Meaning |
|---|---|
axle_check.py FILE.lean [FILE2 ...] |
Check files, concatenated in the given order |
axle_check.py --dir proofs/ |
Check every .lean under a directory (auto-ordered: Definitions → Lemmas → Theorems) |
axle_check.py --code "theorem t : 1=1 := rfl" |
Check an inline snippet (great for #check-style lemma lookups) |
cat f.lean | axle_check.py - |
Read from stdin |
... --statement-check |
Treat sorry as success — for confirming a stub type-checks |
... --json |
Also dump the raw API response |
... --environment lean-4.29.0 |
Pin a Lean environment (default lean-4.29.0, or $AXLE_ENV) |
Exit codes (use them in loops)
| Code | Status | Meaning |
|---|---|---|
0 |
COMPLETE |
Compiles, no errors, no sorry → the proof is formally done ✓ |
2 |
INCOMPLETE_SORRY |
Compiles, but a declaration uses 'sorry' → statement OK, proof unfinished |
1 |
ERROR |
Compile / type / tactic error → read the messages and fix |
3 |
TRANSPORT_ERROR |
Network / auth / quota / usage error (e.g. missing AXLE_API_KEY) |
A
sorryproof returnsokay:truefrom the API — it compiles but is not proven. The script catches this and reportsINCOMPLETE_SORRY. Never report asorry'd result as complete. This is the exact analogue of the old "green build but grep findssorry".
Error positions
On any non-trivial result the script writes the exact text it sent to AXLE to
.axle_last_check.lean in the current directory. Lean positions look like
-:7:12-7:18 (line:col); they refer to that normalized file, so open it to see
the offending line. (Line numbers differ from your source files because all import
lines are collapsed into a single import Mathlib at the top — see Imports below.)
Imports — IMPORTANT (different from the local lean-prover skill)
Always start a proof file with the full import:
import Mathlib
- The AXLE environment has all of Mathlib preloaded; the full import costs nothing (it is checked remotely — there is no local cache to download or build).
- The default AXLE environment's import set is exactly
[Mathlib]. Sendingimport Mathlib.Tacticor specific submodules triggers an "Imports mismatch". axle_check.pystrips everyimportline you write and prepends a singleimport Mathlib(and setsignore_imports), so submodule imports or local cross-file imports (import Proofs.Definitions) are normalized away and never break the check. You still writeimport Mathlibat the top of each file for clean, human-readable Lean source.
This is the opposite of the lean-prover skill's "never use bare import Mathlib"
rule — that rule exists only to limit local cache size, which is irrelevant here.
Using lemmas that are NOT in Mathlib
Only Mathlib is available remotely — you cannot import an external Lean package
(an import SomeProject.Lemmas line is stripped and its names become unknown identifier).
When the resource finder surfaces a lemma that lives outside Mathlib (a paper's companion
formalization, a GitHub Lean project, or an informal result from the literature), you have
two honest options:
Option 1 (preferred) — inline and prove it
Copy the lemma's statement and Lean proof into your proofs/ files and let AXLE verify
it against Mathlib like any other declaration. If its proof only depends on Mathlib, this is
clean and gi
Установить axiom-lean-prover в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл axiom-lean-prover?
Formally verify Lean 4 proofs against Mathlib using the hosted Axiom AXLE API — no local Lean toolchain. Use in the mathematics_lean domain, when a proof needs machine-checked verification but installing Lean/Mathlib locally is undesirable, or when translating informal proofs into formally verified Lean 4 code checked in the cloud.
Как установить скилл axiom-lean-prover?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл axiom-lean-prover запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic