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.
17 lines
458 B
Text
17 lines
458 B
Text
class Trait (X : Type) where
|
|
R : Type
|
|
|
|
attribute [reducible] Trait.R
|
|
|
|
def add_one {X} [Trait X] [One (Trait.R X)] [HAdd X (Trait.R X) X] (x : X) : X := x + (One.one : (Trait.R X))
|
|
|
|
@[reducible] instance : Trait Int := ⟨Nat⟩
|
|
instance : One Nat := ⟨1⟩
|
|
instance : HAdd Int Nat Int := ⟨λ x y => x + y⟩
|
|
|
|
def add_one_to_one (x : Int) (h : x = 1) : add_one (x : Int) = (2 : Int) := by
|
|
conv =>
|
|
pattern add_one _
|
|
trace_state
|
|
rw [h]
|
|
rfl
|