For a mathematical problem I am trying to solve, I have (say) $(N+1)$ inhomogeneous linear equations in $M$ variables of the form
$$\sum_{a=1}^{M}c_{i a}p_{a} = \xi_{i} \quad \text{ where } i=1,\ldots, N$$ $$p_{\alpha} - p_{\beta} = r_0 \qquad \text{ where } \alpha, \beta \in \{1, \ldots, M\} \text{ and } \alpha \neq \beta.$$
(So the first $N$ equations have RHS $\{\xi_i\}_{i=1}^{N}$ and the $(N{+}1)^{th}$ equation has RHS $r_0$.)
The integer coefficients $c_{ia}$ in each equation add up to zero, i.e.
$$\sum_{a=1}^{M}c_{ia} = 0 \quad \text{ for all } a = 1, \ldots N.$$
For a given range of $r_0$, i.e. $r_{0,min} < r_0 < r_{0,max}$, I would like to reduce as many equations as possible to the form
$$p_{\alpha_i} - p_{\alpha_j} = f_{ij}(r_0, \xi_1, \ldots)$$
and the rest that cannot be reduced in this way should take the form
$$p_{\alpha_{m_1}} - 2 p_{\alpha_{m_2}} + p_{\alpha_{m_3}} = g(r_0, \xi_1, \ldots)$$
for some pairs $(\alpha_i, \alpha_j)$ and some triples $(\alpha_{m_1}, \alpha_{m_2}, \alpha_{m_3})$.
Example
Take the matrix
$$M = \left( \begin{array}{cccccccc} -1 & 1 & 0 & 0 & 0 & 1 & -1 & \xi _1 \\ 1 & -1 & 1 & 0 & 0 & 0 & -1 & \xi _2 \\ 0 & 0 & 1 & -1 & 1 & 0 & -1 & \xi _4 \\ 1 & 0 & 0 & 0 & 1 & -1 & -1 & \xi _6 \\ 0 & 0 & 0 & 0 & -1 & 0 & 1 & r_0 \\ \end{array} \right)$$
which is equivalent to the linear system
$$\left( \begin{array}{c} -p_1+p_2+p_6-p_7=\xi _1 \\ p_1-p_2+p_3-p_7=\xi _2 \\ p_3-p_4+p_5-p_7=\xi _4 \\ p_1+p_5-p_6-p_7=\xi _6 \\ p_7-p_5=r_0\\ \end{array} \right)$$
Suppose I run
RowReduce[M]
I get the following output
$$\left( \begin{array}{cccccccc} 1 & 0 & 0 & 0 & 0 & -1 & 0 & \xi _6+r_0\\ 0 & 1 & 0 & 0 & 0 & 0 & -1 & \xi _1+\xi _6+r_0\\ 0 & 0 & 1 & 0 & 0 & 1 & -2 & \xi _1+\xi _2 \\ 0 & 0 & 0 & 1 & 0 & 1 & -2 & \xi _1+\xi _2-\xi _4-r_0\\ 0 & 0 & 0 & 0 & 1 & 0 & -1 & -r_0\\ \end{array} \right)$$
which is equivalent to the linear system
$$\begin{pmatrix}p_1-p_6=\xi _6+r_0,\\p_2-p_7=\xi _1+\xi _6+ r_0,\\p_3+p_6-2 p_7=\xi _1+\xi _2,\\p_4+p_6-2 p_7=\xi _1+\xi _2-\xi _4-r_0,\\p_5-p_7=-r_0\end{pmatrix}$$
It is evident that a further simplification is in fact possible: the third and fourth equations can be subtracted to yield an expression for $p_3 - p_4$, namely
$$p_3 - p_4 = \xi_4 + r_0$$
One way of stating the problem is that RowReduce doesn't yield a matrix which corresponds to the fully reduced system of equations (where by reduction I mean the end goal outlined above, which is to reduce the maximal set of equations to the form $p_{\alpha_i} - p_{\alpha_j} = f_{ij}(r_0, \xi_1, \ldots)$).
Is there a simple way in Mathematica to automate this or obtain the maximally reduced set of equations?
EDIT: I am aware that instead of RowReduce, I should use LUDecomposition. However, doing so still does not maximally reduce the equation set as desired.
EDIT #2: Code added below
Qred = {{-1, 1, 0, 0, 0, 1, -1}, {1, -1, 1, 0, 0, 0, -1}, {0, 0, 1, -1, 1, 0, -1}, {1, 0, 0, 0, 1, -1, -1}, {0, 0, 0, 0, -1, 0, 1}}; ins = {Subscript[[Xi], 1], Subscript[[Xi], 2], Subscript[[Xi], 4], Subscript[[Xi], 6], r0};
(Qnew = MapThread[Append, {Qred, ins}]) // MatrixForm
(Qnewprime1 = RowReduce[Qnew]) // MatrixForm
(Qnewprime2 = LUDecomposition[Qnew][[1]]) // MatrixForm
RowReduce
, it will return a matrix with an identity-matrix-block on the left, which is a clearly defined target form. The simplification you're proposing destroys that form. The question now is, how exactly should your reduction work? (I'm for example not sure that the simples form according to your definition is reached after the step you are proposing, but this will be quite messy to check) $\endgroup$