Zulip Chat Archive

Stream: Is there code for X?

Topic: rw if then else


Winston Yin (尹維晨) (Dec 12 2023 at 06:58):

I don't really know how to work with ite. If I have a hypothesis hp : p, how can I rewrite if p then a else b into a? Similarly for hp : ¬p, please.

Mario Carneiro (Dec 12 2023 at 07:01):

if_pos, if_neg

Mario Carneiro (Dec 12 2023 at 07:01):

or simp [hp], since these are simp lemmas

Eric Rodriguez (Dec 12 2023 at 08:49):

I thought simp simplified by rewriting p into True, and then used docs#if_true

Eric Rodriguez (Dec 12 2023 at 08:49):

(indeed it seems docs#if_pos isn't simp)

Winston Yin (尹維晨) (Dec 12 2023 at 08:50):

^ yes, that's why I couldn't find if_pos...

Andrew Yang (Dec 12 2023 at 09:55):

There's also dif_pos and dif_neg for dependent ifs.


Last updated: Dec 20 2023 at 11:08 UTC