/// Introduces `FlatWeightedSumLeq`, `FlatWeightedSumGeq`, `FlatSumLeq`, FlatSumGeq` constraints.
/// If the input is a weighted sum, the weighted sum constraints are used, otherwise the standard
/// Cases 6 and 7 could potentially be a normalising rule `-e ~> -1*e`. However, I think that we
/// If the term is in the form <coefficient> * <non flat expression>, the expression is flattened
/// + Returns [`ApplicationError::RuleNotApplicable`] if the term is a product containing a matrix
/// + Returns [`ApplicationError::RuleNotApplicable`] if the expression cannot be placed into an
/// because implications can be expressed as a `reifyimply` constraint, which takes a constraint as
// We only want to flatten products containing matrix literals that are lists but not child terms, e.g.
/// The regular bool_lit case is dealt with directly by the Minion solver interface (as it is a
/// This rule has lower priority than boolean_literal_to_wliteral so that we can assume that the