chore: add nomatch tactic (#3294)

This commit is contained in:
Leonardo de Moura 2024-02-09 20:59:06 -08:00 committed by GitHub
parent 1cb7450f40
commit 5b4c24ff97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View file

@ -857,6 +857,12 @@ empty pattern match, closing the goal if the introduced pattern is impossible.
-/
macro "nofun" : tactic => `(tactic| exact nofun)
/--
The tactic `nomatch h` is shorthand for `exact nomatch h`.
-/
macro "nomatch " es:term,+ : tactic =>
`(tactic| exact nomatch $es:term,*)
end Tactic
namespace Attr

View file

@ -0,0 +1,5 @@
example (h : Empty) : False := by
nomatch h
example (x : Nat) (f : Nat → Fin n) (h : n = 0 ∧ True) : False := by
nomatch f x, h.1