lean-ja / lean-ja/lean-by-example
List.attach 使用例
Open
Nobody has claimed this yet.
コード例
データ型
要調査
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
Lean のdiscordサーバから引用。
this recursive definition fails to show termination🤔
def generate (f: List A → A): Nat → A :=
fun n => match n with
| 0 => f []
| p + 1 => f (List.map (generate f) (List.range p))
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 reproducing the termination-checking failure in the posted Lean definition of generate, focusing on its recursive call through List.map and List.range. Read the surrounding List.attach usage documentation or examples in the repository, then document a working example and verify that the termination issue is addressed.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100