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.
29 lines
490 B
Text
29 lines
490 B
Text
namespace Ex1
|
|
mutual
|
|
def isEven : Nat → Bool
|
|
| 0 => true
|
|
| n+1 => isOdd n
|
|
termination_by n => n
|
|
def isOdd : Nat → Bool
|
|
| 0 => false
|
|
| n+1 => isEven n
|
|
termination_by n => n
|
|
end
|
|
|
|
/--
|
|
info: @[irreducible] def Ex1.isEven : Nat → Bool :=
|
|
fun a => isEven._mutual (PSum.inl a)
|
|
-/
|
|
#guard_msgs in
|
|
#print isEven
|
|
|
|
/--
|
|
info: @[irreducible] def Ex1.isOdd : Nat → Bool :=
|
|
fun a => isEven._mutual (PSum.inr a)
|
|
-/
|
|
#guard_msgs in
|
|
#print isOdd
|
|
|
|
#print isEven._mutual
|
|
|
|
end Ex1
|