Documentation

Mathlib.Algebra.Algebra.Basic

Further basic results about Algebra. #

This file could usefully be split further.

@[implicit_reducible]
Equations
  • PUnit.algebra = { toSMul := PUnit.smul, algebraMap := { toFun := fun (x : R) => PUnit.unit, map_one' := , map_mul' := , map_zero' := , map_add' := }, commutes' := , smul_def' := }
@[implicit_reducible]
instance ULift.algebra {R : Type u_1} {A : Type u_2} [CommSemiring R] [Semiring A] [Algebra R A] :
Equations
  • One or more equations did not get rendered due to their size.
theorem ULift.algebraMap_eq {R : Type u_1} {A : Type u_2} [CommSemiring R] [Semiring A] [Algebra R A] (r : R) :
(algebraMap R (ULift.{u_4, u_2} A)) r = { down := (algebraMap R A) r }
@[simp]
theorem ULift.down_algebraMap {R : Type u_1} {A : Type u_2} [CommSemiring R] [Semiring A] [Algebra R A] (r : R) :
@[implicit_reducible]
def ULift.algebra' (R : Type u_1) (A : Type u_2) [CommSemiring R] [Semiring A] [Algebra R A] :

If A is an R-algebra, it is also a ULift R-algebra. In particular, Ulift A is a ULift R algebra. This is not an instance, because it causes a non-reducible diamond in the case where A = Ulift R.

