This PR deprecates the tactics `simp_arith`, `simp_arith!`, `simp_all_arith` and `simp_all_arith!`. Users can just use the `+arith` option.
22 lines
465 B
Text
22 lines
465 B
Text
def f (n : Nat) := n + 1
|
|
|
|
macro "mymacro1 " h:ident : tactic =>
|
|
`(tactic| {
|
|
cases $h:ident with
|
|
| zero => decide
|
|
| succ => simp +arith [f]
|
|
})
|
|
|
|
example : f n > 0 := by
|
|
mymacro1 n -- works
|
|
|
|
macro "mymacro2 " h:ident : tactic =>
|
|
`(tactic| {
|
|
cases $h:ident
|
|
case zero => decide
|
|
case succ => simp +arith [f]
|
|
})
|
|
|
|
example : f n > 0 := by
|
|
-- Should **not** generate: Case tag 'zero._@.cases3._hyg.747' not found.
|
|
mymacro2 n
|