fast-lean-proof-loop
Skill4 starsChanged 20 days agoMITView on GitHub
Shorten Lean 4 proof iteration with a warm editor session, dependency-aware reverse-import build plans, and lemma lookup that Lean itself confirms, while a separate full build plus axiom audit stays the promotion gate.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accepted-proof-exact-retuneSkill
- beachhead-ratchetSkill
- circuit-edit-integration-safetySkill
- computer-algebra-oraclesSkill
- constraint-construction-searchSkill
- cross-model-review-gateSkill
- deepseek-pressure-testSkill
- ecdsafail-fastevalSkill
- ecdsafail-lowq-playbookSkill
- ecdsafail-oracle-loopSkill
- ecdsafail-pareto-ratchetSkill
- ecdsafail-scratch-dietSkill
- elicit-researchSkill
- exact-search-engineeringSkill
- hard-problem-contractSkill
- invariant-chartSkill
- jev-second-perspectiveSkill
- lean-arklib-proofsSkill
- lean-finite-certificate-splittingSkill
- mission-commandSkill
- nasqret-playbookSkill
- pip-disciplineSkill
- portable-source-assertionsSkill
- proximity-prize-campaignSkill
- proximity-prize-frontier-archaeologySkill
- research-loopSkill
- route-compare-probe-disciplineSkill
- rust-archive-build-bindingSkill
- send-to-claude-fableSkill
- shot-autopsySkill
- squares-in-squares-campaignSkill
- verify-paired-native-measurementsSkill
- verify-research-transferSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill while editing a Lean proof inside an already configured project.
- Distinctive: line 14
Search existing project and ArkLib sources before writing new infrastructure.
- Distinctive: line 15
Verify every exact candidate name in one Lean process:
- Very specific: line 53
Use --dry-run to check target selection without compiling.
- Distinctive: line 62
Do not respond to a cascading error list with a broad refactor.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fast Lean proof loop
Use this skill while editing a Lean proof inside an already configured project. It reduces feedback latency without weakening the final acceptance gate.
Keep the interactive loop warm
- Open the authoritative project root in a Lean-aware editor and keep its language-server session alive across edits.
- Change one theorem or dependency cluster at a time. Read the first load-bearing error before following cascades.
- Search existing project and ArkLib sources before writing new infrastructure.
- Verify every exact candidate name in one Lean process:
python3 scripts/lean_symbol_check.py \
--project-root /absolute/path/to/project \
--source-root ProximityPrize \
--query 'encoder_injective|ProtocolClaim' \
--import ProximityPrize.Benchmark.TargetLower \
--name ProximityPrize.Benchmark.ProtocolClaim \
--timeout-seconds 120 \
--output /absolute/path/to/symbol-check.jsonText search produces candidates only. A name becomes verified only when the emitted #check batch exits successfully in the pinned project environment.
The helper kills its full process group and writes a TIMEOUT receipt if dependency hydration or elaboration exceeds the bound; a timeout verifies no name.
Build only the affected reverse-import closure
Generate a plan from the files actually edited:
python3 scripts/lean_fast_loop.py plan \
--project-root /absolute/path/to/project \
--source-root ProximityPrize \
--changed ProximityPrize/SubmissionLower/ChangedLemma.lean \
--output /absolute/path/to/affected-plan.jsonThe plan parses local imports, computes every local module that depends on the changed files, and chooses the outermost affected roots as Lake targets. Inspect the plan, then run the same source-bound calculation:
python3 scripts/lean_fast_loop.py run \
--project-root /absolute/path/to/project \
--source-root ProximityPrize \
--changed ProximityPrize/SubmissionLower/ChangedLemma.lean \
--output /absolute/path/to/incremental-build.jsonUse --dry-run to check target selection without compiling. If imports are generated, conditional, or outside the indexed source root, add the missing root explicitly to the final command and record why.
RCI loop
- Inspect: warm editor diagnostic, changed file, reverse-import plan, and verified symbol candidates.
- Critique: identify the earliest failing dependency, stale import, guessed lemma name, or over-broad rebuild root.
- Improve: make the smallest theorem, import, or target correction.
- Verify: rerun the affected build and retain its source-manifest receipt.
Do not respond to a cascading error list with a broad refactor. Fix the earliest load-bearing error and recalculate the closure after every import change.
Promotion gate
The fast loop is not the shipping receipt. Before promotion, follow references/promotion-gate.md and $lean-arklib-proofs: rebuild the exact official target from the authoritative source, run the full repository build required by policy, run the axiom and placeholder audits, verify source size and imports, run the independent falsifier, and refresh the benchmark. Preserve both incremental and final receipts so speed does not obscure what was actually checked.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

