Commit 2025-04-10 10:51 8c16e6e1

View on Github →

feat(Matrix): row and column functions (#22957) For A : Matrix m n R and i : m, j : n, we define A.row i to refer to the ith row of A as a vector in n -> R, and A.col j to refer to the jth column of A as a vector in m -> R. A.row and A.col are defeq to A and A.transpose respectively, but are helpful to refer to these objects explicitly, avoiding noisy eta-expansions and the simplifier manipulating transposes, such as in expressions like Injective A.col. The current version has Matrix.row and Matrix.col as defs rather than abbrevs - this allows the simplifier to make the reasonable changes A.row i j -> A i j and A.col i j -> A j i, but requires some fixes to a few rws in proofs that exploit the defeq between a matrix and a function. A less aggressive version could have both as abbrevs. We also change some spellings to use the new notation (eg Set.range (fun i => A.transpose i) -> Set.range A.col). Zulip discussion

Estimated changes

added def Matrix.col
added theorem Matrix.col_apply'
added theorem Matrix.col_apply
added theorem Matrix.col_def
added theorem Matrix.col_map
added theorem Matrix.col_submatrix
added theorem Matrix.col_transpose
added theorem Matrix.of_col
added theorem Matrix.of_row
added def Matrix.row
added theorem Matrix.row_apply'
added theorem Matrix.row_apply
added theorem Matrix.row_def
added theorem Matrix.row_eq_self
added theorem Matrix.row_map
added theorem Matrix.row_submatrix
added theorem Matrix.row_transpose