File: Mathlib/Algebra/Algebra/Basic.lean

full_name: PUnit.algebra
code: instance _root_.PUnit.algebra : Algebra R PUnit.{v + 1} 
goal: Algebra R PUnit.{v + 1}

full_name: Algebra.algebraMap_pUnit
code: @[simp]
theorem algebraMap_pUnit (r : R) : algebraMap R PUnit r = PUnit.unit 
goal: (algebraMap R PUnit.{u_2 + 1}) r = PUnit.unit

full_name: ULift.algebra
code: instance _root_.ULift.algebra : Algebra R (ULift A) 
goal: Algebra R (ULift.{u_2, w} A)

full_name: ULift.algebraMap_eq
code: theorem _root_.ULift.algebraMap_eq (r : R) :
    algebraMap R (ULift A) r = ULift.up (algebraMap R A r) 
goal: (algebraMap R (ULift.{u_2, w} A)) r = { down := (algebraMap R A) r }

full_name: ULift.down_algebraMap
code: @[simp]
theorem _root_.ULift.down_algebraMap (r : R) : (algebraMap R (ULift A) r).down = algebraMap R A r 
goal: ((algebraMap R (ULift.{u_2, w} A)) r).down = (algebraMap R A) r

full_name: Algebra.ofSubsemiring
code: /-- Algebra over a subsemiring. This builds upon `Subsemiring.module`. -/
instance ofSubsemiring (S : Subsemiring R) : Algebra S A 
goal: Algebra (↥S) A

full_name: Algebra.algebraMap_ofSubsemiring
code: theorem algebraMap_ofSubsemiring (S : Subsemiring R) :
    (algebraMap S R : S →+* R) = Subsemiring.subtype S 
goal: algebraMap (↥S) R = S.subtype

full_name: Algebra.coe_algebraMap_ofSubsemiring
code: theorem coe_algebraMap_ofSubsemiring (S : Subsemiring R) : (algebraMap S R : S → R) = Subtype.val 
goal: ⇑(algebraMap (↥S) R) = Subtype.val

full_name: Algebra.algebraMap_ofSubsemiring_apply
code: theorem algebraMap_ofSubsemiring_apply (S : Subsemiring R) (x : S) : algebraMap S R x = x 
goal: (algebraMap (↥S) R) x = ↑x

full_name: Algebra.ofSubring
code: /-- Algebra over a subring. This builds upon `Subring.module`. -/
instance ofSubring {R A : Type*} [CommRing R] [Ring A] [Algebra R A] (S : Subring R) :
    Algebra S A 
goal: Algebra (↥S) A

full_name: Algebra.algebraMap_ofSubring
code: theorem algebraMap_ofSubring {R : Type*} [CommRing R] (S : Subring R) :
    (algebraMap S R : S →+* R) = Subring.subtype S 
goal: algebraMap (↥S) R = S.subtype

full_name: Algebra.coe_algebraMap_ofSubring
code: theorem coe_algebraMap_ofSubring {R : Type*} [CommRing R] (S : Subring R) :
    (algebraMap S R : S → R) = Subtype.val 
goal: ⇑(algebraMap (↥S) R) = Subtype.val

full_name: Algebra.algebraMap_ofSubring_apply
code: theorem algebraMap_ofSubring_apply {R : Type*} [CommRing R] (S : Subring R) (x : S) :
    algebraMap S R x = x 
goal: (algebraMap (↥S) R) x = ↑x

full_name: Algebra.algebraMapSubmonoid
code: /-- Explicit characterization of the submonoid map in the case of an algebra.
`S` is made explicit to help with type inference -/
def algebraMapSubmonoid (S : Type*) [Semiring S] [Algebra R S] (M : Submonoid R) : Submonoid S 
goal: Submonoid S

full_name: Algebra.mem_algebraMapSubmonoid_of_mem
code: theorem mem_algebraMapSubmonoid_of_mem {S : Type*} [Semiring S] [Algebra R S] {M : Submonoid R}
    (x : M) : algebraMap R S x ∈ algebraMapSubmonoid S M 
goal: (algebraMap R S) ↑x ∈ Algebra.algebraMapSubmonoid S M

full_name: Algebra.mul_sub_algebraMap_commutes
code: theorem mul_sub_algebraMap_commutes [Ring A] [Algebra R A] (x : A) (r : R) :
    x * (x - algebraMap R A r) = (x - algebraMap R A r) * x 
goal: x * (x - (algebraMap R A) r) = (x - (algebraMap R A) r) * x

