File: Mathlib/RingTheory/TensorProduct/Basic.lean

full_name: LinearMap.baseChange
code: /-- `baseChange A f` for `f : M →ₗ[R] N` is the `A`-linear map `A ⊗[R] M →ₗ[A] A ⊗[R] N`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange (f : M →ₗ[R] N) : A ⊗[R] M →ₗ[A] A ⊗[R] N 
goal: A ⊗[R] M →ₗ[A] A ⊗[R] N

full_name: LinearMap.baseChange_tmul
code: @[simp]
theorem baseChange_tmul (a : A) (x : M) : f.baseChange A (a ⊗ₜ x) = a ⊗ₜ f x 
goal: (LinearMap.baseChange A f) (a ⊗ₜ[R] x) = a ⊗ₜ[R] f x

full_name: LinearMap.baseChange_eq_ltensor
code: theorem baseChange_eq_ltensor : (f.baseChange A : A ⊗ M → A ⊗ N) = f.lTensor A 
goal: ⇑(LinearMap.baseChange A f) = ⇑(LinearMap.lTensor A f)

full_name: LinearMap.baseChange_add
code: @[simp]
theorem baseChange_add : (f + g).baseChange A = f.baseChange A + g.baseChange A 
goal: LinearMap.baseChange A (f + g) = LinearMap.baseChange A f + LinearMap.baseChange A g

full_name: LinearMap.baseChange_zero
code: @[simp]
theorem baseChange_zero : baseChange A (0 : M →ₗ[R] N) = 0 
goal: LinearMap.baseChange A 0 = 0

full_name: LinearMap.baseChange_smul
code: @[simp]
theorem baseChange_smul : (r • f).baseChange A = r • f.baseChange A 
goal: LinearMap.baseChange A (r • f) = r • LinearMap.baseChange A f

full_name: LinearMap.baseChange_id
code: @[simp]
lemma baseChange_id : (.id : M →ₗ[R] M).baseChange A = .id 
goal: LinearMap.baseChange A LinearMap.id = LinearMap.id

full_name: LinearMap.baseChange_comp
code: lemma baseChange_comp (g : N →ₗ[R] P) :
    (g ∘ₗ f).baseChange A = g.baseChange A ∘ₗ f.baseChange A 
goal: LinearMap.baseChange A (g ∘ₗ f) = LinearMap.baseChange A g ∘ₗ LinearMap.baseChange A f

full_name: LinearMap.baseChange_one
code: @[simp]
lemma baseChange_one : (1 : Module.End R M).baseChange A = 1 
goal: LinearMap.baseChange A 1 = 1

full_name: LinearMap.baseChange_mul
code: lemma baseChange_mul (f g : Module.End R M) :
    (f * g).baseChange A = f.baseChange A * g.baseChange A 
goal: LinearMap.baseChange A (f * g) = LinearMap.baseChange A f * LinearMap.baseChange A g

full_name: LinearMap.baseChangeHom
code: /-- `baseChange` as a linear map.

When `M = N`, this is true more strongly as `Module.End.baseChangeHom`. -/
@[simps]
def baseChangeHom : (M →ₗ[R] N) →ₗ[R] A ⊗[R] M →ₗ[A] A ⊗[R] N 
goal: (M →ₗ[R] N) →ₗ[R] A ⊗[R] M →ₗ[A] A ⊗[R] N

full_name: LinearMap.baseChangeHom_apply
code: /-- `baseChange` as a linear map.

When `M = N`, this is true more strongly as `Module.End.baseChangeHom`. -/
@[simps]
def baseChangeHom : (M →ₗ[R] N) →ₗ[R] A ⊗[R] M →ₗ[A] A ⊗[R] N 
goal: (LinearMap.baseChangeHom R A M N) f = LinearMap.baseChange A f

full_name: Module.End.baseChangeHom_apply_apply
code: /-- `baseChange` as an `AlgHom`. -/
@[simps!]
def _root_.Module.End.baseChangeHom : Module.End R M →ₐ[R] Module.End A (A ⊗[R] M) 
goal: ∀ (a_1 : A ⊗[R] M),
  ((Module.End.baseChangeHom R A M) a) a_1 =
    (TensorProduct.liftAux
        (↑R
          ({ toFun := fun h => h ∘ₗ a, map_add' := ⋯, map_smul' := ⋯ } ∘ₗ
            TensorProduct.AlgebraTensorModule.mk R A A M)))
      a_1

full_name: Module.End.baseChangeHom
code: /-- `baseChange` as an `AlgHom`. -/
@[simps!]
def _root_.Module.End.baseChangeHom : Module.End R M →ₐ[R] Module.End A (A ⊗[R] M) 
goal: Module.End R M →ₐ[R] Module.End A (A ⊗[R] M)

full_name: LinearMap.baseChange_pow
code: lemma baseChange_pow (f : Module.End R M) (n : ℕ) :
    (f ^ n).baseChange A = f.baseChange A ^ n 
goal: LinearMap.baseChange A (f ^ n) = LinearMap.baseChange A f ^ n

full_name: LinearMap.baseChange_sub
code: @[simp]
theorem baseChange_sub : (f - g).baseChange A = f.baseChange A - g.baseChange A 
goal: LinearMap.baseChange A (f - g) = LinearMap.baseChange A f - LinearMap.baseChange A g

full_name: LinearMap.baseChange_neg
code: @[simp]
theorem baseChange_neg : (-f).baseChange A = -f.baseChange A 
goal: LinearMap.baseChange A (-f) = -LinearMap.baseChange A f

full_name: LinearMap.liftBaseChangeEquiv
code: /--
If `M` is an `R`-module and `N` is an `A`-module, then `A`-linear maps `A ⊗[R] M →ₗ[A] N`
correspond to `R` linear maps `M →ₗ[R] N` by composing with `M → A ⊗ M`, `x ↦ 1 ⊗ x`.
-/
noncomputable
def liftBaseChangeEquiv : (M →ₗ[R] N) ≃ₗ[A] (A ⊗[R] M →ₗ[A] N) 
goal: (M →ₗ[R] N) ≃ₗ[A] A ⊗[R] M →ₗ[A] N

full_name: LinearMap.liftBaseChange
code: /-- If `N` is an `A` module, we may lift a linear map `M →ₗ[R] N` to `A ⊗[R] M →ₗ[A] N` -/
noncomputable
abbrev liftBaseChange (l : M →ₗ[R] N) : A ⊗[R] M →ₗ[A] N 
goal: A ⊗[R] M →ₗ[A] N

full_name: LinearMap.liftBaseChange_tmul
code: @[simp]
lemma liftBaseChange_tmul (l : M →ₗ[R] N) (x y) : l.liftBaseChange A (x ⊗ₜ y) = x • l y 
goal: (LinearMap.liftBaseChange A l) (x ⊗ₜ[R] y) = x • l y

full_name: LinearMap.liftBaseChange_one_tmul
code: lemma liftBaseChange_one_tmul (l : M →ₗ[R] N) (y) : l.liftBaseChange A (1 ⊗ₜ y) = l y 
goal: (LinearMap.liftBaseChange A l) (1 ⊗ₜ[R] y) = l y

full_name: LinearMap.liftBaseChangeEquiv_symm_apply
code: @[simp]
lemma liftBaseChangeEquiv_symm_apply (l : A ⊗[R] M →ₗ[A] N) (x) :
    (liftBaseChangeEquiv A).symm l x = l (1 ⊗ₜ x) 
