Lean Refactoring

Simplify, golf, shorten, deduplicate, or restructure existing Lean 4 proofs without changing what is proved. Use for simplification and cleanup passes, "make this proof shorter", reducing line count, collapsing tactic blocks, converting tactic proofs to term proofs, and merging duplicated proof work — and for the guard question every such pass owes an answer, "did this refactor change any statement?". The contract is that statements stay frozen while proof bodies change freely. For writing a new proof, fixing a broken one, or designing a statement, use lean-proving instead.

matt-w-horn Updated

File contents

matt-w-horn/lean-skills/tree/main/skills/lean-refactoring commit d82eca843f

Frequently asked questions

npx skillmds@latest add matt-w-horn/lean-refactoring