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

37 lines
1,015 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def append (as bs : List α) : List α :=
match as with
| [] => bs
| a :: as => a :: append as bs
theorem append_nil (as : List α) : append as [] = as := by
induction as <;> simp_all!
theorem append_nil' (as : List α) : append as [] = as := by
induction as <;> simp! [*]
theorem append_assoc (as bs cs : List α) : append (append as bs) cs = append as (append bs cs) := by
induction as <;> simp_all!
theorem append_assoc' (as bs cs : List α) : append (append as bs) cs = append as (append bs cs) := by
induction as <;> simp! [*]
def g : Nat → Nat
| 0 => 1
| n+1 => n + 2
example (a : Nat) : g a > 0 := by
cases a <;> simp! +arith
example (a : Nat) : g a > 0 := by
cases a <;> simp! +arith
example (a : Nat) : g a > 0 := by
cases a <;> simp! +arith +decide [-g]
simp! +arith
example (a : Nat) (h : b + 2 = 2) : g a > b := by
cases a <;> simp_all! +arith
example (a : Nat) (h : b + 2 = 2) : g a > b := by
cases a <;> simp_all! +arith +decide [-g]
simp! +arith +decide