Zulip Chat Archive
Stream: lean4
Topic: disable fail on no goals
Aaron Liu (Apr 05 2025 at 16:11):
Most tactics can fail with a message no goals to be solved
. This can cause some issues, especially in automation (I have seen it 3 times now). Should there be a way to turn this off?
Kyle Miller (Apr 05 2025 at 17:03):
If you have examples of this happening, could you please share?
Aaron Liu (Apr 05 2025 at 17:10):
#lean4 > Cannot prove index is valid
Mario Carneiro (Apr 05 2025 at 17:13):
I don't think an option would help here. In automation, you need the fix to be local, and I don't see how set_option tactic.failOnNoGoals false in (tac1; tac2)
is better than tac1 <;> tac2
which is what we would usually recommend in such a situation
Kyle Miller (Apr 05 2025 at 17:28):
There's one part of this that I've been considering modifying, and that's having autoParam
tactics not run if their metavariable is solved for (or at least giving a better error than "no goals to be solved", for example give a hint to add (argName := _)
).
Aaron Liu (Apr 05 2025 at 17:45):
Mario Carneiro said:
I don't think an option would help here. In automation, you need the fix to be local, and I don't see how
set_option tactic.failOnNoGoals false in (tac1; tac2)
is better thantac1 <;> tac2
which is what we would usually recommend in such a situation
Sometimes you have something more complicated than just tac1; tac2
Kyle Miller (Apr 05 2025 at 17:54):
Failing on no goals is the correct behavior, and I don't think having an option to turn it off makes much sense.
What does make sense to me are:
- observing that the issues appear to be with
autoParam
s, so improve theautoParam
experience by having the tactic runner first check if the goal has already been solved; it's something it really should have been checking anyway. - use
all_goals
as a prefix if you're somehow in some other situation where you don't know if there is a goal or not.
Last updated: May 02 2025 at 03:31 UTC