lean-ja / lean-ja/lean-by-example
値域がEmptyになっているせいで失敗する例. choose タクティク
Open
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
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 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