# How to choose variables of specific form

I am trying to work on a problem with a probability distribution. I wanted to get the result in analytical form. Suppose I need to keep p1, p2, p3, p4 variables such that p1+p2+p3+p4=1;

How to use this information (p1+p2+p3+p4=1) in mathematica so that wherever in my calculation this term appears, it takes the value 1. Otherwise I will have to find this expression in a lengthy result and convert.

Assuming[p1 + p2 + p3 + p4 == 1, Simplify[Exp[p1 + p2 + 3 p3 + p4 + 3]]]

• @KunalSharma One can also set $Assumptions = p1 + p2 + p3 + p4 == 1. It is equivalent to Assuming, except that Assuming temporarily sets $Assumptions and setting $Assumptions will remain in effect for computations until it is reset ($Assumptions = True). Sometimes one form (Assuming vs $Assumptions) is more convenient than the other. Also note that only some functions, such as Simplify, use $Assumptions. – Michael E2 Jun 7 '15 at 17:33