full_name: Algebra.mul_sub_algebraMap_pow_commutes
code: theorem mul_sub_algebraMap_pow_commutes [Ring A] [Algebra R A] (x : A) (r : R) (n : ℕ) :
    x * (x - algebraMap R A r) ^ n = (x - algebraMap R A r) ^ n * x 
goal: x * (x - (algebraMap R A) r) ^ n = (x - (algebraMap R A) r) ^ n * x

full_name: Algebra.semiringToRing
code: /-- A `Semiring` that is an `Algebra` over a commutative ring carries a natural `Ring` structure.
See note [reducible non-instances]. -/
abbrev semiringToRing [Semiring A] [Algebra R A] : Ring A 
goal: Ring A

full_name: Module.End.instAlgebra
code: instance End.instAlgebra : Algebra R (Module.End S M) 
goal: Algebra R (Module.End S M)

full_name: Module.algebraMap_end_eq_smul_id
code: theorem algebraMap_end_eq_smul_id (a : R) : algebraMap R (End S M) a = a • LinearMap.id 
goal: (algebraMap R (Module.End S M)) a = a • LinearMap.id

full_name: Module.algebraMap_end_apply
code: @[simp]
theorem algebraMap_end_apply (a : R) (m : M) : algebraMap R (End S M) a m = a • m 
goal: ((algebraMap R (Module.End S M)) a) m = a • m

full_name: Module.ker_algebraMap_end
code: @[simp]
theorem ker_algebraMap_end (K : Type u) (V : Type v) [Field K] [AddCommGroup V] [Module K V] (a : K)
    (ha : a ≠ 0) : LinearMap.ker ((algebraMap K (End K V)) a) = ⊥ 
goal: LinearMap.ker ((algebraMap K (Module.End K V)) a) = ⊥

