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

遅延評価を入れると矛盾が生じる例

Open
#1,170 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-ja Discordより

-- Assume we can define `ones := 1 :: ones`.
opaque ones : List Nat
axiom ones_eq : ones = 1 :: ones

theorem bad : ones.foldr (· + ·) 0 = ones.foldr (· + ·) 0 + 1 := by
  conv =>
    lhs
    rw [ones_eq, List.foldr_cons]
  omega

-- 🤯
example : False := Nat.ne_add_one (ones.foldr (· + ·) 0) bad

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

The issue contains only a Lean example using ones_eq, List.foldr, and omega; no repository file or test is named. Start by reproducing the example and checking the relevant Lean semantics. Done should be a documented explanation of whether this demonstrates a language inconsistency or needs clarification.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.