# 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:= Assuming[b == -a + c, FullSimplify[a + b + c]]
Assuming[a == -b + c, FullSimplify[a + b + c]]

Out= 2 c

Out= 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 Jun 19, 2018 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. Jun 19, 2018 at 22:17
• @Diego what result are you trying to achieve? could you provide more information? Jun 20, 2018 at 20:09
• Force it to eliminate c in favor of a and b, or any other combination Jun 21, 2018 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:= 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= {{x -> 2 c}}

Out= {{x -> 2 c}}

Out= {{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. Jun 21, 2018 at 20:04