Compare commits

...

1 Commits

Author SHA1 Message Date
Leonardo de Moura
448dfd2f27 chore: add nomatch tactic 2024-02-09 10:18:17 -08:00
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