# How to impose Assumptions for a list of variables?

I've got an $Assumptions variable that I'd like to apply to my whole notebook, looking like so at the moment: $Assumptions = a > 0 && a ∈ Reals && m > 0 && m ∈ Reals ;


I've actually got a number of variables, and would like to treat all of them as Real and greater than zero. Is there a way to apply such assumptions in batch for a set of variables?

EDIT: comments suggested that only the > checks were required, and that {a,m} > 0 can be used. The greater comment appears to be true, but the set greater than doesn't appear to work:

ClearAll[ a, m, x, psi] ;

psi[x_, a_]  = E^(-x^2/2/a^2) / Sqrt[ a Sqrt[Pi]] ;

$Assumptions = a > 0 && a ∈ Reals ; Integrate[ psi[x, a]^2, {x, -Infinity, Infinity}]$Assumptions = a > 0   ;
Integrate[ psi[x, a]^2, {x, -Infinity, Infinity}]

$Assumptions = {a, m} > 0 ; Integrate[ psi[x, a]^2, {x, -Infinity, Infinity}] // Simplify Integrate[psi[x, a]^2, {x, -Infinity, Infinity}] // FullSimplify  (This gives 1,1, Abs[a]/a, and 1/Sign[a] respectively). So the question is reduced to how to list a set of variables in Assumptions so that all of them are > 0 (without writing a > 0 && b > 0 && c > 0 && ...). • a > 0 already implies a ∈ Reals, so you only have to include the former assumption. Commented Nov 27, 2015 at 3:08 •$Assumptions = {a, b, c} > 0; Simplify[Element[b, Reals]] evaluates to True
– Bill
Commented Nov 27, 2015 at 3:58
• Add //Simplify  after each operation and you are there. Have fun! Commented Nov 27, 2015 at 9:03
• Tried adding both // Simplify and // FullSimplify (as now mentioned in an update). Simplify doesn't change the result, and FullSimplify still seems to not know about the a > 0 assumption. Commented Nov 27, 2015 at 13:13
• I can't reproduce the behavior you report. I get 1 for all. Which version are you using? Also, try Thread[{a,m}>0] or even And@@Thread[{a,m}>0]as a workaround. Commented Nov 27, 2015 at 13:20

This seems to work (based on https://mathematica.stackexchange.com/a/5263/10)

ClearAll[a, m, x, psi];

psi[x_, a_] = E^(-x^2/2/a^2)/Sqrt[a Sqrt[Pi]];

\$Assumptions = And @@ (# > 0 &) /@ {a, m} ;
Integrate[psi[x, a]^2, {x, -Infinity, Infinity}]


One of the comments suggested that {a,m} > 0 would work, but that doesn't appear to be the case for me (Mathematica 9).

• I can reproduce this with version 9.0.1. Thread[{a,m}>0] works though. Commented Nov 27, 2015 at 13:24