lean-design-definitions
Use when choosing Lean representations for mathematical objects, structures, predicates or notation.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- lean-design-definitions
- description
- Use when choosing Lean representations for mathematical objects, structures, predicates or notation.
03 SKILL.md 正文
Choose the representation
Input: source definitions and expected uses. Output: representation decision,
source correspondence, existing declarations to reuse and new declarations
for lean-define. This is design, not implementation.
Invoke lean-search for existing structures and equivalent formulations. Read
their actual definitions and instances under the project pin. Compare only
plausible representations: subtype versus set, bundled map versus predicate,
structure versus class, explicit hypothesis versus inferred instance.
Record the chosen carrier, universes, operations, equality, coercions and instance scope. Check that source constructions and later statements can be expressed without changing meaning. Avoid duplicate abstractions and ambiguous instance paths. Identify necessary defining equations and a small meaningful usage example; do not manufacture an arbitrary quota of API lemmas.
If two interpretations change the mathematics, surface that choice before dependent work. A routine faithful encoding can proceed within the existing authorization. Return implementation obligations and unresolved questions to the same coordinator.
Example: encode “x is fixed by f” as f x = x; if the manuscript names its
fixed-point set, decide whether an existing Mathlib definition already provides
that set before introducing a new predicate.
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