with_assumptions function
Evaluate a body under local assumptions.
How to write it
with_assumptions(condition, body)
- condition
- A condition that is true or false, such as x > 0. Takes a condition, true or false.
- body
- The expression to evaluate. Takes an expression.
Examples
with_assumptions(x > 0, simplify(sqrt(x^2)))In the solver,
Open in the solverwith_assumptions(x > 0, simplify(sqrt(x^2)))givesx.