forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConjTranspose.lean
More file actions
472 lines (353 loc) · 17.1 KB
/
ConjTranspose.lean
File metadata and controls
472 lines (353 loc) · 17.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
/-
Copyright (c) 2018 Ellen Arlt. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang
-/
module
public import Mathlib.Algebra.Star.BigOperators
public import Mathlib.Algebra.Star.Module
public import Mathlib.Algebra.Star.StarAlgHom
public import Mathlib.Data.Matrix.Basis
/-!
# Matrices over star rings.
## Notation
The scope `Matrix` gives the following notation:
* `ᴴ` for `Matrix.conjTranspose`
-/
@[expose] public section
universe u u' v w
variable {l m n o : Type*} {m' : o → Type*} {n' : o → Type*}
variable {R : Type*} {S : Type*} {α : Type v} {β : Type w} {γ : Type*}
namespace Matrix
/-- The conjugate transpose of a matrix defined in term of `star`. -/
def conjTranspose [Star α] (M : Matrix m n α) : Matrix n m α :=
M.transpose.map star
@[inherit_doc]
scoped postfix:1024 "ᴴ" => Matrix.conjTranspose
@[simp]
lemma conjTranspose_single [DecidableEq n] [DecidableEq m] [AddMonoid α]
[StarAddMonoid α] (i : m) (j : n) (a : α) :
(single i j a)ᴴ = single j i (star a) := by
change (single i j a).transpose.map starAddEquiv = single j i (star a)
simp
section Diagonal
variable [DecidableEq n]
@[simp]
theorem diagonal_conjTranspose [AddMonoid α] [StarAddMonoid α] (v : n → α) :
(diagonal v)ᴴ = diagonal (star v) := by
rw [conjTranspose, diagonal_transpose, diagonal_map (star_zero _)]
rfl
theorem map_diagonal_star [AddMonoid α] [StarAddMonoid α] (x : n → α) :
(diagonal x).map star = diagonal (star x) := diagonal_map (star_zero _)
end Diagonal
section Diag
@[simp]
theorem diag_conjTranspose [Star α] (A : Matrix n n α) :
diag Aᴴ = star (diag A) :=
rfl
@[simp] theorem diag_map_star [Star α] (A : Matrix n n α) : diag (A.map star) = star (diag A) := rfl
end Diag
section DotProduct
variable [Fintype m] [Fintype n]
section StarRing
variable [NonUnitalSemiring α] [StarRing α] (v w : m → α)
theorem star_dotProduct_star : star v ⬝ᵥ star w = star (w ⬝ᵥ v) := by simp [dotProduct]
theorem star_dotProduct : star v ⬝ᵥ w = star (star w ⬝ᵥ v) := by simp [dotProduct]
theorem dotProduct_star : v ⬝ᵥ star w = star (w ⬝ᵥ star v) := by simp [dotProduct]
end StarRing
end DotProduct
section NonUnitalSemiring
variable [NonUnitalSemiring α]
theorem star_mulVec [Fintype n] [StarRing α] (M : Matrix m n α) (v : n → α) :
star (M *ᵥ v) = star v ᵥ* Mᴴ :=
funext fun _ => (star_dotProduct_star _ _).symm
theorem star_vecMul [Fintype m] [StarRing α] (M : Matrix m n α) (v : m → α) :
star (v ᵥ* M) = Mᴴ *ᵥ star v :=
funext fun _ => (star_dotProduct_star _ _).symm
theorem mulVec_conjTranspose [Fintype m] [StarRing α] (A : Matrix m n α) (x : m → α) :
Aᴴ *ᵥ x = star (star x ᵥ* A) :=
funext fun _ => star_dotProduct _ _
theorem vecMul_conjTranspose [Fintype n] [StarRing α] (A : Matrix m n α) (x : n → α) :
x ᵥ* Aᴴ = star (A *ᵥ star x) :=
funext fun _ => dotProduct_star _ _
end NonUnitalSemiring
@[simp]
theorem conjTranspose_vecMulVec [Mul α] [StarMul α] (w : m → α) (v : n → α) :
(vecMulVec w v)ᴴ = vecMulVec (star v) (star w) :=
ext fun _ _ => star_mul _ _
@[simp] theorem map_vecMulVec_star [Mul α] [StarMul α] (w : m → α) (v : n → α) :
(vecMulVec w v).map star = (vecMulVec (star v) (star w))ᵀ := by
rw [← conjTranspose_vecMulVec]; rfl
section ConjTranspose
open Matrix
/-- Tell `simp` what the entries are in a conjugate transposed matrix.
Compare with `mul_apply`, `diagonal_apply_eq`, etc.
-/
@[simp]
theorem conjTranspose_apply [Star α] (M : Matrix m n α) (i j) :
M.conjTranspose j i = star (M i j) :=
rfl
@[simp]
theorem conjTranspose_conjTranspose [InvolutiveStar α] (M : Matrix m n α) : Mᴴᴴ = M :=
Matrix.ext <| by simp
variable (n α) in
theorem conjTranspose_involutive [InvolutiveStar α] :
(conjTranspose : Matrix n n α → Matrix n n α).Involutive :=
conjTranspose_conjTranspose
theorem conjTranspose_transpose [Star α] (M : Matrix m n α) :
Mᴴᵀ = M.map star :=
rfl
theorem transpose_conjTranspose [Star α] (M : Matrix m n α) :
Mᵀᴴ = M.map star :=
rfl
theorem conjTranspose_injective [InvolutiveStar α] :
Function.Injective (conjTranspose : Matrix m n α → Matrix n m α) :=
(map_injective star_injective).comp transpose_injective
@[simp] theorem conjTranspose_inj [InvolutiveStar α] {A B : Matrix m n α} : Aᴴ = Bᴴ ↔ A = B :=
conjTranspose_injective.eq_iff
@[simp]
theorem conjTranspose_eq_diagonal [DecidableEq n] [AddMonoid α] [StarAddMonoid α]
{M : Matrix n n α} {v : n → α} :
Mᴴ = diagonal v ↔ M = diagonal (star v) :=
(conjTranspose_involutive n α).eq_iff.trans <| by rw [diagonal_conjTranspose]
@[simp] theorem map_star_eq_diagonal [DecidableEq n] [AddMonoid α] [StarAddMonoid α]
{M : Matrix n n α} {v : n → α} : M.map star = diagonal v ↔ M = diagonal (star v) :=
map_involutive star_involutive |>.eq_iff.trans <| by rw [map_diagonal_star]
@[simp]
theorem conjTranspose_zero [AddMonoid α] [StarAddMonoid α] : (0 : Matrix m n α)ᴴ = 0 :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_eq_zero [AddMonoid α] [StarAddMonoid α] {M : Matrix m n α} :
Mᴴ = 0 ↔ M = 0 := by
rw [← conjTranspose_inj (A := M), conjTranspose_zero]
@[simp] theorem map_star_eq_zero [AddMonoid α] [StarAddMonoid α] {M : Matrix m n α} :
M.map star = 0 ↔ M = 0 := by simp [← ext_iff]
@[simp]
theorem conjTranspose_one [DecidableEq n] [NonAssocSemiring α] [StarRing α] :
(1 : Matrix n n α)ᴴ = 1 := by
simp [conjTranspose]
@[simp]
theorem conjTranspose_eq_one [DecidableEq n] [NonAssocSemiring α] [StarRing α] {M : Matrix n n α} :
Mᴴ = 1 ↔ M = 1 :=
(conjTranspose_involutive n α).eq_iff.trans <| by rw [conjTranspose_one]
@[simp] theorem map_star_eq_one [DecidableEq n] [NonAssocSemiring α] [StarRing α]
{M : Matrix n n α} : M.map star = 1 ↔ M = 1 :=
map_involutive star_involutive |>.eq_iff.trans <| by simp
@[simp]
theorem conjTranspose_natCast [DecidableEq n] [NonAssocSemiring α] [StarRing α] (d : ℕ) :
(d : Matrix n n α)ᴴ = d := by
simp [conjTranspose, Matrix.map_natCast, diagonal_natCast]
@[simp]
theorem map_natCast_star [DecidableEq n] [NonAssocSemiring α] [StarRing α] (d : ℕ) :
(d : Matrix n n α).map star = d := by simp [Matrix.map_natCast, diagonal_natCast]
@[simp]
theorem conjTranspose_eq_natCast [DecidableEq n] [NonAssocSemiring α] [StarRing α]
{M : Matrix n n α} {d : ℕ} :
Mᴴ = d ↔ M = d :=
(conjTranspose_involutive n α).eq_iff.trans <| by rw [conjTranspose_natCast]
@[simp] theorem map_star_eq_natCast [DecidableEq n] [NonAssocSemiring α] [StarRing α]
{M : Matrix n n α} {d : ℕ} : M.map star = d ↔ M = d :=
(map_involutive star_involutive).eq_iff.trans <| by rw [map_natCast_star]
@[simp]
theorem conjTranspose_ofNat [DecidableEq n] [NonAssocSemiring α] [StarRing α] (d : ℕ)
[d.AtLeastTwo] : (ofNat(d) : Matrix n n α)ᴴ = OfNat.ofNat d :=
conjTranspose_natCast _
@[simp] theorem map_ofNat_star [DecidableEq n] [NonAssocSemiring α] [StarRing α] (d : ℕ)
[d.AtLeastTwo] : (ofNat(d) : Matrix n n α).map star = OfNat.ofNat d := map_natCast_star _
@[simp]
theorem conjTranspose_eq_ofNat [DecidableEq n] [Semiring α] [StarRing α]
{M : Matrix n n α} {d : ℕ} [d.AtLeastTwo] :
Mᴴ = ofNat(d) ↔ M = OfNat.ofNat d :=
conjTranspose_eq_natCast
@[simp] theorem map_star_eq_ofNat [DecidableEq n] [Semiring α] [StarRing α] {M : Matrix n n α}
{d : ℕ} [d.AtLeastTwo] : M.map star = ofNat(d) ↔ M = OfNat.ofNat d := map_star_eq_natCast
@[simp]
theorem conjTranspose_intCast [DecidableEq n] [Ring α] [StarRing α] (d : ℤ) :
(d : Matrix n n α)ᴴ = d := by
simp [conjTranspose, Matrix.map_intCast, diagonal_intCast]
@[simp] theorem map_intCast_star [DecidableEq n] [Ring α] [StarRing α] (d : ℤ) :
(d : Matrix n n α).map star = d := by simp [Matrix.map_intCast, diagonal_intCast]
@[simp]
theorem conjTranspose_eq_intCast [DecidableEq n] [Ring α] [StarRing α]
{M : Matrix n n α} {d : ℤ} :
Mᴴ = d ↔ M = d :=
(conjTranspose_involutive n α).eq_iff.trans <|
by rw [conjTranspose_intCast]
@[simp] theorem map_star_eq_intCast [DecidableEq n] [Ring α] [StarRing α]
{M : Matrix n n α} {d : ℤ} : M.map star = d ↔ M = d :=
(map_involutive star_involutive).eq_iff.trans <| by rw [map_intCast_star]
@[simp]
theorem conjTranspose_add [AddMonoid α] [StarAddMonoid α] (M N : Matrix m n α) :
(M + N)ᴴ = Mᴴ + Nᴴ :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_sub [AddGroup α] [StarAddMonoid α] (M N : Matrix m n α) :
(M - N)ᴴ = Mᴴ - Nᴴ :=
Matrix.ext <| by simp
/-- Note that `StarModule` is quite a strong requirement; as such we also provide the following
variants which this lemma would not apply to:
* `Matrix.conjTranspose_smul_non_comm`
* `Matrix.conjTranspose_nsmul`
* `Matrix.conjTranspose_zsmul`
* `Matrix.conjTranspose_natCast_smul`
* `Matrix.conjTranspose_intCast_smul`
* `Matrix.conjTranspose_inv_natCast_smul`
* `Matrix.conjTranspose_inv_intCast_smul`
* `Matrix.conjTranspose_ratCast_smul`
-/
@[simp]
theorem conjTranspose_smul [Star R] [Star α] [SMul R α] [StarModule R α] (c : R)
(M : Matrix m n α) : (c • M)ᴴ = star c • Mᴴ :=
Matrix.ext fun _ _ => star_smul _ _
@[simp]
theorem conjTranspose_smul_non_comm [Star R] [Star α] [SMul R α] [SMul Rᵐᵒᵖ α] (c : R)
(M : Matrix m n α) (h : ∀ (r : R) (a : α), star (r • a) = MulOpposite.op (star r) • star a) :
(c • M)ᴴ = MulOpposite.op (star c) • Mᴴ :=
Matrix.ext <| by simp [h]
theorem conjTranspose_smul_self [Mul α] [StarMul α] (c : α) (M : Matrix m n α) :
(c • M)ᴴ = MulOpposite.op (star c) • Mᴴ :=
conjTranspose_smul_non_comm c M star_mul
theorem conjTranspose_nsmul [AddMonoid α] [StarAddMonoid α] (c : ℕ) (M : Matrix m n α) :
(c • M)ᴴ = c • Mᴴ := by
simp
theorem conjTranspose_zsmul [AddGroup α] [StarAddMonoid α] (c : ℤ) (M : Matrix m n α) :
(c • M)ᴴ = c • Mᴴ := by
simp
@[simp]
theorem conjTranspose_natCast_smul [Semiring R] [AddCommMonoid α] [StarAddMonoid α] [Module R α]
(c : ℕ) (M : Matrix m n α) : ((c : R) • M)ᴴ = (c : R) • Mᴴ :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_ofNat_smul [Semiring R] [AddCommMonoid α] [StarAddMonoid α] [Module R α]
(c : ℕ) [c.AtLeastTwo] (M : Matrix m n α) :
((ofNat(c) : R) • M)ᴴ = (OfNat.ofNat c : R) • Mᴴ :=
conjTranspose_natCast_smul c M
@[simp]
theorem conjTranspose_intCast_smul [Ring R] [AddCommGroup α] [StarAddMonoid α] [Module R α] (c : ℤ)
(M : Matrix m n α) : ((c : R) • M)ᴴ = (c : R) • Mᴴ :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_inv_natCast_smul [DivisionSemiring R] [AddCommMonoid α] [StarAddMonoid α]
[Module R α] (c : ℕ) (M : Matrix m n α) : ((c : R)⁻¹ • M)ᴴ = (c : R)⁻¹ • Mᴴ :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_inv_ofNat_smul [DivisionSemiring R] [AddCommMonoid α] [StarAddMonoid α]
[Module R α] (c : ℕ) [c.AtLeastTwo] (M : Matrix m n α) :
((ofNat(c) : R)⁻¹ • M)ᴴ = (OfNat.ofNat c : R)⁻¹ • Mᴴ :=
conjTranspose_inv_natCast_smul c M
@[simp]
theorem conjTranspose_inv_intCast_smul [DivisionRing R] [AddCommGroup α] [StarAddMonoid α]
[Module R α] (c : ℤ) (M : Matrix m n α) : ((c : R)⁻¹ • M)ᴴ = (c : R)⁻¹ • Mᴴ :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_ratCast_smul [DivisionRing R] [AddCommGroup α] [StarAddMonoid α] [Module R α]
(c : ℚ) (M : Matrix m n α) : ((c : R) • M)ᴴ = (c : R) • Mᴴ :=
Matrix.ext <| by simp
theorem conjTranspose_rat_smul [AddCommGroup α] [StarAddMonoid α] [Module ℚ α] (c : ℚ)
(M : Matrix m n α) : (c • M)ᴴ = c • Mᴴ :=
Matrix.ext <| by simp
@[simp]
theorem conjTranspose_mul [Fintype n] [NonUnitalNonAssocSemiring α] [StarRing α] (M : Matrix m n α)
(N : Matrix n l α) : (M * N)ᴴ = Nᴴ * Mᴴ :=
Matrix.ext <| by simp [mul_apply]
@[simp]
theorem conjTranspose_neg [AddGroup α] [StarAddMonoid α] (M : Matrix m n α) : (-M)ᴴ = -Mᴴ :=
Matrix.ext <| by simp
theorem conjTranspose_map [Star α] [Star β] {A : Matrix m n α} (f : α → β)
(hf : Function.Semiconj f star star) : Aᴴ.map f = (A.map f)ᴴ :=
Matrix.ext fun _ _ => hf _
/-- When `star x = x` on the coefficients (such as the real numbers) `conjTranspose` and `transpose`
are the same operation. -/
@[simp]
theorem conjTranspose_eq_transpose_of_trivial [Star α] [TrivialStar α] (A : Matrix m n α) :
Aᴴ = Aᵀ := Matrix.ext fun _ _ => star_trivial _
variable (m n α)
/-- `Matrix.conjTranspose` as an `AddEquiv` -/
@[simps apply]
def conjTransposeAddEquiv [AddMonoid α] [StarAddMonoid α] : Matrix m n α ≃+ Matrix n m α where
toFun := conjTranspose
invFun := conjTranspose
left_inv := conjTranspose_conjTranspose
right_inv := conjTranspose_conjTranspose
map_add' := conjTranspose_add
@[simp]
theorem conjTransposeAddEquiv_symm [AddMonoid α] [StarAddMonoid α] :
(conjTransposeAddEquiv m n α).symm = conjTransposeAddEquiv n m α :=
rfl
variable {m n α}
theorem conjTranspose_list_sum [AddMonoid α] [StarAddMonoid α] (l : List (Matrix m n α)) :
l.sumᴴ = (l.map conjTranspose).sum :=
map_list_sum (conjTransposeAddEquiv m n α) l
theorem conjTranspose_multiset_sum [AddCommMonoid α] [StarAddMonoid α]
(s : Multiset (Matrix m n α)) : s.sumᴴ = (s.map conjTranspose).sum :=
(conjTransposeAddEquiv m n α).toAddMonoidHom.map_multiset_sum s
theorem conjTranspose_sum [AddCommMonoid α] [StarAddMonoid α] {ι : Type*} (s : Finset ι)
(M : ι → Matrix m n α) : (∑ i ∈ s, M i)ᴴ = ∑ i ∈ s, (M i)ᴴ :=
map_sum (conjTransposeAddEquiv m n α) _ s
variable (m n R α)
/-- `Matrix.conjTranspose` as a `LinearMap` -/
@[simps apply]
def conjTransposeLinearEquiv [CommSemiring R] [StarRing R] [AddCommMonoid α] [StarAddMonoid α]
[Module R α] [StarModule R α] : Matrix m n α ≃ₗ⋆[R] Matrix n m α where
__ := conjTransposeAddEquiv m n α
map_smul' := conjTranspose_smul
@[simp]
theorem conjTransposeLinearEquiv_symm [CommSemiring R] [StarRing R] [AddCommMonoid α]
[StarAddMonoid α] [Module R α] [StarModule R α] :
(conjTransposeLinearEquiv m n R α).symm = conjTransposeLinearEquiv n m R α :=
rfl
end ConjTranspose
section Star
/-- When `α` has a star operation, square matrices `Matrix n n α` have a star
operation equal to `Matrix.conjTranspose`. -/
instance [Star α] : Star (Matrix n n α) where star := conjTranspose
theorem star_eq_conjTranspose [Star α] (M : Matrix m m α) : star M = Mᴴ :=
rfl
@[simp]
theorem star_apply [Star α] (M : Matrix n n α) (i j) : (star M) i j = star (M j i) :=
rfl
instance [InvolutiveStar α] : InvolutiveStar (Matrix n n α) where
star_involutive := conjTranspose_conjTranspose
/-- When `α` is a `*`-additive monoid, `Matrix.star` is also a `*`-additive monoid. -/
instance [AddMonoid α] [StarAddMonoid α] : StarAddMonoid (Matrix n n α) where
star_add := conjTranspose_add
instance [Star α] [Star β] [SMul α β] [StarModule α β] : StarModule α (Matrix n n β) where
star_smul := conjTranspose_smul
/-- When `α` is a `*`-(semi)ring, `Matrix.star` is also a `*`-(semi)ring. -/
instance [Fintype n] [NonUnitalNonAssocSemiring α] [StarRing α] : StarRing (Matrix n n α) where
star_add := conjTranspose_add
star_mul := conjTranspose_mul
@[deprecated (since := "2026-04-20")] protected alias star_mul := StarMul.star_mul
end Star
@[simp]
theorem conjTranspose_submatrix [Star α] (A : Matrix m n α) (r : l → m)
(c : o → n) : (A.submatrix r c)ᴴ = Aᴴ.submatrix c r :=
ext fun _ _ => rfl
theorem conjTranspose_reindex [Star α] (eₘ : m ≃ l) (eₙ : n ≃ o) (M : Matrix m n α) :
(reindex eₘ eₙ M)ᴴ = reindex eₙ eₘ Mᴴ :=
rfl
variable (m α) in
/-- `Matrix.conjTranspose` as a `StarRingEquiv` to the opposite ring -/
@[simps!]
def conjTransposeRingEquiv [NonUnitalNonAssocSemiring α] [StarRing α] [Fintype m] :
Matrix m m α ≃⋆+* (Matrix m m α)ᵐᵒᵖ where
__ := (conjTransposeAddEquiv m m α).trans MulOpposite.opAddEquiv
map_mul' M N := (congrArg MulOpposite.op <| conjTranspose_mul M N).trans <| MulOpposite.op_mul ..
map_star' _ := rfl
@[simp]
theorem conjTranspose_pow [Semiring α] [StarRing α] [Fintype m] [DecidableEq m] (M : Matrix m m α)
(k : ℕ) : (M ^ k)ᴴ = Mᴴ ^ k :=
MulOpposite.op_injective <| map_pow (conjTransposeRingEquiv m α) M k
theorem conjTranspose_list_prod [Semiring α] [StarRing α] [Fintype m] [DecidableEq m]
(l : List (Matrix m m α)) : l.prodᴴ = (l.map conjTranspose).reverse.prod :=
(conjTransposeRingEquiv m α).unop_map_list_prod l
variable (n α) in
/-- `Matrix.conjTranspose` as a `StarAlgEquiv` to the opposite ring -/
@[simps!]
def conjTransposeAlgEquiv [Fintype n] [CommSemiring R] [StarRing R] [TrivialStar R] [Semiring α]
[StarRing α] [Algebra R α] [StarModule R α] : Matrix n n α ≃⋆ₐ[R] (Matrix n n α)ᵐᵒᵖ where
__ := conjTransposeRingEquiv n α
map_smul' r M := by
change conjTransposeRingEquiv n α (r • M) = r • conjTransposeRingEquiv n α M
simp
end Matrix