Zulip Chat Archive
Stream: Is there code for X?
Topic: dimension 1 matrix
Edison Xie (Feb 26 2025 at 22:30):
Do we have that Matrix (Fin 1) (Fin 1) A ≃ₐ[K] A
for A
an K
-algebra?
Kevin Buzzard (Feb 26 2025 at 22:39):
@loogle Matrix ?i ?i ?A, ?A
loogle (Feb 26 2025 at 22:39):
:search: Matrix.map_smul', Matrix.map_op_smul', and 2086 more
Kevin Buzzard (Feb 26 2025 at 22:39):
hmm that's quite a lot
@loogle Matrix ?i ?i ?A ≃ₐ[?B] ?A
loogle (Feb 26 2025 at 22:39):
:shrug: nothing found
Eric Wieser (Feb 26 2025 at 22:40):
@loogle Matrix ?i ?i, Unique ?i
loogle (Feb 26 2025 at 22:40):
:search: Matrix.diagonal_unique, Matrix.diag_col_mul_row, and 6 more
Eric Wieser (Feb 26 2025 at 22:42):
The statement I would expect is
example {n} [Unique n] .... : Matrix n n A ≃ₐ[K] A
Kevin Buzzard (Feb 26 2025 at 22:42):
Yeah it doesn't look like it (but Eric is right, it should be stated for a type with a Unique
typeclass rather than just Fin 1
)
Eric Wieser (Feb 26 2025 at 22:42):
And the ring version, and the "rectangular" version with {m n} [Unique m] [Unique n]
for AddEquiv
and LinearEquiv
, etc
Ruben Van de Velde (Feb 26 2025 at 22:59):
import Mathlib
example {n A K : Type*} [Unique n] [Field A] [Field K] [Algebra K A] : Matrix n n A ≃ₐ[K] A where
toFun m := m default default
invFun a := .of fun _ _ => a
left_inv m := by ext i j; simp [Subsingleton.elim i default, Subsingleton.elim j default]
right_inv a := by simp
map_mul' x y := by simp [Matrix.mul_apply]
map_add' x y := by simp
commutes' r := by aesop
Eric Wieser (Feb 26 2025 at 23:01):
I'm going to deduct marks for Field
, but otherwise looks right
Eric Wieser (Feb 26 2025 at 23:02):
I think a PR should build the whole family of Unique
equivalence on top of each other, not just that one at the end
Edison Xie (Feb 26 2025 at 23:03):
Eric Wieser said:
I think a PR should build the whole family of
Unique
equivalence on top of each other, not just that one at the end
which file do you think it belongs to and what name do you think it should be named as?
Eric Wieser (Feb 26 2025 at 23:06):
Maybe Matrix.uniqueEquiv
, Matrix.uniqueAlgEquiv
, etc
Eric Wieser (Feb 26 2025 at 23:07):
#find_home should give good suggestions for where to put them
Ruben Van de Velde (Feb 26 2025 at 23:09):
Yeah, I just wanted to force through to a :tada: asap, and let anyone who felt like it deconstruct it into mathlib-appropriate pieces
Edison Xie (Feb 27 2025 at 15:55):
pr #22375
Last updated: May 02 2025 at 03:31 UTC