lean-define
Use when an agreed mathematical representation requires new Lean definitions, structures, classes or instances.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- lean-define
- description
- Use when an agreed mathematical representation requires new Lean definitions, structures, classes or instances.
03 SKILL.md 正文
Implement a mathematical definition
Input: representation decision and source meaning. Output: actual checked definitions, behavior checks and any separate API proof obligations.
Read the selected definition context and baseline. Implement only the needed representation in its declared source module. Name it by mathematical content; place it before its uses. Keep instances local unless the agreed API needs a global instance. Never encode an unproved theorem as a structure field or axiom merely to bypass its proof obligation.
Compile the definition and a meaningful use or defining-equation check. Inspect
coercions, inferred instances and universes. Reuse definitions found by
lean-search rather than creating aliases without a consumer. Explicitly record
noncomputability and choice when they affect the intended construction.
Update the source record with the actual
declaration and its meaning. Route properties needing proof to lean-align-statement
and lean-prove; a definition existing is not proof of its advertised properties.
Changing an existing definition invalidates dependent fidelity evidence.
Example: after defining FixedBy f x := f x = x, compile a reflexive unfolding
example. The theorem that every point is fixed under additional assumptions is
a separate obligation.
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code