@@ -40,6 +40,7 @@ theorem TensorProduct.toMatrix_map (f : M →ₗ[R] M') (g : N →ₗ[R] N') :
40
40
ext ⟨i, j⟩ ⟨i', j'⟩
41
41
simp_rw [Matrix.kroneckerMap_apply, toMatrix_apply, Basis.tensorProduct_apply,
42
42
TensorProduct.map_tmul, Basis.tensorProduct_repr_tmul_apply]
43
+ exact mul_comm _ _
43
44
44
45
/-- The matrix built from `Matrix.kronecker` corresponds to the linear map built from
45
46
`TensorProduct.map`. -/
@@ -54,20 +55,18 @@ theorem TensorProduct.toMatrix_comm :
54
55
toMatrix (bM.tensorProduct bN) (bN.tensorProduct bM) (TensorProduct.comm R M N) =
55
56
(1 : Matrix (ι × κ) (ι × κ) R).submatrix Prod.swap _root_.id := by
56
57
ext ⟨i, j⟩ ⟨i', j'⟩
57
- simp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, TensorProduct. comm_tmul,
58
- Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply, Basis.repr_self ,
59
- Finsupp.single_apply, @eq_comm _ j', @eq_comm _ i' , mul_ite, mul_one, mul_zero,
60
- Matrix.one_apply, Prod.swap_prod_mk, _root_.id , Prod.ext_iff, ite_and ]
58
+ simp only [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, comm_tmul,
59
+ Basis.tensorProduct_repr_tmul_apply, Basis.repr_self, Finsupp.single_apply, @eq_comm _ i' ,
60
+ @eq_comm _ j', smul_eq_mul , mul_ite, mul_one, mul_zero, ← ite_and, and_comm, submatrix_apply ,
61
+ Matrix.one_apply, Prod.swap_prod_mk, id_eq , Prod.mk.injEq ]
61
62
62
63
/-- `TensorProduct.assoc` corresponds to a permutation of the identity matrix. -/
63
64
theorem TensorProduct.toMatrix_assoc :
64
65
toMatrix ((bM.tensorProduct bN).tensorProduct bP) (bM.tensorProduct (bN.tensorProduct bP))
65
66
(TensorProduct.assoc R M N P) =
66
67
(1 : Matrix (ι × κ × τ) (ι × κ × τ) R).submatrix _root_.id (Equiv.prodAssoc _ _ _) := by
67
68
ext ⟨i, j, k⟩ ⟨⟨i', j'⟩, k'⟩
68
- simp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe,
69
- TensorProduct.assoc_tmul, Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply,
70
- Basis.repr_self, Finsupp.single_apply, @eq_comm _ i', @eq_comm _ j', @eq_comm _ k',
71
- mul_ite, mul_one, mul_zero, Matrix.one_apply, _root_.id, Equiv.prodAssoc_apply, Prod.ext_iff,
72
- ite_and]
73
- split_ifs <;> simp
69
+ simp only [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, assoc_tmul,
70
+ Basis.tensorProduct_repr_tmul_apply, Basis.repr_self, Finsupp.single_apply, @eq_comm _ k',
71
+ @eq_comm _ j', smul_eq_mul, mul_ite, mul_one, mul_zero, ← ite_and, @eq_comm _ i',
72
+ submatrix_apply, Matrix.one_apply, id_eq, Equiv.prodAssoc_apply, Prod.mk.injEq]
0 commit comments