The areas / V06. Rings, fields and ordered algebra
Mathlib.Algebra.Ring.CompTypeclasses
32 declarations. Mathlib docs · Source
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 appropriate RingHom to 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 a conj.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
RingHomCompTriple, RingHomInvPair, RingHomSurjective
class RingHomId E1 #
{R : Type u_4} → [inst : Semiring R] → (R →+* R) → Prop
Class that expresses that a ring homomorphism is in fact the identity.
ctor RingHomId.mk E0 #
∀ {R : Type u_4} [inst : Semiring R] {σ : R →+* R}, σ = RingHom.id R → RingHomId σ
instance instRingHomIdId E0 #
∀ {R : Type u_4} [inst : Semiring R], RingHomId (RingHom.id R)
class RingHomCompTriple E1 #
{R₁ : Type u_1} →
{R₂ : Type u_2} →
{R₃ : Type u_3} →
[inst : Semiring R₁] →
[inst_1 : Semiring R₂] → [inst_2 : Semiring R₃] → (R₁ →+* R₂) → (R₂ →+* R₃) → outParam (R₁ →+* R₃) → Prop
Class that expresses the fact that three ring homomorphisms form a composition triple. This is used to handle composition of semilinear maps.
ctor RingHomCompTriple.mk E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {R₃ : Type u_3} [inst : Semiring R₁] [inst_1 : Semiring R₂] [inst_2 : Semiring R₃]
{σ₁₂ : R₁ →+* R₂} {σ₂₃ : R₂ →+* R₃} {σ₁₃ : outParam (R₁ →+* R₃)}, σ₂₃.comp σ₁₂ = σ₁₃ → RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
theorem RingHomCompTriple.comp_eq E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {R₃ : Type u_3} {inst : Semiring R₁} {inst_1 : Semiring R₂} {inst_2 : Semiring R₃}
{σ₁₂ : R₁ →+* R₂} {σ₂₃ : R₂ →+* R₃} {σ₁₃ : outParam (R₁ →+* R₃)} [self : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃],
σ₂₃.comp σ₁₂ = σ₁₃
The morphisms form a commutative triangle
theorem RingHomCompTriple.comp_apply E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {R₃ : Type u_3} [inst : Semiring R₁] [inst_1 : Semiring R₂] [inst_2 : Semiring R₃]
{σ₁₂ : R₁ →+* R₂} {σ₂₃ : R₂ →+* R₃} {σ₁₃ : R₁ →+* R₃} [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] {x : R₁}, σ₂₃ (σ₁₂ x) = σ₁₃ x
class RingHomInvPair E1 #
{R₁ : Type u_1} →
{R₂ : Type u_2} → [inst : Semiring R₁] → [inst_1 : Semiring R₂] → (R₁ →+* R₂) → outParam (R₂ →+* R₁) → Prop
Class that expresses the fact that two ring homomorphisms are inverses of each other. This is
used to handle symm for semilinear equivalences.
ctor RingHomInvPair.mk E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ : R₁ →+* R₂}
{σ' : outParam (R₂ →+* R₁)}, σ'.comp σ = RingHom.id R₁ → σ.comp σ' = RingHom.id R₂ → RingHomInvPair σ σ'
theorem RingHomInvPair.comp_eq E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {inst : Semiring R₁} {inst_1 : Semiring R₂} {σ : R₁ →+* R₂}
{σ' : outParam (R₂ →+* R₁)} [self : RingHomInvPair σ σ'], σ'.comp σ = RingHom.id R₁
σ' is a left inverse of σ
theorem RingHomInvPair.comp_eq₂ E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {inst : Semiring R₁} {inst_1 : Semiring R₂} {σ : R₁ →+* R₂}
{σ' : outParam (R₂ →+* R₁)} [self : RingHomInvPair σ σ'], σ.comp σ' = RingHom.id R₂
σ' is a left inverse of σ'
theorem RingHomInvPair.comp_apply_eq E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ : R₁ →+* R₂} {σ' : R₂ →+* R₁}
[RingHomInvPair σ σ'] {x : R₁}, σ' (σ x) = x
theorem RingHomInvPair.comp_apply_eq₂ E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ : R₁ →+* R₂} {σ' : R₂ →+* R₁}
[RingHomInvPair σ σ'] {x : R₂}, σ (σ' x) = x
instance RingHomInvPair.ids E0 #
∀ {R₁ : Type u_1} [inst : Semiring R₁], RingHomInvPair (RingHom.id R₁) (RingHom.id R₁)
instance RingHomInvPair.triples E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ₁₂ : R₁ →+* R₂} {σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁], RingHomCompTriple σ₁₂ σ₂₁ (RingHom.id R₁)
instance RingHomInvPair.triples₂ E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ₁₂ : R₁ →+* R₂} {σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁], RingHomCompTriple σ₂₁ σ₁₂ (RingHom.id R₂)
def RingHomInvPair.toRingEquiv E1 #
{R₁ : Type u_1} →
{R₂ : Type u_2} →
[inst : Semiring R₁] →
[inst_1 : Semiring R₂] → (σ : R₁ →+* R₂) → (σ' : R₂ →+* R₁) → [RingHomInvPair σ σ'] → R₁ ≃+* R₂
The ring equivalence defined by a pair of ring homomorphisms satisfying RingHomInvPair.
theorem RingHomInvPair.toRingEquiv_symm_apply E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (σ : R₁ →+* R₂) (σ' : R₂ →+* R₁)
[inst_2 : RingHomInvPair σ σ'] (a : R₂), (RingHomInvPair.toRingEquiv σ σ').symm a = σ' a
theorem RingHomInvPair.toRingEquiv_apply E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (σ : R₁ →+* R₂) (σ' : R₂ →+* R₁)
[inst_2 : RingHomInvPair σ σ'] (a : R₁), (RingHomInvPair.toRingEquiv σ σ') a = σ a
theorem RingHomInvPair.of_ringEquiv E2 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (e : R₁ ≃+* R₂), RingHomInvPair ↑e ↑e.symm
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.
theorem RingHomInvPair.of_ringEquiv_symm E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (e : R₁ ≃+* R₂), RingHomInvPair ↑e.symm ↑e
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.
theorem RingHomInvPair.symm E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (σ₁₂ : R₁ →+* R₂) (σ₂₁ : R₂ →+* R₁)
[RingHomInvPair σ₁₂ σ₂₁], RingHomInvPair σ₂₁ σ₁₂
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 preferable to using this one. Indeed, this
declaration is not currently used in mathlib.
instance RingHomCompTriple.ids E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ₁₂ : R₁ →+* R₂},
RingHomCompTriple (RingHom.id R₁) σ₁₂ σ₁₂
instance RingHomCompTriple.right_ids E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ₁₂ : R₁ →+* R₂},
RingHomCompTriple σ₁₂ (RingHom.id R₂) σ₁₂
class RingHomSurjective E1 #
{R₁ : Type u_1} → {R₂ : Type u_2} → [inst : Semiring R₁] → [inst_1 : Semiring R₂] → (R₁ →+* R₂) → Prop
Class expressing the fact that a RingHom is surjective. This is needed in the context
of semilinear maps, where some lemmas require this.
ctor RingHomSurjective.mk E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ : R₁ →+* R₂},
Function.Surjective ⇑σ → RingHomSurjective σ
theorem RingHomSurjective.is_surjective E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {inst : Semiring R₁} {inst_1 : Semiring R₂} {σ : R₁ →+* R₂}
[self : RingHomSurjective σ], Function.Surjective ⇑σ
The ring homomorphism is surjective
theorem RingHom.surjective E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (σ : R₁ →+* R₂) [t : RingHomSurjective σ],
Function.Surjective ⇑σ
instance RingHomSurjective.invPair E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] {σ₁ : R₁ →+* R₂} {σ₂ : R₂ →+* R₁}
[RingHomInvPair σ₁ σ₂], RingHomSurjective σ₁
instance RingHomSurjective.ids E0 #
∀ {R₁ : Type u_1} [inst : Semiring R₁], RingHomSurjective (RingHom.id R₁)
theorem RingHomSurjective.comp E1 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} {R₃ : Type u_3} [inst : Semiring R₁] [inst_1 : Semiring R₂] [inst_2 : Semiring R₃]
{σ₁₂ : R₁ →+* R₂} {σ₂₃ : R₂ →+* R₃} {σ₁₃ : R₁ →+* R₃} [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] [RingHomSurjective σ₁₂]
[RingHomSurjective σ₂₃], RingHomSurjective σ₁₃
This cannot be an instance as there is no way to infer σ₁₂ and σ₂₃.
instance RingHomSurjective.instToRingHomRingEquiv E0 #
∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (σ : R₁ ≃+* R₂), RingHomSurjective ↑σ