Skip to content

Commit 696b05b

Browse files
chore: generalize Algebra.TensorProduct.tensorTensorTensorComm (#22409)
Co-authored-by: @erdOne Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Whysoserioushah <109107491+Whysoserioushah@users.noreply.github.com>
1 parent 82bee84 commit 696b05b

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

Mathlib/RingTheory/Bialgebra/TensorProduct.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ lemma counit_eq_algHom_toLinearMap :
4141

4242
lemma comul_eq_algHom_toLinearMap :
4343
Coalgebra.comul (R := R) (A := A ⊗[R] B) =
44-
((Algebra.TensorProduct.tensorTensorTensorComm R A A B B).toAlgHom.comp
44+
((Algebra.TensorProduct.tensorTensorTensorComm R R A A B B).toAlgHom.comp
4545
(Algebra.TensorProduct.map (Bialgebra.comulAlgHom R A)
4646
(Bialgebra.comulAlgHom R B))).toLinearMap := by
47-
rfl
47+
ext; simp [← Algebra.TensorProduct.toLinearEquiv_tensorTensorTensorComm]
4848

4949
end Bialgebra.TensorProduct
5050

Mathlib/RingTheory/TensorProduct/Basic.lean

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,30 +1048,41 @@ theorem leftComm_symm_tmul (m : A) (n : B) (p : C) :
10481048
theorem leftComm_toLinearEquiv :
10491049
(leftComm R A B C : _ ≃ₗ[R] _) = _root_.TensorProduct.leftComm R A B C := rfl
10501050

1051-
variable (R A B C D) in
1051+
variable (R S A B C D) in
1052+
set_option maxSynthPendingDepth 2 in
10521053
/-- Tensor product of algebras analogue of `mul_mul_mul_comm`.
10531054
1054-
This is the algebra version of `TensorProduct.tensorTensorTensorComm`. -/
1055-
def tensorTensorTensorComm : (A ⊗[R] B) ⊗[R] C ⊗[R] D ≃ₐ[R] (A ⊗[R] C) ⊗[R] B ⊗[R] D :=
1056-
let e₁ := Algebra.TensorProduct.assoc R A B (C ⊗[R] D)
1057-
let e₂ := congr (1 : A ≃ₐ[R] A) (leftComm R B C D)
1058-
let e₃ := (Algebra.TensorProduct.assoc R A C (B ⊗[R] D)).symm
1059-
e₁.trans (e₂.trans e₃)
1055+
This is the algebra version of `TensorProduct.AlgebraTensorModule.tensorTensorTensorComm`. -/
1056+
def tensorTensorTensorComm : (A ⊗[R] B) ⊗[S] C ⊗[R] D ≃ₐ[S] (A ⊗[S] C) ⊗[R] B ⊗[R] D :=
1057+
AlgEquiv.ofLinearEquiv (TensorProduct.AlgebraTensorModule.tensorTensorTensorComm R S A B C D)
1058+
rfl (LinearMap.map_mul_iff _ |>.mpr <| by ext; simp)
10601059

10611060
@[simp]
10621061
theorem tensorTensorTensorComm_tmul (m : A) (n : B) (p : C) (q : D) :
1063-
tensorTensorTensorComm R A B C D (m ⊗ₜ n ⊗ₜ (p ⊗ₜ q)) = m ⊗ₜ p ⊗ₜ (n ⊗ₜ q) :=
1062+
tensorTensorTensorComm R S A B C D (m ⊗ₜ n ⊗ₜ (p ⊗ₜ q)) = m ⊗ₜ p ⊗ₜ (n ⊗ₜ q) :=
10641063
rfl
10651064

1065+
set_option maxSynthPendingDepth 2 in
10661066
@[simp]
1067+
theorem tensorTensorTensorComm_symm_tmul (m : A) (n : C) (p : B) (q : D) :
1068+
(tensorTensorTensorComm R S A B C D).symm (m ⊗ₜ n ⊗ₜ (p ⊗ₜ q)) = m ⊗ₜ p ⊗ₜ (n ⊗ₜ q) :=
1069+
rfl
1070+
10671071
theorem tensorTensorTensorComm_symm :
1068-
(tensorTensorTensorComm R A B C D).symm = tensorTensorTensorComm R A C B D := by
1072+
(tensorTensorTensorComm R R A B C D).symm = tensorTensorTensorComm R R A C B D := by
10691073
ext; rfl
10701074

1071-
@[simp]
1075+
set_option maxSynthPendingDepth 2 in
10721076
theorem tensorTensorTensorComm_toLinearEquiv :
1073-
(tensorTensorTensorComm R A B C D : _ ≃ₗ[R] _) =
1074-
_root_.TensorProduct.tensorTensorTensorComm R A B C D := rfl
1077+
(tensorTensorTensorComm R S A B C D).toLinearEquiv =
1078+
TensorProduct.AlgebraTensorModule.tensorTensorTensorComm R S A B C D := rfl
1079+
1080+
@[simp]
1081+
theorem toLinearEquiv_tensorTensorTensorComm :
1082+
(tensorTensorTensorComm R R A B C D).toLinearEquiv =
1083+
_root_.TensorProduct.tensorTensorTensorComm R A B C D := by
1084+
apply LinearEquiv.toLinearMap_injective
1085+
ext; simp
10751086

10761087
end
10771088

0 commit comments

Comments
 (0)