Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Matrix): rank of infinite matrices #22226

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

apnelson1
Copy link
Collaborator

@apnelson1 apnelson1 commented Feb 23, 2025

This PR is the first in a series that attempts to improve generality in the current API for matrix rank.

At the moment, for A : Matrix m n R, the term A.rank is only well-defined for Fintype n and CommRing R. This is because the definition is in terms of MulVecLin, which requires these typeclass assumptions. The Fintype assumption, especially, is a little unfortunate, since it necessitates unnecessary and column/row-asymmetric Fintype assumptions throughout the API, and makes it impossible to state the important lemma rank_transpose for infinite matrices.

We don't touch the current definition Matrix.rank directly here, but we introduce cardinal and ENat-valued notions of rank for infinite matrices, with basic API for monotonicity. The lemma cRank_toNat_eq_rank is a proof of concept - it shows that the current Matrix.rank could easily be redefined as Matrix.rank A := (Matrix.cRank A).toNat with a strict gain in generality, and no loss to the existing API. The plan is to do this, and thereby prove rank_transpose in greater generality, in coming PRs.

The definition Matrix.eRank is also natural, since Matrix.eRank_transpose will be true, but Matrix.cRank_transpose will not.

Zulip thread


Open in Gitpod

@apnelson1 apnelson1 added the WIP Work in progress label Feb 23, 2025
@github-actions github-actions bot added the t-data Data (lists, quotients, numbers, etc) label Feb 23, 2025
Copy link

github-actions bot commented Feb 23, 2025

PR summary 92831e7b26

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ cRank
+ cRank_le_card_col
+ cRank_le_card_row
+ cRank_lift_mono_row.{u,u₀,v}
+ cRank_mono_col
+ cRank_mono_row.{u}
+ cRank_toNat_eq_finrank
+ cRank_toNat_eq_rank
+ eRank
+ eRank_le_card_col
+ eRank_le_card_row
+ eRank_submatrix_le
+ eRank_toNat_eq_finrank

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@apnelson1 apnelson1 removed the WIP Work in progress label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-data Data (lists, quotients, numbers, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants