Lean Best Practices

Mathlib4-derived best practices for writing and structuring Lean 4 libraries. Use when user asks to "add a Lean theorem", "create a Lean module", "review Lean code", "structure a Lean library like Mathlib", "fix a Lean build error", or works on `.lean` / `lakefile.lean` / `lean-toolchain` files. Codifies file template, naming, proof style, attribute usage, the `abbrev`/`omega` trap, and the common errors that bite first-time contributors.

solana-foundation d44549b 20.3 KB Updated

File contents

solana-foundation/leanprover-solanalib/tree/main/skills/lean-best-practices commit d44549b5e8

Frequently asked questions

npx skillmds@latest add solana-foundation/lean-best-practices