full_name: Module.End_algebraMap_isUnit_inv_apply_eq_iff
code: theorem End_algebraMap_isUnit_inv_apply_eq_iff {x : R}
    (h : IsUnit (algebraMap R (Module.End S M) x)) (m m' : M) :
    (↑(h.unit⁻¹) : Module.End S M) m = m' ↔ m = x • m' 
goal: ↑h.unit⁻¹ m = m' ↔ m = x • m'

full_name: Module.End_algebraMap_isUnit_inv_apply_eq_iff'
code: theorem End_algebraMap_isUnit_inv_apply_eq_iff' {x : R}
    (h : IsUnit (algebraMap R (Module.End S M) x)) (m m' : M) :
    m' = (↑h.unit⁻¹ : Module.End S M) m ↔ m = x • m' 
goal: m' = ↑h.unit⁻¹ m ↔ m = x • m'

full_name: LinearMap.map_algebraMap_mul
code: /-- An alternate statement of `LinearMap.map_smul` for when `algebraMap` is more convenient to
work with than `•`. -/
theorem map_algebraMap_mul (f : A →ₗ[R] B) (a : A) (r : R) :
    f (algebraMap R A r * a) = algebraMap R B r * f a 
goal: f ((algebraMap R A) r * a) = (algebraMap R B) r * f a

full_name: LinearMap.map_mul_algebraMap
code: theorem map_mul_algebraMap (f : A →ₗ[R] B) (a : A) (r : R) :
    f (a * algebraMap R A r) = f a * algebraMap R B r 
goal: f (a * (algebraMap R A) r) = f a * (algebraMap R B) r

full_name: algebraNat
code: /-- Semiring ⥤ ℕ-Alg -/
instance (priority := 99) algebraNat : Algebra ℕ R 
goal: Algebra ℕ R

full_name: nat_algebra_subsingleton
code: instance nat_algebra_subsingleton : Subsingleton (Algebra ℕ R) 
goal: Subsingleton (Algebra ℕ R)

full_name: algebraInt
code: /-- Ring ⥤ ℤ-Alg -/
instance (priority := 99) algebraInt : Algebra ℤ R 
goal: Algebra ℤ R

full_name: algebraMap_int_eq
code: /-- A special case of `eq_intCast'` that happens to be true definitionally -/
@[simp]
theorem algebraMap_int_eq : algebraMap ℤ R = Int.castRingHom R 
goal: algebraMap ℤ R = Int.castRingHom R

full_name: int_algebra_subsingleton
code: instance int_algebra_subsingleton : Subsingleton (Algebra ℤ R) 
goal: Subsingleton (Algebra ℤ R)

full_name: NoZeroSMulDivisors.of_algebraMap_injective
code: /-- If `algebraMap R A` is injective and `A` has no zero divisors,
`R`-multiples in `A` are zero only if one of the factors is zero.

Cannot be an instance because there is no `Injective (algebraMap R A)` typeclass.
-/
theorem of_algebraMap_injective [CommSemiring R] [Semiring A] [Algebra R A] [NoZeroDivisors A]
    (h : Function.Injective (algebraMap R A)) : NoZeroSMulDivisors R A 
goal: NoZeroSMulDivisors R A

full_name: NoZeroSMulDivisors.algebraMap_injective
code: theorem algebraMap_injective [CommRing R] [Ring A] [Nontrivial A] [Algebra R A]
    [NoZeroSMulDivisors R A] : Function.Injective (algebraMap R A) 
goal: Function.Injective ⇑(algebraMap R A)

full_name: NeZero.of_noZeroSMulDivisors
code: theorem _root_.NeZero.of_noZeroSMulDivisors (n : ℕ) [CommRing R] [NeZero (n : R)] [Ring A]
    [Nontrivial A] [Algebra R A] [NoZeroSMulDivisors R A] : NeZero (n : A) 
goal: NeZero ↑n

full_name: NoZeroSMulDivisors.iff_algebraMap_injective
code: theorem iff_algebraMap_injective [CommRing R] [Ring A] [IsDomain A] [Algebra R A] :
    NoZeroSMulDivisors R A ↔ Function.Injective (algebraMap R A) 
goal: NoZeroSMulDivisors R A ↔ Function.Injective ⇑(algebraMap R A)

full_name: NoZeroSMulDivisors.CharZero.noZeroSMulDivisors_nat
code: instance (priority := 100) CharZero.noZeroSMulDivisors_nat [Semiring R] [NoZeroDivisors R]
    [CharZero R] : NoZeroSMulDivisors ℕ R 
goal: NoZeroSMulDivisors ℕ R

full_name: NoZeroSMulDivisors.CharZero.noZeroSMulDivisors_int
code: instance (priority := 100) CharZero.noZeroSMulDivisors_int [Ring R] [NoZeroDivisors R]
    [CharZero R] : NoZeroSMulDivisors ℤ R 
goal: NoZeroSMulDivisors ℤ R

full_name: NoZeroSMulDivisors.Algebra.noZeroSMulDivisors
code: instance (priority := 100) Algebra.noZeroSMulDivisors [Nontrivial A] [NoZeroDivisors A] :
    NoZeroSMulDivisors R A 
goal: NoZeroSMulDivisors R A

full_name: algebra_compatible_smul
code: theorem algebra_compatible_smul (r : R) (m : M) : r • m = (algebraMap R A) r • m 
goal: r • m = (algebraMap R A) r • m

full_name: algebraMap_smul
code: @[simp]
theorem algebraMap_smul (r : R) (m : M) : (algebraMap R A) r • m = r • m 
goal: (algebraMap R A) r • m = r • m

full_name: NoZeroSMulDivisors.trans
code: theorem NoZeroSMulDivisors.trans (R A M : Type*) [CommRing R] [Ring A] [IsDomain A] [Algebra R A]
    [AddCommGroup M] [Module R M] [Module A M] [IsScalarTower R A M] [NoZeroSMulDivisors R A]
    [NoZeroSMulDivisors A M] : NoZeroSMulDivisors R M 
goal: NoZeroSMulDivisors R M

full_name: IsScalarTower.to_smulCommClass
code: instance (priority := 120) IsScalarTower.to_smulCommClass : SMulCommClass R A M 
goal: SMulCommClass R A M

full_name: IsScalarTower.to_smulCommClass'
code: instance (priority := 110) IsScalarTower.to_smulCommClass' : SMulCommClass A R M 
goal: SMulCommClass A R M

full_name: Algebra.to_smulCommClass
code: instance (priority := 200) Algebra.to_smulCommClass {R A} [CommSemiring R] [Semiring A]
    [Algebra R A] : SMulCommClass R A A 
goal: SMulCommClass R A A

full_name: smul_algebra_smul_comm
code: theorem smul_algebra_smul_comm (r : R) (a : A) (m : M) : a • r • m = r • a • m 
goal: a • r • m = r • a • m

full_name: LinearMap.ltoFun
code: /-- `A`-linearly coerce an `R`-linear map from `M` to `A` to a function, given an algebra `A` over
a commutative semiring `R` and `M` a module over `R`. -/
def ltoFun (R : Type u) (M : Type v) (A : Type w) [CommSemiring R] [AddCommMonoid M] [Module R M]
    [CommSemiring A] [Algebra R A] : (M →ₗ[R] A) →ₗ[A] M → A 
goal: (M →ₗ[R] A) →ₗ[A] M → A

full_name: LinearMap.ker_restrictScalars
code: @[simp]
theorem LinearMap.ker_restrictScalars (f : M →ₗ[S] N) :
    LinearMap.ker (f.restrictScalars R) = f.ker.restrictScalars R 
goal: LinearMap.ker (↑R f) = Submodule.restrictScalars R (LinearMap.ker f)

full_name: Invertible.algebraMapOfInvertibleAlgebraMap
code: /-- 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. -/
abbrev Invertible.algebraMapOfInvertibleAlgebraMap (f : A →ₗ[R] B) (hf : f 1 = 1) {r : R}
    (h : Invertible (algebraMap R A r)) : Invertible (algebraMap R B r) 
goal: Invertible ((algebraMap R B) r)

full_name: IsUnit.algebraMap_of_algebraMap
code: /-- 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. -/
lemma IsUnit.algebraMap_of_algebraMap (f : A →ₗ[R] B) (hf : f 1 = 1) {r : R}
    (h : IsUnit (algebraMap R A r)) : IsUnit (algebraMap R B r) 
goal: IsUnit ((algebraMap R B) r)

full_name: injective_algebraMap_of_linearMap
code: /-- 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 injective_algebraMap_of_linearMap (hb : Function.Injective b) :
    Function.Injective (algebraMap F E) 
goal: Function.Injective ⇑(algebraMap F E)

full_name: surjective_algebraMap_of_linearMap
code: /-- 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 surjective_algebraMap_of_linearMap (hb : Function.Surjective b) :
    Function.Surjective (algebraMap F E) 
goal: Function.Surjective ⇑(algebraMap F E)

full_name: bijective_algebraMap_of_linearMap
code: /-- 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_linearMap (hb : Function.Bijective b) :
    Function.Bijective (algebraMap F E) 
goal: Function.Bijective ⇑(algebraMap F E)

full_name: bijective_algebraMap_of_linearEquiv
code: /-- 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. -/
theorem bijective_algebraMap_of_linearEquiv (b : F ≃ₗ[F] E) :
    Function.Bijective (algebraMap F E) 
goal: Function.Bijective ⇑(algebraMap F E)

full_name: LinearMap.extendScalarsOfSurjectiveEquiv
code: /-- If `R →+* S` is surjective, then `S`-linear maps between modules are exactly `R`-linear maps. -/
def LinearMap.extendScalarsOfSurjectiveEquiv (h : Function.Surjective (algebraMap R S)) :
    (M →ₗ[R] N) ≃ₗ[R] (M →ₗ[S] N) 
goal: (M →ₗ[R] N) ≃ₗ[R] M →ₗ[S] N

full_name: LinearMap.extendScalarsOfSurjective
code: /-- If `R →+* S` is surjective, then `R`-linear maps are also `S`-linear. -/
abbrev LinearMap.extendScalarsOfSurjective (h : Function.Surjective (algebraMap R S))
    (l : M →ₗ[R] N) : M →ₗ[S] N 
goal: M →ₗ[S] N

full_name: LinearEquiv.extendScalarsOfSurjective
code: /-- If `R →+* S` is surjective, then `R`-linear isomorphisms are also `S`-linear. -/
def LinearEquiv.extendScalarsOfSurjective (h : Function.Surjective (algebraMap R S))
    (f : M ≃ₗ[R] N) : M ≃ₗ[S] N 
goal: M ≃ₗ[S] N

full_name: LinearMap.extendScalarsOfSurjective_apply
code: @[simp]
lemma LinearMap.extendScalarsOfSurjective_apply (l : M →ₗ[R] N) (x) :
    l.extendScalarsOfSurjective h x = l x 
goal: (LinearMap.extendScalarsOfSurjective h l) x = l x

full_name: LinearEquiv.extendScalarsOfSurjective_apply
code: @[simp]
lemma LinearEquiv.extendScalarsOfSurjective_apply (f : M ≃ₗ[R] N) (x) :
    f.extendScalarsOfSurjective h x = f x 
goal: (LinearEquiv.extendScalarsOfSurjective h f) x = f x

full_name: LinearEquiv.extendScalarsOfSurjective_symm
code: @[simp]
lemma LinearEquiv.extendScalarsOfSurjective_symm (f : M ≃ₗ[R] N) :
    (f.extendScalarsOfSurjective h).symm = f.symm.extendScalarsOfSurjective h 
goal: (LinearEquiv.extendScalarsOfSurjective h f).symm = LinearEquiv.extendScalarsOfSurjective h f.symm