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.
64 lines
1.4 KiB
Text
64 lines
1.4 KiB
Text
class MulComm (α : Type u) [Mul α] : Prop where
|
||
mulComm : {a b : α} → a * b = b * a
|
||
|
||
instance : Mul Bool where
|
||
mul := and
|
||
|
||
instance : MulComm Bool where
|
||
mulComm {a b} :=
|
||
match a, b with
|
||
| true, true => rfl
|
||
| true, false => rfl
|
||
| false, true => rfl
|
||
| false, false => rfl
|
||
|
||
instance : MulComm Bool where
|
||
mulComm := fun {a b} =>
|
||
match a, b with
|
||
| true, true => rfl
|
||
| true, false => rfl
|
||
| false, true => rfl
|
||
| false, false => rfl
|
||
|
||
instance : MulComm Bool := {
|
||
mulComm := fun {a b} =>
|
||
match a, b with
|
||
| true, true => rfl
|
||
| true, false => rfl
|
||
| false, true => rfl
|
||
| false, false => rfl
|
||
}
|
||
|
||
instance : MulComm Bool := {
|
||
mulComm := @fun a b =>
|
||
match a, b with
|
||
| true, true => rfl
|
||
| true, false => rfl
|
||
| false, true => rfl
|
||
| false, false => rfl
|
||
}
|
||
|
||
instance : MulComm Bool where
|
||
mulComm {a b} := by cases a <;> cases b <;> rfl
|
||
|
||
instance : MulComm Bool :=
|
||
⟨by intro a b; cases a <;> cases b <;> rfl⟩
|
||
|
||
instance : MulComm Bool :=
|
||
⟨fun {a b} => by cases a <;> cases b <;> rfl⟩
|
||
|
||
instance : MulComm Bool :=
|
||
⟨fun {a b} =>
|
||
match a, b with
|
||
| true, true => rfl
|
||
| true, false => rfl
|
||
| false, true => rfl
|
||
| false, false => rfl⟩
|
||
|
||
instance : MulComm Bool :=
|
||
⟨@fun a b =>
|
||
match a, b with
|
||
| true, true => rfl
|
||
| true, false => rfl
|
||
| false, true => rfl
|
||
| false, false => rfl⟩
|