Assuming
Evaluate with assumed for the duration of the call, then forget it. Provided by @enumeratio/analytic.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Assuming!Assuming(cond, expr)evaluate under a single assumed condition, a List of them (an implicit conjunction), or an And of them.Typed signatures
| Type | Package | Applies |
|---|---|---|
(expression, expression) -> expression | analytic | always |
Details
- Built on compute-engine's own assumption store: the condition is pushed in a fresh scope (
ce.pushScope/ce.assume), is evaluated, and the scope is popped — compute-engine documents assumptions as scoped, so popping restores exactly what was in force before, even nested and even mid-evaluation (unlikece.checkpoint, which refuses there). - No leakage: an assumption made here is gone once the call returns, whatever does — verified by asking about the assumed symbol immediately after.
- What resolves under the assumption is whatever compute-engine's own
evaluate()already consults assumptions for — Abs, Sign, and among them. This is more eager than bare Wolfram evaluation for those heads (Wolfram leavesAbs(x)alone untilRefine/Simplifynames it explicitly); it is not a general Simplify.
Examples
About
| Examples | 9 |
|---|---|
| Checked against | Wolfram Language 7 agree1 differ1 unevaluated |
| Crosswalk | Wolfram Language |
Implementation
mapped
wolframpackages/oracle/src/mappings.tsWolfram's own Assuming only affects functions that consult $Assumptions (Simplify, FullSimplify, Refine) — a bare Abs(x) inside it stays symbolic, unlike compute-engine's own eager assumption-aware evaluate(). Wrapping the body in FullSimplify is what makes the oracle check the same claim we do.