🐛 Lean4 Theorem Proving

Use when working with Lean 4 (.lean files), writing mathematical proofs, seeing "failed to synthesize instance" errors, managing sorry/axiom elimination, or searching mathlib for lemmas - provides build-first workflow, haveI/letI patterns, compiler-guided repair, and LSP integration

QUICK INSTALL
npx playbooks add skill cameronfreer/lean4-skills --skill lean4-theorem-proving

About Lean4 Theorem Proving

Use when working with Lean 4 (.lean files), writing mathematical proofs, seeing "failed to synthesize instance" errors, managing sorry/axiom elimination, or searching mathlib for lemmas - provides build-first workflow, haveI/letI patterns, compiler-guided repair, and LSP integration

The 36-word prompt provides structured debugging guidance — covering detailed methodology and consistent output formats. Install it in one command.

Use Cases

  • Systematically diagnosing production errors and crashes
  • Tracing memory leaks and performance bottlenecks
  • Debugging async race conditions and concurrency issues
  • Root-cause analysis with structured logging

Example Prompts

Get started Help me use the Lean4 Theorem Proving skill effectively.

System Prompt (36 words)

Use when working with Lean 4 (.lean files), writing mathematical proofs, seeing "failed to synthesize instance" errors, managing sorry/axiom elimination, or searching mathlib for lemmas - provides build-first workflow, haveI/letI patterns, compiler-guided repair, and LSP integration

Frequently Asked Questions

What is Lean4 Theorem Proving?

Lean4 Theorem Proving is a free debugging skill for AI coding agents. Use when working with Lean 4 (.lean files), writing mathematical proofs, seeing "failed to synthesize instance" errors, managing sorry/axiom elimination, or searching mathlib for lemmas - provides build-first workflow, haveI/letI patterns, compiler-guided repair, and LSP integration. It provides a specialized system prompt that configures your agent with debugging expertise.

How do I use Lean4 Theorem Proving with Claude Code?

Run npx playbooks add skill cameronfreer/lean4-skills --skill lean4-theorem-proving in your terminal to install Lean4 Theorem Proving into your Claude Code session. It works immediately after installation.

Which AI coding agents work with Lean4 Theorem Proving?

Lean4 Theorem Proving is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.

Is Lean4 Theorem Proving free to use?

Yes, Lean4 Theorem Proving is completely free and open source. The full source is available on GitHub at https://github.com/cameronfreer/lean4-skills/tree/main/plugins/lean4-theorem-proving/skills/lean4-theorem-proving. You only need a subscription to the AI agent you use it with.

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.