Zulip Chat Archive
Stream: lean4
Topic: Unsolved goal in the middle
Patrick Massot (Sep 18 2023 at 14:09):
In the series of potential improvements to error reporting, it would be nice to put red squiggles under the example or theorem keyword when there is am unsolved goal in the middle of the proof. Compare:
example (x y : Nat) : x = y := by -- yellow squiggle
calc x = x := rfl
_ = y := sorry
_ = y := rfl
with
example (x y : Nat) : x = y := by -- no squiggle at all
calc x = x := rfl
_ = y := by apply Eq.symm
_ = y := rfl
Note this little UX inconsistency was already present in Lean 3.
Henrik Böving (Sep 18 2023 at 14:30):
Why red squiggles? Those usually show an error in our current UX concept right? But yellow squiggles seem sensible :thumbs_up:
Patrick Massot (Sep 19 2023 at 02:14):
Red squiggles would be consistent with what you get when the whole proof is incomplete. But I agree this is debatable. And any case a yellow squiggles would already be better than the current status.
Sebastian Ullrich (Sep 19 2023 at 07:28):
Yes, this seems very much debatable (meaning, I'm not rejecting it but would like to hear more opinions). The problem with more error/warning messages is that it's less clear which one to focus on first - and a squiggle necessarily must come with a message.
Damiano Testa (Sep 19 2023 at 07:51):
Would it be possible to (also) underline the sorry
, when declaration uses 'sorry'
?
For me, this would be an improvement: it highlights which declaration has a problem and where the problem is.
Last updated: Dec 20 2023 at 11:08 UTC