Divisibility of matrix entries under multiplication #
A common divisor of the entries of a matrix survives multiplication on either side: every
entry of P * A * Q is an S-combination of entries of A, so anything dividing all of
those divides all of these.
Nothing here needs invertibility, a square shape, or a diagonal target — only that the
products are conformable — so the statements are at NonUnitalCommSemiring and rectangular.
No multiplicative identity is involved; multiplication is used both associatively and
commutatively.
The Smith-normal-form theory consumes both, but neither has a Smith-normal-form hypothesis and neither should require importing that theory to reach.
Main results #
Matrix.dvd_mul_mul_apply: a common divisor of the entries ofAdivides every entry ofP * A * Q.Matrix.dvd_diag_of_dvd_entries: ifL * A * RisMatrix.diagonal d, then a common divisor of the entries ofAdivides everyd k.Matrix.forall_dvd_apply_iff_of_mul_eq_mul: ifW * B = A * W, then an element coprime todet Wdivides every entry ofAexactly when it divides every entry ofB—AandBare conjugate after invertingdet W.
A common divisor of the entries survives two-sided multiplication. If c divides
every entry of A, then it divides every entry of P * A * Q, since each entry of the
product is an S-combination of entries of A.
Every common divisor of the entries divides every diagonal entry. Each d k is the
(k, k) entry of L * A * R, hence an S-combination of the entries of A.
Conjugation by a matrix of determinant coprime to e preserves divisibility by e. If
W * B = A * W, then adjugate W * A * W = det W • B and W * B * adjugate W = det W • A, so an
e coprime to det W divides every entry of A exactly when it divides every entry of B.