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

46 lines
999 B
Text

inductive Foo (n : Nat) : Type
| foo (t: Foo n): Foo n
namespace Foo
inductive Bar: Foo n → Prop
theorem ex₁ {s: Foo n} (H: s.Bar): True := by
cases h₁ : s
case foo s' =>
cases h₂ : n; sorry
have: Bar s' := sorry
exact ex₁ this
termination_by sizeOf s
theorem ex₂
{s: Foo n}
(H: s.Bar):
True := by
generalize hs': s = s'
match s' with
| foo s' =>
have: Bar s' := sorry
have hterm: sizeOf s' < sizeOf s := by simp_all +arith
exact ex₂ this
termination_by sizeOf s
theorem ex₃ {s: Foo n} (H: s.Bar): True := by
cases h₁ : s
case foo s' =>
match n with
| 0 => sorry
| _ =>
have: Bar s' := sorry
exact ex₃ this
termination_by sizeOf s
-- it works
theorem ex₄ {s: Foo n} (H: s.Bar): True := by
match s with
| foo s' =>
match n with
| 0 => sorry
| _ =>
have: Bar s' := sorry
exact ex₄ this
termination_by sizeOf s