goal: ((LinearMap.liftBaseChangeEquiv A).symm l) x = l (1 ⊗ₜ[R] x)

full_name: LinearMap.liftBaseChange_comp
code: lemma liftBaseChange_comp {P} [AddCommMonoid P] [Module A P] [Module R P] [IsScalarTower R A P]
    (l : M →ₗ[R] N) (l' : N →ₗ[A] P) :
      l' ∘ₗ l.liftBaseChange A = (l'.restrictScalars R ∘ₗ l).liftBaseChange A 
goal: l' ∘ₗ LinearMap.liftBaseChange A l = LinearMap.liftBaseChange A (↑R l' ∘ₗ l)

full_name: LinearMap.range_liftBaseChange
code: @[simp]
lemma range_liftBaseChange (l : M →ₗ[R] N) :
    LinearMap.range (l.liftBaseChange A) = Submodule.span A (LinearMap.range l) 
goal: LinearMap.range (LinearMap.liftBaseChange A l) = Submodule.span A ↑(LinearMap.range l)

full_name: Algebra.TensorProduct.instOneTensorProduct
code: instance : One (A ⊗[R] B) 
goal: One (A ⊗[R] B)

full_name: Algebra.TensorProduct.one_def
code: theorem one_def : (1 : A ⊗[R] B) = (1 : A) ⊗ₜ (1 : B) 
goal: 1 = 1 ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.instAddCommMonoidWithOne
code: instance instAddCommMonoidWithOne : AddCommMonoidWithOne (A ⊗[R] B) 
goal: AddCommMonoidWithOne (A ⊗[R] B)

full_name: Algebra.TensorProduct.natCast_def
code: theorem natCast_def (n : ℕ) : (n : A ⊗[R] B) = (n : A) ⊗ₜ (1 : B) 
goal: ↑n = ↑n ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.natCast_def'
code: theorem natCast_def' (n : ℕ) : (n : A ⊗[R] B) = (1 : A) ⊗ₜ (n : B) 
goal: ↑n = 1 ⊗ₜ[R] ↑n

full_name: Algebra.TensorProduct.mul
code: /-- (Implementation detail)
The multiplication map on `A ⊗[R] B`,
as an `R`-bilinear map.
-/
@[irreducible]
def mul : A ⊗[R] B →ₗ[R] A ⊗[R] B →ₗ[R] A ⊗[R] B 
goal: A ⊗[R] B →ₗ[R] A ⊗[R] B →ₗ[R] A ⊗[R] B

full_name: Algebra.TensorProduct.mul_apply
code: @[simp]
theorem mul_apply (a₁ a₂ : A) (b₁ b₂ : B) :
    mul (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂) = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂) 
goal: (Algebra.TensorProduct.mul (a₁ ⊗ₜ[R] b₁)) (a₂ ⊗ₜ[R] b₂) = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)

full_name: Algebra.TensorProduct.instMul
code: instance instMul : Mul (A ⊗[R] B) 
goal: Mul (A ⊗[R] B)

full_name: Algebra.TensorProduct.tmul_mul_tmul
code: @[simp]
theorem tmul_mul_tmul (a₁ a₂ : A) (b₁ b₂ : B) :
    a₁ ⊗ₜ[R] b₁ * a₂ ⊗ₜ[R] b₂ = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂) 
goal: a₁ ⊗ₜ[R] b₁ * a₂ ⊗ₜ[R] b₂ = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)

full_name: SemiconjBy.tmul
code: theorem _root_.SemiconjBy.tmul {a₁ a₂ a₃ : A} {b₁ b₂ b₃ : B}
    (ha : SemiconjBy a₁ a₂ a₃) (hb : SemiconjBy b₁ b₂ b₃) :
    SemiconjBy (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂) (a₃ ⊗ₜ[R] b₃) 
goal: SemiconjBy (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂) (a₃ ⊗ₜ[R] b₃)

full_name: Commute.tmul
code: nonrec theorem _root_.Commute.tmul {a₁ a₂ : A} {b₁ b₂ : B}
    (ha : Commute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂) 
goal: Commute (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂)

full_name: Algebra.TensorProduct.instNonUnitalNonAssocSemiring
code: instance instNonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring (A ⊗[R] B) 
goal: NonUnitalNonAssocSemiring (A ⊗[R] B)

full_name: Algebra.TensorProduct.isScalarTower_right
code: instance (priority := 100) isScalarTower_right [Monoid S] [DistribMulAction S A]
    [IsScalarTower S A A] [SMulCommClass R S A] : IsScalarTower S (A ⊗[R] B) (A ⊗[R] B) 
goal: IsScalarTower S (A ⊗[R] B) (A ⊗[R] B)

full_name: Algebra.TensorProduct.sMulCommClass_right
code: instance (priority := 100) sMulCommClass_right [Monoid S] [DistribMulAction S A]
    [SMulCommClass S A A] [SMulCommClass R S A] : SMulCommClass S (A ⊗[R] B) (A ⊗[R] B) 
goal: SMulCommClass S (A ⊗[R] B) (A ⊗[R] B)

full_name: Algebra.TensorProduct.one_mul
code: protected theorem one_mul (x : A ⊗[R] B) : mul (1 ⊗ₜ 1) x = x 
goal: (Algebra.TensorProduct.mul (1 ⊗ₜ[R] 1)) x = x

full_name: Algebra.TensorProduct.mul_one
code: protected theorem mul_one (x : A ⊗[R] B) : mul x (1 ⊗ₜ 1) = x 
goal: (Algebra.TensorProduct.mul x) (1 ⊗ₜ[R] 1) = x

full_name: Algebra.TensorProduct.instNonAssocSemiring
code: instance instNonAssocSemiring : NonAssocSemiring (A ⊗[R] B) 
goal: NonAssocSemiring (A ⊗[R] B)

full_name: Algebra.TensorProduct.mul_assoc
code: protected theorem mul_assoc (x y z : A ⊗[R] B) : mul (mul x y) z = mul x (mul y z) 
goal: (Algebra.TensorProduct.mul ((Algebra.TensorProduct.mul x) y)) z =
  (Algebra.TensorProduct.mul x) ((Algebra.TensorProduct.mul y) z)

full_name: Algebra.TensorProduct.instNonUnitalSemiring
code: instance instNonUnitalSemiring : NonUnitalSemiring (A ⊗[R] B) 
goal: NonUnitalSemiring (A ⊗[R] B)

full_name: Algebra.TensorProduct.instSemiring
code: instance instSemiring : Semiring (A ⊗[R] B) 
goal: Semiring (A ⊗[R] B)

full_name: Algebra.TensorProduct.tmul_pow
code: @[simp]
theorem tmul_pow (a : A) (b : B) (k : ℕ) : a ⊗ₜ[R] b ^ k = (a ^ k) ⊗ₜ[R] (b ^ k) 
goal: a ⊗ₜ[R] b ^ k = (a ^ k) ⊗ₜ[R] (b ^ k)

full_name: Algebra.TensorProduct.includeLeftRingHom_apply
code: /-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* A ⊗[R] B 
goal: Algebra.TensorProduct.includeLeftRingHom a = a ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.includeLeftRingHom
code: /-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* A ⊗[R] B 
goal: A →+* A ⊗[R] B

full_name: Algebra.TensorProduct.leftAlgebra
code: instance leftAlgebra [SMulCommClass R S A] : Algebra S (A ⊗[R] B) 
goal: Algebra S (A ⊗[R] B)

