Zulip Chat Archive

Stream: new members

Topic: iff negation


Bhavik Mehta (Dec 16 2019 at 22:34):

Is there a tactic I can use to make this immediate?

example (A B : finset (fin n)) (a : fin n) (h : a  A  a  B) : (a  A  a  B) := by finish

I know I can do it by hand if I had to, but this seems like the sort of thing finish ought to be good at so I don't have to think about it

Kevin Buzzard (Dec 16 2019 at 22:35):

logic.basic is the place to look for things like this

Kevin Buzzard (Dec 16 2019 at 22:36):

Oh -- you want a tactic?

import data.finset
import tactic.tauto

variable (n : )

example (A B : finset (fin n)) (a : fin n) (h : a  A  a  B) : (a  A  a  B) :=
by tauto!

Kevin Buzzard (Dec 16 2019 at 22:36):

tauto and tauto! are always good for logic nonsense.

Bhavik Mehta (Dec 16 2019 at 22:37):

Yeah I want a tactic so I don't have to get my hands dirty with this sort of thing in the middle of a big proof

Bhavik Mehta (Dec 16 2019 at 22:37):

I tried tauto, finish and finish!, but I didn't think to try tauto!... :(

Kevin Buzzard (Dec 16 2019 at 22:37):

Yeah, Patrick taught me about tauto!

Kevin Buzzard (Dec 16 2019 at 22:38):

Looking at the meta code, what might be going on is that tauto is for constructive logic and tauto! for classical logic?

Bhavik Mehta (Dec 16 2019 at 22:39):

That makes sense!

Bhavik Mehta (Dec 16 2019 at 22:39):

I do wonder still why finish couldn't do it though

Joe (Dec 16 2019 at 22:40):

tauto works for me.

Joe (Dec 16 2019 at 22:40):

import data.finset
import tactic.tauto

variable (n : )

example (A B : finset (fin n)) (a : fin n) (h : a  A  a  B) : (a  A  a  B) :=
by tauto

Bhavik Mehta (Dec 16 2019 at 22:40):

Oh. My mistake then

Kevin Buzzard (Dec 16 2019 at 22:40):

import data.finset

variable (n : )

example (A B : finset (fin n)) (a : fin n) (h : a  A  a  B) : (a  A  a  B) :=
by split;finish

Last updated: Dec 20 2023 at 11:08 UTC