Zulip Chat Archive
Stream: lean4
Topic: merging goals tactic
Jakob von Raumer (Aug 27 2021 at 20:55):
I'm considering writing a tactic that basically checks if the current goal list contains duplicates and "merges" them into a single mVar. Does anyone know if such a tactic exists in lean3 (or coq for that matter)?
Mario Carneiro (Aug 27 2021 at 22:19):
no, but it's a pretty easy tactic to write
Jakob von Raumer (Aug 28 2021 at 05:54):
My concern was more how to name it. The "hardest" part might be to compare the contexts...
Marcus Rossel (Aug 28 2021 at 06:08):
Unfortunately dedup
is already a different tactic in Lean 3. So maybe collapse
?
Mario Carneiro (Aug 28 2021 at 06:16):
I was thinking dedup_goals
Mario Carneiro (Aug 28 2021 at 06:18):
It's true that merging contexts complicates matters. What do you want to do about incompatible contexts? You could take the intersection of the contexts, but that could lose a lot of assumptions
Eric Wieser (Aug 28 2021 at 07:31):
I guess you could combine all the assumptions not present in all goals into a single assumption in the form of a pprod of psigmas?
Jakob von Raumer (Aug 28 2021 at 18:21):
I'd actually conservatively only merge those goals where contexts match up to reordering&defeq
Last updated: Dec 20 2023 at 11:08 UTC