Zulip Chat Archive
Stream: metaprogramming / tactics
Topic: Consolidating duplicate goals
Brendan Seamas Murphy (May 13 2024 at 20:47):
If I end up with two goals left, where both the hypotheses and the target are exactly the same, is there a tactic which consolidates them down to a single goal? Sometimes rw
causes this scenario
Damiano Testa (May 13 2024 at 20:48):
Does using all_goals
suffice for your use case?
Brendan Seamas Murphy (May 13 2024 at 20:49):
In my current situation yes, but in the general case no, since rw
can produce multiple sets of duplicates
Brendan Seamas Murphy (May 13 2024 at 20:50):
You can use any_goals
or all_goals try
or something, but I think it would be nicer to not do that
Damiano Testa (May 13 2024 at 20:50):
any_goals
?
Damiano Testa (May 13 2024 at 20:50):
I don't think that there is a systematic way of doing this, but there have been discussions of "delay" tactics.
Adam Topaz (May 13 2024 at 22:03):
It's not so trivial to consolidate goals in this way since the metavariables (and often the local contexts) are different even if the type of the goal is the same.
Jovan Gerbscheid (May 14 2024 at 05:32):
There is definitely room for improvement in the handling of goals in rw
. It simply collects all metavariables in the expression and turns them into new goals, without checking whether a metavariable may already be a goal,
Damiano Testa (May 14 2024 at 09:14):
There was a previous thread that might be relevant.
Last updated: May 02 2025 at 03:31 UTC