I hope I am not to redundant with my questions. As part of solving a physical problem, I want to assume once and for all that all my variables and parameters are real, positive and finite.

Is it possible make such assumptions for all Mathematica functions?

I tried this piece of code I found on the forum:

$Assumptions = Element[_, Reals] && {_ ∈ Reals} && {_} > 0;

But still, Sign does not aways return 1, Minimize does not treat all parameters as negative, etc.

  • 1
    $\begingroup$ Would that be useful? $\endgroup$
    – Öskå
    Aug 27, 2014 at 12:17

1 Answer 1


Your assigning a pattern to $Assumptions won't work because the Mathematica assumption mechanism is simply not geared to accept patterns. It is not based on pattern matching. To get $Assumptions to behave as you say you want it to, you would have to use the system hook $NewSymbol and do something like what is discussed in this answer.

But even that won't do what you really want, because only functions that take the option Assumptions pay attention to $Assumptions. The mechanism is that such functions evaluate Assumptions :> $Assumptions when the option is not explicitly given. Only a rather small number of Mathematica take this option.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.