I have hundreds of augmented matrices in the following form: $$\left(\begin{array}{cccc|c} 1 & 1 & 1 & 1& 2+\frac{4}{f}\\ a & b & c & d& 2\\ p & q & r & s& 2\\ m & n & k & l & 2 \end{array}\right),$$ where $a$, $b$, $c$, $d$, $p$, $q$, $r$, $s$ are known and $m$, $n$, $k$, $l$ are not known.
For example, $a=1$, $b=0$, $c=2$, $d=0$, $p=0$, $q=2$, $r=0$ and $s=2$, we have $$\left(\begin{array}{cccc|c} 1 & 1 & 1 & 1& 2+\frac{4}{f}\\ 1 & 0 & 2 & 0& 2\\ 0 & 2 & 0 & 2& 2\\ m & n & k & l & 2 \end{array}\right).$$ Then I need to compute its rref as follows: $$\left(\begin{array}{cccc|c} 1 & 1 & 1 & 1& 2+\frac{4}{f}\\ 1 & 0 & 2 & 0& 2\\ 0 & 2 & 0 & 2& 2\\ m & n & k & l & 2 \end{array}\right) \rightarrow \left(\begin{array}{cccc|c} 1 & 0 & 0 & 0& \frac{8}{f}\\ 0 & 1 & 0 & 1& 1\\ 0 & 0 & 1 & 0& 1-\frac{4}{f}\\ 0 & 0 & 0 & l-n & -\frac{f(n+k-2)+8m-4k}{f} \end{array}\right) $$ I have tried Wolfram Alpha, but somehow it assumes $l\neq n$ even I insist $l=n$:
I have tried wxmaxima but it fails to do the task.
I would like to know whether there is any open source program to do the computation without assuming $l\neq n$.
