1
1
/-
2
2
Copyright (c) 2020 Scott Morrison. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
- Authors: Scott Morrison
4
+ Authors: Scott Morrison, Eric Wieser
5
5
-/
6
6
import data.matrix.basis
7
7
import ring_theory.tensor_product
@@ -27,39 +27,16 @@ variables {n : Type w}
27
27
variables (R A n)
28
28
namespace matrix_equiv_tensor
29
29
30
- /--
31
- (Implementation detail).
32
- The bare function underlying `(A ⊗[R] matrix n n R) →ₐ[R] matrix n n A`, on pure tensors.
33
- -/
34
- def to_fun (a : A) (m : matrix n n R) : matrix n n A :=
35
- λ i j, a * algebra_map R A (m i j)
36
-
37
- /--
38
- (Implementation detail).
39
- The function underlying `(A ⊗[R] matrix n n R) →ₐ[R] matrix n n A`,
40
- as an `R`-linear map in the second tensor factor.
41
- -/
42
- def to_fun_right_linear (a : A) : matrix n n R →ₗ[R] matrix n n A :=
43
- { to_fun := to_fun R A n a,
44
- map_add' := λ x y, by { dsimp only [to_fun], ext, simp [mul_add], },
45
- map_smul' := λ r x,
46
- begin
47
- dsimp only [to_fun],
48
- ext,
49
- simp only [pi.smul_apply, ring_hom.map_mul, algebra.id.smul_eq_mul],
50
- dsimp,
51
- rw [algebra.smul_def r, ←_root_.mul_assoc, ←_root_.mul_assoc, algebra.commutes],
52
- end , }
53
-
54
30
/--
55
31
(Implementation detail).
56
32
The function underlying `(A ⊗[R] matrix n n R) →ₐ[R] matrix n n A`,
57
33
as an `R`-bilinear map.
58
34
-/
59
35
def to_fun_bilinear : A →ₗ[R] matrix n n R →ₗ[R] matrix n n A :=
60
- { to_fun := to_fun_right_linear R A n,
61
- map_add' := λ x y, by { ext, simp [to_fun_right_linear, to_fun, add_mul], },
62
- map_smul' := λ r x, by { ext, simp [to_fun_right_linear, to_fun] }, }
36
+ (algebra.lsmul R (matrix n n A)).to_linear_map.compl₂ (algebra.linear_map R A).map_matrix
37
+
38
+ @[simp] lemma to_fun_bilinear_apply (a : A) (m : matrix n n R) :
39
+ to_fun_bilinear R A n a m = a • m.map (algebra_map R A) := rfl
63
40
64
41
/--
65
42
(Implementation detail).
@@ -78,28 +55,23 @@ def to_fun_alg_hom : (A ⊗[R] matrix n n R) →ₐ[R] matrix n n A :=
78
55
alg_hom_of_linear_map_tensor_product
79
56
(to_fun_linear R A n)
80
57
begin
81
- intros, ext,
82
- simp_rw [to_fun_linear, to_fun_bilinear, lift.tmul],
58
+ intros,
59
+ simp_rw [to_fun_linear, lift.tmul, to_fun_bilinear_apply, mul_eq_mul, matrix.map_mul],
60
+ ext,
83
61
dsimp,
84
- simp_rw [to_fun_right_linear],
85
- dsimp,
86
- simp_rw [to_fun, matrix.mul_mul_left, pi.smul_apply, smul_eq_mul, matrix.mul_apply,
87
- ←_root_.mul_assoc _ a₂ _, algebra.commutes, _root_.mul_assoc a₂ _ _, ←finset.mul_sum,
88
- ring_hom.map_sum, ring_hom.map_mul, _root_.mul_assoc],
62
+ simp_rw [matrix.mul_apply, matrix.map, pi.smul_apply, smul_eq_mul, finset.mul_sum,
63
+ _root_.mul_assoc, algebra.left_comm],
89
64
end
90
65
begin
91
- intros, ext,
92
- simp only [to_fun_linear, to_fun_bilinear, to_fun_right_linear, to_fun, matrix.one_apply ,
93
- algebra_map_matrix_apply, lift.tmul, linear_map.coe_mk] ,
94
- split_ifs; simp ,
66
+ intros,
67
+ simp_rw [to_fun_linear, lift.tmul, to_fun_bilinear_apply ,
68
+ matrix.map_one (algebra_map R A) (map_zero _) (map_one _), algebra_map_smul ,
69
+ algebra.algebra_map_eq_smul_one] ,
95
70
end
96
71
97
72
@[simp] lemma to_fun_alg_hom_apply (a : A) (m : matrix n n R) :
98
- to_fun_alg_hom R A n (a ⊗ₜ m) = λ i j, a * algebra_map R A (m i j) :=
99
- begin
100
- simp [to_fun_alg_hom, alg_hom_of_linear_map_tensor_product, to_fun_linear],
101
- refl,
102
- end
73
+ to_fun_alg_hom R A n (a ⊗ₜ m) = a • m.map (algebra_map R A) :=
74
+ by simp [to_fun_alg_hom, alg_hom_of_linear_map_tensor_product, to_fun_linear]
103
75
104
76
/--
105
77
(Implementation detail.)
@@ -118,11 +90,11 @@ by simp [inv_fun]
118
90
by simp [inv_fun, add_tmul, finset.sum_add_distrib]
119
91
120
92
@[simp] lemma inv_fun_smul (a : A) (M : matrix n n A) :
121
- inv_fun R A n (λ i j, a * M i j ) = (a ⊗ₜ 1 ) * inv_fun R A n M :=
93
+ inv_fun R A n (a • M ) = (a ⊗ₜ 1 ) * inv_fun R A n M :=
122
94
by simp [inv_fun,finset.mul_sum]
123
95
124
96
@[simp] lemma inv_fun_algebra_map (M : matrix n n R) :
125
- inv_fun R A n (λ i j, algebra_map R A (M i j )) = 1 ⊗ₜ M :=
97
+ inv_fun R A n (M.map ( algebra_map R A)) = 1 ⊗ₜ M :=
126
98
begin
127
99
dsimp [inv_fun],
128
100
simp only [algebra.algebra_map_eq_smul_one, smul_tmul, ←tmul_sum, mul_boole],
@@ -133,17 +105,17 @@ end
133
105
134
106
lemma right_inv (M : matrix n n A) : (to_fun_alg_hom R A n) (inv_fun R A n M) = M :=
135
107
begin
136
- simp only [inv_fun, alg_hom.map_sum, std_basis_matrix, apply_ite ⇑(algebra_map R A),
137
- mul_boole, to_fun_alg_hom_apply, ring_hom.map_zero, ring_hom.map_one],
108
+ simp only [inv_fun, alg_hom.map_sum, std_basis_matrix, apply_ite ⇑(algebra_map R A), smul_eq_mul,
109
+ mul_boole, to_fun_alg_hom_apply, ring_hom.map_zero, ring_hom.map_one, matrix.map, pi.smul_def ],
138
110
convert finset.sum_product, apply matrix_eq_sum_std_basis,
139
111
end
140
112
141
113
lemma left_inv (M : A ⊗[R] matrix n n R) : inv_fun R A n (to_fun_alg_hom R A n M) = M :=
142
114
begin
143
- apply tensor_product.induction_on M,
115
+ induction M using tensor_product.induction_on with a m x y hx hy,
116
+ { simp, },
144
117
{ simp, },
145
- { intros a m, simp, },
146
- { intros x y hx hy, simp [alg_hom.map_sum, hx, hy], },
118
+ { simp [alg_hom.map_sum, hx, hy], },
147
119
end
148
120
149
121
/--
0 commit comments