/// Expressions like allDiff and sum support 1-dimensional matrices as inputs, e.g. sum(m) where m is indexed by 1..3.
/// This rule is similar to `expand_matrix_components_reference`, but turns the matrix reference
/// Other rules like `flatten_matrix_slice` take care of actually turning the slice into the matrix elements.