pub fn smith_normal_form(mat: &[Vec<i32>]) -> Vec<i32>
Compute the Smith Normal Form of an integer matrix.
Returns the diagonal entries (elementary divisors) of the SNF. Used for homology computation over Z.