# Jupyter notebook: Affine equivalences of rational surfaces of translation, and applications to rational minimal surfaces

This is a Jupyter notebook accompanying the paper [1].

[1] J.G. Alcazar, G. Muntingh. _Affine equivalences of rational surfaces of translation, and applications to rational minimal surfaces_, Available at arXiv.

[2] https://groupprops.subwiki.org/wiki/Dihedral_group:D8


```python
!pip install --quiet sympy numpy matplotlib tabulate

import numpy as np
import sympy as sp

import matplotlib.pyplot as plt
import matplotlib as mpl

from utils.minsurf import Weierstrass_Enneper
from utils.plot import Enneper_mesh, symmetry_element_meshes, bridge_meshes

from sympy.assumptions import assuming, Q
sp.init_printing()

from IPython.display import display, Math, Latex, HTML
from tabulate import tabulate
```


```python
def T1(n, x=None):
    """
    :param n: Degree of the Chebyshev polynomial
    :param x: Variable/number
    :return: Chebyshev polynomial of the first kind of degree n in the variable/number x.
    """
    if x is None:
        x = sp.Symbol('x')

    if n == 0:
        return 1
    elif n == 1:
        return x
    elif n >= 2:
        return sp.expand(2*x*T1(n-1, x=x) - T1(n-2, x=x))


def S_enneper(k):
    r, s, t = sp.symbols("r s t")

    x = sp.expand(sp.expand(t - r**(2*k+1) * T1(2*k + 1, x=t/r)/(2*k + 1)).subs(r, sp.sqrt(s**2 + t**2)))
    y = sp.expand(sp.expand(-s - (-1)**k * r**(2*k+1) * T1(2*k + 1, x=s/r)/(2*k + 1)).subs(r, sp.sqrt(s**2 + t**2)))
    z = sp.expand(sp.expand(2*r**(k+1) * T1(k+1, x=t/r)/(k+1)).subs(r, sp.sqrt(s**2 + t**2)))

    return x, y, z


def binomial(n, k):
    assert(0 <= k <= n)

    if n == 0 or n == 1 or k == 0 or k == n:
        return 1
    else:
        return binomial(n-1, k-1) + binomial(n-1, k)

    
def get_colors():
    c_surfs = tuple([tuple(list(mpl.colors.to_rgb(col))[:3] + [0.8]) for col in ['tab:blue', 'cornflowerblue']])
    c_plane, c_line, c_point = [tuple(list(mpl.colors.to_rgb(col))[:3] + [0.2])
                                for col in ["indianred", "forestgreen", "goldenrod"]]

    return c_surfs, c_plane, c_line, c_point


def plot_enneper(ks=(1, 2, 3, 4), N=20, azimuths=(0, 20), elevations=(90, 30), colors=get_colors(), verbose=True,
                 savefig=False, showfig=True, elements=True):
    """
    :param tuple ks        : Orders of the Enneper surface
    :param int N           : Resolution of each plot
    :param tuple azimuths  : Azimuths for each plot
    :param tuple elevations: Elevations for each plot
    :param tuple colors    : RGBA tuples for colors of the surface, planes, lines, and point
    :param bool verbose    : Whether to output auxilliary information
    :param bool savefig    : Whether to save the figure to a file
    :param bool showfig    : Whether to show the figure
    :param bool elements   : Whether to display elements
    :return:
    """
    c_surfs, c_plane, c_line, c_point = colors
    for k in ks:
        if verbose:
            print(f"Enneper surface of order k={k}")

        # Collect meshes of the Enneper surface, its symmetry planes, symmetry axes, and symmetry point
        X, Y, Z, C = Enneper_mesh(k=k, N=N, colors=c_surfs)

        if elements:
            u_plane = max(np.max(X), np.max(Y))
            u_line = 0.6*np.max(np.sqrt(X**2 + Y**2))
            u_zfactor = np.max(Z) / u_plane

            Xs, Ys, Zs, Cs = symmetry_element_meshes(k, N, u_plane, u_line, u_zfactor, c_plane, c_line, c_point)
            X, Y, Z, C = bridge_meshes([X] + Xs, [Y] + Ys, [Z] + Zs, [C] + Cs)

        # We plot the surface from various view points
        for azimuth, elevation in zip(azimuths, elevations):
            fig = plt.figure()
            ax = fig.gca(projection='3d')
            ax.view_init(elev=elevation, azim=azimuth)

            ax.plot_surface(X, Y, Z, antialiased=True, rstride=1, cstride=1, facecolors=C,
                            shade=True, linewidth=1)

            ax.set_xlim(np.min(X), np.max(X))
            ax.set_ylim(np.min(Y), np.max(Y))
            ax.set_zlim(np.min(Z), np.max(Z))
            plt.axis('off')

            if savefig:
                if elements:
                    fname = f"figs/Enneper-k-{k}-elements-elevation-{elevation}-azimuth-{azimuth}-N-{N}.png"
                else:
                    fname = f"figs/Enneper-k-{k}-elevation-{elevation}-azimuth-{azimuth}-N-{N}.png"

                plt.savefig(fname, bbox_inches='tight', dpi=300)

            if showfig:
                plt.show()

    
r, s, t = sp.symbols("r s t", real=True)
z = sp.Symbol('z', nonzero=True)
k = sp.Symbol('k', positive=True)
m = sp.Symbol('m', positive=True)
```

