lean-ja / lean-ja/lean-by-example

List.attach 使用例

Open
#1,097 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.