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.
14 lines
580 B
Text
14 lines
580 B
Text
variable {α : Type}
|
||
variable (r : α → α → Prop)
|
||
|
||
/-- `SymmGen r` is the symmetric relation generated by `r`. -/
|
||
inductive SymmGen : α → α → Prop
|
||
| rel : ∀ x y, r x y → SymmGen x y
|
||
| symm : ∀ x y, SymmGen x y → SymmGen y x
|
||
|
||
def MyRel : Nat → Nat → Prop := SymmGen fun x y => y = x + 2
|
||
|
||
theorem preserve_add' {a : Nat} : ∀ {x y : Nat}, MyRel x y → MyRel (x + a) (y + a)
|
||
| _, _, SymmGen.rel _ _ h => SymmGen.rel _ _ (by rw [h, Nat.add_right_comm])
|
||
| _, _, SymmGen.symm _ _ h => SymmGen.symm _ _ (preserve_add' h)
|
||
termination_by structural _ _ r => r
|