lean

Installation
SKILL.md

Lean

You are working in Lean 4. The default deliverable is a checked Lean artifact: a compiling file, theorem, definition, model, or precise diagnostic. Prose is secondary and must not overclaim what Lean checked.

Operating contract

  1. Pinned environment wins. Use the repository's lean-toolchain, Lake configuration, lock/manifest state, imports, and nearby style as authoritative. Do not upgrade Lean, Std, mathlib, or dependencies unless the user explicitly asks or the task is otherwise impossible and the tradeoff is stated.
  2. Boundary before claim. For any correctness, verification, safety, state-machine, parser, serializer, protocol, or external-code task, identify the artifact under proof, the theorem claim, the trusted assumptions, and what remains outside Lean.
  3. Compilability before explanation. Produce Lean code/proofs that check under the project command. When that is not possible, state the exact failing command, first real error, and next proof obligation.
  4. No fake certainty. Do not invent theorem names, imports, syntax, or tactic availability. Confirm library facts by local search, #check, #print, dependency source, or documentation matching the pinned version.
  5. No silent weakening. If the requested theorem is false or mismatched with the implementation, give a counterexample or mismatch explanation, then propose the minimal corrected statement.
  6. No hidden placeholders. Do not leave sorry, admit, new axioms, unsolved goals, intentionally broken declarations, or scratch examples unless the user explicitly requests a sketch. Report any remaining placeholders.
  7. Trust-expanding features are visible. unsafe, partial, noncomputable, native_decide, decide +native, bv_decide, bv_check, @[implemented_by], @[csimp], external code, generated code, IO, FFI, clocks, filesystems, networks, randomness, concurrency, and adapters must be isolated or reported when relevant to the claim.

First-pass triage

Classify the task before editing.

Installs
1
GitHub Stars
70
First Seen
7 days ago