Skip to content

Commit 1ae76b2

Browse files
chore(LinearAlgebra/TensorProduct/Basic): more semi-linearizing (#27353)
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com> Co-authored-by: ADedecker <anatolededecker@gmail.com>
1 parent 0d4551a commit 1ae76b2

File tree

13 files changed

+191
-166
lines changed

13 files changed

+191
-166
lines changed

Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,29 +455,29 @@ instance : MonoidalPreadditive (ModuleCat.{u} R) := by
455455
· intros
456456
ext : 1
457457
refine TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => ?_)
458-
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply, hom_zero, LinearMap.zero_apply]
458+
simp only [LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply, hom_zero, LinearMap.zero_apply]
459459
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
460460
erw [MonoidalCategory.whiskerLeft_apply]
461461
simp
462462
· intros
463463
ext : 1
464464
refine TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => ?_)
465-
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply, hom_zero, LinearMap.zero_apply, ]
465+
simp only [LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply, hom_zero, LinearMap.zero_apply, ]
466466
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
467467
erw [MonoidalCategory.whiskerRight_apply]
468468
simp
469469
· intros
470470
ext : 1
471471
refine TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => ?_)
472-
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply, hom_add, LinearMap.add_apply]
472+
simp only [LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply, hom_add, LinearMap.add_apply]
473473
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
474474
erw [MonoidalCategory.whiskerLeft_apply, MonoidalCategory.whiskerLeft_apply]
475475
erw [MonoidalCategory.whiskerLeft_apply]
476476
simp [TensorProduct.tmul_add]
477477
· intros
478478
ext : 1
479479
refine TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => ?_)
480-
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply, hom_add, LinearMap.add_apply]
480+
simp only [LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply, hom_add, LinearMap.add_apply]
481481
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
482482
erw [MonoidalCategory.whiskerRight_apply, MonoidalCategory.whiskerRight_apply]
483483
erw [MonoidalCategory.whiskerRight_apply]
@@ -488,14 +488,14 @@ instance : MonoidalLinear R (ModuleCat.{u} R) := by
488488
· intros
489489
ext : 1
490490
refine TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => ?_)
491-
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply, hom_smul, LinearMap.smul_apply]
491+
simp only [LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply, hom_smul, LinearMap.smul_apply]
492492
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
493493
erw [MonoidalCategory.whiskerLeft_apply, MonoidalCategory.whiskerLeft_apply]
494494
simp
495495
· intros
496496
ext : 1
497497
refine TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => ?_)
498-
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply, hom_smul, LinearMap.smul_apply]
498+
simp only [LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply, hom_smul, LinearMap.smul_apply]
499499
-- This used to be `rw`, but we need `erw` after https://github.com/leanprover/lean4/pull/2644
500500
erw [MonoidalCategory.whiskerRight_apply, MonoidalCategory.whiskerRight_apply]
501501
simp [TensorProduct.smul_tmul, TensorProduct.tmul_smul]

