lean4

Solid

Use when editing .lean files, debugging Lean 4 builds (type mismatch, sorry, failed to synthesize instance, axiom warnings, lake build errors), searching mathlib for lemmas, formalizing mathematics in Lean, or learning Lean 4 concepts. Also trigger when the user asks for help with Lean 4, mathlib, or lakefile. Do NOT trigger for Coq/Rocq, Agda, Isabelle, HOL4, Mizar, Idris, Megalodon, or other non-Lean theorem provers.

Data & Documents 122 stars 21 forks Updated 4 days ago Apache-2.0

Install

View on GitHub

Quality Score: 78/100

Stars 20%
70
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
0

Skill Content

# Lean 4 Theorem Proving Use this skill whenever you're editing Lean 4 proofs, debugging Lean builds, formalizing mathematics in Lean, or learning Lean 4 concepts. It prioritizes LSP-based inspection and mathlib search, with scripted primitives for sorry analysis, axiom checking, and error parsing. ## Core Principles **Search before prove.** Many mathematical facts already exist in mathlib. Search exhaustively before writing tactics. **Build incrementally.** Lean's type checker is your test suite—if it compiles with no sorries and standard axioms only, the proof is sound. **Respect scope.** Follow the user's preference: fill one sorry, its transitive dependencies, all sorries in a file, or everything. Ask if unclear. **Never change statements or add axioms without explicit permission.** Theorem/lemma statements, type signatures, and docstrings are off-limits unless the user requests changes. Inline comments may be adjusted; docstrings may not (they're part of the API). Custom axioms require explicit approval—if a proof seems to need one, stop and discuss. Exception: within synthesis wrappers (`/lean4:formalize`, `/lean4:autoformalize`), session-generated declarations may be redrafted under the outer-loop statement-safety rules; see cycle-engine.md. ## Commands | Command | Purpose | |---------|---------| | `/lean4:draft` | Draft Lean declaration skeletons from informal claims | | `/lean4:formalize` | Interactive formalization — drafting plus guided proving | | `/lean4:...

Details

Author
frenzymath
Repository
frenzymath/Archon
Created
2 months ago
Last Updated
4 days ago
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category