mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
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.
13 lines
434 B
Lean4
13 lines
434 B
Lean4
def Family (α : Type _) (n : Nat) := Inhabited (Fin n → α)
|
||
|
||
def all_but_last {α} {n} (f : Family α (n + 1)) : Family α n :=
|
||
Inhabited.mk λ k => f.default ⟨k.val, Nat.lt_trans k.isLt n.lt_succ_self⟩
|
||
|
||
def all : {n : Nat} → Family Prop n → Prop
|
||
| 0, _ => True
|
||
| n + 1, f => all (all_but_last f)
|
||
|
||
def th : (n : Nat) → (f : Family Prop n) → Decidable (all f)
|
||
| 0, f => isTrue ⟨⟩
|
||
| n + 1, f => th n (all_but_last f)
|