lean4-htt/tests/lean/splitIssue.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
310 B
Text

def g (x : Nat) := 2*x + 1
def f (x : Nat) : Nat :=
match g x with
| 0 => 1
| y + 1 => g x
example : f x = 2*x + 1 := by
unfold f
split
next h => simp +arith [g] at h
next y h =>
trace_state
-- split tactic should *not* rewrite `g x` to `Nat.succ y`
show g x = 2*x + 1
simp [g]