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

16 lines
582 B
Text

-- A function that reduced badly, as a canary for kernel reduction
def bad (n : Nat) : Nat :=
if h : n = 0 then 0 else bad (n / 2)
termination_by n
theorem foo : 2 * bad 42000 = bad 42000 + bad 42000 := by simp +arith
theorem foo2 (h : 2 * bad 42000 = bad 42000 + bad 42000 + 1) : False := by simp +arith at h
theorem foo3 (h : bad 42000 + bad 42000 = x) : (2 * bad 42000 = x) := by simp +arith at h; assumption
@[irreducible] def f : Nat → Nat := fun x => x
theorem doesn't_do_anything : f 3 = 3 := by
fail_if_success simp_arith -- does not apply f_eq and g_eq
rw [f]