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

78 lines
1.9 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

inductive L (α : Type u) : Type u where
| nil : L α
| cons : α → L α → L α
def L.eq [BEq α] (xs ys : L α) : Bool :=
match _ : xs.ctorIdx == ys.ctorIdx with
| false => false
| true =>
match xs, ys with
| .nil, .nil => true
| .cons x xs, .cons y ys => x == y && xs.eq ys
/--
info: theorem L.eq.eq_def.{u_1} : ∀ {α : Type u_1} [inst : BEq α] (xs ys : L α),
xs.eq ys =
match h : xs.ctorIdx == ys.ctorIdx with
| false => false
| true =>
match xs, ys, h with
| L.nil, L.nil, h => true
| L.cons x xs, L.cons y ys, h => x == y && xs.eq ys
-/
#guard_msgs in
#print sig L.eq.eq_def
-- and mutual
mutual
inductive L1 (α : Type u) : Type u where
| nil : L1 α
| cons : α → L2 α → L1 α
inductive L2 (α : Type u) : Type u where
| nil : L2 α
| cons : α → L1 α → L2 α
end
mutual
def L1.eq [BEq α] (xs ys : L1 α) : Bool :=
match _ : xs.ctorIdx == ys.ctorIdx with
| false => false
| true =>
match xs, ys with
| .nil, .nil => true
| .cons x xs, .cons y ys => x == y && xs.eq ys
def L2.eq [BEq α] (xs ys : L2 α) : Bool :=
match _ : xs.ctorIdx == ys.ctorIdx with
| false => false
| true =>
match xs, ys with
| .nil, .nil => true
| .cons x xs, .cons y ys => x == y && xs.eq ys
end
/--
info: theorem L1.eq.eq_def.{u_1} : ∀ {α : Type u_1} [inst : BEq α] (xs ys : L1 α),
xs.eq ys =
match h : xs.ctorIdx == ys.ctorIdx with
| false => false
| true =>
match xs, ys, h with
| L1.nil, L1.nil, h => true
| L1.cons x xs, L1.cons y ys, h => x == y && xs.eq ys
-/
#guard_msgs in
#print sig L1.eq.eq_def
/--
info: theorem L2.eq.eq_def.{u_1} : ∀ {α : Type u_1} [inst : BEq α] (xs ys : L2 α),
xs.eq ys =
match h : xs.ctorIdx == ys.ctorIdx with
| false => false
| true =>
match xs, ys, h with
| L2.nil, L2.nil, h => true
| L2.cons x xs, L2.cons y ys, h => x == y && xs.eq ys
-/
#guard_msgs in
#print sig L2.eq.eq_def