home / skills / a5c-ai / babysitter / lean-proof-assistant
This skill guides formal theorem verification in Lean 4, translating proofs, generating tactics, and leveraging Mathlib4 for rigorous results.
npx playbooks add skill a5c-ai/babysitter --skill lean-proof-assistantReview the files below or copy the command above to add this skill to your agents.
---
name: lean-proof-assistant
description: Interface with Lean 4 proof assistant for formal theorem verification
allowed-tools:
- Bash
- Read
- Write
- Edit
- Glob
- Grep
metadata:
specialization: mathematics
domain: science
category: theorem-proving
phase: 6
---
# Lean Proof Assistant
## Purpose
Provides expert guidance on using the Lean 4 proof assistant for formal theorem verification and mathematical formalization.
## Capabilities
- Parse informal proofs into Lean 4 syntax
- Generate tactic-based proof scripts
- Access Mathlib4 library for standard results
- Automated term rewriting and simplification
- Generate proof outlines with sorry placeholders
- Extract executable code from proofs
## Usage Guidelines
1. **Proof Development**: Use Lean 4 syntax with Mathlib4 conventions
2. **Tactic Application**: Apply tactics systematically (intro, apply, exact, rw)
3. **Library Navigation**: Search Mathlib4 for existing lemmas and theorems
4. **Proof Completion**: Fill sorry placeholders incrementally
## Tools/Libraries
- Lean 4
- Mathlib4
- Lake build system
- VS Code Lean extension
This skill interfaces with the Lean 4 proof assistant to help you develop, verify, and extract formal proofs and code. It provides guidance for converting informal arguments into Lean 4 syntax, generating tactic-based proof scripts, and leveraging Mathlib4 for standard results. The skill is designed to speed iterative proof development and reduce common syntactic and tactic errors.
The skill analyzes informal proof descriptions or partial Lean files, proposes Lean 4 syntax and tactic sequences, and can insert 'sorry' placeholders to scaffold proofs for later completion. It can search Mathlib4 for relevant lemmas, suggest rewrites and simplifications, and produce executable code extracted from proved constructions. Outputs are Lean 4 snippets and step-by-step proof outlines compatible with the Lake build system and typical VS Code Lean workflows.
Can the skill run Lean locally or verify proofs by itself?
The skill produces Lean 4 code and proof scripts but does not execute or typecheck them remotely; you should run Lake and the Lean toolchain locally or in your environment to verify.
How accurate are autogenerated tactic scripts?
Autogenerated scripts are practical starting points that often require small edits; they focus on common tactic patterns and Mathlib4 usage but may need adaptation to local library versions or naming.