lean4-htt/tests/lean/run/projWithNestedIrrelevantFields.lean
Cameron Zwarich 1a9de502f2
fix: handle constants with erased types in toMonoType (#8709)
This PR handles constants with erased types in `toMonoType`. It is much
harder to write a test case for this than you would think, because most
references to such types get replaced with `lcErased` earlier.
2025-06-10 16:27:33 +00:00

24 lines
878 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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