# Brown-Klosin_calculations

## 3152 days ago by jimlb

This is an easy way to do the calculations to make sure they are correct as well as to save typing into latex.  Make sure to click to typeset above before evaluating if you want to see the results nicely.  A couple tips in case you don't use SAGE much:  it uses python, so things are numbered starting at 0, if you are unsure of a command you can type command? and it will bring up usage.

var('a11,a12,a21,a22,c11,c12,c21,c22,b11,b12,b21,b22,d11,d12,d21,d22,e11,e12,e21,e22,delta1,delta2,delta3,delta4,x,z')
 $\newcommand{\Bold}{\mathbf{#1}}\left(a_{11}, a_{12}, a_{21}, a_{22}, c_{11}, c_{12}, c_{21}, c_{22}, b_{11}, b_{12}, b_{21}, b_{22}, d_{11}, d_{12}, d_{21}, d_{22}, e_{11}, e_{12}, e_{21}, e_{22}, \delta_{1}, \delta_{2}, \delta_{3}, \delta_{4}, x, z\right)$

Here I do the calculation for the $\mathcal{B}_3$ case.  The augmented matrix $[\Upsilon:\mathcal{D}]$ has the following form.

Gamma = Matrix(SR,[[a11-x*c11,a12-x*c12,0,x*d11-b11],[0,a11-x*c11,a12-x*c12,x*d12-b12],[c21,c22,0,-d21],[0,c21,c22,-d22]]);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ c_{21} & c_{22} & 0 & -d_{21} \\ 0 & c_{21} & c_{22} & -d_{22} \end{array}\right)$

We start with the assumption that $c_{21} \neq 0$.

Gamma.rescale_row(2,1/c21);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ 1 & \frac{c_{22}}{c_{21}} & 0 & -\frac{d_{21}}{c_{21}} \\ 0 & c_{21} & c_{22} & -d_{22} \end{array}\right)$
Gamma.swap_rows(2,0);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22}}{c_{21}} & 0 & -\frac{d_{21}}{c_{21}} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & c_{21} & c_{22} & -d_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22}}{c_{21}} & 0 & -\frac{d_{21}}{c_{21}} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} - b_{11} \\ 0 & c_{21} & c_{22} & -d_{22} \end{array}\right)$
Gamma.swap_rows(3,1);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22}}{c_{21}} & 0 & -\frac{d_{21}}{c_{21}} \\ 0 & c_{21} & c_{22} & -d_{22} \\ 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \end{array}\right)$
Gamma.rescale_row(1,1/c21);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22}}{c_{21}} & 0 & -\frac{d_{21}}{c_{21}} \\ 0 & 1 & \frac{c_{22}}{c_{21}} & -\frac{d_{22}}{c_{21}} \\ 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22}}{c_{21}} & 0 & -\frac{d_{21}}{c_{21}} \\ 0 & 1 & \frac{c_{22}}{c_{21}} & -\frac{d_{22}}{c_{21}} \\ 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} - b_{11} \\ 0 & 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & -\frac{c_{22}^{2}}{c_{21}^{2}} & -\frac{d_{21}}{c_{21}} + \frac{c_{22} d_{22}}{c_{21}^{2}} \\ 0 & 1 & \frac{c_{22}}{c_{21}} & -\frac{d_{22}}{c_{21}} \\ 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} - b_{11} \\ 0 & 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & -\frac{c_{22}^{2}}{c_{21}^{2}} & -\frac{d_{21}}{c_{21}} + \frac{c_{22} d_{22}}{c_{21}^{2}} \\ 0 & 1 & \frac{c_{22}}{c_{21}} & -\frac{d_{22}}{c_{21}} \\ 0 & 0 & \frac{{\left(c_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} - a_{12}\right)} c_{22}}{c_{21}} & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} - \frac{{\left(c_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} - a_{12}\right)} d_{22}}{c_{21}} - b_{11} \\ 0 & 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} + \frac{{\left(d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12}\right)} c_{22}}{c_{21}} - \frac{{\left(c_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} - a_{12}\right)} d_{22}}{c_{21}} - b_{11} \\ 0 & 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12} \end{array}\right)$
Gamma.swap_rows(3,2);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -c_{12} x + \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12} \\ 0 & 0 & 0 & d_{11} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{21}} + \frac{{\left(d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{22}}{c_{21}} - b_{12}\right)} c_{22}}{c_{21}} - \frac{{\left(c_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} c_{22}}{c_{21}} - a_{12}\right)} d_{22}}{c_{21}} - b_{11} \end{array}\right)$

Looking at the bottom right entry we multiply by $c_{21}$ and simplify to get:

$X = x(c_{21}d_{11} - c_{11}d_{21} + c_{22} d_{12} - c_{12}d_{22}) + (a_{12}d_{22} + a_{11} d_{21} - b_{12}c_{22} - b_{11}c_{21})$.

g = Matrix(SR,[[a11,a12,b11,b12],[a21,a22,b21,b22],[c11,c12,d11,d12],[c21,c22,d21,d22]]);g;
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} a_{11} & a_{12} & b_{11} & b_{12} \\ a_{21} & a_{22} & b_{21} & b_{22} \\ c_{11} & c_{12} & d_{11} & d_{12} \\ c_{21} & c_{22} & d_{21} & d_{22} \end{array}\right)$

