Skip to content

Commit f65659b

Browse files
committed
feat(LinearAlgebra): make TensorProduct.finsuppLeft and friends heterobasic (#33469)
1 parent 1ea98c2 commit f65659b

File tree

13 files changed

+77
-137
lines changed

13 files changed

+77
-137
lines changed

Mathlib/LinearAlgebra/DirectSum/Finsupp.lean

Lines changed: 44 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,6 @@ public import Mathlib.LinearAlgebra.Finsupp.SumProd
3131
* `finsuppTensorFinsupp`, the tensor product of `ι →₀ M` and `κ →₀ N`
3232
is linearly equivalent to `(ι × κ) →₀ (M ⊗ N)`.
3333
34-
## Case of MvPolynomial
35-
36-
These functions apply to `MvPolynomial`, one can define
37-
```
38-
noncomputable def MvPolynomial.rTensor' :
39-
MvPolynomial σ S ⊗[R] N ≃ₗ[S] (σ →₀ ℕ) →₀ (S ⊗[R] N) :=
40-
TensorProduct.finsuppLeft'
41-
42-
noncomputable def MvPolynomial.rTensor :
43-
MvPolynomial σ R ⊗[R] N ≃ₗ[R] (σ →₀ ℕ) →₀ N :=
44-
TensorProduct.finsuppScalarLeft
45-
```
46-
47-
However, to be actually usable, these definitions need lemmas to be given in companion PR.
48-
49-
## Case of `Polynomial`
50-
51-
`Polynomial` is a structure containing a `Finsupp`, so these functions
52-
can't be applied directly to `Polynomial`.
53-
54-
Some linear equivs need to be added to mathlib for that.
55-
This belongs to a companion PR.
56-
57-
## TODO
58-
59-
* generalize to `MonoidAlgebra`, `AlgHom `
60-
61-
* reprove `TensorProduct.finsuppLeft'` using existing heterobasic version of `TensorProduct.congr`
6234
-/
6335

6436
@[expose] public section
@@ -72,8 +44,8 @@ open Set LinearMap Submodule
7244

7345
section TensorProduct
7446

75-
variable (R : Type*) [CommSemiring R]
76-
(M : Type*) [AddCommMonoid M] [Module R M]
47+
variable (R S : Type*) [CommSemiring R] [Semiring S] [Algebra R S]
48+
(M : Type*) [AddCommMonoid M] [Module R M] [Module S M] [IsScalarTower R S M]
7749
(N : Type*) [AddCommMonoid N] [Module R N]
7850

7951
namespace TensorProduct
@@ -82,110 +54,95 @@ variable (ι : Type*) [DecidableEq ι]
8254

8355
/-- The tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` -/
8456
noncomputable def finsuppLeft :
85-
(ι →₀ M) ⊗[R] N ≃ₗ[R] ι →₀ M ⊗[R] N :=
86-
congr (finsuppLEquivDirectSum R M ι) (.refl R N) ≪≫ₗ
87-
directSumLeft R (fun _ ↦ M) N ≪≫ₗ (finsuppLEquivDirectSum R _ ι).symm
57+
(ι →₀ M) ⊗[R] N ≃ₗ[S] ι →₀ M ⊗[R] N :=
58+
AlgebraTensorModule.congr (finsuppLEquivDirectSum S M ι) (.refl R N) ≪≫ₗ
59+
directSumLeft _ S (fun _ ↦ M) N ≪≫ₗ (finsuppLEquivDirectSum _ _ ι).symm
8860

89-
variable {R M N ι}
61+
variable {R S M N ι}
9062

9163
lemma finsuppLeft_apply_tmul (p : ι →₀ M) (n : N) :
92-
finsuppLeft R M N ι (p ⊗ₜ[R] n) = p.sum fun i m ↦ Finsupp.single i (m ⊗ₜ[R] n) := by
64+
finsuppLeft R S M N ι (p ⊗ₜ[R] n) = p.sum fun i m ↦ Finsupp.single i (m ⊗ₜ[R] n) := by
9365
induction p using Finsupp.induction_linear with
9466
| zero => simp
9567
| add f g hf hg => simp [add_tmul, map_add, hf, hg, Finsupp.sum_add_index]
9668
| single => simp [finsuppLeft]
9769

9870
@[simp]
9971
lemma finsuppLeft_apply_tmul_apply (p : ι →₀ M) (n : N) (i : ι) :
100-
finsuppLeft R M N ι (p ⊗ₜ[R] n) i = p i ⊗ₜ[R] n := by
72+
finsuppLeft R S M N ι (p ⊗ₜ[R] n) i = p i ⊗ₜ[R] n := by
10173
rw [finsuppLeft_apply_tmul, Finsupp.sum_apply,
10274
Finsupp.sum_eq_single i (fun _ _ ↦ Finsupp.single_eq_of_ne') (by simp), Finsupp.single_eq_same]
10375

10476
theorem finsuppLeft_apply (t : (ι →₀ M) ⊗[R] N) (i : ι) :
105-
finsuppLeft R M N ι t i = rTensor N (Finsupp.lapply i) t := by
77+
finsuppLeft R S M N ι t i = rTensor N (Finsupp.lapply i) t := by
10678
induction t with
10779
| zero => simp
10880
| tmul f n => simp only [finsuppLeft_apply_tmul_apply, rTensor_tmul, Finsupp.lapply_apply]
10981
| add x y hx hy => simp [map_add, hx, hy]
11082

11183
@[simp]
11284
lemma finsuppLeft_symm_apply_single (i : ι) (m : M) (n : N) :
113-
(finsuppLeft R M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) =
85+
(finsuppLeft R S M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) =
11486
Finsupp.single i m ⊗ₜ[R] n := by
11587
simp [finsuppLeft]
11688

117-
variable (R M N ι)
89+
variable (R S M N ι) in
11890
/-- The tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` -/
11991
noncomputable def finsuppRight :
120-
M ⊗[R] (ι →₀ N) ≃ₗ[R] ι →₀ M ⊗[R] N :=
121-
congr (.refl R M) (finsuppLEquivDirectSum R N ι) ≪≫ₗ
122-
directSumRight R M (fun _ : ι ↦ N) ≪≫ₗ (finsuppLEquivDirectSum R _ ι).symm
123-
124-
variable {R M N ι}
92+
M ⊗[R] (ι →₀ N) ≃ₗ[S] ι →₀ M ⊗[R] N :=
93+
AlgebraTensorModule.congr (.refl S M) (finsuppLEquivDirectSum R N ι) ≪≫ₗ
94+
directSumRight' R S M (fun _ : ι ↦ N) ≪≫ₗ (finsuppLEquivDirectSum _ _ ι).symm
12595

12696
lemma finsuppRight_apply_tmul (m : M) (p : ι →₀ N) :
127-
finsuppRight R M N ι (m ⊗ₜ[R] p) = p.sum fun i n ↦ Finsupp.single i (m ⊗ₜ[R] n) := by
97+
finsuppRight R S M N ι (m ⊗ₜ[R] p) = p.sum fun i n ↦ Finsupp.single i (m ⊗ₜ[R] n) := by
12898
induction p using Finsupp.induction_linear with
12999
| zero => simp
130100
| add f g hf hg => simp [tmul_add, map_add, hf, hg, Finsupp.sum_add_index]
131-
| single => simp [finsuppRight]
101+
| single => simp [finsuppRight, directSumRight']; simp [lof_eq_of R, ← lof_eq_of S]
132102

133103
@[simp]
134104
lemma finsuppRight_apply_tmul_apply (m : M) (p : ι →₀ N) (i : ι) :
135-
finsuppRight R M N ι (m ⊗ₜ[R] p) i = m ⊗ₜ[R] p i := by
105+
finsuppRight R S M N ι (m ⊗ₜ[R] p) i = m ⊗ₜ[R] p i := by
136106
rw [finsuppRight_apply_tmul, Finsupp.sum_apply,
137107
Finsupp.sum_eq_single i (fun _ _ ↦ Finsupp.single_eq_of_ne') (by simp), Finsupp.single_eq_same]
138108

139109
theorem finsuppRight_apply (t : M ⊗[R] (ι →₀ N)) (i : ι) :
140-
finsuppRight R M N ι t i = lTensor M (Finsupp.lapply i) t := by
110+
finsuppRight R S M N ι t i = lTensor M (Finsupp.lapply i) t := by
141111
induction t with
142112
| zero => simp
143113
| tmul m f => simp [finsuppRight_apply_tmul_apply]
144114
| add x y hx hy => simp [map_add, hx, hy]
145115

116+
@[simp]
117+
lemma finsuppRight_tmul_single (i : ι) (m : M) (n : N) :
118+
finsuppRight R S M N ι (m ⊗ₜ[R] Finsupp.single i n) = Finsupp.single i (m ⊗ₜ[R] n) := by
119+
ext; simp +contextual [Finsupp.single_apply, apply_ite]
120+
146121
@[simp]
147122
lemma finsuppRight_symm_apply_single (i : ι) (m : M) (n : N) :
148-
(finsuppRight R M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) =
123+
(finsuppRight R S M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) =
149124
m ⊗ₜ[R] Finsupp.single i n := by
150-
simp [finsuppRight]
151-
152-
variable {S : Type*} [CommSemiring S] [Algebra R S]
153-
[Module S M] [IsScalarTower R S M]
125+
simp [LinearEquiv.symm_apply_eq]
154126

155127
lemma finsuppLeft_smul' (s : S) (t : (ι →₀ M) ⊗[R] N) :
156-
finsuppLeft R M N ι (s • t) = s • finsuppLeft R M N ι t := by
128+
finsuppLeft R S M N ι (s • t) = s • finsuppLeft R S M N ι t := by
157129
induction t with
158130
| zero => simp
159131
| add x y hx hy => simp [hx, hy]
160132
| tmul p n => ext; simp [smul_tmul', finsuppLeft_apply_tmul_apply]
161133

162-
variable (R M N ι S)
163-
/-- When `M` is also an `S`-module, then `TensorProduct.finsuppLeft R M N`
164-
is an `S`-linear equiv -/
165-
noncomputable def finsuppLeft' :
166-
(ι →₀ M) ⊗[R] N ≃ₗ[S] ι →₀ M ⊗[R] N where
167-
__ := finsuppLeft R M N ι
168-
map_smul' := finsuppLeft_smul'
134+
@[deprecated (since := "2026-01-01")] alias finsuppLeft' := finsuppLeft
169135

170-
variable {R M N ι S}
136+
@[nolint synTaut, deprecated "is syntactic rfl now" (since := "2026-01-01")]
171137
lemma finsuppLeft'_apply (x : (ι →₀ M) ⊗[R] N) :
172-
finsuppLeft' R M N ι S x = finsuppLeft R M N ι x := rfl
173-
174-
/- -- TODO : reprove using the existing heterobasic lemmas
175-
noncomputable example :
176-
(ι →₀ M) ⊗[R] N ≃ₗ[S] ι →₀ (M ⊗[R] N) := by
177-
have f : (⨁ (i₁ : ι), M) ⊗[R] N ≃ₗ[S] ⨁ (i : ι), M ⊗[R] N := sorry
178-
exact (AlgebraTensorModule.congr
179-
(finsuppLEquivDirectSum S M ι) (.refl R N)).trans
180-
(f.trans (finsuppLEquivDirectSum S (M ⊗[R] N) ι).symm) -/
138+
finsuppLeft R S M N ι x = finsuppLeft R S M N ι x := rfl
181139

182-
variable (R M N ι)
140+
variable (R M N ι) in
183141
/-- The tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` -/
184142
noncomputable def finsuppScalarLeft :
185143
(ι →₀ R) ⊗[R] N ≃ₗ[R] ι →₀ N :=
186-
finsuppLeft R R N ι ≪≫ₗ (Finsupp.mapRange.linearEquiv (TensorProduct.lid R N))
144+
finsuppLeft R R R N ι ≪≫ₗ (Finsupp.mapRange.linearEquiv (TensorProduct.lid R N))
187145

188-
variable {R M N ι}
189146
@[simp]
190147
lemma finsuppScalarLeft_apply_tmul_apply (p : ι →₀ R) (n : N) (i : ι) :
191148
finsuppScalarLeft R N ι (p ⊗ₜ[R] n) i = p i • n := by
@@ -207,38 +164,36 @@ lemma finsuppScalarLeft_symm_apply_single (i : ι) (n : N) :
207164
(Finsupp.single i 1) ⊗ₜ[R] n := by
208165
simp [finsuppScalarLeft, finsuppLeft_symm_apply_single]
209166

210-
variable (R M N ι)
211-
167+
variable (R S M N ι) in
212168
/-- The tensor product of `M` and `ι →₀ R` is linearly equivalent to `ι →₀ M` -/
213169
noncomputable def finsuppScalarRight :
214-
M ⊗[R] (ι →₀ R) ≃ₗ[R] ι →₀ M :=
215-
finsuppRight R M R ι ≪≫ₗ Finsupp.mapRange.linearEquiv (TensorProduct.rid R M)
216-
217-
variable {R M N ι}
170+
M ⊗[R] (ι →₀ R) ≃ₗ[S] ι →₀ M :=
171+
finsuppRight R S M R ι ≪≫ₗ Finsupp.mapRange.linearEquiv (AlgebraTensorModule.rid R S M)
218172

219173
@[simp]
220174
lemma finsuppScalarRight_apply_tmul_apply (m : M) (p : ι →₀ R) (i : ι) :
221-
finsuppScalarRight R M ι (m ⊗ₜ[R] p) i = p i • m := by
175+
finsuppScalarRight R S M ι (m ⊗ₜ[R] p) i = p i • m := by
222176
simp [finsuppScalarRight]
223177

224178
lemma finsuppScalarRight_apply_tmul (m : M) (p : ι →₀ R) :
225-
finsuppScalarRight R M ι (m ⊗ₜ[R] p) = p.sum fun i n ↦ Finsupp.single i (n • m) := by
179+
finsuppScalarRight R S M ι (m ⊗ₜ[R] p) = p.sum fun i n ↦ Finsupp.single i (n • m) := by
226180
ext i
227181
rw [finsuppScalarRight_apply_tmul_apply, Finsupp.sum_apply,
228182
Finsupp.sum_eq_single i (fun _ _ ↦ Finsupp.single_eq_of_ne') (by simp), Finsupp.single_eq_same]
229183

230184
lemma finsuppScalarRight_apply (t : M ⊗[R] (ι →₀ R)) (i : ι) :
231-
finsuppScalarRight R M ι t i = TensorProduct.rid R M ((Finsupp.lapply i).lTensor M t) := by
185+
finsuppScalarRight R S M ι t i =
186+
AlgebraTensorModule.rid R S M ((Finsupp.lapply i).lTensor M t) := by
232187
simp [finsuppScalarRight, finsuppRight_apply]
233188

234189
@[simp]
235190
lemma finsuppScalarRight_symm_apply_single (i : ι) (m : M) :
236-
(finsuppScalarRight R M ι).symm (Finsupp.single i m) =
191+
(finsuppScalarRight R S M ι).symm (Finsupp.single i m) =
237192
m ⊗ₜ[R] (Finsupp.single i 1) := by
238193
simp [finsuppScalarRight, finsuppRight_symm_apply_single]
239194

240195
theorem finsuppScalarRight_smul (s : S) (t) :
241-
finsuppScalarRight R M ι (s • t) = s • finsuppScalarRight R M ι t := by
196+
finsuppScalarRight R S M ι (s • t) = s • finsuppScalarRight R S M ι t := by
242197
induction t using TensorProduct.induction_on with
243198
| zero => simp
244199
| add x y hx hy => simp [hx, hy]
@@ -248,15 +203,11 @@ theorem finsuppScalarRight_smul (s : S) (t) :
248203
ext i n j
249204
simp [smul_comm n s m]
250205

251-
variable (R S M ι) in
252-
/-- When `M` is also an `S`-module, `TensorProduct.finsuppScalarRight R M ι` is `S`-linear. -/
253-
noncomputable def finsuppScalarRight' :
254-
M ⊗[R] (ι →₀ R) ≃ₗ[S] ι →₀ M where
255-
toAddEquiv := finsuppScalarRight R M ι
256-
map_smul' s x := finsuppScalarRight_smul s x
206+
@[deprecated (since := "2026-01-01")] alias finsuppScalarRight' := finsuppScalarRight
257207

208+
@[nolint synTaut, deprecated "is syntactic rfl now" (since := "2026-01-01")]
258209
theorem coe_finsuppScalarRight' :
259-
⇑(finsuppScalarRight' R M ι S) = finsuppScalarRight R M ι :=
210+
⇑(finsuppScalarRight R S M ι) = finsuppScalarRight R S M ι :=
260211
rfl
261212

262213
end TensorProduct
@@ -269,7 +220,7 @@ variable (R S M N ι κ : Type*)
269220

270221
theorem Finsupp.linearCombination_one_tmul [DecidableEq ι] {v : ι → M} :
271222
(linearCombination S ((1 : S) ⊗ₜ[R] v ·)).restrictScalars R =
272-
(linearCombination R v).lTensor S ∘ₗ (finsuppScalarRight R S ι).symm := by
223+
(linearCombination R v).lTensor S ∘ₗ (finsuppScalarRight R R S ι).symm := by
273224
ext; simp [smul_tmul']
274225

275226
variable [Module S M] [IsScalarTower R S M]

Mathlib/LinearAlgebra/DirectSum/TensorProduct.lean

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,18 @@ protected def directSum :
6363
AlgebraTensorModule.map_tmul, id_coe, id_eq]
6464

6565
/-- Tensor products distribute over a direct sum on the left . -/
66-
def directSumLeft : (⨁ i₁, M₁ i₁) ⊗[R] M₂' ≃ₗ[R] ⨁ i, M₁ i ⊗[R] M₂' :=
66+
def directSumLeft : (⨁ i₁, M₁ i₁) ⊗[R] M₂' ≃ₗ[S] ⨁ i, M₁ i ⊗[R] M₂' :=
6767
LinearEquiv.ofLinear
68-
(lift <|
69-
DirectSum.toModule R _ _ fun _ =>
70-
(mk R _ _).compr₂ <| DirectSum.lof R ι₁ (fun i => M₁ i ⊗[R] M₂') _)
71-
(DirectSum.toModule R _ _ fun _ => rTensor _ (DirectSum.lof R ι₁ _ _))
72-
(DirectSum.linearMap_ext R fun i =>
73-
TensorProduct.ext <|
74-
LinearMap.ext₂ fun m₁ m₂ => by
75-
dsimp only [comp_apply, compr₂ₛₗ_apply, id_apply, mk_apply]
76-
simp_rw [DirectSum.toModule_lof, rTensor_tmul, lift.tmul, DirectSum.toModule_lof,
77-
compr₂_apply, mk_apply])
78-
(TensorProduct.ext <|
79-
DirectSum.linearMap_ext R fun i =>
80-
LinearMap.ext₂ fun m₁ m₂ => by
81-
dsimp only [comp_apply, compr₂ₛₗ_apply, id_apply, mk_apply]
82-
simp_rw [lift.tmul, DirectSum.toModule_lof, compr₂_apply,
83-
mk_apply, DirectSum.toModule_lof, rTensor_tmul])
68+
(AlgebraTensorModule.lift <|
69+
DirectSum.toModule S _ _ fun _ =>
70+
(AlgebraTensorModule.mk _ S _ _).compr₂ <| DirectSum.lof _ ι₁ (fun i => M₁ i ⊗[R] M₂') _)
71+
(DirectSum.toModule _ _ _ fun i => AlgebraTensorModule.map (DirectSum.lof _ ι₁ M₁ i) .id)
72+
(by ext; simp)
73+
(by ext; simp)
8474

8575
/-- Tensor products distribute over a direct sum on the right. -/
8676
def directSumRight : (M₁' ⊗[R] ⨁ i, M₂ i) ≃ₗ[R] ⨁ i, M₁' ⊗[R] M₂ i :=
87-
TensorProduct.comm R _ _ ≪≫ₗ directSumLeft R M₂ M₁' ≪≫ₗ
77+
TensorProduct.comm R _ _ ≪≫ₗ directSumLeft R R M₂ M₁' ≪≫ₗ
8878
DFinsupp.mapRange.linearEquiv fun _ => TensorProduct.comm R _ _
8979

9080
variable {M₁ M₁' M₂ M₂'}
@@ -104,24 +94,24 @@ theorem directSum_symm_lof_tmul (i₁ : ι₁) (m₁ : M₁ i₁) (i₂ : ι₂)
10494

10595
@[simp]
10696
theorem directSumLeft_tmul_lof (i : ι₁) (x : M₁ i) (y : M₂') :
107-
directSumLeft R M₁ M₂' (DirectSum.lof R _ _ i x ⊗ₜ[R] y) =
108-
DirectSum.lof R _ _ i (x ⊗ₜ[R] y) := by
109-
dsimp only [directSumLeft, LinearEquiv.ofLinear_apply, lift.tmul]
110-
rw [DirectSum.toModule_lof R i]
97+
directSumLeft R S M₁ M₂' (DirectSum.lof S _ _ i x ⊗ₜ[R] y) =
98+
DirectSum.lof S _ _ i (x ⊗ₜ[R] y) := by
99+
dsimp [directSumLeft, LinearEquiv.ofLinear_apply, lift.tmul]
100+
rw [DirectSum.toModule_lof S]
111101
rfl
112102

113103
@[simp]
114104
theorem directSumLeft_symm_lof_tmul (i : ι₁) (x : M₁ i) (y : M₂') :
115-
(directSumLeft R M₁ M₂').symm (DirectSum.lof R _ _ i (x ⊗ₜ[R] y)) =
116-
DirectSum.lof R _ _ i x ⊗ₜ[R] y := by
105+
(directSumLeft R S M₁ M₂').symm (DirectSum.lof S _ _ i (x ⊗ₜ[R] y)) =
106+
DirectSum.lof S _ _ i x ⊗ₜ[R] y := by
117107
rw [LinearEquiv.symm_apply_eq, directSumLeft_tmul_lof]
118108

119109
@[simp]
120110
lemma directSumLeft_tmul (m : ⨁ i, M₁ i) (n : M₂') (i : ι₁) :
121-
directSumLeft R M₁ M₂' (m ⊗ₜ[R] n) i = (m i) ⊗ₜ[R] n := by
122-
suffices (DirectSum.component R ι₁ _ i) ∘ₗ (directSumLeft R M₁ M₂').toLinearMap ∘ₗ
123-
((TensorProduct.mk R (⨁ i, M₁ i) M₂').flip n) =
124-
((TensorProduct.mk R (M₁ i) M₂').flip n) ∘ₗ (DirectSum.component R ι₁ M₁ i) by
111+
directSumLeft R S M₁ M₂' (m ⊗ₜ[R] n) i = (m i) ⊗ₜ[R] n := by
112+
suffices (DirectSum.component S ι₁ _ i) ∘ₗ (directSumLeft R S M₁ M₂').toLinearMap ∘ₗ
113+
((AlgebraTensorModule.mk R S (⨁ i, M₁ i) M₂').flip n) =
114+
((AlgebraTensorModule.mk R S (M₁ i) M₂').flip n) ∘ₗ (DirectSum.component S ι₁ M₁ i) by
125115
simpa using LinearMap.congr_fun this m
126116
ext j n
127117
by_cases hj : j = i

Mathlib/LinearAlgebra/TensorProduct/Basis.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ If `{𝒞ᵢ}` is a basis for the module `N`, then every elements of `x ∈ M
8686
as `∑ᵢ mᵢ ⊗ 𝒞ᵢ` for some `mᵢ ∈ M`.
8787
-/
8888
def TensorProduct.equivFinsuppOfBasisRight : M ⊗[R] N ≃ₗ[R] κ →₀ M :=
89-
LinearEquiv.lTensor M 𝒞.repr ≪≫ₗ TensorProduct.finsuppScalarRight R M κ
89+
LinearEquiv.lTensor M 𝒞.repr ≪≫ₗ TensorProduct.finsuppScalarRight R R M κ
9090

9191
@[simp]
9292
lemma TensorProduct.equivFinsuppOfBasisRight_apply_tmul (m : M) (n : N) :

Mathlib/LinearAlgebra/TensorProduct/Submodule.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ theorem mulLeftMap_eq_mulMap_comp {ι : Type*} [DecidableEq ι] (m : ι → M) :
265265
variable {N} in
266266
theorem mulRightMap_eq_mulMap_comp {ι : Type*} [DecidableEq ι] (n : ι → N) :
267267
mulRightMap M n = mulMap M N ∘ₗ LinearMap.lTensor M (Finsupp.linearCombination R n) ∘ₗ
268-
(TensorProduct.finsuppScalarRight R M ι).symm.toLinearMap := by
268+
(TensorProduct.finsuppScalarRight R R M ι).symm.toLinearMap := by
269269
ext; simp
270270

271271
end Semiring

Mathlib/RepresentationTheory/Coinvariants.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ lemma coinvariantsTensorFreeToFinsupp_mk_tmul_single (x : A) (i : α) (g : G) (r
468468
DFunLike.coe (F := (A.ρ.tprod (Representation.free k G α)).Coinvariants →ₗ[k] α →₀ A.V)
469469
(coinvariantsTensorFreeToFinsupp A α) (Coinvariants.mk _ (x ⊗ₜ single i (single g r))) =
470470
single i (r • A.ρ g⁻¹ x) := by
471-
simp [tensorObj_carrier, coinvariantsTensorFreeToFinsupp,
472-
Coinvariants.map, finsuppTensorRight, TensorProduct.finsuppRight]
471+
simp [tensorObj_carrier, coinvariantsTensorFreeToFinsupp, Coinvariants.map]
473472

474473
variable (A α)
475474

Mathlib/RepresentationTheory/Rep.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ open ModuleCat.MonoidalCategory
481481
@[simps! hom_hom inv_hom]
482482
def finsuppTensorLeft :
483483
A.finsupp α ⊗ B ≅ (A ⊗ B).finsupp α :=
484-
Action.mkIso (TensorProduct.finsuppLeft k A B α).toModuleIso
484+
Action.mkIso (TensorProduct.finsuppLeft k _ A B α).toModuleIso
485485
fun _ => ModuleCat.hom_ext <| TensorProduct.ext <| lhom_ext fun _ _ => by
486486
ext
487487
simp [Action_ρ_eq_ρ, TensorProduct.finsuppLeft_apply_tmul,
@@ -492,7 +492,7 @@ def finsuppTensorLeft :
492492
@[simps! hom_hom inv_hom]
493493
def finsuppTensorRight :
494494
A ⊗ B.finsupp α ≅ (A ⊗ B).finsupp α :=
495-
Action.mkIso (TensorProduct.finsuppRight k A B α).toModuleIso fun _ => ModuleCat.hom_ext <|
495+
Action.mkIso (TensorProduct.finsuppRight k _ A B α).toModuleIso fun _ => ModuleCat.hom_ext <|
496496
TensorProduct.ext <| LinearMap.ext fun _ => lhom_ext fun _ _ => by
497497
ext
498498
simp [Action_ρ_eq_ρ, TensorProduct.finsuppRight_apply_tmul, ModuleCat.endRingEquiv,

Mathlib/RingTheory/Flat/FaithfullyFlat/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ instance directSum {ι : Type*} [Nonempty ι] (M : ι → Type*) [∀ i, AddComm
196196
obtain ⟨x, y, hxy⟩ := Nontrivial.exists_pair_ne (α := M i ⊗[R] N)
197197
haveI : Nontrivial (⨁ (i : ι), M i ⊗[R] N) :=
198198
⟨DirectSum.of _ i x, DirectSum.of _ i y, fun h ↦ hxy (DirectSum.of_injective i h)⟩
199-
apply (TensorProduct.directSumLeft R M N).toEquiv.nontrivial
199+
apply (TensorProduct.directSumLeft R R M N).toEquiv.nontrivial
200200

201201
/-- Free `R`-modules over discrete types are flat. -/
202202
instance finsupp (ι : Type v) [Nonempty ι] : FaithfullyFlat R (ι →₀ R) := by

Mathlib/RingTheory/Ideal/Quotient/Index.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ lemma Submodule.index_smul_le [Finite (R ⧸ I)]
8080
have hf : Function.Surjective f := fun x ↦ by
8181
obtain ⟨y, hy⟩ := H.ge x.2; exact ⟨y, Subtype.ext hy⟩
8282
have : Function.Surjective
83-
(f.lTensor (R ⧸ I) ∘ₗ (finsuppScalarRight R (R ⧸ I) s).symm.toLinearMap) :=
83+
(f.lTensor (R ⧸ I) ∘ₗ (finsuppScalarRight R R (R ⧸ I) s).symm.toLinearMap) :=
8484
(LinearMap.lTensor_surjective (R ⧸ I) hf).comp (LinearEquiv.surjective _)
8585
refine (Nat.card_le_card_of_surjective _ this).trans ?_
8686
simp only [Nat.card_eq_fintype_card, Fintype.card_finsupp, Fintype.card_coe, le_rfl]

0 commit comments

Comments
 (0)