lean4-htt/tests/lean/run/caseTacInMacros.lean
Leonardo de Moura 2a67a49f31
chore: simp_arith has been deprecated (#7043)
This PR deprecates the tactics `simp_arith`, `simp_arith!`,
`simp_all_arith` and `simp_all_arith!`. Users can just use the `+arith`
option.
2025-02-12 03:55:45 +00:00

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