Defining Taylor's version of $J$.

J=Matrix(SR,[[0,0,1,0],[0,0,0,1],[-1,0,0,0],[0,-1,0,0]]);J
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ -1 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 \end{array}\right)$
g*J*g.transpose();
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & a_{11} b_{21} + a_{12} b_{22} - a_{21} b_{11} - a_{22} b_{12} & a_{11} d_{11} + a_{12} d_{12} - b_{11} c_{11} - b_{12} c_{12} & a_{11} d_{21} + a_{12} d_{22} - b_{11} c_{21} - b_{12} c_{22} \\ -a_{11} b_{21} - a_{12} b_{22} + a_{21} b_{11} + a_{22} b_{12} & 0 & a_{21} d_{11} + a_{22} d_{12} - b_{21} c_{11} - b_{22} c_{12} & a_{21} d_{21} + a_{22} d_{22} - b_{21} c_{21} - b_{22} c_{22} \\ -a_{11} d_{11} - a_{12} d_{12} + b_{11} c_{11} + b_{12} c_{12} & -a_{21} d_{11} - a_{22} d_{12} + b_{21} c_{11} + b_{22} c_{12} & 0 & c_{11} d_{21} + c_{12} d_{22} - c_{21} d_{11} - c_{22} d_{12} \\ -a_{11} d_{21} - a_{12} d_{22} + b_{11} c_{21} + b_{12} c_{22} & -a_{21} d_{21} - a_{22} d_{22} + b_{21} c_{21} + b_{22} c_{22} & -c_{11} d_{21} - c_{12} d_{22} + c_{21} d_{11} + c_{22} d_{12} & 0 \end{array}\right)$

For $g$ to be symplectic, we must have the $(4,3)$ entry is 0, which says the coefficient of $x$ in $X$ must vanish. Similarly, the $(1,4)$ entry must vanish, which gives the non-$x$ term of $X$ must vanish.  Thus, $X =0$.  It still works! whew..

Now suppose that $c_{21} = 0$.

Gamma = Matrix(SR,[[a11-x*c11,a12-x*c12,0,x*d11-b11],[0,a11-x*c11,a12-x*c12,x*d12-b12],[0,c22,0,-d21],[0,0,c22,-d22]]);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ 0 & c_{22} & 0 & -d_{21} \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$

Assume $c_{22} \neq 0$.

Gamma.rescale_row(2,1/c22);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ 0 & 1 & 0 & -\frac{d_{21}}{c_{22}} \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & 0 & -c_{12} x + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \\ 0 & 1 & 0 & -\frac{d_{21}}{c_{22}} \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & 0 & 0 & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & 0 & -c_{12} x + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \\ 0 & 1 & 0 & -\frac{d_{21}}{c_{22}} \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & 0 & 0 & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & 0 & -c_{12} x + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \\ 0 & 1 & 0 & 0 \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$
Gamma.swap_columns(0,1);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & -c_{11} x + a_{11} & 0 & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & 0 & -c_{12} x + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \\ 1 & 0 & 0 & 0 \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$
Gamma.swap_rows(0,2);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 0 & -c_{12} x + a_{12} & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \\ 0 & -c_{11} x + a_{11} & 0 & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & 0 & c_{22} & -d_{22} \end{array}\right)$
Gamma.swap_columns(1,2);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & -c_{12} x + a_{12} & 0 & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \\ 0 & 0 & -c_{11} x + a_{11} & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & c_{22} & 0 & -d_{22} \end{array}\right)$
Gamma.swap_rows(1,3);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & c_{22} & 0 & -d_{22} \\ 0 & 0 & -c_{11} x + a_{11} & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & -c_{12} x + a_{12} & 0 & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \end{array}\right)$
Gamma.rescale_row(1,1/c22);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & -\frac{d_{22}}{c_{22}} \\ 0 & 0 & -c_{11} x + a_{11} & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & -c_{12} x + a_{12} & 0 & d_{12} x - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -c_{11} x + a_{11} & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & -c_{12} x + a_{12} & 0 & d_{12} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{22}}{c_{22}} - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -c_{11} x + a_{11} & d_{11} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{21}}{c_{22}} - b_{11} \\ 0 & 0 & 0 & d_{12} x - \frac{{\left(c_{12} x - a_{12}\right)} d_{22}}{c_{22}} - \frac{{\left(c_{11} x - a_{11}\right)} d_{21}}{c_{22}} - b_{12} \end{array}\right)$
Gamma = Matrix(SR,[[a11-x*c11,a12-x*c12,0,x*d11-b11],[0,a11-x*c11,a12-x*c12,x*d12-b12],[0,0,0,-d21],[0,0,0,-d22]]);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \\ 0 & 0 & 0 & -d_{21} \\ 0 & 0 & 0 & -d_{22} \end{array}\right)$
Gamma= Matrix(SR,[[a11-x*c11,a12-x*c12,0,x*d11-b11],[0,a11-x*c11,a12-x*c12,x*d12-b12]]);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} -c_{11} x + a_{11} & -c_{12} x + a_{12} & 0 & d_{11} x - b_{11} \\ 0 & -c_{11} x + a_{11} & -c_{12} x + a_{12} & d_{12} x - b_{12} \end{array}\right)$

