Propositional typeclasses on several ring homs #
This file contains three typeclasses used in the definition of (semi)linear maps:
RingHomId σ, which expresses the fact thatσ₂₃ = idRingHomCompTriple σ₁₂ σ₂₃ σ₁₃, which expresses the fact thatσ₂₃.comp σ₁₂ = σ₁₃RingHomInvPair σ₁₂ σ₂₁, which states thatσ₁₂andσ₂₁are inverses of each otherRingHomSurjective σ, which states thatσis surjective These typeclasses ensure that objects such asσ₂₃.comp σ₁₂never end up in the type of a semilinear map; instead, the typeclass system directly finds the appropriateRingHomto use. A typical use-case is conjugate-linear maps, i.e. whenσ = Complex.conj; this system ensures that composing two conjugate-linear maps is a linear map, and not aconj.comp conj-linear map.
Instances of these typeclasses mostly involving RingHom.id are also provided:
RingHomInvPair (RingHom.id R) (RingHom.id R)[RingHomInvPair σ₁₂ σ₂₁] : RingHomCompTriple σ₁₂ σ₂₁ (RingHom.id R₁)RingHomCompTriple (RingHom.id R₁) σ₁₂ σ₁₂RingHomCompTriple σ₁₂ (RingHom.id R₂) σ₁₂RingHomSurjective (RingHom.id R)[RingHomInvPair σ₁ σ₂] : RingHomSurjective σ₁
Implementation notes #
-
For the typeclass
RingHomInvPair σ₁₂ σ₂₁,σ₂₁is marked as anoutParam, as it must typically be found via the typeclass inference system. -
Likewise, for
RingHomCompTriple σ₁₂ σ₂₃ σ₁₃,σ₁₃is marked as anoutParam, for the same reason.
Tags #
- comp_eq : RingHom.comp σ₂₃ σ₁₂ = σ₁₃
The morphisms form a commutative triangle
Class that expresses the fact that three ring homomorphisms form a composition triple. This is used to handle composition of semilinear maps.
Instances
- comp_eq : RingHom.comp σ' σ = RingHom.id R₁
σ'is a left inverse ofσ - comp_eq₂ : RingHom.comp σ σ' = RingHom.id R₂
σ'is a left inverse ofσ'
Class that expresses the fact that two ring homomorphisms are inverses of each other. This is
used to handle symm for semilinear equivalences.
Instances
Construct a RingHomInvPair from both directions of a ring equiv.
This is not an instance, as for equivalences that are involutions, a better instance
would be RingHomInvPair e e. Indeed, this declaration is not currently used in mathlib.
See note [reducible non-instances].
Swap the direction of a RingHomInvPair. This is not an instance as it would loop, and better
instances are often available and may often be preferrable to using this one. Indeed, this
declaration is not currently used in mathlib.
See note [reducible non-instances].
- is_surjective : Function.Surjective ↑σ
The ring homomorphism is surjective
Class expressing the fact that a RingHom is surjective. This is needed in the context
of semilinear maps, where some lemmas require this.
Instances
This cannot be an instance as there is no way to infer σ₁₂ and σ₂₃.