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

21 lines
547 B
Text

open BitVec
example (x : BitVec n) : zeroExtend (if 1#1 = 1#1 then 128 else 64) x = zeroExtend 128 x := by
simp
example (x : BitVec n) : zeroExtend (if 1#1 = 0#1 then 128 else 64) x = zeroExtend 64 x := by
simp
abbrev f (_ : 1#1 = 1#1) := 128
example (h' : 128 = n) : (if h : 1#1 = 1#1 then f h else 20) = n := by
dsimp [-dite_eq_ite]
guard_target = f _ = n
exact h'
abbrev g (_ : 1#1 ≠ 0#1) := 128
example (h' : 128 = m) : (if h : 1#1 = 0#1 then 10 else g h) = m := by
dsimp [-dite_eq_ite]
guard_target = g _ = m
exact h'