lean-formalize
Develop and verify a mathematical proof in Lean, continue an incomplete Lean project, or audit whether it proves the original statement.
Skill by wanshuiyin
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
npx agentmarket install skill/wanshuiyin-lean-formalize
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/lean-formalize
Tools it pre-approves 19
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(*),Read,Write,Edit,Grep,Glob,Agent,Skill,mcp__codex__codex,mcp__codex__codex-reply,mcp__antigravity__antigravity,mcp__antigravity__antigravity-reply,
Show 7 more
mcp__grok__grok,mcp__grok__grok-reply,mcp__claude-review__review,mcp__claude-review__review_reply,mcp__claude-review__review_start,mcp__claude-review__review_reply_start,mcp__claude-review__review_status
What's inside
- Skill name
lean-formalize- Description
- Develop and verify a mathematical proof in Lean, continue an incomplete Lean project, or audit whether it proves the original statement. Connect actual inputs to intermediate lemmas, assemble the target theorem, check its transitive axioms, and provide a reproducible handoff. Use when Lean is requested or a specific proof obligation benefits from formal verification; use proof-writer for ordinary mathematical drafting.
- License
- MIT
- Allowed tools
- Bash(*),, Read,, Write,, Edit,, Grep,, Glob,, Agent,, Skill,, mcp__codex__codex,, mcp__codex__codex-reply,, mcp__antigravity__antigravity,, mcp__antigravity__antigravity-reply,, mcp__grok__grok,, mcp__grok__grok-reply,, mcp__claude-review__review,, mcp__claude-review__review_reply,, mcp__claude-review__review_start,, mcp__claude-review__review_reply_start,, mcp__claude-review__review_status
- Instructions
- 371 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (4)
- SKILL.md
- adversarial-review.md · references/
- lean-working-loop.md · references/
- verification-and-handoff.md · references/
SKILL.md (first lines)
# Lean Formalize > **Before each reviewer slot**, follow [Selectable Reviewers](../shared-references/reviewer-backends.md): > resolve invocation → `.aris/reviewer.json` → Claude Code default (Codex MCP) > with `reviewer_route.py` through the canonical helper resolver, preserving this > slot's tier, fresh contexts, source/image inputs and deterministic gates. > Codex examples/pins below apply only to `backend=codex`; other routes use their > own first-call/reply contract. Save the route and actual returned identity; > unavailable selections are `REVIEW_UNAVAILABLE`. Classify acceptance from actual > families/completion/scope. Forward invocation reviewer/model/effort overrides > to reviewer-bearing children. Generation workers are unchanged. Turn the user's mathematical statement into a checked Lean theorem with its meaning preserved. A compiled conditional lemma is progress; completion concerns the original statement and the trust basis actually used. ## When to use Lean Use this skill when the user requests Lean, when continuing an existing Lean proof, or when formal verification addresses a concrete uncertainty in a central claim—for example, a long dependency chain, a delicate reduction, or coverage of a finite classification. State the obligation it will help resolve and proceed within the authorized task. Difficulty alone is not a reason to formalize. Ordinary derivations and short proofs can stay in `formula-derivation` or `proof-writer`; do not make Lean a prerequisite for every mathematical result. Respect the user's chosen proof method and the scale of the requested work. ## Core workflow ```text Original statement and Lean definitions → A: cross-family adversarial statement alignment → Proof obligations, representations, and lemma interfaces → Lean implementation ↔ B: adversarial review of key arguments and connections → Actual inputs connected; original theorem assembled → Executed type, definition, and transitive-axiom audit → C: cross-family adversarial review of the final exported result → Reproducible delivery and research-state update ``` For substantial new proof projects, A/B/C are part of the workflow. For a continuation, reuse completed checks on unchanged claims and revisit affected ones. Small routine formalizations need checks proportional to the actual claim; an explicit user request for cross-family review still applies to them. Use the authorized reviewer families available in the current host. If the user specifies both Grok and Gemini, obtain and record both; a same-family agent or another provider does not silently satisfy either request. Unavailability leaves that checkpoint pending while independent proof work continues. A checked theorem and a fully completed requested review workflow are separate deliverables. ## Scope and entry Follow the requested scope: implement, continue, audit, or package. For an audit, inspect and report rather than silently repairing or weakening the theorem. For implementation, develop the mathematical argument as well as its Lean proof: search relevant literature or library results, explore alternative routes, and discharge the missing lemmas. Continue through the remaining interfaces and top-level assembly; do not stop at a target declaration or the first successful compilation. Read the authoritative statement, existing Lean entry point, toolchain and lockfile, and latest progress record. Reuse the project and its document names. Do not reinstall tools, change dependencies, or start a new proof framework when the existing environment is suitable. Resolve APIs against the pinned library. Use the existing proof route when it works. If the mathematical argument itself is missing, isolate that obligation and use `proof-writer` or ordinary proof work. A delegated `proof-writer` task develops that argument and returns its proof or remaining gap to this run; it must not invoke `lean-formalize` again. Syntax automation cannot discharge an unproved premise. Do not promise that an arbitrary open problem can be formalized or solved. ### Start or resume the right work | Current input | First useful action | |---|---| |Only a mathematical statement|Fix definitions and quantifiers, then develop a proof route and its first difficult obligation| |A prose proof|Identify nontrivial dependencies and choose Lean representations; expose any missing argument before coding it| |A partial Lean project|Inspect the target and its actual callers, read the last useful build/error record, and continue at the highest unclosed connection| |An audit request|Read definitions and exported types, run applicable checks, and report; do not silently repair the target| |A completed proof to hand off|Check the current entry point and evidence, then prepare portable sources and commands without restarting the mathematical search| Name the intended main module, exported declaration, and current next obligation early. If no complete mathematical route is known, say which statement is being attempted; do not mark it provable merely because the implementation has started. Tool/API problems and missing mathematical arguments require different next steps. ## 1. Fix meaning before implementation Record a short mathematical specification, or reference the existing one: - Objects, domains, quantifiers, original hypotheses, and conclusion. - Equivalence of convenient representations to the original objects. - User constraints on computation, external certificates, and logical foundations. - The Lean declarations intended to express and prove the result. Separate original hypotheses from properties introduced by a reduction. Identify where finiteness, nonemptiness, decidability, normalization, and index conventions change the statement or require a bridge. Check plausible vacuity and quantifier failures in the actual theorem, rather than inventing unrelated edge cases. Keep the user's original statement as the comparison baseline until the user changes the goal. A working specification rewritten to match the implementation does not change that baseline. Record authorized scope changes explicitly; do not request confirmation again for a change already authorized in the session. If a repair yields only a stronger assumption or weaker conclusion, identify the proved variant and the original obligation still open. A stronger proved result can establish the original claim when its implication is supplied. Run checkpoint A on the actual definition bodies and proposed target. Ask for independent back-translation before comparison with the original mathematics. The input packet and prompt are in [references/adversarial-review.md](references/adversarial-review.md). A reviewer who saw only the intended prose has not checked the encoding. ## 2. Design the connections, then build useful pieces
From wanshuiyin/Auto-claude-code-research-in-sleep, MIT.
More from wanshuiyin/Auto-claude-code-research-in-sleep
- 0.699score
paper-illustration-image2
wanshuiyin
Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation.
SkillAFreshness: A★ 18KClaude Code - 0.699score
figure-spec
wanshuiyin
Generate deterministic publication-quality architecture, workflow, and pipeline diagrams from structured JSON (FigureSpec) into editable SVG.
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when a local…
SkillAFreshness: A★ 18KClaude Code - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project with Codex: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when…
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
render-html
wanshuiyin
Render an ARIS Markdown / JSON artifact (IDEA_REPORT, AUTO_REVIEW, KILL_ARGUMENT, PAPER_PLAN, research-wiki state, etc.) into a single-file HTML view designed…
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
paper-poster-html
wanshuiyin
DEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real…
SkillAFreshness: A★ 18KClaude Code - 0.695score
experiment-queue
wanshuiyin
SSH job queue for multi-seed/multi-config ML experiments with OOM-aware retry, stale-screen cleanup, and wave-transition race prevention.
SkillAFreshness: A★ 18KClaude Code - 0.694score
arxiv
wanshuiyin
Search, download, and summarize academic papers from arXiv.
SkillAFreshness: A★ 18KClaude Code +9 - 0.694score
claims-drafting
wanshuiyin
Draft patent claims for an invention.
SkillAFreshness: A★ 18KClaude Code - 0.694score
analyze-results
wanshuiyin
Analyze ML experiment results, compute statistics, generate comparison tables and insights.
SkillAFreshness: A★ 18KClaude Code +9 - 0.694score
alphaxiv
wanshuiyin
Quick single-paper lookup via AlphaXiv LLM-optimized summaries with tiered source fallback.
SkillAFreshness: A★ 18KClaude Code +9 - 0.694score
auto-review-loop-minimax
wanshuiyin
Autonomous multi-round research review loop using MiniMax API.
SkillAFreshness: A★ 18KClaude Code
Signals
- Stars
- 18,007
- Forks
- 1,488
- Open issues
- 58
- Last commit (this folder)
- Oct 19, 2026 (9 days ago)
- Last release
- Sep 28, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from wanshuiyin
- 0.699score
render-html
wanshuiyin
Render an ARIS Markdown / JSON artifact (IDEA_REPORT, AUTO_REVIEW, KILL_ARGUMENT, PAPER_PLAN, research-wiki state, etc.) into a single-file HTML view designed…
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
paper-poster-html
wanshuiyin
DEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real…
SkillAFreshness: A★ 18KClaude Code - 0.699score
paper-illustration-image2
wanshuiyin
Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation.
SkillAFreshness: A★ 18KClaude Code - 0.699score
figure-spec
wanshuiyin
Generate deterministic publication-quality architecture, workflow, and pipeline diagrams from structured JSON (FigureSpec) into editable SVG.
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when a local…
SkillAFreshness: A★ 18KClaude Code - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project with Codex: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when…
SkillAFreshness: A★ 18KClaude Code +9
Cite this page
lean-formalize skill. Agent Mart. https://agentmart.dev/skills/wanshuiyin-lean-formalize (last updated 2026-10-24)