# Plotting Enneper surfaces and their symmetry elements


```python
plot_enneper(N=50)
```

## Proposition 7 in [1]


```python
f = 2
g = z**k
psi = Weierstrass_Enneper(f, g, z, imag_unit=sp.I)
print(f"The Weierstrass form with f={f} and g={g} yields the minimal curve")
display(psi)
```

## Proposition 8 in [1] (for the case k=1)


```python
Psi = [[sp.expand(expr.subs(k, 1).diff(z, k0).subs(z, 0)) for expr in psi] for k0 in [1, 2, 3]]
Psi = sp.Matrix(Psi).transpose()
A = sp.Matrix([[sp.I**m, 0, 0], [0, (-1)**m, 0], [0, 0, (-sp.I)**m]])
M = Psi*A*Psi.inv()
print("\nThe matrix Psi=")
display(Psi)
print("\nThe matrix Psi^-1=")
display(Psi.inv())
print("\nThe matrix A=")
display(A)
print("\nThe matrix M=")
display(M)
R1 = M.subs(m, 1)
print("\nThe matrix R1=")
display(R1)

```

    
    The matrix Psi=



$\displaystyle \left[\begin{matrix}1 & 0 & -2\\i & 0 & 2 i\\0 & 2 & 0\end{matrix}\right]$


    
    The matrix Psi^-1=



$\displaystyle \left[\begin{matrix}\frac{1}{2} & - \frac{i}{2} & 0\\0 & 0 & \frac{1}{2}\\- \frac{1}{4} & - \frac{i}{4} & 0\end{matrix}\right]$


    
    The matrix A=



$\displaystyle \left[\begin{matrix}i^{m} & 0 & 0\\0 & \left(-1\right)^{m} & 0\\0 & 0 & \left(- i\right)^{m}\end{matrix}\right]$


    
    The matrix M=



$\displaystyle \left[\begin{matrix}\frac{i^{m}}{2} + \frac{\left(- i\right)^{m}}{2} & - \frac{i i^{m}}{2} + \frac{i \left(- i\right)^{m}}{2} & 0\\\frac{i i^{m}}{2} - \frac{i \left(- i\right)^{m}}{2} & \frac{i^{m}}{2} + \frac{\left(- i\right)^{m}}{2} & 0\\0 & 0 & \left(-1\right)^{m}\end{matrix}\right]$


    
    The matrix R1=



$\displaystyle \left[\begin{matrix}0 & 1 & 0\\-1 & 0 & 0\\0 & 0 & -1\end{matrix}\right]$


## Example 1 in [1]


```python
for k in range(1, 4+1):
    print(f"\nThe Enneper surface of order k={k} has parametrization:")
    display(S_enneper(k))
```

## Remark 2 in [1]


```python
for n in range(0, 5):
    k, eps = divmod(n, 2)
    lhs1 = sp.expand(sp.expand(r**n * T1(n, t/r)).subs(r, sp.sqrt(s**2 + t**2)))
    lhs2 = sp.expand(sp.expand(r**n * T1(n, s/r)).subs(r, sp.sqrt(s**2 + t**2)))
    rhs1 = sum([(-1)**(k+m) * binomial(n, 2*m + eps) * s**(n - 2*m - eps) * t**(2*m + eps) for m in range(k+1)])
    rhs2 = sum([(-1)**(k+m) * binomial(n, 2*m + eps) * t**(n - 2*m - eps) * s**(2*m + eps) for m in range(k+1)])
    print(f"For n={n}, the lhs and rhs in Remark 2 match: {lhs1 == rhs1 and lhs2 == rhs2}")
```

    For n=0, the lhs and rhs in Remark 2 match: True
    For n=1, the lhs and rhs in Remark 2 match: True
    For n=2, the lhs and rhs in Remark 2 match: True
    For n=3, the lhs and rhs in Remark 2 match: True
    For n=4, the lhs and rhs in Remark 2 match: True


