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.
33 lines
1 KiB
Text
33 lines
1 KiB
Text
module
|
||
example (as bs cs : Array α) (v : α)
|
||
(i : Nat)
|
||
(h₁ : i < as.size)
|
||
(h₂ : bs = as.set i v)
|
||
(h₃ : cs = bs)
|
||
(h₄ : i ≠ j)
|
||
(h₅ : j < cs.size)
|
||
(h₆ : j < as.size)
|
||
: cs[j] = as[j] := by
|
||
skip
|
||
grind only [= Array.getElem_set_ne, = Array.size_set] -- works
|
||
|
||
theorem Array.getElem_set_ne_abstracted (xs : Array α) (i : Nat) (h' : i < xs.size) (v : α) {j : Nat}
|
||
(pj : j < xs.size) (h : i ≠ j) :
|
||
(xs.set i v)[j]'(by as_aux_lemma => simp [*]) = xs[j] := Array.getElem_set_ne h' pj h
|
||
|
||
example (as bs cs : Array α) (v : α)
|
||
(i : Nat)
|
||
(h₁ : i < as.size)
|
||
(h₂ : bs = as.set i v)
|
||
(h₃ : cs = bs)
|
||
(h₄ : i ≠ j)
|
||
(h₅ : j < cs.size)
|
||
(h₆ : j < as.size)
|
||
: cs[j] = as[j] := by
|
||
grind only [= Array.getElem_set_ne_abstracted, = Array.size_set] -- should work
|
||
|
||
opaque p : (i : Nat) → i ≠ 10 → Prop
|
||
|
||
example (h : ∀ i, (¬i > 0) ∨ ∀ h : i ≠ 10, p i h) : p 5 (by decide) := by
|
||
have := h 5; clear h
|
||
grind
|