We now consider the $\mathcal{B}_2$ calculation.

var('a11,a12,a21,a22,c11,c12,c21,c22,b11,b12,b21,b22,d11,d12,d21,d22,e11,e12,e21,e22,delta1,delta2,delta3,delta4,x,z')
 $\newcommand{\Bold}{\mathbf{#1}}\left(a_{11}, a_{12}, a_{21}, a_{22}, c_{11}, c_{12}, c_{21}, c_{22}, b_{11}, b_{12}, b_{21}, b_{22}, d_{11}, d_{12}, d_{21}, d_{22}, e_{11}, e_{12}, e_{21}, e_{22}, \delta_{1}, \delta_{2}, \delta_{3}, \delta_{4}, x, z\right)$
Gamma = Matrix(SR,[[c11+x*c21, c12+x*c22 , 0 ,-d11-x*d21],[0 , c11+x*c21 , c12 + x*c22 , -d12 - x*d22],[a21-x*a11+z*c21 , a22-x*a12+z*c22, 0 , -b21+x*b11-z*d21],[0 , a21 - x*a11+z*c12 , a22 - x*a12 + z*c22 , -b22+x*b12 - z*d22]]);Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} c_{21} x + c_{11} & c_{22} x + c_{12} & 0 & -d_{21} x - d_{11} \\ 0 & c_{21} x + c_{11} & c_{22} x + c_{12} & -d_{22} x - d_{12} \\ -a_{11} x + c_{21} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & 0 & b_{11} x - d_{21} z - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$

Assume that $c_{21}x + c_{11} \neq 0$.

Gamma.rescale_row(0,1/(c21*x+c11));Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22} x + c_{12}}{c_{21} x + c_{11}} & 0 & -\frac{d_{21} x + d_{11}}{c_{21} x + c_{11}} \\ 0 & c_{21} x + c_{11} & c_{22} x + c_{12} & -d_{22} x - d_{12} \\ -a_{11} x + c_{21} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & 0 & b_{11} x - d_{21} z - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & \frac{c_{22} x + c_{12}}{c_{21} x + c_{11}} & 0 & -\frac{d_{21} x + d_{11}}{c_{21} x + c_{11}} \\ 0 & c_{21} x + c_{11} & c_{22} x + c_{12} & -d_{22} x - d_{12} \\ 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & 0 & b_{11} x - d_{21} z - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & -\frac{d_{21} x + d_{11}}{c_{21} x + c_{11}} \\ 0 & c_{21} x + c_{11} & c_{22} x + c_{12} & -d_{22} x - d_{12} \\ 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & 0 & b_{11} x - d_{21} z - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & c_{21} x + c_{11} & c_{22} x + c_{12} & -d_{22} x - d_{12} \\ 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & 0 & b_{11} x - d_{21} z - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$
Gamma.rescale_row(1,1/(c21*x+c11));Gamma
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & \frac{c_{22} x + c_{12}}{c_{21} x + c_{11}} & -\frac{d_{22} x + d_{12}}{c_{21} x + c_{11}} \\ 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & 0 & b_{11} x - d_{21} z - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & -\frac{d_{22} x + d_{12}}{c_{21} x + c_{11}} \\ 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} & b_{11} x - d_{21} z - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & b_{12} x - d_{22} z - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} & b_{11} x - d_{21} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} & b_{11} x - d_{21} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & -a_{11} x + c_{12} z + a_{21} & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} & b_{11} x - d_{21} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22} \end{array}\right)$

If $c_{22}x + c_{12} = 0$, we should get a contradiction as in the write-up.  (It will have rank 2, which gives too many $E$'s that map to $x,z$.)  If we assume $c_{22}x+c_{12} \neq 0$, then we have:

 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -\frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} & b_{11} x - d_{21} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + \frac{{\left(c_{22} x + c_{12}\right)} {\left(b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22}\right)}}{c_{21} x + c_{11}} - b_{21} \\ 0 & 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22} \end{array}\right)$
 $\newcommand{\Bold}{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -a_{12} x + c_{22} z + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} + a_{22} & b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22} \\ 0 & 0 & -\frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} + \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} & b_{11} x - d_{21} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{12} x - c_{22} z - \frac{{\left(c_{22} x + c_{12}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} - a_{22}\right)}}{c_{21} x + c_{11}} - \frac{{\left(d_{21} x + d_{11}\right)} {\left(a_{11} x - c_{21} z - a_{21}\right)}}{c_{21} x + c_{11}} + \frac{{\left(c_{22} x + c_{12}\right)} {\left(b_{12} x - d_{22} z - \frac{{\left(d_{22} x + d_{12}\right)} {\left(a_{11} x - c_{12} z - a_{21}\right)}}{c_{21} x + c_{11}} - b_{22}\right)}}{c_{21} x + c_{11}} - b_{21} \end{array}\right)$