/// Only same-operator bounds on the same atomic LHS are merged. Integer strictness is left alone
/// expressions here can enumerate the Cartesian product of both operand domains, turning a cheap
/// node-local check into the dominant translation cost. Literal and declaration-domain lookup are
fn resolved_ground_domain_of_for_partial_eval(expr: &Expr) -> Option<Moo<GroundDomain>> {
matches!(expr, Expr::Min(_, values) | Expr::Max(_, values) if is_empty_matrix_operand(values))
/// settle both at once: where it is undefined, relational semantics make the containing boolean
/// domain when that is a constant-size lookup: a declaration's own domain, or the empty domain of
/// an empty `min`/`max`. Deep evaluation runs once per expansion and can afford the general case.
/// scheduler. Use [`run_partial_evaluator`] when a caller explicitly wants semantic checks that
/// Nested uses such as `(x = true) <-> and([y = true, ...])` otherwise force Minion flattening to
/// introduce aux variables for the left-hand `Eq`, because both sides of the outer equality are
/// non-atomic. Lowering the tautological `= true` first keeps a boolean decision variable atomic
/// Literal–literal equalities are left alone for constant folding. Non-boolean atoms are refused.
fn run_partial_evaluator_with_mode(expr: &Expr, mode: PartialEvalMode) -> ApplicationResult {
Expr::Flatten(_, _, _) => Err(RuleNotApplicable), // TODO: check if anything can be done here
/// `int(1..)`, and an empty `[]` parses to `[;int(1..0)]`. Matching the elements directly folds
fn as_constant_bound_comparison_ref(expr: &Expr) -> Option<(&Atom, ConstantBoundOp, i32)> {
/// Bounds are keyed rather than searched, so merging `n` bounds over distinct atoms -- the shape
/// Checks for tautologies involving pairs of terms inside an or, returning true if one is found.
/// A power folds when both operands are singletons, taking the base from a declaration domain.