I have a bunch of linear equations of the form
x[1] == 5012 - 5x[3] - 2x[4] + 5x[7]
etc. Specifically there is one linear variable on the left, and the right-hand side is linear (generically with a constant).
I want to process these so that all the variables come on the left and the constant stays on the right. So for the above I would want
x[1] + 5x[3] + 2x[4] - 5x[7] == 5012
as the output. This feels like a very simple thing to try and do but I am struggling to implement it.