# How to force Refine to use a specific form

I have an assumption relating three variables and Simplify (and all functions that use assumptions) seem to take preference on one of these variables. For example:

In[80]:= Assuming[b == -a + c, FullSimplify[a + b + c]]
Assuming[a == -b + c, FullSimplify[a + b + c]]

Out[80]= 2 c

Out[81]= 2 c


Is there a way to force it to eliminate one of these a b c in particular?

• How about using replacement rules instead? Eg a + b + c /. b -> c - a – MarcoB Jun 19 '18 at 5:21
• That would work. In fact I think that's what I'll do if no better solution comes. The thing is my example isn't simple like these two lines example; the assumptions are global. So I would have to clear the assumptions and use this replacement at least for this specific calculation. – Diego Jun 19 '18 at 22:17
• @Diego what result are you trying to achieve? could you provide more information? – roman465 Jun 20 '18 at 20:09
• Force it to eliminate c in favor of a and b, or any other combination – Diego Jun 21 '18 at 0:22

If I understood you right, you can use Eliminate. Since it works with equations only, let x==a+b+cand use the condition b==-a+c to eliminate a, b, or c, so x will be rewritten in terms of other two variables.

In[50]:= Eliminate[{x == a + b + c, b == -a + c}, a] // Solve[#, x] &
Eliminate[{x == a + b + c, b == -a + c}, b] // Solve[#, x] &
Eliminate[{x == a + b + c, b == -a + c}, c] // Solve[#, x] &

Out[50]= {{x -> 2 c}}

Out[51]= {{x -> 2 c}}

Out[52]= {{x -> 2 (a + b)}}


Or you can use replacement rules, as mentioned in comments.

• Hah! thanks. That does work. I tried using Eliminate before but couldn't make it work. – Diego Jun 21 '18 at 20:04