Skip to content

Commit c1e30e1

Browse files
committed
1 parent 72acbe6 commit c1e30e1

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

  • Mathlib/LinearAlgebra/TensorProduct

Mathlib/LinearAlgebra/TensorProduct/Pi.lean

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,14 @@ section
4343

4444
variable {ι} (M : ι → Type*) [∀ i, AddCommMonoid (M i)] [∀ i, Module R (M i)]
4545

46-
set_option backward.privateInPublic true in
47-
private def piRightHomBil : N →ₗ[S] (∀ i, M i) →ₗ[R] ∀ i, N ⊗[R] M i where
46+
/-- (Implementation): Bilinear map for defining `TensorProduct.piRightHom`. -/
47+
def piRightHomBil : N →ₗ[S] (∀ i, M i) →ₗ[R] ∀ i, N ⊗[R] M i where
4848
toFun n := LinearMap.pi (fun i ↦ mk R N (M i) n ∘ₗ LinearMap.proj i)
4949
map_add' _ _ := by
5050
ext
5151
simp
5252
map_smul' _ _ := rfl
5353

54-
set_option backward.privateInPublic true in
55-
set_option backward.privateInPublic.warn false in
5654
/-- For any `R`-module `N`, index type `ι` and family of `R`-modules `Mᵢ`, there is a natural
5755
linear map `N ⊗[R] (∀ i, M i) →ₗ ∀ i, N ⊗[R] M i`. This map is an isomorphism if `ι` is finite. -/
5856
def piRightHom : N ⊗[R] (∀ i, M i) →ₗ[S] ∀ i, N ⊗[R] M i :=
@@ -65,8 +63,7 @@ lemma piRightHom_tmul (x : N) (f : ∀ i, M i) :
6563

6664
variable [Fintype ι] [DecidableEq ι]
6765

68-
set_option backward.privateInPublic true in
69-
private
66+
/-- (Implementation): Inverse for `TensorProduct.piRight`. -/
7067
def piRightInv : (∀ i, N ⊗[R] M i) →ₗ[S] N ⊗[R] ∀ i, M i :=
7168
LinearMap.lsum S (fun i ↦ N ⊗[R] M i) S <| fun i ↦
7269
AlgebraTensorModule.map LinearMap.id (single R M i)
@@ -90,8 +87,6 @@ private lemma piRightInv_single (x : N) (i : ι) (m : M i) :
9087
rw [this]
9188
simp
9289

93-
set_option backward.privateInPublic true in
94-
set_option backward.privateInPublic.warn false in
9590
/-- Tensor product commutes with finite products on the right. -/
9691
def piRight : N ⊗[R] (∀ i, M i) ≃ₗ[S] ∀ i, N ⊗[R] M i :=
9792
LinearEquiv.ofLinear
@@ -122,8 +117,8 @@ TODO: generalize to `S`-linear. -/
122117

123118
end
124119

125-
set_option backward.privateInPublic true in
126-
private def piScalarRightHomBil : N →ₗ[S] (ι → R) →ₗ[R] (ι → N) where
120+
/-- (Implementation): Bilinear map for defining `TensorProduct.piScalarRightHom`. -/
121+
def piScalarRightHomBil : N →ₗ[S] (ι → R) →ₗ[R] (ι → N) where
127122
toFun n := LinearMap.compLeft (toSpanSingleton R N n) ι
128123
map_add' x y := by
129124
ext i j
@@ -135,8 +130,6 @@ private def piScalarRightHomBil : N →ₗ[S] (ι → R) →ₗ[R] (ι → N) wh
135130
rw [← IsScalarTower.smul_assoc, _root_.Algebra.smul_def, mul_comm, mul_smul]
136131
simp
137132

138-
set_option backward.privateInPublic true in
139-
set_option backward.privateInPublic.warn false in
140133
/-- For any `R`-module `N` and index type `ι`, there is a natural
141134
linear map `N ⊗[R] (ι → R) →ₗ (ι → N)`. This map is an isomorphism if `ι` is finite. -/
142135
def piScalarRightHom : N ⊗[R] (ι → R) →ₗ[S] (ι → N) :=
@@ -150,8 +143,7 @@ lemma piScalarRightHom_tmul (x : N) (f : ι → R) :
150143

151144
variable [Fintype ι] [DecidableEq ι]
152145

153-
set_option backward.privateInPublic true in
154-
private
146+
/-- (Implementation): Inverse for `TensorProduct.piScalarRight`. -/
155147
def piScalarRightInv : (ι → N) →ₗ[S] N ⊗[R] (ι → R) :=
156148
LinearMap.lsum S (fun _ ↦ N) S <| fun i ↦ {
157149
toFun := fun n ↦ n ⊗ₜ Pi.single i 1
@@ -164,8 +156,6 @@ private lemma piScalarRightInv_single (x : N) (i : ι) :
164156
piScalarRightInv R S N ι (Pi.single i x) = x ⊗ₜ Pi.single i 1 := by
165157
simp [piScalarRightInv, Pi.single_apply, TensorProduct.ite_tmul]
166158

167-
set_option backward.privateInPublic true in
168-
set_option backward.privateInPublic.warn false in
169159
/-- For any `R`-module `N` and finite index type `ι`, `N ⊗[R] (ι → R)` is canonically
170160
isomorphic to `ι → N`. -/
171161
def piScalarRight : N ⊗[R] (ι → R) ≃ₗ[S] (ι → N) :=

0 commit comments

Comments
 (0)