Closed ymherklotz closed 4 months ago
Thank you for the detailed report. I can reproduce step 4 but not 1 in the sandbox.
Indeed, thanks for trying to reproduce it. I didn't know that this actually worked if you comment close to the .
. If you try and comment the line by putting the cursor at the very start of the line 28, instead of glued to the .
, then it should be possible to reproduce step 1 too. It does for me in the sandbox.
Prerequisites
Please put an X between the brackets as you perform the following steps:
Description
With incremental tactic evaluation, error reporting seems to have become brittle. There are situations where one thinks no errors are being reported, but one is able to prove anything using invalid tactics, because errors are not being reported for that line.
Even when one fixes the error, because the tactics are incremental they don't display errors until one actually modified tactics above them. If one only modifies tactics below, one can get very random behaviour where tactics should fail but seem to solve goals instead.
Context
We were working in a fairly large proof and kept non-deterministically getting into situations where Lean wouldn't report errors any more, and would seem to solve goals when it shouldn't, because we had a malformed statement very low down in the proof. Even after fixing that, we still got erratic behaviour until we finally restarted lean a few times and fixing errors that arose incrementally with every restart.
Steps to Reproduce
Live coding environment of the bug
exact
tactic is solving the goal.simp
) and see the error on line 22 disappear again.Expected behavior: Errors should always be displayed and should not disappear after making edits. Invalid tactics should also not appear to be modifying the goal (and look like they're solving it).
Actual behavior: Errors disappear when making edits throughout a file, and invalid tactics may seem like they are solving a goal even though they are actually encountering an error.
Versions
Additional Information
Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.