Inequality
Wolfram's chained-comparison form -- v1 rel1 v2, v2 rel2 v3, ... all at once, letting the relation change partway through the chain (0 <= x < 5).
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Inequality✓Inequality(v1, rel1, v2, rel2, v3, ...)the conjunction of every consecutive link, where each relᵢ is one of Equal, NotEqual, Less, LessEqual, Greater, GreaterEqual.Typed signatures
| Type | Package | Applies |
|---|---|---|
(expression, expression, expression, expression*) -> boolean | analytic | always |
Details
- A chain that uses the SAME relation throughout (0 < x < 5) is already Less or LessEqual etc. taking more than two arguments -- see those heads. Inequality exists for a chain that MIXES relations (0 <= x < 5), which compute-engine's own n-ary comparison heads don't represent.
- Evaluates as the And of its pairwise links, applied through the relation heads compute-engine already ships -- so a fully numeric chain folds all the way to True/False, and a symbolic one is left as And of whatever didn't fold.
- Round-trips with Wolfram, which prints exactly this shape whenever Reduce, FunctionDomain, or a mixed-relation input (
0 <= x < 5) produces one -- see packages/wolfram/src/to-wolfram.ts. - Declines (leaves the call unevaluated) on a malformed chain -- an even argument count, or something other than one of the six relations in a relation slot.
Examples
Basic #
Scope #
A homogeneous chain (same relation throughout) still goes through And here -- write it as Less(0, x, 5) directly for the native n-ary form
live ↗InOut
About
| Examples | 7 |
|---|---|
| Checked against | Wolfram Language 7 agree |
| Crosswalk | Wolfram Language |
See also: Less, LessEqual, FunctionDomain