Commit 2026-11-13 21:54 189ce949

View on Github →

feat(Data/Matrix,LinearAlgebra/Matrix): generalize basic lemmas to rectangular matrices (#45927) Generalize 40 square-matrix (Matrix n n) lemmas in place to rectangular matrices:

  • Analysis
    • InnerProductSpace/PiL2: inner_matrix_row_row, inner_matrix_col_col
    • Normed
      • Lp/PiLp: PiLp.basis_toMatrix_basisFun_mul
      • Module/FiniteDimension: Module.Basis.continuous_toMatrix
  • Combinatorics/SimpleGraph/AdjMatrix: SimpleGraph.adjMatrix_mul_apply, SimpleGraph.mul_adjMatrix_apply
  • Data/Matrix
    • Basis: Matrix.single_neg, Matrix.single_mulVec_eq
    • Block: Matrix.comp_diagonal
    • Mul: Matrix.vecMulVec_zero, Matrix.vecMulVec_ne_zero, Matrix.vecMulVec_eq_zero, Matrix.mul_mul_apply, Matrix.submatrix_mul_transpose_submatrix
    • PEquiv: PEquiv.toMatrix_toPEquiv_eq
  • LinearAlgebra
    • AffineSpace/Matrix: AffineBasis.toMatrix_vecMul_coords, AffineBasis.toMatrix_mul_toMatrix
    • Matrix
      • Basis: Module.Basis.coePiBasisFun.toMatrix_eq_transpose, Module.Basis.toMatrix_smul, basis_toMatrix_basisFun_mul, Module.Basis.toMatrix_reindex, Module.Basis.toMatrix_map
      • Defs: Matrix.map_smul', Matrix.map_op_smul'
      • Integer: Matrix.map_mul_natCast, Matrix.map_mul_intCast, Matrix.map_mul_ratCast
      • NonsingularInverse: Matrix.right_inv_eq_left_inv
      • RowCol: Matrix.replicateRow_mul_replicateCol, Matrix.replicateRow_mul_replicateCol_apply
      • SemiringInverse: Matrix.isAddUnit_mul
      • Symmetric: Matrix.isSymm_mul_transpose_self, Matrix.isSymm_transpose_mul_self
      • ToLin: Matrix.ker_toLin'_eq_bot_iff, LinearMap.toMatrix_eq_toMatrix', LinearMap.toMatrix_singleton
      • Transvection: Matrix.TransvectionStruct.sumInl_toMatrix_prod_mul, Matrix.TransvectionStruct.mul_sumInl_toMatrix_prod
  • RingTheory/Trace/Basic: Algebra.traceMatrix_of_matrix_vecMul, Algebra.traceMatrix_of_matrix_mulVec Found using a (small) Gemini 4 Carbon swarm, asked to write metaprograms to spot accidental square specializations with trivial fixes.

Estimated changes