Equations
Instances For
    @[simp]
    theorem ULift.algebraMap_apply' {R : Type u_1} {A : Type u_2} [CommSemiring R] [Semiring A] [Algebra R A] (r : ULift.{u_4, u_1} R) :

    This references the ULift.algebra' instance.

    @[implicit_reducible, instance 900]
    instance Algebra.ofSubsemiring {R : Type u_1} {A : Type u_2} [CommSemiring R] [Semiring A] [Algebra R A] {C : Type u_4} [SetLike C R] [SubsemiringClass C R] (S : C) :
    Algebra (↥S) A

    Algebra over a subsemiring. This builds upon Subsemiring.module.

    Equations
    theorem Algebra.coe_algebraMap_ofSubsemiring {R : Type u_1} [CommSemiring R] {C : Type u_4} [SetLike C R] [SubsemiringClass C R] (S : C) :
    (algebraMap (↥S) R) = Subtype.val
    theorem Algebra.algebraMap_ofSubsemiring_apply {R : Type u_1} [CommSemiring R] {C : Type u_4} [SetLike C R] [SubsemiringClass C R] (S : C) (x : S) :
    (algebraMap (↥S) R) x = x
    @[implicit_reducible]
    instance Algebra.ofSubring {R : Type u_5} {A : Type u_6} [CommRing R] [Ring A] [Algebra R A] (S : Subring R) :
    Algebra (↥S) A

    Algebra over a subring. This builds upon Subring.module.

    Equations
    theorem Algebra.algebraMap_ofSubring {R : Type u_5} [CommRing R] (S : Subring R) :
    algebraMap (↥S) R = S.subtype
    @[deprecated Algebra.coe_algebraMap_ofSubsemiring (since := "2025-11-23")]
    theorem Algebra.coe_algebraMap_ofSubring {R : Type u_5} [CommRing R] (S : Subring R) :
    (algebraMap (↥S) R) = Subtype.val
    @[deprecated Algebra.algebraMap_ofSubsemiring_apply (since := "2025-11-23")]
    theorem Algebra.algebraMap_ofSubring_apply {R : Type u_5} [CommRing R] (S : Subring R) (x : S) :
    (algebraMap (↥S) R) x = x
    def Algebra.algebraMapSubmonoid {R : Type u_1} [CommSemiring R] (S : Type u_4) [Semiring S] [Algebra R S] (M : Submonoid R) :

    Explicit characterization of the submonoid map in the case of an algebra. S is made explicit to help with type inference

    Equations
    Instances For
      theorem Algebra.mem_algebraMapSubmonoid_of_mem {R : Type u_1} [CommSemiring R] {S : Type u_4} [Semiring S] [Algebra R S] {M : Submonoid R} (x : M) :
      theorem Algebra.mul_sub_algebraMap_commutes {R : Type u_1} {A : Type u_2} [CommSemiring R] [Ring A] [Algebra R A] (x : A) (r : R) :
      x * (x - (algebraMap R A) r) = (x - (algebraMap R A) r) * x
      theorem Algebra.mul_sub_algebraMap_pow_commutes {R : Type u_1} {A : Type u_2} [CommSemiring R] [Ring A] [Algebra R A] (x : A) (r : R) (n : ) :
      x * (x - (algebraMap R A) r) ^ n = (x - (algebraMap R A) r) ^ n * x
      @[reducible, inline]
      abbrev Algebra.semiringToRing {A : Type u_2} (R : Type u_4) [CommRing R] [Semiring A] [Algebra R A] :

      A Semiring that is an Algebra over a commutative ring carries a natural Ring structure. See note [reducible non-instances].

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[reducible, inline]
        abbrev RingHom.commSemiringToCommRing {R : Type u_4} {A : Type u_5} [CommRing R] [CommSemiring A] (φ : R →+* A) :

        The CommRing structure on a CommSemiring induced by a ring morphism from a CommRing.

        Equations
        Instances For
          @[implicit_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          @[implicit_reducible]
          instance Module.End.instAlgebra (R : Type u) (S : Type v) (M : Type w) [CommSemiring R] [Semiring S] [AddCommMonoid M] [Module R M] [Module S M] [SMulCommClass S R M] [SMul R S] [IsScalarTower R S M] :
          Algebra R (End S M)
          Equations
          theorem Module.algebraMap_end_eq_smul_id (R : Type u) (S : Type v) (M : Type w) [CommSemiring R] [Semiring S] [AddCommMonoid M] [Module R M] [Module S M] [SMulCommClass S R M] [SMul R S] [IsScalarTower R S M] (a : R) :
          @[simp]
          theorem Module.algebraMap_end_apply (R : Type u) (S : Type v) (M : Type w) [CommSemiring R] [Semiring S] [AddCommMonoid M] [Module R M] [Module S M] [SMulCommClass S R M] [SMul R S] [IsScalarTower R S M] (a : R) (m : M) :
          ((algebraMap R (End S M)) a) m = a m
          @[simp]
          theorem Module.ker_algebraMap_end (K : Type u) (V : Type v) [Semifield K] [AddCommMonoid V] [Module K V] (a : K) (ha : a 0) :
          theorem Module.End.algebraMap_isUnit_inv_apply_eq_iff {R : Type u} (S : Type v) {M : Type w} [CommSemiring R] [Semiring S] [AddCommMonoid M] [Module R M] [Module S M] [SMulCommClass S R M] [SMul R S] [IsScalarTower R S M] {x : R} (h : IsUnit ((algebraMap R (End S M)) x)) (m m' : M) :
          h.unit⁻¹ m = m' m = x m'
          theorem Module.End.algebraMap_isUnit_inv_apply_eq_iff' {R : Type u} (S : Type v) {M : Type w} [CommSemiring R] [Semiring S] [AddCommMonoid M] [Module R M] [Module S M] [SMulCommClass S R M] [SMul R S] [IsScalarTower R S M] {x : R} (h : IsUnit ((algebraMap R (End S M)) x)) (m m' : M) :
          m' = h.unit⁻¹ m m = x m'
          theorem LinearMap.map_algebraMap_mul {R : Type u_1} {A : Type u_2} {B : Type u_3} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] (f : A →ₗ[R] B) (a : A) (r : R) :
          f ((algebraMap R A) r * a) = (algebraMap R B) r * f a

          An alternate statement of LinearMap.map_smul for when algebraMap is more convenient to work with than .

          theorem LinearMap.map_mul_algebraMap {R : Type u_1} {A : Type u_2} {B : Type u_3} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] (f : A →ₗ[R] B) (a : A) (r : R) :
          f (a * (algebraMap R A) r) = f a * (algebraMap R B) r
          @[implicit_reducible, instance 99]
          instance Semiring.toNatAlgebra {R : Type u_1} [Semiring R] :

          Semiring ⥤ ℕ-Alg

          Equations
          @[simp]
          theorem algebraMap_comp_natCast (R : Type u_2) (A : Type u_3) [CommSemiring R] [Semiring A] [Algebra R A] :
          @[implicit_reducible, instance 99]
          instance Ring.toIntAlgebra (R : Type u_1) [Ring R] :

          Ring ⥤ ℤ-Alg

          Equations
          @[simp]

          A special case of eq_intCast' that happens to be true definitionally

          @[simp]
          theorem algebraMap_comp_intCast (R : Type u_2) (A : Type u_3) [CommRing R] [Ring A] [Algebra R A] :
          theorem NeZero.of_faithfulSMul (R : Type u_1) (A : Type u_2) [Semiring R] [Semiring A] [Module R A] [IsScalarTower R A A] [FaithfulSMul R A] (n : ) [NeZero n] :
          NeZero n
          @[simp]
          theorem FaithfulSMul.algebraMap_eq_zero_iff (R : Type u_1) (A : Type u_2) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] {r : R} :
          (algebraMap R A) r = 0 r = 0
          @[simp]
          theorem FaithfulSMul.algebraMap_eq_one_iff (R : Type u_1) (A : Type u_2) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] {r : R} :
          (algebraMap R A) r = 1 r = 1
          @[simp]
          theorem algebraMap.coe_inj (R : Type u_1) (A : Type u_2) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] {a b : R} :
          a = b a = b
          theorem algebraMap.coe_eq_zero_iff (R : Type u_1) (A : Type u_2) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] (a : R) :
          a = 0 a = 0
          @[deprecated algebraMap.coe_eq_zero_iff (since := "2025-10-21")]
          theorem algebraMap.lift_map_eq_zero_iff (R : Type u_1) (A : Type u_2) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] (a : R) :
          a = 0 a = 0
          theorem algebra_compatible_smul {R : Type u_1} [CommSemiring R] (A : Type u_2) [Semiring A] [Algebra R A] {M : Type u_3} [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] (r : R) (m : M) :
          r m = (algebraMap R A) r m
          @[simp]
          theorem algebraMap_smul {R : Type u_1} [CommSemiring R] (A : Type u_2) [Semiring A] [Algebra R A] {M : Type u_3} [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] (r : R) (m : M) :
          (algebraMap R A) r m = r m
          theorem isSMulRegular_algebraMap_iff {R : Type u_1} [CommSemiring R] (A : Type u_2) [Semiring A] [Algebra R A] {M : Type u_3} [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] {r : R} :
          @[instance 120]
          instance IsScalarTower.to_smulCommClass {R : Type u_1} [CommSemiring R] {A : Type u_2} [Semiring A] [Algebra R A] {M : Type u_3} [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] :
          @[instance 110]
          instance IsScalarTower.to_smulCommClass' {R : Type u_1} [CommSemiring R] {A : Type u_2} [Semiring A] [Algebra R A] {M : Type u_3} [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] :
          @[instance 10000]
          instance Algebra.to_smulCommClass {R : Type u_4} {A : Type u_5} [CommSemiring R] [Semiring A] [Algebra R A] :

          This has high priority because it is almost always the right instance when it applies.

          @[instance 100]
          instance instSMulCommClass {R : Type u_4} {S : Type u_5} {A : Type u_6} [CommSemiring R] [CommSemiring S] [Semiring A] [Algebra R A] [Algebra S A] :
          theorem smul_algebra_smul_comm {R : Type u_1} [CommSemiring R] {A : Type u_2} [Semiring A] [Algebra R A] {M : Type u_3} [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] (r : R) (a : A) (m : M) :
          a r m = r a m
          theorem IsDomain.of_faithfulSMul (R : Type u_1) (A : Type u_3) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] [IsDomain A] :
          theorem Module.IsTorsionFree.of_faithfulSMul (R : Type u_1) (S : Type u_2) (A : Type u_3) [CommSemiring R] [Semiring A] [Algebra R A] [FaithfulSMul R A] [Semiring S] [Module S R] [Module S A] [IsScalarTower S R A] [IsTorsionFree S A] :
          @[instance 100]
          @[instance 101]
          @[deprecated Module.isTorsionFree_iff_algebraMap_injective (since := "2026-01-21")]

          Alias of Module.isTorsionFree_iff_algebraMap_injective.

          @[deprecated Module.isTorsionFree_iff_faithfulSMul (since := "2026-01-21")]

          Alias of Module.isTorsionFree_iff_faithfulSMul.

          @[reducible, inline]
          abbrev Invertible.algebraMapOfInvertibleAlgebraMap {R : Type u_1} {A : Type u_2} {B : Type u_3} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] (f : A →ₗ[R] B) (hf : f 1 = 1) {r : R} (h : Invertible ((algebraMap R A) r)) :

          If there is a linear map f : A →ₗ[R] B that preserves 1, then algebraMap R B r is invertible when algebraMap R A r is.

          Equations
          Instances For
            theorem IsUnit.algebraMap_of_algebraMap {R : Type u_1} {A : Type u_2} {B : Type u_3} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] (f : A →ₗ[R] B) (hf : f 1 = 1) {r : R} (h : IsUnit ((algebraMap R A) r)) :
            IsUnit ((algebraMap R B) r)

            If there is a linear map f : A →ₗ[R] B that preserves 1, then algebraMap R B r is a unit when algebraMap R A r is.

            theorem injective_algebraMap_of_linearMap {F : Type u_1} {E : Type u_2} [CommSemiring F] [Semiring E] [Algebra F E] (b : F →ₗ[F] E) (hb : Function.Injective b) :

            If E is an F-algebra, and there exists an injective F-linear map from F to E, then the algebra map from F to E is also injective.

            theorem surjective_algebraMap_of_linearMap {F : Type u_1} {E : Type u_2} [CommSemiring F] [Semiring E] [Algebra F E] (b : F →ₗ[F] E) (hb : Function.Surjective b) :

            If E is an F-algebra, and there exists a surjective F-linear map from F to E, then the algebra map from F to E is also surjective.

            theorem bijective_algebraMap_of_linearMap {F : Type u_1} {E : Type u_2} [CommSemiring F] [Semiring E] [Algebra F E] (b : F →ₗ[F] E) (hb : Function.Bijective b) :

            If E is an F-algebra, and there exists a bijective F-linear map from F to E, then the algebra map from F to E is also bijective.

            NOTE: The same result can also be obtained if there are two F-linear maps from F to E, one is injective, the other one is surjective. In this case, use injective_algebraMap_of_linearMap and surjective_algebraMap_of_linearMap separately.

            theorem bijective_algebraMap_of_linearEquiv {F : Type u_1} {E : Type u_2} [CommSemiring F] [Semiring E] [Algebra F E] (b : F ≃ₗ[F] E) :

            If E is an F-algebra, there exists an F-linear isomorphism from F to E (namely, E is a free F-module of rank one), then the algebra map from F to E is bijective.

            def LinearMap.extendScalarsOfSurjectiveEquiv {R : Type u_1} {S : Type u_2} [CommSemiring R] [Semiring S] [Algebra R S] {M : Type u_3} {N : Type u_4} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module S M] [IsScalarTower R S M] [Module R N] [Module S N] [IsScalarTower R S N] (h : Function.Surjective (algebraMap R S)) :

            If R →+* S is surjective, then S-linear maps between modules are exactly R-linear maps.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[reducible, inline]
              abbrev LinearMap.extendScalarsOfSurjective {R : Type u_1} {S : Type u_2} [CommSemiring R] [Semiring S] [Algebra R S] {M : Type u_3} {N : Type u_4} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module S M] [IsScalarTower R S M] [Module R N] [Module S N] [IsScalarTower R S N] (h : Function.Surjective (algebraMap R S)) (l : M →ₗ[R] N) :

              If R →+* S is surjective, then R-linear maps are also S-linear.

              Equations
              Instances For
                def LinearEquiv.extendScalarsOfSurjective {R : Type u_1} {S : Type u_2} [CommSemiring R] [Semiring S] [Algebra R S] {M : Type u_3} {N : Type u_4} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module S M] [IsScalarTower R S M] [Module R N] [Module S N] [IsScalarTower R S N] (h : Function.Surjective (algebraMap R S)) (f : M ≃ₗ[R] N) :

                If R →+* S is surjective, then R-linear isomorphisms are also S-linear.

                Equations
                Instances For
                  @[simp]
                  theorem LinearMap.extendScalarsOfSurjective_apply {R : Type u_1} {S : Type u_4} [CommSemiring R] [Semiring S] [Algebra R S] {M : Type u_2} {N : Type u_3} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module S M] [IsScalarTower R S M] [Module R N] [Module S N] [IsScalarTower R S N] (h : Function.Surjective (algebraMap R S)) (l : M →ₗ[R] N) (x : M) :
                  @[simp]
                  theorem LinearEquiv.extendScalarsOfSurjective_apply {R : Type u_1} {S : Type u_4} [CommSemiring R] [Semiring S] [Algebra R S] {M : Type u_2} {N : Type u_3} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module S M] [IsScalarTower R S M] [Module R N] [Module S N] [IsScalarTower R S N] (h : Function.Surjective (algebraMap R S)) (f : M ≃ₗ[R] N) (x : M) :
                  @[simp]
                  theorem algebraMap.coe_prod {R : Type u_1} {A : Type u_2} [CommSemiring R] [CommSemiring A] [Algebra R A] {ι : Type u_3} {s : Finset ι} (a : ιR) :
                  (∏ is, a i) = is, (a i)
                  theorem algebraMap.coe_sum {R : Type u_1} {A : Type u_2} [CommSemiring R] [CommSemiring A] [Algebra R A] {ι : Type u_3} {s : Finset ι} (a : ιR) :
                  (∑ is, a i) = is, (a i)