lean4-htt/tests/elab/issue10353.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

42 lines
880 B
Text

import Lean
structure IW : Type 1 where
I : Type
set_option Elab.async false
def aux (iw: IW) (e : Nat) (sm : List iw.I)
: Nat :=
e
-- set_option wf.preprocess false
-- set_option trace.Elab.definition.wf true
-- set_option pp.raw true
-- set_option trace.Debug.Meta.Tactic.simp true
mutual
def aval (iw: IW) (n : Nat) (e : Nat) : Nat :=
match n with
| 0 => e
| n' + 1 =>
let e1 :=
let input_map : List iw.I := [] --lifting RB
let new_e := aux iw e input_map -- removing args RB
avalCore iw n' new_e -- inlining RB
avalCore iw n' e
termination_by (n, 0)
-- Inlining RB
def avalCore (iw: IW) (n' : Nat) (e : Nat) : Nat :=
aval iw n' e
termination_by (n', 1)
end
example :
(have x : Nat := id 1
have y : Nat := id x + 1
(fun (x : Fin y) => x)) = (fun x => x) := by
simp -zetaUnused -zetaDelta -zeta only [id]
rfl