Confusing goal with unfinished `have`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Description
In the following unfinished proof:
example : ∃n, n < 1 := by
have h : 0 < 1 :=
--^ cursor here
exact ⟨0, h⟩
the goal state shows up as
h : 0 < 1
⊢ ∃ n, n < 1
with 0 < 1 as the assumption. To see the "real" goal ⊢ 0 < 1 we have to write by. This is confusing for beginners, since really at that cursor there is no goal state at all -- one should produce a term. So I suggest we show an expected type there rather than a goal state.
Versions
8df2b07
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 unfinished-proof example in the issue and trace how Lean presents the state at the cursor after have h : 0 < 1 :=. The work is done when that position reports an expected type rather than the surrounding theorem goal, while the by form continues to show a goal state.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100