Mathlib/Algebra/Category/ModuleCat/Monoidal/Closed.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ theorem monoidalClosed_uncurry
6565
should give a map `M ⊗ Hom(M, N) ⟶ N`, so we flip the order of the arguments in the identity map
6666
`Hom(M, N) ⟶ (M ⟶ N)` and uncurry the resulting map `M ⟶ Hom(M, N) ⟶ N.` -/
6767
theorem ihom_ev_app (M N : ModuleCat.{u} R) :
68-
(ihom.ev M).app N = ModuleCat.ofHom (TensorProduct.uncurry R M ((ihom M).obj N) N
68+
(ihom.ev M).app N = ModuleCat.ofHom (TensorProduct.uncurry (.id R) M ((ihom M).obj N) N
6969
(LinearMap.lcomp _ _ homLinearEquiv.toLinearMap ∘ₗ LinearMap.id.flip)) := by
7070
rw [← MonoidalClosed.uncurry_id_eq_ev]
7171
ext : 1

Mathlib/Algebra/Lie/TensorProduct.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ variable (R L M N P Q)
8181
/-- The universal property for tensor product of modules of a Lie algebra: the `R`-linear
8282
tensor-hom adjunction is equivariant with respect to the `L` action. -/
8383
def lift : (M →ₗ[R] N →ₗ[R] P) ≃ₗ⁅R,L⁆ M ⊗[R] N →ₗ[R] P :=
84-
{ TensorProduct.lift.equiv R M N P with
84+
{ TensorProduct.lift.equiv (.id R) M N P with
8585
map_lie' := fun {x f} => by
8686
ext m n
8787
simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, LinearEquiv.coe_coe,

Mathlib/Analysis/InnerProductSpace/TensorProduct.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace TensorProduct
5858
/-- Bilinear map for the inner product on tensor products.
5959
On pure tensors: `inner_ (a ⊗ₜ b) (c ⊗ₜ d) = ⟪a, c⟫ * ⟪b, d⟫`. -/
6060
private abbrev inner_ : E ⊗[𝕜] F →ₗ⋆[𝕜] E ⊗[𝕜] F →ₗ[𝕜] 𝕜 :=
61-
(lift <| mapBilinear 𝕜 E F 𝕜 𝕜).compr₂ (LinearMap.mul' 𝕜 𝕜) ∘ₛₗ map (innerₛₗ 𝕜) (innerₛₗ 𝕜)
61+
(lift <| mapBilinear (.id 𝕜) E F 𝕜 𝕜).compr₂ (LinearMap.mul' 𝕜 𝕜) ∘ₛₗ map (innerₛₗ 𝕜) (innerₛₗ 𝕜)
6262

6363
instance instInner : Inner 𝕜 (E ⊗[𝕜] F) := ⟨fun x y => inner_ x y⟩
6464

@@ -252,7 +252,7 @@ def congrIsometry (f : E ≃ₗᵢ[𝕜] G) (g : F ≃ₗᵢ[𝕜] H) :
252252
inner_map_map f.toLinearIsometry g.toLinearIsometry
253253

254254
@[simp] lemma congrIsometry_apply (f : E ≃ₗᵢ[𝕜] G) (g : F ≃ₗᵢ[𝕜] H) (x : E ⊗[𝕜] F) :
255-
congrIsometry f g x = congr f g x := rfl
255+
congrIsometry f g x = congr (σ₁₂ := .id _) f g x := rfl
256256

257257
lemma congrIsometry_symm (f : E ≃ₗᵢ[𝕜] G) (g : F ≃ₗᵢ[𝕜] H) :
258258
(congrIsometry f g).symm = congrIsometry f.symm g.symm := rfl

Mathlib/CategoryTheory/Monoidal/Internal/Module.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def inverseObj (A : AlgCat.{u} R) : MonObj (ModuleCat.of R A) where
104104
ext : 1
105105
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11041): `ext` did not pick up `TensorProduct.ext`
106106
refine TensorProduct.ext <| LinearMap.ext_ring <| LinearMap.ext fun x => ?_
107-
rw [compr₂_apply, compr₂_apply, hom_comp, LinearMap.comp_apply]
107+
rw [compr₂ₛₗ_apply, compr₂ₛₗ_apply, hom_comp, LinearMap.comp_apply]
108108
-- Porting note: this `dsimp` does nothing
109109
-- dsimp [AlgCat.id_apply, TensorProduct.mk_apply, Algebra.linearMap_apply,
110110
-- LinearMap.compr₂_apply, Function.comp_apply, RingHom.map_one,
@@ -123,8 +123,8 @@ def inverseObj (A : AlgCat.{u} R) : MonObj (ModuleCat.of R A) where
123123
-- LinearMap.compr₂_apply, Function.comp_apply, ModuleCat.MonoidalCategory.hom_apply,
124124
-- AlgCat.coe_comp]
125125
-- Porting note: because `dsimp` is not effective, `rw` needs to be changed to `erw`
126-
erw [compr₂_apply, compr₂_apply]
127-
rw [ModuleCat.hom_comp, LinearMap.comp_apply]
126+
erw [compr₂_apply, compr₂ₛₗ_apply]
127+
simp [ModuleCat.hom_comp, LinearMap.comp_apply]
128128
erw [LinearMap.mul'_apply, ModuleCat.MonoidalCategory.rightUnitor_hom_apply, ← Algebra.commutes,
129129
← Algebra.smul_def]
130130
dsimp
@@ -133,7 +133,7 @@ def inverseObj (A : AlgCat.{u} R) : MonObj (ModuleCat.of R A) where
133133
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/11041): `ext` did not pick up `TensorProduct.ext`
134134
refine TensorProduct.ext <| TensorProduct.ext <| LinearMap.ext fun x => LinearMap.ext fun y =>
135135
LinearMap.ext fun z => ?_
136-
dsimp only [compr₂_apply, TensorProduct.mk_apply]
136+
dsimp only [compr₂ₛₗ_apply, TensorProduct.mk_apply]
137137
rw [hom_comp, LinearMap.comp_apply, hom_comp, LinearMap.comp_apply, hom_comp,
138138
LinearMap.comp_apply]
139139
erw [LinearMap.mul'_apply, LinearMap.mul'_apply]

Mathlib/LinearAlgebra/BilinearForm/TensorProduct.lean

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ Note this is heterobasic; the bilinear map on the left can take values in a modu
4848
(commutative) algebra over the ring of the module in which the right bilinear map is valued. -/
4949
def tensorDistrib :
5050
(BilinMap A M₁ N₁ ⊗[R] BilinMap R M₂ N₂) →ₗ[A] BilinMap A (M₁ ⊗[R] M₂) (N₁ ⊗[R] N₂) :=
51-
(TensorProduct.lift.equiv A (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₂) (N₁ ⊗[R] N₂)).symm.toLinearMap ∘ₗ
51+
(TensorProduct.lift.equiv (.id A) (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₂) (N₁ ⊗[R] N₂)).symm.toLinearMap ∘ₗ
5252
((LinearMap.llcomp A _ _ _).flip
5353
(TensorProduct.AlgebraTensorModule.tensorTensorTensorComm R R A A M₁ M₂ M₁ M₂).toLinearMap)
5454
∘ₗ TensorProduct.AlgebraTensorModule.homTensorHomMap R _ _ _ _ _ _
5555
∘ₗ (TensorProduct.AlgebraTensorModule.congr
56-
(TensorProduct.lift.equiv A M₁ M₁ N₁)
57-
(TensorProduct.lift.equiv R _ _ _)).toLinearMap
56+
(TensorProduct.lift.equiv (.id A) M₁ M₁ N₁)
57+
(TensorProduct.lift.equiv (.id R) _ _ _)).toLinearMap
5858

5959
@[simp]
6060
theorem tensorDistrib_tmul (B₁ : BilinMap A M₁ N₁) (B₂ : BilinMap R M₂ N₂) (m₁ : M₁) (m₂ : M₂)
@@ -163,10 +163,11 @@ noncomputable def tensorDistribEquiv :
163163
BilinForm R M₁ ⊗[R] BilinForm R M₂ ≃ₗ[R] BilinForm R (M₁ ⊗[R] M₂) :=
164164
-- the same `LinearEquiv`s as from `tensorDistrib`,
165165
-- but with the inner linear map also as an equiv
166-
TensorProduct.congr (TensorProduct.lift.equiv R _ _ _) (TensorProduct.lift.equiv R _ _ _) ≪≫ₗ
166+
TensorProduct.congr
167+
(TensorProduct.lift.equiv (.id R) _ _ _) (TensorProduct.lift.equiv (.id R) _ _ _) ≪≫ₗ
167168
TensorProduct.dualDistribEquiv R (M₁ ⊗ M₁) (M₂ ⊗ M₂) ≪≫ₗ
168169
(TensorProduct.tensorTensorTensorComm R _ _ _ _).dualMap ≪≫ₗ
169-
(TensorProduct.lift.equiv R _ _ _).symm
170+
(TensorProduct.lift.equiv (.id R) _ _ _).symm
170171

171172
@[simp]
172173
theorem tensorDistribEquiv_tmul (B₁ : BilinForm R M₁) (B₂ : BilinForm R M₂) (m₁ : M₁) (m₂ : M₂)

Mathlib/LinearAlgebra/Coevaluation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ theorem contractLeft_assoc_coevaluation :
6262
letI := Classical.decEq (Basis.ofVectorSpaceIndex K V)
6363
apply TensorProduct.ext
6464
apply (Basis.ofVectorSpace K V).dualBasis.ext; intro j; apply LinearMap.ext_ring
65-
rw [LinearMap.compr₂_apply, LinearMap.compr₂_apply, TensorProduct.mk_apply]
65+
rw [LinearMap.compr₂ₛₗ_apply, LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply]
6666
simp only [LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_toLinearMap]
6767
rw [rid_tmul, one_smul, lid_symm_apply]
6868
simp only [LinearMap.lTensor_tmul, coevaluation_apply_one]
@@ -80,7 +80,7 @@ theorem contractLeft_assoc_coevaluation' :
8080
letI := Classical.decEq (Basis.ofVectorSpaceIndex K V)
8181
apply TensorProduct.ext
8282
apply LinearMap.ext_ring; apply (Basis.ofVectorSpace K V).ext; intro j
83-
rw [LinearMap.compr₂_apply, LinearMap.compr₂_apply, TensorProduct.mk_apply]
83+
rw [LinearMap.compr₂ₛₗ_apply, LinearMap.compr₂ₛₗ_apply, TensorProduct.mk_apply]
8484
simp only [LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_toLinearMap]
8585
rw [lid_tmul, one_smul, rid_symm_apply]
8686
simp only [LinearMap.rTensor_tmul, coevaluation_apply_one]

Mathlib/LinearAlgebra/Contraction.lean

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def contractRight : M ⊗[R] Module.Dual R M →ₗ[R] R :=
4848
/-- The natural map associating a linear map to the tensor product of two modules. -/
4949
def dualTensorHom : Module.Dual R M ⊗[R] N →ₗ[R] M →ₗ[R] N :=
5050
let M' := Module.Dual R M
51-
(uncurry R M' N (M →ₗ[R] N) : _ → M' ⊗ N →ₗ[R] M →ₗ[R] N) LinearMap.smulRightₗ
51+
(uncurry (.id R) M' N (M →ₗ[R] N) : _ → M' ⊗ N →ₗ[R] M →ₗ[R] N) LinearMap.smulRightₗ
5252

5353
variable {R M N P Q}
5454

@@ -91,12 +91,13 @@ theorem zero_prodMap_dualTensorHom (g : Module.Dual R N) (q : Q) :
9191
simp only [coe_comp, coe_inr, Function.comp_apply, prodMap_apply, dualTensorHom_apply,
9292
snd_apply, Prod.smul_mk, LinearMap.zero_apply, smul_zero]
9393

94+
attribute [-ext] AlgebraTensorModule.curry_injective in
9495
theorem map_dualTensorHom (f : Module.Dual R M) (p : P) (g : Module.Dual R N) (q : Q) :
9596
TensorProduct.map (dualTensorHom R M P (f ⊗ₜ[R] p)) (dualTensorHom R N Q (g ⊗ₜ[R] q)) =
9697
dualTensorHom R (M ⊗[R] N) (P ⊗[R] Q) (dualDistrib R M N (f ⊗ₜ g) ⊗ₜ[R] (p ⊗ₜ[R] q)) := by
9798
ext m n
98-
simp only [compr₂_apply, mk_apply, map_tmul, dualTensorHom_apply, dualDistrib_apply,
99-
smul_tmul_smul]
99+
simp only [compr₂ₛₗ_apply, mk_apply, map_tmul, dualTensorHom_apply, dualDistrib_apply,
100+
smul_tmul_smul]
100101

101102
@[simp]
102103
theorem comp_dualTensorHom (f : Module.Dual R M) (n : N) (g : Module.Dual R N) (p : P) :
@@ -118,6 +119,7 @@ theorem toMatrix_dualTensorHom {m : Type*} {n : Type*} [Fintype m] [Finite n] [D
118119
rw [and_iff_not_or_not, Classical.not_not] at hij
119120
rcases hij with hij | hij <;> simp [hij]
120121

122+
attribute [-ext] AlgebraTensorModule.curry_injective in
121123
/-- If `M` is free, the natural linear map $M^* ⊗ N → Hom(M, N)$ is an equivalence. This function
122124
provides this equivalence in return for a basis of `M`. -/
123125
-- We manually create simp-lemmas because `@[simps]` generates a malformed lemma
@@ -132,7 +134,7 @@ noncomputable def dualTensorHomEquivOfBasis : Module.Dual R M ⊗[R] N ≃ₗ[R]
132134
(by
133135
ext f m
134136
simp only [applyₗ_apply_apply, coeFn_sum, dualTensorHom_apply, mk_apply, id_coe, _root_.id,
135-
Fintype.sum_apply, Function.comp_apply, Basis.coe_dualBasis, coe_comp, compr₂_apply,
137+
Fintype.sum_apply, Function.comp_apply, Basis.coe_dualBasis, coe_comp, compr₂ₛₗ_apply,
136138
tmul_smul, smul_tmul', ← sum_tmul, Basis.sum_dual_apply_smul_coord])
137139

138140
@[simp]
@@ -198,26 +200,28 @@ noncomputable def rTensorHomEquivHomRTensor : (M →ₗ[R] P) ⊗[R] Q ≃ₗ[R]
198200
congr (dualTensorHomEquiv R M P).symm (LinearEquiv.refl R Q) ≪≫ₗ TensorProduct.assoc R _ P Q ≪≫ₗ
199201
dualTensorHomEquiv R M _
200202

203+
attribute [-ext] AlgebraTensorModule.curry_injective in
201204
@[simp]
202205
theorem lTensorHomEquivHomLTensor_toLinearMap :
203-
(lTensorHomEquivHomLTensor R M P Q).toLinearMap = lTensorHomToHomLTensor R M P Q := by
206+
(lTensorHomEquivHomLTensor R M P Q).toLinearMap = lTensorHomToHomLTensor (.id R) M P Q := by
204207
let e := congr (LinearEquiv.refl R P) (dualTensorHomEquiv R M Q)
205208
have h : Function.Surjective e.toLinearMap := e.surjective
206209
refine (cancel_right h).1 ?_
207210
ext f q m
208-
simp only [e, lTensorHomEquivHomLTensor, dualTensorHomEquiv, LinearEquiv.comp_coe, compr₂_apply,
211+
simp only [e, lTensorHomEquivHomLTensor, dualTensorHomEquiv, LinearEquiv.comp_coe, compr₂ₛₗ_apply,
209212
mk_apply, LinearEquiv.coe_coe, LinearEquiv.trans_apply, congr_tmul, LinearEquiv.refl_apply,
210213
dualTensorHomEquivOfBasis_apply, dualTensorHomEquivOfBasis_symm_cancel_left, leftComm_tmul,
211214
dualTensorHom_apply, coe_comp, Function.comp_apply, lTensorHomToHomLTensor_apply, tmul_smul]
212215

216+
attribute [-ext] AlgebraTensorModule.curry_injective in
213217
@[simp]
214218
theorem rTensorHomEquivHomRTensor_toLinearMap :
215-
(rTensorHomEquivHomRTensor R M P Q).toLinearMap = rTensorHomToHomRTensor R M P Q := by
219+
(rTensorHomEquivHomRTensor R M P Q).toLinearMap = rTensorHomToHomRTensor (.id R) M P Q := by
216220
let e := congr (dualTensorHomEquiv R M P) (LinearEquiv.refl R Q)
217221
have h : Function.Surjective e.toLinearMap := e.surjective
218222
refine (cancel_right h).1 ?_
219223
ext f p q m
220-
simp only [e, rTensorHomEquivHomRTensor, dualTensorHomEquiv, compr₂_apply, mk_apply, coe_comp,
224+
simp only [e, rTensorHomEquivHomRTensor, dualTensorHomEquiv, compr₂ₛₗ_apply, mk_apply, coe_comp,
221225
LinearEquiv.coe_toLinearMap, Function.comp_apply,
222226
dualTensorHomEquivOfBasis_apply, LinearEquiv.trans_apply, congr_tmul,
223227
dualTensorHomEquivOfBasis_symm_cancel_left, LinearEquiv.refl_apply, assoc_tmul,
@@ -227,12 +231,12 @@ variable {R M N P Q}
227231

228232
@[simp]
229233
theorem lTensorHomEquivHomLTensor_apply (x : P ⊗[R] (M →ₗ[R] Q)) :
230-
lTensorHomEquivHomLTensor R M P Q x = lTensorHomToHomLTensor R M P Q x := by
234+
lTensorHomEquivHomLTensor R M P Q x = lTensorHomToHomLTensor (.id R) M P Q x := by
231235
rw [← LinearEquiv.coe_toLinearMap, lTensorHomEquivHomLTensor_toLinearMap]
232236

233237
@[simp]
234238
theorem rTensorHomEquivHomRTensor_apply (x : (M →ₗ[R] P) ⊗[R] Q) :
235-
rTensorHomEquivHomRTensor R M P Q x = rTensorHomToHomRTensor R M P Q x := by
239+
rTensorHomEquivHomRTensor R M P Q x = rTensorHomToHomRTensor (.id R) M P Q x := by
236240
rw [← LinearEquiv.coe_toLinearMap, rTensorHomEquivHomRTensor_toLinearMap]
237241

238242
variable (R M N P Q)
@@ -244,13 +248,14 @@ between the two is given by `homTensorHomEquiv_toLinearMap` and `homTensorHomEqu
244248
noncomputable def homTensorHomEquiv : (M →ₗ[R] P) ⊗[R] (N →ₗ[R] Q) ≃ₗ[R] M ⊗[R] N →ₗ[R] P ⊗[R] Q :=
245249
rTensorHomEquivHomRTensor R M P _ ≪≫ₗ
246250
(LinearEquiv.refl R M).arrowCongr (lTensorHomEquivHomLTensor R N _ Q) ≪≫ₗ
247-
lift.equiv R M N _
251+
lift.equiv _ M N _
248252

253+
attribute [-ext] AlgebraTensorModule.curry_injective in
249254
@[simp]
250255
theorem homTensorHomEquiv_toLinearMap :
251-
(homTensorHomEquiv R M N P Q).toLinearMap = homTensorHomMap R M N P Q := by
256+
(homTensorHomEquiv R M N P Q).toLinearMap = homTensorHomMap (.id R) M N P Q := by
252257
ext m n
253-
simp only [homTensorHomEquiv, compr₂_apply, mk_apply, LinearEquiv.coe_toLinearMap,
258+
simp only [homTensorHomEquiv, compr₂ₛₗ_apply, mk_apply, LinearEquiv.coe_toLinearMap,
254259
LinearEquiv.trans_apply, lift.equiv_apply, LinearEquiv.arrowCongr_apply, LinearEquiv.refl_symm,
255260
LinearEquiv.refl_apply, rTensorHomEquivHomRTensor_apply, lTensorHomEquivHomLTensor_apply,
256261
lTensorHomToHomLTensor_apply, rTensorHomToHomRTensor_apply, homTensorHomMap_apply,
@@ -260,7 +265,7 @@ variable {R M N P Q}
260265

261266
@[simp]
262267
theorem homTensorHomEquiv_apply (x : (M →ₗ[R] P) ⊗[R] (N →ₗ[R] Q)) :
263-
homTensorHomEquiv R M N P Q x = homTensorHomMap R M N P Q x := by
268+
homTensorHomEquiv R M N P Q x = homTensorHomMap (.id R) M N P Q x := by
264269
rw [← LinearEquiv.coe_toLinearMap, homTensorHomEquiv_toLinearMap]
265270

266271
end CommSemiring

Mathlib/LinearAlgebra/DirectSum/TensorProduct.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ def directSumLeft : (⨁ i₁, M₁ i₁) ⊗[R] M₂' ≃ₗ[R] ⨁ i, M₁ i
6868
(DirectSum.linearMap_ext R fun i =>
6969
TensorProduct.ext <|
7070
LinearMap.ext₂ fun m₁ m₂ => by
71-
dsimp only [comp_apply, compr₂_apply, id_apply, mk_apply]
71+
dsimp only [comp_apply, compr₂ₛₗ_apply, id_apply, mk_apply]
7272
simp_rw [DirectSum.toModule_lof, rTensor_tmul, lift.tmul, DirectSum.toModule_lof,
7373
compr₂_apply, mk_apply])
7474
(TensorProduct.ext <|
7575
DirectSum.linearMap_ext R fun i =>
7676
LinearMap.ext₂ fun m₁ m₂ => by
77-
dsimp only [comp_apply, compr₂_apply, id_apply, mk_apply]
77+
dsimp only [comp_apply, compr₂ₛₗ_apply, id_apply, mk_apply]
7878
simp_rw [lift.tmul, DirectSum.toModule_lof, compr₂_apply,
7979
mk_apply, DirectSum.toModule_lof, rTensor_tmul])
8080

Mathlib/LinearAlgebra/Dual/Lemmas.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ sending `f ⊗ g` to the composition of `TensorProduct.map f g` with
10311031
the natural isomorphism `R ⊗ R ≃ R`.
10321032
-/
10331033
def dualDistrib : Dual R M ⊗[R] Dual R N →ₗ[R] Dual R (M ⊗[R] N) :=
1034-
compRight _ (TensorProduct.lid R R) ∘ₗ homTensorHomMap R M N R R
1034+
compRight _ (TensorProduct.lid R R) ∘ₗ homTensorHomMap (.id R) M N R R
10351035

10361036
variable {R M N}
10371037

@@ -1069,7 +1069,7 @@ noncomputable def dualDistribInvOfBasis (b : Basis ι R M) (c : Basis κ R N) :
10691069
Dual R (M ⊗[R] N) →ₗ[R] Dual R M ⊗[R] Dual R N :=
10701070
∑ i, ∑ j,
10711071
(ringLmapEquivSelf R ℕ _).symm (b.dualBasis i ⊗ₜ c.dualBasis j) ∘ₗ
1072-
applyₗ (c j) ∘ₗ applyₗ (b i) ∘ₗ lcurry R M N R
1072+
applyₗ (c j) ∘ₗ applyₗ (b i) ∘ₗ lcurry (.id R) M N R
10731073

10741074
@[simp]
10751075
theorem dualDistribInvOfBasis_apply (b : Basis ι R M) (c : Basis κ R N) (f : Dual R (M ⊗[R] N)) :

0 commit comments

Comments
 (0)