Zulip Chat Archive
Stream: mathlib4
Topic: Matrix.toLin' vs Matrix.mulVecLin
Yury G. Kudryashov (Apr 29 2025 at 18:18):
Which one of docs#Matrix.mulVecLin and docs#Matrix.toLin' is supposed to be the normal form for docs#Matrix.mulVec as a linear map?
Yury G. Kudryashov (Apr 29 2025 at 18:18):
Note that toLin' has an extra DecidableEq assumption that is only needed for the invFun part of the equivalence.
Yury G. Kudryashov (Apr 29 2025 at 18:20):
@loogle Matrix.toLin'
loogle (Apr 29 2025 at 18:20):
:search: Matrix.toLin', Matrix.toLin_eq_toLin', and 61 more
Yury G. Kudryashov (Apr 29 2025 at 18:21):
@loogle Matrix.mulVecLin
loogle (Apr 29 2025 at 18:21):
:search: Matrix.mulVecLin, Matrix.mulVecLin_transpose, and 20 more
Eric Wieser (Apr 29 2025 at 20:43):
The unbundled one should be the normal form I think
Yury G. Kudryashov (Apr 29 2025 at 21:46):
Then I'll make a PR adding the missing simp lemmas and replacing toLin' with mulVecLin.
Yury G. Kudryashov (Apr 29 2025 at 21:46):
BTW, should we have a def for matrix nullity?
Yury G. Kudryashov (Apr 29 2025 at 21:46):
We have one for rank, but for nullity we use the finrank of the kernel of mulVecLin (or toLin')
Yury G. Kudryashov (Apr 29 2025 at 21:47):
(in fact, we have 3 defs for rank with different codomains)
Eric Wieser (Apr 30 2025 at 00:49):
I think @Peter Nelson was in the process of refactoring matrix ranks to remove finiteness conditions
Yury G. Kudryashov (Apr 30 2025 at 00:49):
Remove in which sense?
Yury G. Kudryashov (Apr 30 2025 at 00:50):
Yury G. Kudryashov (Apr 30 2025 at 00:51):
I see, it assumes fintype for no reason. It should be just m.crank.toNat
Yury G. Kudryashov (Apr 30 2025 at 00:51):
But this refactor is orthogonal to my question
Eric Wieser (Apr 30 2025 at 01:06):
(it was in response to your parenthetical)
Yury G. Kudryashov (Apr 30 2025 at 01:49):
After the refactor, we may still have 3 versions with codomains Cardinal, ENat, and Nat, but Nat version probably won't assume Fintype.
Yury G. Kudryashov (Apr 30 2025 at 01:50):
UPD: wait, we need Fintype to define mulVec, scratch that.
Yury G. Kudryashov (Apr 30 2025 at 01:51):
Or do you want to redefine Matrix.rank as the rank of the submodule generated by the columns without mulVec?
Peter Nelson (Apr 30 2025 at 01:51):
You don’t need mulVec for rank. It is the dimension of the row or column span.
Yury G. Kudryashov (Apr 30 2025 at 01:55):
I see.
Last updated: May 02 2025 at 03:31 UTC