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.
24 lines
878 B
Text
24 lines
878 B
Text
structure RingHom (R₁ R₂ : Type) where
|
||
toFun : R₁ → R₂
|
||
|
||
def RingHom.comp {R₁ R₂ R₃ : Type} (σ' : RingHom R₂ R₃) (σ : RingHom R₁ R₂) : RingHom R₁ R₃ where
|
||
toFun := σ'.toFun ∘ σ.toFun
|
||
|
||
def RingHom.id (R : Type) : RingHom R R where
|
||
toFun := _root_.id
|
||
|
||
structure RingHomInvPair {R₁ R₂ : Type} (σ : RingHom R₁ R₂) (σ' : RingHom R₂ R₁) : Prop where
|
||
comp_eq : σ'.comp σ = RingHom.id R₁
|
||
comp_eq₂ : σ.comp σ' = RingHom.id R₂
|
||
|
||
structure LinearEquiv (R : Type) (σ : RingHom R R) (invPair : RingHomInvPair σ σ)
|
||
|
||
structure AffineEquiv (k P₁ P₂ : Type) (V₁ V₂ : Type) where
|
||
toFun : P₁ → P₂
|
||
linear : LinearEquiv k (RingHom.id k) ⟨rfl, rfl⟩
|
||
|
||
variable {k P₁ P₂ V₁ V₂ : Type}
|
||
|
||
def toAffineMap {k P₁ P₂ V₁ V₂ : Type} (e : AffineEquiv k P₁ P₂ V₁ V₂) : P₁ → P₂ :=
|
||
e.toFun
|
||
|