Open keyboardDrummer opened 3 weeks ago
There are many cases of Auto lemmas in the Dafny standard library, and it seems all of them should be kept. Most of them introduce triggers, so they contain valuable information as well. I'm hesitant about introducing this suggestion since it would be given for many common valid cases.
Given
suggest writing
We might not include the changes in the body as part of the suggestion, and leave figuring that out up to the customer.
If there is a range, such as in:
We can suggest making the range part of the requires clause:
I think the suggestion should only be given if all ensures clauses of the lemma start for all forall that has a parameter of this type and range. For example, for:
I do not think there should be a suggestion to make
y
a parameter.I think ideally we introduce warning instead of suggestions, but we can only introduce warnings if they can always be resolved. I think here we might be able to introduce a warning if we introduce a way not to need the Auto version.
Suppose we allow:
which translates to:
There would be no way to specify triggers for the generated forall, so in case you want those you have to manually write the forall without using the
_
syntax. We would then also not give a warning/suggestion for the "Auto" type lemmas if their quantifiers include custom triggers.Some cases from the standard library that could be removed if we introduce the
_
syntax: