chore: add nomatch tactic (#3294)
This commit is contained in:
parent
1cb7450f40
commit
5b4c24ff97
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
5
tests/lean/run/nomatch_tac.lean
Normal file
5
tests/lean/run/nomatch_tac.lean
Normal 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
|
||||
Loading…
Add table
Reference in a new issue