# Symplectic-Conditions

## 3113 days ago by jimlb

var('a11,a12,a21,a22,c11,c12,c21,c22,b11,b12,b21,b22,d11,d12,d21,d22,x,y,z')
 $\newcommand{\Bold}[1]{\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}, x, y, z\right)$
g=Matrix(SR,[[a11,a12,b11,b12],[a21,a22,b21,b22],[c11,c12,d11,d12],[c21,c22,d21,d22]]);g;
 $\newcommand{\Bold}[1]{\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)$
J=Matrix(SR,[[0,0,1,0],[0,0,0,1],[-1,0,0,0],[0,-1,0,0]]);J;
 $\newcommand{\Bold}[1]{\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)$

The general conditions are given by setting the following matrix equal to $J$.

g*J*g.transpose()
 $\newcommand{\Bold}[1]{\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)$

Here is the calculation of the determinant from group 4.  I don't know how to take the symplectic conditions into account in SAGE. I can probably do it in Maple if necessary.

A=Matrix(SR,[[-b12,-b11],[-b22,-b21]]);A
 $\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -b_{12} & -b_{11} \\ -b_{22} & -b_{21} \end{array}\right)$
B=Matrix(SR,[[b11*y + b12*z + a12,b11*x+b12*y+a11],[b21*y+b22*z + a22,b21*x+b22*y+a21]]);B
 $\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} b_{11} y + b_{12} z + a_{12} & b_{11} x + b_{12} y + a_{11} \\ b_{21} y + b_{22} z + a_{22} & b_{21} x + b_{22} y + a_{21} \end{array}\right)$
C=Matrix(SR,[[-d12,-d11],[-d22,-d21]]);C
 $\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -d_{12} & -d_{11} \\ -d_{22} & -d_{21} \end{array}\right)$
Cinv=Matrix(SR,[[-d21/(d12*d21-d11*d22),d11/(d12*d21-d11*d22)],[d22/(d12*d21-d11*d22),-d12/(d12*d21-d11*d22)]]);Cinv
 $\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} \frac{d_{21}}{d_{11} d_{22} - d_{12} d_{21}} & -\frac{d_{11}}{d_{11} d_{22} - d_{12} d_{21}} \\ -\frac{d_{22}}{d_{11} d_{22} - d_{12} d_{21}} & \frac{d_{12}}{d_{11} d_{22} - d_{12} d_{21}} \end{array}\right)$
D=Matrix(SR,[[d11*y+d12*z,d11*x+d12*y],[d21*y+d22*z, d21*x+d22*y]]);D
 $\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} d_{11} y + d_{12} z & d_{11} x + d_{12} y \\ d_{21} y + d_{22} z & d_{21} x + d_{22} y \end{array}\right)$
E=-A*Cinv*D+B;E
 $\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -{\left(\frac{b_{11} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} y + d_{12} z\right)} + {\left(\frac{b_{11} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} y + d_{22} z\right)} + b_{11} y + b_{12} z + a_{12} & -{\left(\frac{b_{11} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} x + d_{12} y\right)} + {\left(\frac{b_{11} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} x + d_{22} y\right)} + b_{11} x + b_{12} y + a_{11} \\ -{\left(\frac{b_{21} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} y + d_{12} z\right)} + {\left(\frac{b_{21} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} y + d_{22} z\right)} + b_{21} y + b_{22} z + a_{22} & -{\left(\frac{b_{21} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} x + d_{12} y\right)} + {\left(\frac{b_{21} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} x + d_{22} y\right)} + b_{21} x + b_{22} y + a_{21} \end{array}\right)$
E.det()
 $\newcommand{\Bold}[1]{\mathbf{#1}}-{\left({\left(\frac{b_{11} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} x + d_{12} y\right)} - {\left(\frac{b_{11} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} x + d_{22} y\right)} - b_{11} x - b_{12} y - a_{11}\right)} {\left({\left(\frac{b_{21} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} y + d_{12} z\right)} - {\left(\frac{b_{21} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} y + d_{22} z\right)} - b_{21} y - b_{22} z - a_{22}\right)} + {\left({\left(\frac{b_{11} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} y + d_{12} z\right)} - {\left(\frac{b_{11} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{12} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} y + d_{22} z\right)} - b_{11} y - b_{12} z - a_{12}\right)} {\left({\left(\frac{b_{21} d_{22}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{21}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{11} x + d_{12} y\right)} - {\left(\frac{b_{21} d_{12}}{d_{11} d_{22} - d_{12} d_{21}} - \frac{b_{22} d_{11}}{d_{11} d_{22} - d_{12} d_{21}}\right)} {\left(d_{21} x + d_{22} y\right)} - b_{21} x - b_{22} y - a_{21}\right)}$