## Table 1 in [1]
Consider the unitary matrices
$$\mathbf{B} = \begin{bmatrix}0&-i&0\\i&0&0\\0&0&i \end{bmatrix},\quad 
\mathbf{C} = \begin{bmatrix}i&0&0\\0&i&0\\0&0&i \end{bmatrix},\quad
\mathbf{S} = \begin{bmatrix}1&0&0\\0&-1&0\\0&0&1\end{bmatrix},\quad
\mathbf{T} = \begin{bmatrix}1&0&0\\0&1&0\\0&0&-1\end{bmatrix},\quad
\mathbf{R}_1 = \begin{bmatrix}0&1&0\\-1&0&0\\0&0&-1 \end{bmatrix}.$$
The matrices in Table 1 are $\mathbf{S}^n \mathbf{B}^s \mathbf{C}^{q+r}$, for $q,r,s \in \mathbb{Z}/4\mathbb{Z}$ and $n\in \mathbb{Z}/2\mathbb{Z}$.


```python
def matrix_to_latex(M):
    s = "$\\begin{bmatrix}" + \
        "".join(["".join([str(M[i])] + (i % 3 != 2)*["&"] + (i % 3 == 2)*["\\\\"])  for i in range(len(C))]) + \
        "\end{bmatrix}$"
    return s

S = sp.Matrix([[1, 0, 0], [0, -1, 0], [0, 0, 1]])
B = sp.Matrix([[0, -sp.I, 0], [sp.I, 0, 0], [0, 0, sp.I]])
C = sp.Matrix([[sp.I, 0, 0], [0, sp.I, 0], [0, 0, sp.I]])
T = sp.Matrix([[1, 0, 0], [0, 1, 0], [0, 0, -1]])
I = S**0
```


```python
headers = ['$M^+_{q+r,s}$', '$q+r\equiv 0$', '$q+r\equiv 1$', '$q+r \equiv 2$', '$q+r \equiv 3$']
table = [ [f"$s\equiv{s}$"] + [matrix_to_latex(B**s * C**qr) for qr in range(4)] for s in range(4)]
HTML(tabulate(table, headers=headers, floatfmt='.3e', tablefmt='html'))
```




<table>
<thead>
<tr><th>$M^+_{q+r,s}$  </th><th>$q+r\equiv 0$                                        </th><th>$q+r\equiv 1$                                        </th><th>$q+r \equiv 2$                                        </th><th>$q+r \equiv 3$                                        </th></tr>
</thead>
<tbody>
<tr><td>$s\equiv0$     </td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$  </td><td>$\begin{bmatrix}I&amp;0&amp;0\\0&amp;I&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$  </td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}-I&amp;0&amp;0\\0&amp;-I&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$</td></tr>
<tr><td>$s\equiv1$     </td><td>$\begin{bmatrix}0&amp;-I&amp;0\\I&amp;0&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;I&amp;0\\-I&amp;0&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;-1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$  </td></tr>
<tr><td>$s\equiv2$     </td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}I&amp;0&amp;0\\0&amp;I&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$ </td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}-I&amp;0&amp;0\\0&amp;-I&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$ </td></tr>
<tr><td>$s\equiv3$     </td><td>$\begin{bmatrix}0&amp;-I&amp;0\\I&amp;0&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;I&amp;0\\-I&amp;0&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$  </td><td>$\begin{bmatrix}0&amp;-1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$ </td></tr>
</tbody>
</table>




```python
headers = ['$M^-_{q+r,s}$', '$q+r\equiv 0$', '$q+r\equiv 1$', '$q+r \equiv 2$', '$q+r \equiv 3$']
table = [[f"$s\equiv{s}$"] + [matrix_to_latex(B**s * C**qr *S) for qr in range(4)] for s in range(4)]
HTML(tabulate(table, headers=headers, floatfmt='.3e', tablefmt='html'))
```




