A Constraint consists of an optional lower and upper bound (inclusive),
constraining a value to a set of the form ∅, {x}, [x, y], [x, ∞), (-∞, y], or (-∞, ∞).
An optional lower bound on a integer.
Instances For
An optional upper bound on a integer.
Instances For
A lower bound at x is satisfied at t if x ≤ t.
Instances For
A upper bound at y is satisfied at t if t ≤ y.
Instances For
A Constraint consists of an optional lower and upper bound (inclusive),
constraining a value to a set of the form ∅, {x}, [x, y], [x, ∞), (-∞, y], or (-∞, ∞).
- lowerBound : LowerBound
A lower bound.
- upperBound : UpperBound
An upper bound.
Instances For
Instances For
A constraint is satisfied at t is both the lower bound and upper bound are satisfied.
Instances For
Apply a function to both the lower bound and upper bound.
Instances For
Translate a constraint.
Instances For
Negate a constraint. [x, y] becomes [-y, -x].
Instances For
The trivial constraint, satisfied everywhere.
Instances For
The impossible constraint, unsatisfiable.
Instances For
Check if a constraint is unsatisfiable.
Instances For
Check if a constraint requires an exact value.
Instances For
Scale a constraint by multiplying by an integer.
- If
k = 0this is either impossible, if the original constraint was impossible, or the= 0exact constraint. - If
kis positive this takes[x, y]to[k * x, k * y] - If
kis negative this takes[x, y]to[k * y, k * x].
Instances For
The sum of two constraints. [a, b] + [c, d] = [a + c, b + d].
Instances For
A linear combination of two constraints.
Instances For
The conjunction of two constraints.
Instances For
Dividing a constraint by a natural number, and tightened to integer bounds. Thus the lower bound is rounded up, and the upper bound is rounded down.
Instances For
It is convenient below to say that a constraint is satisfied at the dot product of two vectors,
so we make an abbreviation sat' for this.
Instances For
Normalize a constraint, by dividing through by the GCD.
Return none if there is nothing to do, to avoid adding unnecessary steps to the proof term.
Instances For
Normalize a constraint, by dividing through by the GCD.
Instances For
Multiply by -1 if the leading coefficient is negative, otherwise return none.
Instances For
Multiply by -1 if the leading coefficient is negative, otherwise do nothing.
Instances For
positivize and normalize, returning none if neither does anything.
Instances For
positivize and normalize
Instances For
The value of the new variable introduced when solving a hard equality.
Instances For
The coefficients of the new equation generated when solving a hard equality.