pub fn det(a: &[Vec<Rational>]) -> Rational
Exact determinant via forward elimination (product of pivots × permutation sign).