<table>
<thead>
<tr><th>$M^-_{q+r,s}$  </th><th>$q+r\equiv 0$                                        </th><th>$q+r\equiv 1$                                         </th><th>$q+r \equiv 2$                                        </th><th>$q+r \equiv 3$                                       </th></tr>
</thead>
<tbody>
<tr><td>$s\equiv0$     </td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}I&amp;0&amp;0\\0&amp;-I&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$  </td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}-I&amp;0&amp;0\\0&amp;I&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$</td></tr>
<tr><td>$s\equiv1$     </td><td>$\begin{bmatrix}0&amp;I&amp;0\\I&amp;0&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$  </td><td>$\begin{bmatrix}0&amp;-1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;-I&amp;0\\-I&amp;0&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$  </td></tr>
<tr><td>$s\equiv2$     </td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}I&amp;0&amp;0\\0&amp;-I&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$ </td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$  </td><td>$\begin{bmatrix}-I&amp;0&amp;0\\0&amp;I&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$ </td></tr>
<tr><td>$s\equiv3$     </td><td>$\begin{bmatrix}0&amp;I&amp;0\\I&amp;0&amp;0\\0&amp;0&amp;-I\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;-1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;-I&amp;0\\-I&amp;0&amp;0\\0&amp;0&amp;I\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$ </td></tr>
</tbody>
</table>



The matrices $\mathbf{B}$ and $\mathbf{C}$ commute, and their product is the matrix $\mathbf{R}_1$.


```python
print(R1 == B@C == C@B)
```

    True


The matrix $\mathbf{B}$ is a square root of the matrix $T$.


```python
print(B@B == T)
```

    True


## Remark 4 in [1]
Consider the (external) direct product group
$$ D_4 \times \mathbf{Z}/2\mathbf{Z} \simeq \langle \rho,\sigma,\tau\,:\,\rho^4=\sigma^2=\tau^2=e,\ \sigma\rho\sigma=\rho^{-1},\ \tau\rho=\rho\tau,\ \sigma\tau=\tau\sigma \rangle, $$
where $e$ denotes the neutral element. The map
$$ D_4 \times \mathbf{Z}/2\mathbf{Z} \longrightarrow O(3), \qquad \sigma^n \rho^m \tau^p\longmapsto \mathbf{S}^n\mathbf{R}_1^m \mathbf{T}^p $$
is a group monomorphism establishing a group structure on the set of real matrices in the above table.


```python
print("R1 has order 4:", R1@R1 != I and R1@R1@R1 != I and R1@R1@R1@R1 == I)
print("S has order 2:", S@S == I)
print("T has order 2:", T@T == I)
print("S and R1 satisfy the dihedral relation SR_1S = R_1^-1:", S@R1@S == R1.inv())
print("T and R1 commute:", T@R1 == R1@T)
print("S and T commute:", S@T == T@S)
```

    R1 has order 4: True
    S has order 2: True
    T has order 2: True
    S and R1 satisfy the dihedral relation SR_1S = R_1^-1: True
    T and R1 commute: True
    S and T commute: True


Next, we show that these matrices appear in the above table. Since $\mathbf{T} = \mathbf{B}^2$ and $\mathbf{R}_1 = \mathbf{B}\mathbf{C} = \mathbf{C}\mathbf{B}$, one has
$$\mathbf{R}_1^m \mathbf{S}^n \mathbf{T}^p = \mathbf{C}^m \mathbf{B}^{m + 2p} \mathbf{S}^n = \mathbf{C}^{q+r} \mathbf{B}^s \mathbf{S}^n, $$
with $s = m + 2p$ and $m = q + r$.


```python
headers = ['$M^-_{q+r,s}$', '$q+r\equiv 0$', '$q+r\equiv 1$', '$q+r \equiv 2$', '$q+r \equiv 3$']
table = [[f"$s-(q+r)\equiv {2*m}$"] + [matrix_to_latex(R1**p * T**m) for p in range(4)] for m in range(2)]
HTML(tabulate(table, headers=headers, floatfmt='.3e', tablefmt='html'))
```




