// If you triggered this assertion, you either made a variant of this enum that is too big, or you
/// TODO: make this compatible with Set Difference calculations - need to change return type and domain for this expression and write a set comprehension rule.
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#abs)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#alldiff)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#sumgeq)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#sumleq)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#ineq)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#minuseq)
/// documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#weightedsumleq)
/// documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#weightedsumleq)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#minuseq)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#product)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#div_undefzero)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#mod_undefzero)
/// + [Github comment about `pow` semantics](https://github.com/minion/minion/issues/40#issuecomment-2595914891)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#pow)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#reify)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#reifyimply)
/// `w-inintervalset(x, [a1,a2, b1,b2, … ])` ensures that the value of x belongs to one of the
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#w-inintervalset)
/// `w-inset(x, [v1, v2, … ])` ensures that the value of `x` is one of the explicitly given values `v1`, `v2`, etc.
/// This constraint enforces membership in a specific set of discrete values rather than intervals.
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#w-inset)
/// + [Minion documentation](https://minion-solver.readthedocs.io/en/stable/usage/constraints.html#element_one)
/// This expression is for encoding i32 ints as a vector of boolean expressions for cnf - using 2s complement
/// Addition over a pair of expressions (i.e. a + b) rather than a vec-expr like Expression::Sum.
/// Multiplication over a pair of expressions (i.e. a * b) rather than a vec-expr like Expression::Product.
// for the given matrix literal, return a bounded domain from the min to max of applying op to each
// For example, to find the bounds of the intervals [1,4], [1,5] combined using op, we used to do
// TODO: (flm8) the Minion bindings currently only support single ranges for domains, so we use the min/max bounds
/// This is true for both forms of matrix literals: those with elements of type [`Literal`] and
/// It is generally undefined to edit the length of a matrix unless it is a list (as defined by
if let Some(max_atom_category) = Biplate::<Atom>::universe_bi(&x).iter().map(|x| x.category_of()).max()
if let Some(max_declaration_category) = Biplate::<DeclarationPtr>::universe_bi(&x).iter().map(|x| x.category_of()).max()
"Invalid indexing operation: expected the operand to be a collection, got {self}: {subject_ty}"
"Invalid indexing operation: expected the operand to be a collection, got {self}: {matrix_type}"