agentleFS
rainoftimerainoftime/pl-skills/lean-prover/SKILL.md

lean-prover

Skill17 starsChanged 9 months agoApache-2.0View on GitHub

A skill for using Lean 4, a modern interactive theorem prover with powerful type theory, dependent types, and mathematical structures.

The file

Files
SKILL.md

Lean Prover

Domain: Proof Assistant / Formal Verification

Overview

A skill for using Lean 4, a modern interactive theorem prover with powerful type theory, dependent types, and mathematical structures.

Capabilities

  • Define mathematical structures and theories
  • Prove theorems interactively
  • Build certified programs
  • Create mathematical libraries
  • Implement custom automation

Key Concepts

  • Dependent Types: Types depending on values
  • Lean's Type Theory: Inductive types, structures, classes
  • Tactics: Proof automation and construction
  • Monads: State, IO, reader monads in proofs
  • Metaprogramming: Custom proof automation

Lean Features

  • Extensible syntax and semantics
  • Natural number game
  • Mathematical library (mathlib)
  • Continuous predicates
  • Homotopy type theory support

Use Cases

  • Formal mathematics
  • Program verification
  • Compiler certification
  • Language meta-theory
  • Mechanized proofs

Canonical References

ReferenceWhy It Matters
Avigad, Massot, "Mathematics in Lean"Official Lean tutorial
Carneiro, "The Type Theory of Lean" (2019)Lean's type theory foundation
mathlib documentationMathematical library examples
Lean 4 manualLanguage reference

Research Tools & Artifacts

Lean ecosystem:

ToolWhat to Learn
mathlibMathematics library
Lean 4Implementation
Lean 3Previous version
VersoDocumentation tool

Research Frontiers

1. Metaprogramming

  • Goal: Custom automation and tactics
  • Approach: Lean 4 metaprogramming API
  • Papers: "Metaprogramming in Lean 4" (2020)

2. Automation

  • Goal: More powerful proof automation
  • Approach: AI-assisted proving, auto-params
  • Papers: "ProofNet" experiments

Implementation Pitfalls

PitfallReal ConsequenceSolution
Proof complexityLarge proofsStructure with lemmas
Universe issuesUniverse level errorsExplicit universe annotations
Definitional vs propositionalWrong equality typeUse appropriate eq

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.