Zulip Chat Archive
Stream: new members
Topic: Closing negated goals quickly
Eric Wieser (Jun 15 2020 at 20:25):
I have left as my goal:
hnp : ¬p head,
hnq : ¬q head
⊢ ¬(p head ∨ q head)
Is there a quick tactic-mode incantation to finish off?
Bhavik Mehta (Jun 15 2020 at 20:27):
Eric Wieser (Jun 15 2020 at 20:27):
tauto
by itself does not work
Bhavik Mehta (Jun 15 2020 at 20:28):
Or maybe tauto!
Eric Wieser (Jun 15 2020 at 20:28):
intro h, cases h, exact hnp h, exact hnq h
does but feels clumsy.
Bhavik Mehta (Jun 15 2020 at 20:28):
If not finish
should do it too
Eric Wieser (Jun 15 2020 at 20:29):
import tactic
being missing strikes again. tauto
worked after all
Thanks!
Eric Wieser (Jun 15 2020 at 20:36):
Another goal I'm struggling to close quickly:
hs : (filter (λ (x : α), p x ∨ q x) tail).length ≤ (filter p tail).length + (filter q tail).length,
⊢ (filter (λ (x : α), p x ∨ q x) tail).length + 1 ≤ (filter p tail).length + 1 + ((filter q tail).length + 1)
rw
doesn't seem to work here, and finish
works in my installation but not the codewars one.
Reid Barton (Jun 15 2020 at 20:37):
linarith
should be smart enough for this one
Eric Wieser (Jun 15 2020 at 20:38):
Bingo, knew I'd seen this type of issue before.
Last updated: Dec 20 2023 at 11:08 UTC