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

値域がEmptyになっているせいで失敗する例. choose タクティク

Open
#1,658 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

class Metric (X : Type ) where
  dist : X → X → ℝ

example  [Metric X] :
  ∃ δ, 0 < δ ∧ ∀ y : X, Metric.dist y y = δ
:= by
  by_contra F; simp at F
  -- これは失敗する
  -- choose! g Hg using F
  choose g Hg using F
  guard_hyp g : (x : ℝ) → 0 < x → X
  sorry

example [Nonempty X] [Metric X] :
  ∃ δ, 0 < δ ∧ ∀ y : X, Metric.dist y y = δ
:= by
  by_contra F; simp at F
  -- これは成功
  choose! g Hg using F
  sorry

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 with the two Lean examples in the issue and reproduce the contrasting choose and choose! results. Trace how the tactics handle the empty-valued range and identify the repository example or explanation that needs updating; done means the distinction and required assumptions are clear.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.