<jupyter_start><jupyter_text>Bring's curveverification of the period matrix given in http://arxiv.org/pdf/1206.6004.pdf [Braden]<jupyter_code># Initialize jupyter notebook. Calling twice allegedly avoids a bug
%matplotlib notebook
%matplotlib notebook 

from cyclepainter import *
# Define the Bring's curve (affine projection)
k.<zeta>=CyclotomicField(5)
A2.<x,y>=AffineSpace(k,2)
curve = x*y^5 + x + x^2*y^2 - x^4*y - 2*y^3
# Define the cohomology basis (top of page 18 in [Braden])
den = (-5*x*y^4 + x^4 - 2*x^2*y + 6*y^2)
diffs = [
    (y^3-x)/den,
    (-x*y^2 + 1)/den,
    (-x^2 + y)/den,
    y*(x^2-y)/den
]
# Automorphism
rot = lambda x, y: (zeta^3*x, zeta*y)
# Load CyclePainter
cp = CyclePainter(curve)
cp.start()
# Load the pre-defined paths. These were hand-replicated using Figure 6 in [Braden] 
# and successive application of the rot automorphism
cp.load_paths('brings_curve_paths.pickle')
cp.saved_paths()
# Show one of these paths
cp.get_path('a8').display()
# This is precisely the intersection matrix from the bottom of page 13 in [Braden]
I = cp.intersection_matrix(['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8'])
I
# We will also need the transormation (4.2) in [Braden], to transform the above paths into a canonical basis
M = np.matrix([
    [1, 0, 0, 0,-2, 0, 1, 0],
    [1,-1, 0,-1,-1, 1, 1, 1],
    [1,-1, 0, 0,-1, 2, 1,-1],
    [0,-1, 0, 0, 1, 2, 0, 0],
    [1,-1, 1, 0,-1, 1,-1,-1],
    [1,-1, 1,-1, 0, 0,-1, 1],
    [1,-1, 1,-1, 0, 1, 0, 1],
    [0,-1, 0,-1, 1, 1, 1, 2]
])
# Verify that M above indeed transforms the paths into a canonical basis
M.T*I*M
# Calculate the period matrix (using the transormation M)
pm = cp.period_matrix(['a1', 'a2', 'a3', 'a4'], ['a5', 'a6', 'a7', 'a8'], diffs) * M
# Finally, find the Riemann matrix
A, B = pm[:,:4], pm[:,4:]
rm = np.matmul(np.linalg.inv(A), B)
np.round(np.matmul(np.linalg.inv(A), B), 3)
# Finally, setting t0, the form of the riemann matrix (1.1) in [Braden] is verified
t0 = np.array(rm)[0][1]
t0
np.round(rm/t0, 9)<jupyter_output><empty_output>