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.
25 lines
852 B
Text
25 lines
852 B
Text
variable {α : Type} {r : α → α → Prop} {b : α}
|
||
|
||
inductive ReflTransGen (r : α → α → Prop) (a : α) : α → Prop
|
||
| refl : ReflTransGen r a a
|
||
| tail {b c} : ReflTransGen r a b → r b c → ReflTransGen r a c
|
||
|
||
namespace ReflTransGen
|
||
|
||
theorem head (hab : r a b) (hbc : ReflTransGen r b c) : ReflTransGen r a c := by
|
||
induction hbc
|
||
case refl => exact refl.tail hab
|
||
case tail c d _ hcd hac => exact hac.tail hcd
|
||
|
||
@[elab_as_elim]
|
||
theorem head_induction_on {P : ∀ a : α, ReflTransGen r a b → Prop} {a : α} (h : ReflTransGen r a b)
|
||
(refl : P b refl)
|
||
(head : ∀ {a c} (h' : r a c) (h : ReflTransGen r c b), P c h → P a (h.head h')) : P a h := by
|
||
induction h
|
||
case refl => exact refl
|
||
case tail b c _ hbc ih =>
|
||
apply ih
|
||
{ exact head hbc _ refl }
|
||
{ exact fun h1 h2 => head h1 (h2.tail hbc) }
|
||
|
||
end ReflTransGen
|