lean-ja / lean-ja/lean-by-example
declare_syntax_cat の behavior 指定するコード例
Open
Nobody has claimed this yet.
コード例
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
import Mathlib
inductive Animal where | dog
declare_syntax_cat animal
-- Uncomment this line to break the code below
-- syntax "dog" : animal
open Animal in
#check dog
open Animal in
example : Animal := dog
example (a : Animal) : True := by
cases a
case dog => trivial
see: >
Keywords in a syntax category are reserved everywhere?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Lean snippet with the syntax "dog" : animal line enabled and compare it with the current behavior. Read the linked Zulip discussion to establish the intended behavior, then document the explanation and a focused code example showing it.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100