full_name: Algebra.TensorProduct.instAlgebra
code: /-- The tensor product of two `R`-algebras is an `R`-algebra. -/
instance instAlgebra : Algebra R (A ⊗[R] B) 
goal: Algebra R (A ⊗[R] B)

full_name: Algebra.TensorProduct.algebraMap_apply
code: @[simp]
theorem algebraMap_apply [SMulCommClass R S A] (r : S) :
    algebraMap S (A ⊗[R] B) r = (algebraMap S A) r ⊗ₜ 1 
goal: (algebraMap S (A ⊗[R] B)) r = (algebraMap S A) r ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.algebraMap_apply'
code: theorem algebraMap_apply' (r : R) :
    algebraMap R (A ⊗[R] B) r = 1 ⊗ₜ algebraMap R B r 
goal: (algebraMap R (A ⊗[R] B)) r = 1 ⊗ₜ[R] (algebraMap R B) r

full_name: Algebra.TensorProduct.includeLeft
code: /-- The `R`-algebra morphism `A →ₐ[R] A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
def includeLeft [SMulCommClass R S A] : A →ₐ[S] A ⊗[R] B 
goal: A →ₐ[S] A ⊗[R] B

full_name: Algebra.TensorProduct.includeLeft_apply
code: @[simp]
theorem includeLeft_apply [SMulCommClass R S A] (a : A) :
    (includeLeft : A →ₐ[S] A ⊗[R] B) a = a ⊗ₜ 1 
goal: Algebra.TensorProduct.includeLeft a = a ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.includeRight
code: /-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
def includeRight : B →ₐ[R] A ⊗[R] B 
goal: B →ₐ[R] A ⊗[R] B

full_name: Algebra.TensorProduct.includeRight_apply
code: @[simp]
theorem includeRight_apply (b : B) : (includeRight : B →ₐ[R] A ⊗[R] B) b = 1 ⊗ₜ b 
goal: Algebra.TensorProduct.includeRight b = 1 ⊗ₜ[R] b

full_name: Algebra.TensorProduct.includeLeftRingHom_comp_algebraMap
code: theorem includeLeftRingHom_comp_algebraMap :
    (includeLeftRingHom.comp (algebraMap R A) : R →+* A ⊗[R] B) =
      includeRight.toRingHom.comp (algebraMap R B) 
goal: Algebra.TensorProduct.includeLeftRingHom.comp (algebraMap R A) =
  Algebra.TensorProduct.includeRight.comp (algebraMap R B)

full_name: Algebra.TensorProduct.ext
code: /-- A version of `TensorProduct.ext` for `AlgHom`.

Using this as the `@[ext]` lemma instead of `Algebra.TensorProduct.ext'` allows `ext` to apply
lemmas specific to `A →ₐ[S] _` and `B →ₐ[R] _`; notably this allows recursion into nested tensor
products of algebras.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem ext ⦃f g : (A ⊗[R] B) →ₐ[S] C⦄
    (ha : f.comp includeLeft = g.comp includeLeft)
    (hb : (f.restrictScalars R).comp includeRight = (g.restrictScalars R).comp includeRight) :
    f = g 
goal: f = g

full_name: Algebra.TensorProduct.ext'
code: theorem ext' {g h : A ⊗[R] B →ₐ[S] C} (H : ∀ a b, g (a ⊗ₜ b) = h (a ⊗ₜ b)) : g = h 
goal: g = h

full_name: Algebra.TensorProduct.instAddCommGroupWithOne
code: instance instAddCommGroupWithOne : AddCommGroupWithOne (A ⊗[R] B) 
goal: AddCommGroupWithOne (A ⊗[R] B)

full_name: Algebra.TensorProduct.intCast_def
code: theorem intCast_def (z : ℤ) : (z : A ⊗[R] B) = (z : A) ⊗ₜ (1 : B) 
goal: ↑z = ↑z ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.instNonUnitalNonAssocRing
code: instance instNonUnitalNonAssocRing : NonUnitalNonAssocRing (A ⊗[R] B) 
goal: NonUnitalNonAssocRing (A ⊗[R] B)

full_name: Algebra.TensorProduct.instNonAssocRing
code: instance instNonAssocRing : NonAssocRing (A ⊗[R] B) 
goal: NonAssocRing (A ⊗[R] B)

full_name: Algebra.TensorProduct.instNonUnitalRing
code: instance instNonUnitalRing : NonUnitalRing (A ⊗[R] B) 
goal: NonUnitalRing (A ⊗[R] B)

full_name: Algebra.TensorProduct.instCommSemiring
code: instance instCommSemiring : CommSemiring (A ⊗[R] B) 
goal: CommSemiring (A ⊗[R] B)

full_name: Algebra.TensorProduct.instRing
code: instance instRing : Ring (A ⊗[R] B) 
goal: Ring (A ⊗[R] B)

full_name: Algebra.TensorProduct.intCast_def'
code: theorem intCast_def' (z : ℤ) : (z : A ⊗[R] B) = (1 : A) ⊗ₜ (z : B) 
goal: ↑z = 1 ⊗ₜ[R] ↑z

full_name: Algebra.TensorProduct.instCommRing
code: instance instCommRing : CommRing (A ⊗[R] B) 
goal: CommRing (A ⊗[R] B)

full_name: Algebra.TensorProduct.rightAlgebra
code: /-- `S ⊗[R] T` has a `T`-algebra structure. This is not a global instance or else the action of
`S` on `S ⊗[R] S` would be ambiguous. -/
abbrev rightAlgebra : Algebra B (A ⊗[R] B) 
goal: Algebra B (A ⊗[R] B)

full_name: Algebra.TensorProduct.right_isScalarTower
code: instance right_isScalarTower : IsScalarTower R B (A ⊗[R] B) 
goal: IsScalarTower R B (A ⊗[R] B)

full_name: Algebra.TensorProduct.algHomOfLinearMapTensorProduct
code: /-- Build an algebra morphism from a linear map out of a tensor product, and evidence that on pure
tensors, it preserves multiplication and the identity.

