lean4-htt/tests/lean/run/2042.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

33 lines
541 B
Text

@[simp] def foo (a : Nat) : Nat :=
2 * a
/--
info: case h
x : Nat
⊢ 2 * x = x + x
-/
#guard_msgs in
example : foo = fun a => a + a :=
by
fail_if_success simp -- should not unfold `foo` into a lambda
funext x
simp -- unfolds `foo`
trace_state
simp +arith
@[simp] def boo : Nat → Nat
| a => 2 * a
/--
info: case h
x : Nat
⊢ 2 * x = x + x
-/
#guard_msgs in
example : boo = fun a => a + a :=
by
fail_if_success simp -- should not unfold `boo` into a lambda
funext x
simp -- unfolds `boo`
trace_state
simp +arith