Zulip Chat Archive

Stream: maths

Topic: reassociate to prune goals?


Jakob von Raumer (Aug 04 2021 at 09:20):

Is there a tactic for categories similar to slice_lhs which prunes away components of morphisms that already match up on both sides? I'd assume that's sometimes more efficient than just modifying small subterms until _everything_ matches up on both sides? /cc @Scott Morrison @Markus Himmel

Bhavik Mehta (Aug 06 2021 at 14:27):

congr can sometimes do things like this. Personally I tend to avoid slice_lhs these days, usually you can find pure rewrite proofs which are much shorter without it. A particular trick which is super useful is to use assoc in the forward direction as much as you can, and then use reassociated versions of lemmas where needed

Jakob von Raumer (Aug 06 2021 at 14:49):

congr often misfires though. Reassociating and applying whisker_eq also does the trick, I noticed. Using reassociated lemmas is a good point, maybe I can use that to golf this monster a bit...

Bhavik Mehta (Aug 06 2021 at 15:13):

You can use congr' 1 or variants to refine it better as well


Last updated: Dec 20 2023 at 11:08 UTC