lean4-htt/tests/elab/1113.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

20 lines
490 B
Text

def foo: {n: Nat} → Fin n → Nat
| 0, _ => 0
| n+1, _ => 0
-- Local copy to make test more robust against staging issues
@[simp] theorem Nat.succ_eq_add_one' (n : Nat) : succ n = n + 1 :=
rfl
theorem t3 {f: Fin (n+1)}:
foo f = 0 := by
dsimp only [←Nat.succ_eq_add_one' n] at f -- use `dsimp` to ensure we don't copy `f`
trace_state
simp only [foo]
example {n: Nat} {f: Fin (n+1)}:
foo f = 0 := by
revert f
rw[←Nat.succ_eq_add_one' n]
intro f
simp only [foo]