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

24 lines
514 B
Text

opaque f (a : Nat) (h : a > 0) : Nat
example (h : a = b) : f (a + 1) (by simp +arith) = f (1 + b) (by simp +arith) := by
conv => lhs; congr; rw [h]
conv => lhs; congr; rw [Nat.add_comm]
opaque g (p : Prop) [Decidable p] (a : Nat) (h : a > 0) : Nat
example (h : a = b) : g True (a + 1) (by simp +arith) = g (1+1=2) (1 + b) (by simp +arith) := by
conv =>
lhs
congr
. rfl
. rw [h]
conv =>
lhs
congr
. rfl
. rw [Nat.add_comm]
conv =>
rhs
congr
. simp
. rfl