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

56 lines
1.2 KiB
Text
Raw 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.

structure CompoundName where
module : String
name : String
structure T where
name : CompoundName
placeholder : Nat
/--
Value whose size is bounded by a constant offset of another value.
-/
abbrev Bounded (α : Type _) [SizeOf α] {β} [SizeOf β] (e : β) (c : Int) := { a : α // sizeOf a ≤ sizeOf e + c }
def getArg (e : T) : Bounded T e (-1) := sorry
mutual
inductive A where
| a : A
| b : C → A
inductive C
| c : A → C
end
mutual
def mkA (x : T) : A :=
match x.name with
| CompoundName.mk "LongName" "a" => .a
| CompoundName.mk "LongName" "b" => .a
| CompoundName.mk "LongName" "c" => .a
| CompoundName.mk "LongName" "d" => .a
| CompoundName.mk "LongName" "e" => .a
| CompoundName.mk "LongName" "f" => .a
| CompoundName.mk "LongName" "g" => .a
| CompoundName.mk "LongName" "h" => .a
| CompoundName.mk "LongName" "i" => .a
| CompoundName.mk "LongName" "j" => .a
| CompoundName.mk "LongName" "k" => .a
| CompoundName.mk "LongName" "z" =>
let ⟨y, _⟩ := getArg x
.b (mkC y)
| _ => sorry
termination_by sizeOf x
def mkC (x : T) : C :=
match x.name with
| CompoundName.mk "LongName" "b" =>
let ⟨y, _⟩ := getArg x
.c (mkA y)
| f => sorry
termination_by sizeOf x
end