<table>
<thead>
<tr><th>$M^-_{q+r,s}$    </th><th>$q+r\equiv 0$                                       </th><th>$q+r\equiv 1$                                        </th><th>$q+r \equiv 2$                                        </th><th>$q+r \equiv 3$                                       </th></tr>
</thead>
<tbody>
<tr><td>$s-(q+r)\equiv 0$</td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;-1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td></tr>
<tr><td>$s-(q+r)\equiv 2$</td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;-1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td></tr>
</tbody>
</table>




```python
headers = ['$M^-_{q+r,s}$', '$q+r\equiv 0$', '$q+r\equiv 1$', '$q+r \equiv 2$', '$q+r \equiv 3$']
table = [[f"$s-(q+r)\equiv {2*m}$"] + [matrix_to_latex(R1**p * T**m * S) for p in range(4)] for m in range(2)]

HTML(tabulate(table, headers=headers, floatfmt='.3e', tablefmt='html'))
```




<table>
<thead>
<tr><th>$M^-_{q+r,s}$    </th><th>$q+r\equiv 0$                                        </th><th>$q+r\equiv 1$                                         </th><th>$q+r \equiv 2$                                       </th><th>$q+r \equiv 3$                                      </th></tr>
</thead>
<tbody>
<tr><td>$s-(q+r)\equiv 0$</td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;-1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}0&amp;1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td></tr>
<tr><td>$s-(q+r)\equiv 2$</td><td>$\begin{bmatrix}1&amp;0&amp;0\\0&amp;-1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;-1&amp;0\\-1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td><td>$\begin{bmatrix}-1&amp;0&amp;0\\0&amp;1&amp;0\\0&amp;0&amp;-1\\\end{bmatrix}$</td><td>$\begin{bmatrix}0&amp;1&amp;0\\1&amp;0&amp;0\\0&amp;0&amp;1\\\end{bmatrix}$ </td></tr>
</tbody>
</table>



## Example 2 in [1]
Let $\varphi^q(z) = i^q(z)$. We show that the diagonal cases $s = q + r$ in Table 1 are symmetries of the Enneper surface of order 1, by verifying the relations
$$ \Psi \circ \varphi^q (z) = \mathbf{f}^+_{q+r,s} \circ \Psi(z) = \mathbf{M}^+_{q+r,s} \Psi(z),$$
$$ \Psi \circ \varphi^q (z) = \mathbf{f}^-_{q+r,s} \circ \overline{\Psi}(z) = \mathbf{M}^-_{q+r,s} \overline{\Psi}(z). $$


```python
k = 1
f = 2 + 0*z
g = z**k
psi = Weierstrass_Enneper(f, g, z, imag_unit=sp.I)

print(f"The Enneper surface of order k={k} has the symmetry:")
for q in range(4):
    for r in range(4):
        for s in range(4):
            # Does the parity-like condition hold for this combination (q,r,s)?
            if sp.I**s * g == g.subs(z, sp.I**q*z) and sp.I**r * f == f.subs(z, sp.I**q*z):
                M = B**s * C**(q+r)
                rhs = M@sp.Matrix(psi)
                lhs = sp.Matrix([expr.subs(z, sp.I**q * z) for expr in psi])
                print("M^+_{"+str(q+r)+","+str(s)+"}:", sp.expand(lhs - rhs) == sp.Matrix([0,0,0]))
                psi_conj = sp.Matrix([expr.conjugate() for expr in psi])
                rhs = S@M@psi_conj
                lhs = sp.Matrix([expr.subs(z, sp.I**(-q) * z) for expr in psi])
                print("M^-_{"+str(q+r)+","+str(s)+"}:", sp.expand(lhs - rhs) == sp.Matrix([0,0,0]))
```

    The Enneper surface of order k=1 has the symmetry:
    M^+_{0,0}: True
    M^-_{0,0}: True
    M^+_{1,1}: True
    M^-_{1,1}: True
    M^+_{2,2}: True
    M^-_{2,2}: True
    M^+_{3,3}: True
    M^-_{3,3}: True


208d762d8a96ed3a017e0cbea1bf7d0d94642430
ipynb
Jupyter Notebook
translational-minimal.ipynb
georgmuntingh/min-surf
6564d3234b6c97946ffad08e75891a615efc175b
MIT
translational-minimal.ipynb
georgmuntingh/min-surf
6564d3234b6c97946ffad08e75891a615efc175b
MIT
translational-minimal.ipynb
georgmuntingh/min-surf
6564d3234b6c97946ffad08e75891a615efc175b
MIT
Qwen/Qwen-72B
1. YES
2. YES