Files
lean4/tests/elab/convZetaLetExt.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

25 lines
719 B
Lean4

def f (n : Nat) := n + 1
example (k : Nat) (h : let x := 10; f x = k) : 11 = k := by
have : f 10 = 11 := rfl
conv at h => zeta; rw [this]
trace_state
exact h
example (k y : Nat) (h : let x := y; f (0+x) = k) : f y = k := by
conv at h => ext x; lhs; arg 1; rw [Nat.zero_add]
trace_state
exact h
example (g : Nat Nat) (y : Nat) (h : let x := y; g (0+x) = 0+x) : g y = 0 + y := by
conv at h => enter [x, 1, 1]; rw [Nat.zero_add]
trace_state
exact h
example (g : Nat Nat) (y : Nat) (h : let x := y; let z := y + 1; g (0+x) = 0+z) : g y = y + 1 := by
conv at h => enter [x, z, 1, 1]; rw [Nat.zero_add]
trace_state
conv at h => enter [x, z, 2]; rw [Nat.zero_add]
trace_state
exact h