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

24 lines
650 B
Text

--
set_option trace.Meta.Tactic.subst true
theorem tst1 (x y z : Nat) : y = z → x = x → x = y → x = z := by
intro h1 h2 h3
subst x
assumption
theorem tst2 (x y z : Nat) : y = z → x = z + y → x = z + z := by
intro h1 h2
subst h1
subst h2
exact rfl
def BV (n : Nat) : Type := { a : Array Bool // a.size = n }
theorem tst3 (n m : Nat) (v : BV n) (w : BV m) (h1 : n = m) (h2 : forall (v1 v2 : BV n), v1 = v2) : v = cast (congrArg BV h1.symm) w := by
subst h1
apply h2
theorem tst4 (n m : Nat) (v : BV n) (w : BV m) (h1 : n = m) (h2 : forall (v1 v2 : BV n), v1 = v2) : v = cast (congrArg BV h1.symm) w := by
subst n
apply h2