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.
40 lines
1.2 KiB
Lean4
40 lines
1.2 KiB
Lean4
module
|
||
def List.Disjoint (l₁ l₂ : List α) : Prop :=
|
||
∀ ⦃a⦄, a ∈ l₁ → a ∈ l₂ → False
|
||
|
||
|
||
/--
|
||
error: `grind` failed
|
||
case grind
|
||
i n : Nat
|
||
f : Nat → List (List Nat)
|
||
l : List Nat
|
||
h :
|
||
¬List.Pairwise
|
||
(fun x y =>
|
||
(if x ^ i ≤ n then List.map (fun m => x :: m) (f x) else []).Disjoint
|
||
(if y ^ i ≤ n then List.map (fun m => y :: m) (f y) else []))
|
||
l
|
||
⊢ False
|
||
[grind] Goal diagnostics
|
||
[facts] Asserted facts
|
||
[prop] ¬List.Pairwise
|
||
(fun x y =>
|
||
(if x ^ i ≤ n then List.map (fun m => x :: m) (f x) else []).Disjoint
|
||
(if y ^ i ≤ n then List.map (fun m => y :: m) (f y) else []))
|
||
l
|
||
[eqc] False propositions
|
||
[prop] List.Pairwise
|
||
(fun x y =>
|
||
(if x ^ i ≤ n then List.map (fun m => x :: m) (f x) else []).Disjoint
|
||
(if y ^ i ≤ n then List.map (fun m => y :: m) (f y) else []))
|
||
l
|
||
-/
|
||
#guard_msgs in
|
||
theorem test (f : Nat → List (List Nat)) {l : List Nat} :
|
||
l.Pairwise
|
||
(fun x y ↦
|
||
(if x ^ i ≤ n then List.map (fun m ↦ x :: m) (f x) else []).Disjoint
|
||
(if y ^ i ≤ n then List.map (fun m ↦ y :: m) (f y) else [])) := by
|
||
grind
|