Zulip Chat Archive

Stream: general

Topic: nested cases


Reid Barton (Feb 26 2018 at 16:30):

Is there a more convenient way to unpack the components of a conclusion of the form ∃ x y, p x ∧ q y ∧ r x y in a tactics block than using multiple cases tactics?

Andrew Ashworth (Feb 26 2018 at 16:31):

you want mathlib's rcases or core's cases_matching

Reid Barton (Feb 26 2018 at 16:36):

oh yeah, rcases is what I want. Much better!

Sean Leather (Feb 27 2018 at 12:21):

@Reid Barton Also, in case you didn't know, the anonymous constructor notation ⟨..., ...⟩ is right-associative for nested constructors. So, for example, you can do rcases h with ⟨x, y, px, qy, rxy⟩ with your type. I learned this recently, and it's quite convenient.


Last updated: Dec 20 2023 at 11:08 UTC