Note that we state `h_one` using `1 ⊗ₜ[R] 1` instead of `1` so that lemmas about `f` applied to pure
tensors can be directly applied by the caller (without needing `TensorProduct.one_def`).
-/
def algHomOfLinearMapTensorProduct (f : A ⊗[R] B →ₗ[S] C)
    (h_mul : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
    (h_one : f (1 ⊗ₜ[R] 1) = 1) : A ⊗[R] B →ₐ[S] C 
goal: A ⊗[R] B →ₐ[S] C

full_name: Algebra.TensorProduct.algHomOfLinearMapTensorProduct_apply
code: @[simp]
theorem algHomOfLinearMapTensorProduct_apply (f h_mul h_one x) :
    (algHomOfLinearMapTensorProduct f h_mul h_one : A ⊗[R] B →ₐ[S] C) x = f x 
goal: (Algebra.TensorProduct.algHomOfLinearMapTensorProduct f h_mul h_one) x = f x

full_name: Algebra.TensorProduct.algEquivOfLinearEquivTensorProduct
code: /-- Build an algebra equivalence from a linear equivalence out of a tensor product, and evidence
that on pure tensors, it preserves multiplication and the identity.

Note that we state `h_one` using `1 ⊗ₜ[R] 1` instead of `1` so that lemmas about `f` applied to pure
tensors can be directly applied by the caller (without needing `TensorProduct.one_def`).
-/
def algEquivOfLinearEquivTensorProduct (f : A ⊗[R] B ≃ₗ[S] C)
    (h_mul : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
    (h_one : f (1 ⊗ₜ[R] 1) = 1) : A ⊗[R] B ≃ₐ[S] C 
goal: A ⊗[R] B ≃ₐ[S] C

full_name: Algebra.TensorProduct.algEquivOfLinearEquivTensorProduct_apply
code: @[simp]
theorem algEquivOfLinearEquivTensorProduct_apply (f h_mul h_one x) :
    (algEquivOfLinearEquivTensorProduct f h_mul h_one : A ⊗[R] B ≃ₐ[S] C) x = f x 
goal: (Algebra.TensorProduct.algEquivOfLinearEquivTensorProduct f h_mul h_one) x = f x

full_name: Algebra.TensorProduct.algEquivOfLinearEquivTripleTensorProduct
code: /-- Build an algebra equivalence from a linear equivalence out of a triple tensor product,
and evidence of multiplicativity on pure tensors.
-/
def algEquivOfLinearEquivTripleTensorProduct (f : (A ⊗[R] B) ⊗[R] C ≃ₗ[R] D)
    (h_mul :
      ∀ (a₁ a₂ : A) (b₁ b₂ : B) (c₁ c₂ : C),
        f ((a₁ * a₂) ⊗ₜ (b₁ * b₂) ⊗ₜ (c₁ * c₂)) = f (a₁ ⊗ₜ b₁ ⊗ₜ c₁) * f (a₂ ⊗ₜ b₂ ⊗ₜ c₂))
    (h_one : f (((1 : A) ⊗ₜ[R] (1 : B)) ⊗ₜ[R] (1 : C)) = 1) :
    (A ⊗[R] B) ⊗[R] C ≃ₐ[R] D 
goal: (A ⊗[R] B) ⊗[R] C ≃ₐ[R] D

full_name: Algebra.TensorProduct.algEquivOfLinearEquivTripleTensorProduct_apply
code: @[simp]
theorem algEquivOfLinearEquivTripleTensorProduct_apply (f h_mul h_one x) :
    (algEquivOfLinearEquivTripleTensorProduct f h_mul h_one : (A ⊗[R] B) ⊗[R] C ≃ₐ[R] D) x = f x 
goal: (Algebra.TensorProduct.algEquivOfLinearEquivTripleTensorProduct f h_mul h_one) x = f x

full_name: Algebra.TensorProduct.lift
code: /-- The forward direction of the universal property of tensor products of algebras; any algebra
morphism from the tensor product can be factored as the product of two algebra morphisms that
commute.

See `Algebra.TensorProduct.liftEquiv` for the fact that every morphism factors this way. -/
def lift (f : A →ₐ[S] C) (g : B →ₐ[R] C) (hfg : ∀ x y, Commute (f x) (g y)) : (A ⊗[R] B) →ₐ[S] C 
goal: A ⊗[R] B →ₐ[S] C

full_name: Algebra.TensorProduct.lift_tmul
code: @[simp]
theorem lift_tmul (f : A →ₐ[S] C) (g : B →ₐ[R] C) (hfg : ∀ x y, Commute (f x) (g y))
    (a : A) (b : B) :
    lift f g hfg (a ⊗ₜ b) = f a * g b 
goal: (Algebra.TensorProduct.lift f g hfg) (a ⊗ₜ[R] b) = f a * g b

full_name: Algebra.TensorProduct.lift_includeLeft_includeRight
code: @[simp]
theorem lift_includeLeft_includeRight :
    lift includeLeft includeRight (fun a b => (Commute.one_right _).tmul (Commute.one_left _)) =
      .id S (A ⊗[R] B) 
goal: Algebra.TensorProduct.lift Algebra.TensorProduct.includeLeft Algebra.TensorProduct.includeRight ⋯ =
  AlgHom.id S (A ⊗[R] B)

full_name: Algebra.TensorProduct.lift_comp_includeLeft
code: @[simp]
theorem lift_comp_includeLeft (f : A →ₐ[S] C) (g : B →ₐ[R] C) (hfg : ∀ x y, Commute (f x) (g y)) :
    (lift f g hfg).comp includeLeft = f 
goal: (Algebra.TensorProduct.lift f g hfg).comp Algebra.TensorProduct.includeLeft = f

full_name: Algebra.TensorProduct.lift_comp_includeRight
code: @[simp]
theorem lift_comp_includeRight (f : A →ₐ[S] C) (g : B →ₐ[R] C) (hfg : ∀ x y, Commute (f x) (g y)) :
    ((lift f g hfg).restrictScalars R).comp includeRight = g 
goal: (AlgHom.restrictScalars R (Algebra.TensorProduct.lift f g hfg)).comp Algebra.TensorProduct.includeRight = g

full_name: Algebra.TensorProduct.liftEquiv
code: /-- The universal property of the tensor product of algebras.

Pairs of algebra morphisms that commute are equivalent to algebra morphisms from the tensor product.

This is `Algebra.TensorProduct.lift` as an equivalence.

See also `GradedTensorProduct.liftEquiv` for an alternative commutativity requirement for graded
algebra. -/
@[simps]
def liftEquiv : {fg : (A →ₐ[S] C) × (B →ₐ[R] C) // ∀ x y, Commute (fg.1 x) (fg.2 y)}
    ≃ ((A ⊗[R] B) →ₐ[S] C) 
goal: { fg // ∀ (x : A) (y : B), Commute (fg.1 x) (fg.2 y) } ≃ (A ⊗[R] B →ₐ[S] C)

full_name: Algebra.TensorProduct.liftEquiv_apply
code: /-- The universal property of the tensor product of algebras.

Pairs of algebra morphisms that commute are equivalent to algebra morphisms from the tensor product.

This is `Algebra.TensorProduct.lift` as an equivalence.

See also `GradedTensorProduct.liftEquiv` for an alternative commutativity requirement for graded
algebra. -/
@[simps]
def liftEquiv : {fg : (A →ₐ[S] C) × (B →ₐ[R] C) // ∀ x y, Commute (fg.1 x) (fg.2 y)}
    ≃ ((A ⊗[R] B) →ₐ[S] C) 
goal: Algebra.TensorProduct.liftEquiv fg = Algebra.TensorProduct.lift (↑fg).1 (↑fg).2 ⋯

full_name: Algebra.TensorProduct.liftEquiv_symm_apply_coe
code: /-- The universal property of the tensor product of algebras.

Pairs of algebra morphisms that commute are equivalent to algebra morphisms from the tensor product.

This is `Algebra.TensorProduct.lift` as an equivalence.

See also `GradedTensorProduct.liftEquiv` for an alternative commutativity requirement for graded
algebra. -/
@[simps]
def liftEquiv : {fg : (A →ₐ[S] C) × (B →ₐ[R] C) // ∀ x y, Commute (fg.1 x) (fg.2 y)}
    ≃ ((A ⊗[R] B) →ₐ[S] C) 
goal: ↑(Algebra.TensorProduct.liftEquiv.symm f') =
  (f'.comp Algebra.TensorProduct.includeLeft, (AlgHom.restrictScalars R f').comp Algebra.TensorProduct.includeRight)

full_name: Algebra.TensorProduct.lid
code: /-- The base ring is a left identity for the tensor product of algebra, up to algebra isomorphism.
-/
protected nonrec def lid : R ⊗[R] A ≃ₐ[R] A 
goal: R ⊗[R] A ≃ₐ[R] A

full_name: Algebra.TensorProduct.lid_toLinearEquiv
code: @[simp] theorem lid_toLinearEquiv :
    (TensorProduct.lid R A).toLinearEquiv = _root_.TensorProduct.lid R A 
goal: (Algebra.TensorProduct.lid R A).toLinearEquiv = TensorProduct.lid R A

full_name: Algebra.TensorProduct.lid_tmul
code: @[simp]
theorem lid_tmul (r : R) (a : A) : TensorProduct.lid R A (r ⊗ₜ a) = r • a 
goal: (Algebra.TensorProduct.lid R A) (r ⊗ₜ[R] a) = r • a

full_name: Algebra.TensorProduct.lid_symm_apply
code: @[simp]
theorem lid_symm_apply (a : A) : (TensorProduct.lid R A).symm a = 1 ⊗ₜ a 
goal: (Algebra.TensorProduct.lid R A).symm a = 1 ⊗ₜ[R] a

full_name: Algebra.TensorProduct.rid
code: /-- The base ring is a right identity for the tensor product of algebra, up to algebra isomorphism.

Note that if `A` is commutative this can be instantiated with `S = A`.
-/
protected nonrec def rid : A ⊗[R] R ≃ₐ[S] A 
goal: A ⊗[R] R ≃ₐ[S] A

full_name: Algebra.TensorProduct.rid_toLinearEquiv
code: @[simp] theorem rid_toLinearEquiv :
    (TensorProduct.rid R S A).toLinearEquiv = AlgebraTensorModule.rid R S A 
goal: (Algebra.TensorProduct.rid R S A).toLinearEquiv = TensorProduct.AlgebraTensorModule.rid R S A

full_name: Algebra.TensorProduct.rid_tmul
code: @[simp]
theorem rid_tmul (r : R) (a : A) : TensorProduct.rid R S A (a ⊗ₜ r) = r • a 
goal: (Algebra.TensorProduct.rid R S A) (a ⊗ₜ[R] r) = r • a

full_name: Algebra.TensorProduct.rid_symm_apply
code: @[simp]
theorem rid_symm_apply (a : A) : (TensorProduct.rid R S A).symm a = a ⊗ₜ 1 
goal: (Algebra.TensorProduct.rid R S A).symm a = a ⊗ₜ[R] 1

full_name: Algebra.TensorProduct.comm
code: /-- The tensor product of R-algebras is commutative, up to algebra isomorphism.
-/
protected def comm : A ⊗[R] B ≃ₐ[R] B ⊗[R] A 
goal: A ⊗[R] B ≃ₐ[R] B ⊗[R] A

full_name: Algebra.TensorProduct.comm_toLinearEquiv
code: @[simp] theorem comm_toLinearEquiv :
    (Algebra.TensorProduct.comm R A B).toLinearEquiv = _root_.TensorProduct.comm R A B 
goal: (Algebra.TensorProduct.comm R A B).toLinearEquiv = TensorProduct.comm R A B

full_name: Algebra.TensorProduct.comm_tmul
code: @[simp]
theorem comm_tmul (a : A) (b : B) :
    TensorProduct.comm R A B (a ⊗ₜ b) = b ⊗ₜ a 
goal: (Algebra.TensorProduct.comm R A B) (a ⊗ₜ[R] b) = b ⊗ₜ[R] a

full_name: Algebra.TensorProduct.comm_symm_tmul
code: @[simp]
theorem comm_symm_tmul (a : A) (b : B) :
    (TensorProduct.comm R A B).symm (b ⊗ₜ a) = a ⊗ₜ b 
goal: (Algebra.TensorProduct.comm R A B).symm (b ⊗ₜ[R] a) = a ⊗ₜ[R] b

full_name: Algebra.TensorProduct.comm_symm
code: theorem comm_symm :
    (TensorProduct.comm R A B).symm = TensorProduct.comm R B A 
goal: (Algebra.TensorProduct.comm R A B).symm = Algebra.TensorProduct.comm R B A

full_name: Algebra.TensorProduct.adjoin_tmul_eq_top
code: theorem adjoin_tmul_eq_top : adjoin R { t : A ⊗[R] B | ∃ a b, a ⊗ₜ[R] b = t } = ⊤ 
goal: Algebra.adjoin R {t | ∃ a b, a ⊗ₜ[R] b = t} = ⊤

full_name: Algebra.TensorProduct.assoc_aux_1
code: theorem assoc_aux_1 (a₁ a₂ : A) (b₁ b₂ : B) (c₁ c₂ : C) :
    (TensorProduct.assoc R A B C) (((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) ⊗ₜ[R] (c₁ * c₂)) =
      (TensorProduct.assoc R A B C) ((a₁ ⊗ₜ[R] b₁) ⊗ₜ[R] c₁) *
        (TensorProduct.assoc R A B C) ((a₂ ⊗ₜ[R] b₂) ⊗ₜ[R] c₂) 
goal: (TensorProduct.assoc R A B C) (((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) ⊗ₜ[R] (c₁ * c₂)) =
  (TensorProduct.assoc R A B C) ((a₁ ⊗ₜ[R] b₁) ⊗ₜ[R] c₁) * (TensorProduct.assoc R A B C) ((a₂ ⊗ₜ[R] b₂) ⊗ₜ[R] c₂)

full_name: Algebra.TensorProduct.assoc_aux_2
code: theorem assoc_aux_2 : (TensorProduct.assoc R A B C) ((1 ⊗ₜ[R] 1) ⊗ₜ[R] 1) = 1 
goal: (TensorProduct.assoc R A B C) ((1 ⊗ₜ[R] 1) ⊗ₜ[R] 1) = 1

full_name: Algebra.TensorProduct.assoc
code: /-- The associator for tensor product of R-algebras, as an algebra isomorphism. -/
protected def assoc : (A ⊗[R] B) ⊗[R] C ≃ₐ[R] A ⊗[R] B ⊗[R] C 
goal: (A ⊗[R] B) ⊗[R] C ≃ₐ[R] A ⊗[R] B ⊗[R] C

full_name: Algebra.TensorProduct.assoc_toLinearEquiv
code: @[simp] theorem assoc_toLinearEquiv :
  (Algebra.TensorProduct.assoc R A B C).toLinearEquiv = _root_.TensorProduct.assoc R A B C 
goal: (Algebra.TensorProduct.assoc R A B C).toLinearEquiv = TensorProduct.assoc R A B C

full_name: Algebra.TensorProduct.assoc_tmul
code: @[simp]
theorem assoc_tmul (a : A) (b : B) (c : C) :
    Algebra.TensorProduct.assoc R A B C ((a ⊗ₜ b) ⊗ₜ c) = a ⊗ₜ (b ⊗ₜ c) 
goal: (Algebra.TensorProduct.assoc R A B C) ((a ⊗ₜ[R] b) ⊗ₜ[R] c) = a ⊗ₜ[R] b ⊗ₜ[R] c

full_name: Algebra.TensorProduct.assoc_symm_tmul
code: @[simp]
theorem assoc_symm_tmul (a : A) (b : B) (c : C) :
    (Algebra.TensorProduct.assoc R A B C).symm (a ⊗ₜ (b ⊗ₜ c)) = (a ⊗ₜ b) ⊗ₜ c 
goal: (Algebra.TensorProduct.assoc R A B C).symm (a ⊗ₜ[R] b ⊗ₜ[R] c) = (a ⊗ₜ[R] b) ⊗ₜ[R] c

full_name: Algebra.TensorProduct.map
code: /-- The tensor product of a pair of algebra morphisms. -/
def map (f : A →ₐ[S] B) (g : C →ₐ[R] D) : A ⊗[R] C →ₐ[S] B ⊗[R] D 
goal: A ⊗[R] C →ₐ[S] B ⊗[R] D

full_name: Algebra.TensorProduct.map_tmul
code: @[simp]
theorem map_tmul (f : A →ₐ[S] B) (g : C →ₐ[R] D) (a : A) (c : C) : map f g (a ⊗ₜ c) = f a ⊗ₜ g c 
goal: (Algebra.TensorProduct.map f g) (a ⊗ₜ[R] c) = f a ⊗ₜ[R] g c

full_name: Algebra.TensorProduct.map_id
code: @[simp]
theorem map_id : map (.id S A) (.id R C) = .id S _ 
goal: Algebra.TensorProduct.map (AlgHom.id S A) (AlgHom.id R C) = AlgHom.id S (A ⊗[R] C)

full_name: Algebra.TensorProduct.map_comp
code: theorem map_comp (f₂ : B →ₐ[S] C) (f₁ : A →ₐ[S] B) (g₂ : E →ₐ[R] F) (g₁ : D →ₐ[R] E) :
    map (f₂.comp f₁) (g₂.comp g₁) = (map f₂ g₂).comp (map f₁ g₁) 
goal: Algebra.TensorProduct.map (f₂.comp f₁) (g₂.comp g₁) =
  (Algebra.TensorProduct.map f₂ g₂).comp (Algebra.TensorProduct.map f₁ g₁)

full_name: Algebra.TensorProduct.map_comp_includeLeft
code: @[simp]
theorem map_comp_includeLeft (f : A →ₐ[S] B) (g : C →ₐ[R] D) :
    (map f g).comp includeLeft = includeLeft.comp f 
goal: (Algebra.TensorProduct.map f g).comp Algebra.TensorProduct.includeLeft = Algebra.TensorProduct.includeLeft.comp f

full_name: Algebra.TensorProduct.map_restrictScalars_comp_includeRight
code: @[simp]
theorem map_restrictScalars_comp_includeRight (f : A →ₐ[S] B) (g : C →ₐ[R] D) :
    ((map f g).restrictScalars R).comp includeRight = includeRight.comp g 
goal: (AlgHom.restrictScalars R (Algebra.TensorProduct.map f g)).comp Algebra.TensorProduct.includeRight =
  Algebra.TensorProduct.includeRight.comp g

full_name: Algebra.TensorProduct.map_comp_includeRight
code: @[simp]
theorem map_comp_includeRight (f : A →ₐ[R] B) (g : C →ₐ[R] D) :
    (map f g).comp includeRight = includeRight.comp g 
goal: (Algebra.TensorProduct.map f g).comp Algebra.TensorProduct.includeRight = Algebra.TensorProduct.includeRight.comp g

full_name: Algebra.TensorProduct.map_range
code: theorem map_range (f : A →ₐ[R] B) (g : C →ₐ[R] D) :
    (map f g).range = (includeLeft.comp f).range ⊔ (includeRight.comp g).range 
goal: (Algebra.TensorProduct.map f g).range =
  (Algebra.TensorProduct.includeLeft.comp f).range ⊔ (Algebra.TensorProduct.includeRight.comp g).range

full_name: Algebra.TensorProduct.congr
code: /-- Construct an isomorphism between tensor products of an S-algebra with an R-algebra
from S- and R- isomorphisms between the tensor factors.
-/
def congr (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) : A ⊗[R] C ≃ₐ[S] B ⊗[R] D 
goal: A ⊗[R] C ≃ₐ[S] B ⊗[R] D

full_name: Algebra.TensorProduct.congr_toLinearEquiv
code: @[simp] theorem congr_toLinearEquiv (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) :
    (Algebra.TensorProduct.congr f g).toLinearEquiv =
      TensorProduct.AlgebraTensorModule.congr f.toLinearEquiv g.toLinearEquiv 
goal: (Algebra.TensorProduct.congr f g).toLinearEquiv =
  TensorProduct.AlgebraTensorModule.congr f.toLinearEquiv g.toLinearEquiv

full_name: Algebra.TensorProduct.congr_apply
code: @[simp]
theorem congr_apply (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) (x) :
    congr f g x = (map (f : A →ₐ[S] B) (g : C →ₐ[R] D)) x 
goal: (Algebra.TensorProduct.congr f g) x = (Algebra.TensorProduct.map ↑f ↑g) x

full_name: Algebra.TensorProduct.congr_symm_apply
code: @[simp]
theorem congr_symm_apply (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) (x) :
    (congr f g).symm x = (map (f.symm : B →ₐ[S] A) (g.symm : D →ₐ[R] C)) x 
goal: (Algebra.TensorProduct.congr f g).symm x = (Algebra.TensorProduct.map ↑f.symm ↑g.symm) x

full_name: Algebra.TensorProduct.congr_refl
code: @[simp]
theorem congr_refl : congr (.refl : A ≃ₐ[S] A) (.refl : C ≃ₐ[R] C) = .refl 
goal: Algebra.TensorProduct.congr AlgEquiv.refl AlgEquiv.refl = AlgEquiv.refl

full_name: Algebra.TensorProduct.congr_trans
code: theorem congr_trans (f₁ : A ≃ₐ[S] B) (f₂ : B ≃ₐ[S] C) (g₁ : D ≃ₐ[R] E) (g₂ : E ≃ₐ[R] F) :
    congr (f₁.trans f₂) (g₁.trans g₂) = (congr f₁ g₁).trans (congr f₂ g₂) 
goal: Algebra.TensorProduct.congr (f₁.trans f₂) (g₁.trans g₂) =
  (Algebra.TensorProduct.congr f₁ g₁).trans (Algebra.TensorProduct.congr f₂ g₂)

full_name: Algebra.TensorProduct.congr_symm
code: theorem congr_symm (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) : congr f.symm g.symm = (congr f g).symm 
goal: Algebra.TensorProduct.congr f.symm g.symm = (Algebra.TensorProduct.congr f g).symm

full_name: Algebra.TensorProduct.productLeftAlgHom
code: /-- If `A`, `B`, `C` are `R`-algebras, `A` and `C` are also `S`-algebras (forming a tower as
`·/S/R`), then the product map of `f : A →ₐ[S] C` and `g : B →ₐ[R] C` is an `S`-algebra
homomorphism.

This is just a special case of `Algebra.TensorProduct.lift` for when `C` is commutative. -/
abbrev productLeftAlgHom (f : A →ₐ[S] C) (g : B →ₐ[R] C) : A ⊗[R] B →ₐ[S] C 
goal: A ⊗[R] B →ₐ[S] C

full_name: Algebra.TensorProduct.lmul'
code: /-- `LinearMap.mul'` is an `AlgHom` on commutative rings. -/
def lmul' : S ⊗[R] S →ₐ[R] S 
goal: S ⊗[R] S →ₐ[R] S

full_name: Algebra.TensorProduct.lmul'_toLinearMap
code: theorem lmul'_toLinearMap : (lmul' R : _ →ₐ[R] S).toLinearMap = LinearMap.mul' R S 
goal: (Algebra.TensorProduct.lmul' R).toLinearMap = LinearMap.mul' R S

full_name: Algebra.TensorProduct.lmul'_apply_tmul
code: @[simp]
theorem lmul'_apply_tmul (a b : S) : lmul' (S := S) R (a ⊗ₜ[R] b) = a * b 
goal: (Algebra.TensorProduct.lmul' R) (a ⊗ₜ[R] b) = a * b

full_name: Algebra.TensorProduct.lmul'_comp_includeLeft
code: @[simp]
theorem lmul'_comp_includeLeft : (lmul' R : _ →ₐ[R] S).comp includeLeft = AlgHom.id R S 
goal: (Algebra.TensorProduct.lmul' R).comp Algebra.TensorProduct.includeLeft = AlgHom.id R S

full_name: Algebra.TensorProduct.lmul'_comp_includeRight
code: @[simp]
theorem lmul'_comp_includeRight : (lmul' R : _ →ₐ[R] S).comp includeRight = AlgHom.id R S 
goal: (Algebra.TensorProduct.lmul' R).comp Algebra.TensorProduct.includeRight = AlgHom.id R S

full_name: Algebra.TensorProduct.productMap
code: /-- If `S` is commutative, for a pair of morphisms `f : A →ₐ[R] S`, `g : B →ₐ[R] S`,
We obtain a map `A ⊗[R] B →ₐ[R] S` that commutes with `f`, `g` via `a ⊗ b ↦ f(a) * g(b)`.

This is a special case of `Algebra.TensorProduct.productLeftAlgHom` for when the two base rings are
the same.
-/
def productMap : A ⊗[R] B →ₐ[R] S 
goal: A ⊗[R] B →ₐ[R] S

full_name: Algebra.TensorProduct.productMap_eq_comp_map
code: theorem productMap_eq_comp_map : productMap f g = (lmul' R).comp (TensorProduct.map f g) 
goal: Algebra.TensorProduct.productMap f g = (Algebra.TensorProduct.lmul' R).comp (Algebra.TensorProduct.map f g)

full_name: Algebra.TensorProduct.productMap_apply_tmul
code: @[simp]
theorem productMap_apply_tmul (a : A) (b : B) : productMap f g (a ⊗ₜ b) = f a * g b 
goal: (Algebra.TensorProduct.productMap f g) (a ⊗ₜ[R] b) = f a * g b

full_name: Algebra.TensorProduct.productMap_left_apply
code: theorem productMap_left_apply (a : A) : productMap f g (a ⊗ₜ 1) = f a 
goal: (Algebra.TensorProduct.productMap f g) (a ⊗ₜ[R] 1) = f a

full_name: Algebra.TensorProduct.productMap_left
code: @[simp]
theorem productMap_left : (productMap f g).comp includeLeft = f 
goal: (Algebra.TensorProduct.productMap f g).comp Algebra.TensorProduct.includeLeft = f

full_name: Algebra.TensorProduct.productMap_right_apply
code: theorem productMap_right_apply (b : B) :
    productMap f g (1 ⊗ₜ b) = g b 
goal: (Algebra.TensorProduct.productMap f g) (1 ⊗ₜ[R] b) = g b

full_name: Algebra.TensorProduct.productMap_right
code: @[simp]
theorem productMap_right : (productMap f g).comp includeRight = g 
goal: (Algebra.TensorProduct.productMap f g).comp Algebra.TensorProduct.includeRight = g

full_name: Algebra.TensorProduct.productMap_range
code: theorem productMap_range : (productMap f g).range = f.range ⊔ g.range 
goal: (Algebra.TensorProduct.productMap f g).range = f.range ⊔ g.range

full_name: Algebra.TensorProduct.basisAux
code: /-- Given an `R`-algebra `A` and an `R`-basis of `M`, this is an `R`-linear isomorphism
`A ⊗[R] M ≃ (ι →₀ A)` (which is in fact `A`-linear). -/
noncomputable def basisAux : A ⊗[R] M ≃ₗ[R] ι →₀ A 
goal: A ⊗[R] M ≃ₗ[R] ι →₀ A

full_name: Algebra.TensorProduct.basisAux_tmul
code: theorem basisAux_tmul (a : A) (m : M) :
    basisAux A b (a ⊗ₜ m) = a • Finsupp.mapRange (algebraMap R A) (map_zero _) (b.repr m) 
goal: (Algebra.TensorProduct.basisAux A b) (a ⊗ₜ[R] m) = a • Finsupp.mapRange ⇑(algebraMap R A) ⋯ (b.repr m)

full_name: Algebra.TensorProduct.basisAux_map_smul
code: theorem basisAux_map_smul (a : A) (x : A ⊗[R] M) : basisAux A b (a • x) = a • basisAux A b x 
goal: (Algebra.TensorProduct.basisAux A b) (a • x) = a • (Algebra.TensorProduct.basisAux A b) x

full_name: Algebra.TensorProduct.basis
code: /-- Given a `R`-algebra `A`, this is the `A`-basis of `A ⊗[R] M` induced by a `R`-basis of `M`. -/
noncomputable def basis : Basis ι A (A ⊗[R] M) 
goal: Basis ι A (A ⊗[R] M)

full_name: Algebra.TensorProduct.basis_repr_tmul
code: @[simp]
theorem basis_repr_tmul (a : A) (m : M) :
    (basis A b).repr (a ⊗ₜ m) = a • Finsupp.mapRange (algebraMap R A) (map_zero _) (b.repr m) 
goal: (Algebra.TensorProduct.basis A b).repr (a ⊗ₜ[R] m) = a • Finsupp.mapRange ⇑(algebraMap R A) ⋯ (b.repr m)

full_name: Algebra.TensorProduct.basis_repr_symm_apply
code: theorem basis_repr_symm_apply (a : A) (i : ι) :
    (basis A b).repr.symm (Finsupp.single i a) = a ⊗ₜ b.repr.symm (Finsupp.single i 1) 
goal: (Algebra.TensorProduct.basis A b).repr.symm (Finsupp.single i a) = a ⊗ₜ[R] b.repr.symm (Finsupp.single i 1)

full_name: Algebra.TensorProduct.basis_apply
code: @[simp]
theorem basis_apply (i : ι) : basis A b i = 1 ⊗ₜ b i 
goal: (Algebra.TensorProduct.basis A b) i = 1 ⊗ₜ[R] b i

full_name: Algebra.TensorProduct.basis_repr_symm_apply'
code: theorem basis_repr_symm_apply' (a : A) (i : ι) : a • basis A b i = a ⊗ₜ b i 
goal: a • (Algebra.TensorProduct.basis A b) i = a ⊗ₜ[R] b i

full_name: Basis.baseChange_linearMap
code: lemma _root_.Basis.baseChange_linearMap (b : Basis ι R M) (b' : Basis ι' R N) (ij : ι × ι') :
    baseChange A (b'.linearMap b ij) = (basis A b').linearMap (basis A b) ij 
goal: LinearMap.baseChange A ((b'.linearMap b) ij) =
  ((Algebra.TensorProduct.basis A b').linearMap (Algebra.TensorProduct.basis A b)) ij

full_name: Basis.baseChange_end
code: lemma _root_.Basis.baseChange_end (b : Basis ι R M) (ij : ι × ι) :
    baseChange A (b.end ij) = (basis A b).end ij 
goal: LinearMap.baseChange A (b.end ij) = (Algebra.TensorProduct.basis A b).end ij

full_name: Algebra.TensorProduct.instFreeTensorProduct
code: instance (R A M : Type*)
    [CommSemiring R] [AddCommMonoid M] [Module R M] [Module.Free R M]
    [CommSemiring A] [Algebra R A] :
    Module.Free A (A ⊗[R] M) 
goal: Module.Free A (A ⊗[R] M)

full_name: LinearMap.toMatrix_baseChange
code: @[simp]
lemma toMatrix_baseChange (f : M₁ →ₗ[R] M₂) (b₁ : Basis ι R M₁) (b₂ : Basis ι₂ R M₂) :
    toMatrix (basis A b₁) (basis A b₂) (f.baseChange A) =
    (toMatrix b₁ b₂ f).map (algebraMap R A) 
goal: (LinearMap.toMatrix (Algebra.TensorProduct.basis A b₁) (Algebra.TensorProduct.basis A b₂)) (LinearMap.baseChange A f) =
  ((LinearMap.toMatrix b₁ b₂) f).map ⇑(algebraMap R A)

full_name: LinearMap.tensorProduct_apply
code: /-- The natural linear map $A ⊗ \text{Hom}_R(M, N) → \text{Hom}_A (M_A, N_A)$,
where $M_A$ and $N_A$ are the respective modules over $A$ obtained by extension of scalars.

See `LinearMap.tensorProductEnd` for this map specialized to endomorphisms,
and bundled as `A`-algebra homomorphism. -/
@[simps!]
noncomputable
def tensorProduct : A ⊗[R] (M →ₗ[R] N) →ₗ[A] (A ⊗[R] M) →ₗ[A] (A ⊗[R] N) 
goal: ∀ (a : A ⊗[R] (M →ₗ[R] N)),
  (LinearMap.tensorProduct R A M N) a =
    (TensorProduct.liftAux
        (↑R { toFun := fun a => a • LinearMap.baseChangeHom R A M N, map_add' := ⋯, map_smul' := ⋯ }))
      a

full_name: LinearMap.tensorProduct
code: /-- The natural linear map $A ⊗ \text{Hom}_R(M, N) → \text{Hom}_A (M_A, N_A)$,
where $M_A$ and $N_A$ are the respective modules over $A$ obtained by extension of scalars.

See `LinearMap.tensorProductEnd` for this map specialized to endomorphisms,
and bundled as `A`-algebra homomorphism. -/
@[simps!]
noncomputable
def tensorProduct : A ⊗[R] (M →ₗ[R] N) →ₗ[A] (A ⊗[R] M) →ₗ[A] (A ⊗[R] N) 
goal: A ⊗[R] (M →ₗ[R] N) →ₗ[A] A ⊗[R] M →ₗ[A] A ⊗[R] N

full_name: LinearMap.tensorProductEnd
code: /-- The natural `A`-algebra homomorphism $A ⊗ (\text{End}_R M) → \text{End}_A (A ⊗ M)$,
where `M` is an `R`-module, and `A` an `R`-algebra. -/
@[simps!]
noncomputable
def tensorProductEnd : A ⊗[R] (End R M) →ₐ[A] End A (A ⊗[R] M) 
goal: A ⊗[R] Module.End R M →ₐ[A] Module.End A (A ⊗[R] M)

full_name: LinearMap.tensorProductEnd_apply
code: /-- The natural `A`-algebra homomorphism $A ⊗ (\text{End}_R M) → \text{End}_A (A ⊗ M)$,
where `M` is an `R`-module, and `A` an `R`-algebra. -/
@[simps!]
noncomputable
def tensorProductEnd : A ⊗[R] (End R M) →ₐ[A] End A (A ⊗[R] M) 
goal: (LinearMap.tensorProductEnd R A M) a =
  (TensorProduct.liftAux (↑R { toFun := fun a => a • LinearMap.baseChangeHom R A M M, map_add' := ⋯, map_smul' := ⋯ }))
    a

full_name: Module.endTensorEndAlgHom
code: /-- The algebra homomorphism from `End M ⊗ End N` to `End (M ⊗ N)` sending `f ⊗ₜ g` to
the `TensorProduct.map f g`, the tensor product of the two maps.

This is an `AlgHom` version of `TensorProduct.AlgebraTensorModule.homTensorHomMap`. Like that
definition, this is generalized across many different rings; namely a tower of algebras `A/S/R`. -/
def endTensorEndAlgHom : End A M ⊗[R] End R N →ₐ[S] End A (M ⊗[R] N) 
goal: Module.End A M ⊗[R] Module.End R N →ₐ[S] Module.End A (M ⊗[R] N)

full_name: Module.endTensorEndAlgHom_apply
code: theorem endTensorEndAlgHom_apply (f : End A M) (g : End R N) :
    endTensorEndAlgHom (R := R) (S := S) (A := A) (M := M) (N := N) (f ⊗ₜ[R] g)
      = AlgebraTensorModule.map f g 
goal: Module.endTensorEndAlgHom (f ⊗ₜ[R] g) = TensorProduct.AlgebraTensorModule.map f g

full_name: Subalgebra.finite_sup
code: theorem Subalgebra.finite_sup {K L : Type*} [CommSemiring K] [CommSemiring L] [Algebra K L]
    (E1 E2 : Subalgebra K L) [Module.Finite K E1] [Module.Finite K E2] :
    Module.Finite K ↥(E1 ⊔ E2) 
goal: Module.Finite K ↥(E1 ⊔ E2)

full_name: Subalgebra.finiteDimensional_sup
code: @[deprecated Subalgebra.finite_sup (since := "2024-04-11")]
theorem Subalgebra.finiteDimensional_sup {K L : Type*} [Field K] [CommRing L] [Algebra K L]
    (E1 E2 : Subalgebra K L) [FiniteDimensional K E1] [FiniteDimensional K E2] :
    FiniteDimensional K (E1 ⊔ E2 : Subalgebra K L) 
goal: FiniteDimensional K ↥(E1 ⊔ E2)

full_name: TensorProduct.Algebra.moduleAux
code: /-- An auxiliary definition, used for constructing the `Module (A ⊗[R] B) M` in
`TensorProduct.Algebra.module` below. -/
def moduleAux : A ⊗[R] B →ₗ[R] M →ₗ[R] M 
goal: A ⊗[R] B →ₗ[R] M →ₗ[R] M

full_name: TensorProduct.Algebra.moduleAux_apply
code: theorem moduleAux_apply (a : A) (b : B) (m : M) : moduleAux (a ⊗ₜ[R] b) m = a • b • m 
goal: (TensorProduct.Algebra.moduleAux (a ⊗ₜ[R] b)) m = a • b • m

full_name: TensorProduct.Algebra.module
code: /-- If `M` is a representation of two different `R`-algebras `A` and `B` whose actions commute,
then it is a representation the `R`-algebra `A ⊗[R] B`.

An important example arises from a semiring `S`; allowing `S` to act on itself via left and right
multiplication, the roles of `R`, `A`, `B`, `M` are played by `ℕ`, `S`, `Sᵐᵒᵖ`, `S`. This example
is important because a submodule of `S` as a `Module` over `S ⊗[ℕ] Sᵐᵒᵖ` is a two-sided ideal.

NB: This is not an instance because in the case `B = A` and `M = A ⊗[R] A` we would have a diamond
of `smul` actions. Furthermore, this would not be a mere definitional diamond but a true
mathematical diamond in which `A ⊗[R] A` had two distinct scalar actions on itself: one from its
multiplication, and one from this would-be instance. Arguably we could live with this but in any
case the real fix is to address the ambiguity in notation, probably along the lines outlined here:
https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.234773.20base.20change/near/240929258
-/
protected def module : Module (A ⊗[R] B) M 
goal: Module (A ⊗[R] B) M

full_name: TensorProduct.Algebra.smul_def
code: theorem smul_def (a : A) (b : B) (m : M) : a ⊗ₜ[R] b • m = a • b • m 
goal: a ⊗ₜ[R] b • m = a • b • m