Module docstring
{"# Bases and dimensionality of tensor products of modules
This file defines various bases on the tensor product of modules, and shows that the tensor product of free modules is again free. "}
{"# Bases and dimensionality of tensor products of modules
This file defines various bases on the tensor product of modules, and shows that the tensor product of free modules is again free. "}
Basis.tensorProduct
definition
(b : Basis ι S M) (c : Basis κ R N) : Basis (ι × κ) S (M ⊗[R] N)
/-- If `b : ι → M` and `c : κ → N` are bases then so is `fun i ↦ b i.1 ⊗ₜ c i.2 : ι × κ → M ⊗ N`. -/
def Basis.tensorProduct (b : Basis ι S M) (c : Basis κ R N) :
Basis (ι × κ) S (M ⊗[R] N) :=
Finsupp.basisSingleOne.map
((TensorProduct.AlgebraTensorModule.congr b.repr c.repr).trans <|
(finsuppTensorFinsupp R S _ _ _ _).trans <|
Finsupp.lcongr (Equiv.refl _) (TensorProduct.AlgebraTensorModule.rid R S S)).symm
Basis.tensorProduct_apply
theorem
(b : Basis ι S M) (c : Basis κ R N) (i : ι) (j : κ) : Basis.tensorProduct b c (i, j) = b i ⊗ₜ c j
@[simp]
theorem Basis.tensorProduct_apply (b : Basis ι S M) (c : Basis κ R N) (i : ι) (j : κ) :
Basis.tensorProduct b c (i, j) = b i ⊗ₜ c j := by
simp [Basis.tensorProduct]
Basis.tensorProduct_apply'
theorem
(b : Basis ι S M) (c : Basis κ R N) (i : ι × κ) : Basis.tensorProduct b c i = b i.1 ⊗ₜ c i.2
theorem Basis.tensorProduct_apply' (b : Basis ι S M) (c : Basis κ R N) (i : ι × κ) :
Basis.tensorProduct b c i = b i.1 ⊗ₜ c i.2 := by
simp [Basis.tensorProduct]
Basis.tensorProduct_repr_tmul_apply
theorem
(b : Basis ι S M) (c : Basis κ R N) (m : M) (n : N) (i : ι) (j : κ) :
(Basis.tensorProduct b c).repr (m ⊗ₜ n) (i, j) = c.repr n j • b.repr m i
@[simp]
theorem Basis.tensorProduct_repr_tmul_apply (b : Basis ι S M) (c : Basis κ R N) (m : M) (n : N)
(i : ι) (j : κ) :
(Basis.tensorProduct b c).repr (m ⊗ₜ n) (i, j) = c.repr n j • b.repr m i := by
simp [Basis.tensorProduct, mul_comm]
Basis.baseChange
definition
(b : Basis ι R M) : Basis ι S (S ⊗[R] M)
/-- The lift of an `R`-basis of `M` to an `S`-basis of the base change `S ⊗[R] M`. -/
noncomputable
def Basis.baseChange (b : Basis ι R M) : Basis ι S (S ⊗[R] M) :=
((Basis.singleton Unit S).tensorProduct b).reindex (Equiv.punitProd ι)
Basis.baseChange_repr_tmul
theorem
(b : Basis ι R M) (x y i) : (b.baseChange S).repr (x ⊗ₜ y) i = b.repr y i • x
@[simp]
lemma Basis.baseChange_repr_tmul (b : Basis ι R M) (x y i) :
(b.baseChange S).repr (x ⊗ₜ y) i = b.repr y i • x := by
simp [Basis.baseChange, Basis.tensorProduct]
Basis.baseChange_apply
theorem
(b : Basis ι R M) (i) : b.baseChange S i = 1 ⊗ₜ b i
@[simp]
lemma Basis.baseChange_apply (b : Basis ι R M) (i) :
b.baseChange S i = 1 ⊗ₜ b i := by
simp [Basis.baseChange, Basis.tensorProduct]
TensorProduct.equivFinsuppOfBasisRight
definition
: M ⊗[R] N ≃ₗ[R] κ →₀ M
/--
If `{𝒞ᵢ}` is a basis for the module `N`, then every elements of `x ∈ M ⊗ N` can be uniquely written
as `∑ᵢ mᵢ ⊗ 𝒞ᵢ` for some `mᵢ ∈ M`.
-/
def TensorProduct.equivFinsuppOfBasisRight : M ⊗[R] NM ⊗[R] N ≃ₗ[R] κ →₀ M :=
LinearEquiv.lTensorLinearEquiv.lTensor M 𝒞.repr ≪≫ₗ TensorProduct.finsuppScalarRight R M κ
TensorProduct.equivFinsuppOfBasisRight_apply_tmul
theorem
(m : M) (n : N) : (TensorProduct.equivFinsuppOfBasisRight 𝒞) (m ⊗ₜ n) = (𝒞.repr n).mapRange (· • m) (zero_smul _ _)
@[simp]
lemma TensorProduct.equivFinsuppOfBasisRight_apply_tmul (m : M) (n : N) :
(TensorProduct.equivFinsuppOfBasisRight 𝒞) (m ⊗ₜ n) =
(𝒞.repr n).mapRange (· • m) (zero_smul _ _) := by
ext; simp [equivFinsuppOfBasisRight]
TensorProduct.equivFinsuppOfBasisRight_apply_tmul_apply
theorem
(m : M) (n : N) (i : κ) : (TensorProduct.equivFinsuppOfBasisRight 𝒞) (m ⊗ₜ n) i = 𝒞.repr n i • m
lemma TensorProduct.equivFinsuppOfBasisRight_apply_tmul_apply
(m : M) (n : N) (i : κ) :
(TensorProduct.equivFinsuppOfBasisRight 𝒞) (m ⊗ₜ n) i =
𝒞.repr n i • m := by
simp only [equivFinsuppOfBasisRight_apply_tmul, Finsupp.mapRange_apply]
TensorProduct.equivFinsuppOfBasisRight_symm
theorem
:
(TensorProduct.equivFinsuppOfBasisRight 𝒞).symm.toLinearMap =
Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N).flip (𝒞 i)
lemma TensorProduct.equivFinsuppOfBasisRight_symm :
(TensorProduct.equivFinsuppOfBasisRight 𝒞).symm.toLinearMap =
Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N).flip (𝒞 i) := by
ext; simp [equivFinsuppOfBasisRight]
TensorProduct.equivFinsuppOfBasisRight_symm_apply
theorem
(b : κ →₀ M) : (TensorProduct.equivFinsuppOfBasisRight 𝒞).symm b = b.sum fun i m ↦ m ⊗ₜ 𝒞 i
@[simp]
lemma TensorProduct.equivFinsuppOfBasisRight_symm_apply (b : κ →₀ M) :
(TensorProduct.equivFinsuppOfBasisRight 𝒞).symm b = b.sum fun i m ↦ m ⊗ₜ 𝒞 i :=
congr($(TensorProduct.equivFinsuppOfBasisRight_symm 𝒞) b)
TensorProduct.sum_tmul_basis_right_injective
theorem
: Function.Injective (Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N).flip (𝒞 i))
lemma TensorProduct.sum_tmul_basis_right_injective :
Function.Injective (Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N).flip (𝒞 i)) :=
have := Classical.decEq κ
(equivFinsuppOfBasisRight_symm (M := M) 𝒞).symm ▸
(TensorProduct.equivFinsuppOfBasisRight 𝒞).symm.injective
TensorProduct.sum_tmul_basis_right_eq_zero
theorem
(b : κ →₀ M) (h : (b.sum fun i m ↦ m ⊗ₜ[R] 𝒞 i) = 0) : b = 0
lemma TensorProduct.sum_tmul_basis_right_eq_zero
(b : κ →₀ M) (h : (b.sum fun i m ↦ m ⊗ₜ[R] 𝒞 i) = 0) : b = 0 :=
have := Classical.decEq κ
(TensorProduct.equivFinsuppOfBasisRight 𝒞).symm.injective (a₂ := 0) <| by simpa
TensorProduct.equivFinsuppOfBasisLeft
definition
: M ⊗[R] N ≃ₗ[R] ι →₀ N
/--
If `{ℬᵢ}` is a basis for the module `M`, then every elements of `x ∈ M ⊗ N` can be uniquely written
as `∑ᵢ ℬᵢ ⊗ nᵢ` for some `nᵢ ∈ N`.
-/
def TensorProduct.equivFinsuppOfBasisLeft : M ⊗[R] NM ⊗[R] N ≃ₗ[R] ι →₀ N :=
TensorProduct.commTensorProduct.comm R M N ≪≫ₗ TensorProduct.equivFinsuppOfBasisRight ℬ
TensorProduct.equivFinsuppOfBasisLeft_apply_tmul
theorem
(m : M) (n : N) : (TensorProduct.equivFinsuppOfBasisLeft ℬ) (m ⊗ₜ n) = (ℬ.repr m).mapRange (· • n) (zero_smul _ _)
@[simp]
lemma TensorProduct.equivFinsuppOfBasisLeft_apply_tmul (m : M) (n : N) :
(TensorProduct.equivFinsuppOfBasisLeft ℬ) (m ⊗ₜ n) =
(ℬ.repr m).mapRange (· • n) (zero_smul _ _) := by
ext; simp [equivFinsuppOfBasisLeft]
TensorProduct.equivFinsuppOfBasisLeft_apply_tmul_apply
theorem
(m : M) (n : N) (i : ι) : (TensorProduct.equivFinsuppOfBasisLeft ℬ) (m ⊗ₜ n) i = ℬ.repr m i • n
lemma TensorProduct.equivFinsuppOfBasisLeft_apply_tmul_apply
(m : M) (n : N) (i : ι) :
(TensorProduct.equivFinsuppOfBasisLeft ℬ) (m ⊗ₜ n) i =
ℬ.repr m i • n := by
simp only [equivFinsuppOfBasisLeft_apply_tmul, Finsupp.mapRange_apply]
TensorProduct.equivFinsuppOfBasisLeft_symm
theorem
: (TensorProduct.equivFinsuppOfBasisLeft ℬ).symm.toLinearMap = Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N) (ℬ i)
lemma TensorProduct.equivFinsuppOfBasisLeft_symm :
(TensorProduct.equivFinsuppOfBasisLeft ℬ).symm.toLinearMap =
Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N) (ℬ i) := by
ext; simp [equivFinsuppOfBasisLeft]
TensorProduct.equivFinsuppOfBasisLeft_symm_apply
theorem
(b : ι →₀ N) : (TensorProduct.equivFinsuppOfBasisLeft ℬ).symm b = b.sum fun i n ↦ ℬ i ⊗ₜ n
@[simp]
lemma TensorProduct.equivFinsuppOfBasisLeft_symm_apply (b : ι →₀ N) :
(TensorProduct.equivFinsuppOfBasisLeft ℬ).symm b = b.sum fun i n ↦ ℬ i ⊗ₜ n :=
congr($(TensorProduct.equivFinsuppOfBasisLeft_symm ℬ) b)
TensorProduct.sum_tmul_basis_left_injective
theorem
: Function.Injective (Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N) (ℬ i))
lemma TensorProduct.sum_tmul_basis_left_injective :
Function.Injective (Finsupp.lsum R fun i ↦ (TensorProduct.mk R M N) (ℬ i)) :=
have := Classical.decEq ι
(equivFinsuppOfBasisLeft_symm (N := N) ℬ).symm ▸
(TensorProduct.equivFinsuppOfBasisLeft ℬ).symm.injective
TensorProduct.sum_tmul_basis_left_eq_zero
theorem
(b : ι →₀ N) (h : (b.sum fun i n ↦ ℬ i ⊗ₜ[R] n) = 0) : b = 0
lemma TensorProduct.sum_tmul_basis_left_eq_zero
(b : ι →₀ N) (h : (b.sum fun i n ↦ ℬ i ⊗ₜ[R] n) = 0) : b = 0 :=
have := Classical.decEq ι
(TensorProduct.equivFinsuppOfBasisLeft ℬ).symm.injective (a₂ := 0) <| by simpa
Module.Free.tensor
instance
: Module.Free S (M ⊗[R] N)
instance Module.Free.tensor : Module.Free S (M ⊗[R] N) :=
let ⟨bM⟩ := exists_basis (R := S) (M := M)
let ⟨bN⟩ := exists_basis (R := R) (M := N)
of_basis (bM.2.tensorProduct bN.2)