Zulip Chat Archive

Stream: Is there code for X?

Topic: modus tollens in context


Patrick Thomas (Oct 26 2021 at 06:22):

If I have P -> Q in the context, is there a tactic to get ~Q -> ~P, or if I have both P -> Q and ~Q to get ~P?

Yury G. Kudryashov (Oct 26 2021 at 06:24):

I usually write term mode proofs in this case, see docs#mt.

Yury G. Kudryashov (Oct 26 2021 at 06:25):

E.g., you can write have h' := mt h or have h' := mt hpq hq.

Yury G. Kudryashov (Oct 26 2021 at 06:26):

Probably you can do something like have h' : not P := by tauto.

Yury G. Kudryashov (Oct 26 2021 at 06:26):

See also by_contra tactic and tactic#contrapose

Patrick Thomas (Oct 26 2021 at 06:30):

Thank you.


Last updated: Dec 20 2023 at 11:08 UTC