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.
15 lines
320 B
Text
15 lines
320 B
Text
structure Fin2 (n : Nat) :=
|
|
(val : Nat)
|
|
(isLt : val < n)
|
|
|
|
protected def Fin2.ofNat {n : Nat} (a : Nat) : Fin2 (Nat.succ n) :=
|
|
⟨a % Nat.succ n, Nat.mod_lt _ (Nat.zero_lt_succ _)⟩
|
|
|
|
instance : OfNat (Fin2 (no_index (n+1))) i where
|
|
ofNat := Fin2.ofNat i
|
|
|
|
def ex1 : Fin2 (9 + 1) :=
|
|
0
|
|
|
|
def ex2 : Fin2 10 :=
|
|
0
|