54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
|
def group_action_matrices(C_AS):
|
||
|
F = C_AS.base_ring
|
||
|
n = C_AS.height
|
||
|
holo = C_AS.holomorphic_differentials_basis()
|
||
|
holo_forms = [omega.form for omega in holo]
|
||
|
denom = LCM([denominator(omega) for omega in holo_forms])
|
||
|
variable_names = 'x, y'
|
||
|
for j in range(n):
|
||
|
variable_names += ', z' + str(j)
|
||
|
Rxyz = PolynomialRing(F, n+2, variable_names)
|
||
|
x, y = Rxyz.gens()[:2]
|
||
|
z = Rxyz.gens()[2:]
|
||
|
holo_forms = [Rxyz(omega*denom) for omega in holo_forms]
|
||
|
A = [[] for i in range(n)]
|
||
|
for omega in holo:
|
||
|
for i in range(n):
|
||
|
ei = n*[0]
|
||
|
ei[i] = 1
|
||
|
omega1 = omega.group_action(ei)
|
||
|
omega1 = denom * omega1
|
||
|
v1 = omega1.coordinates(holo_forms)
|
||
|
A[i] += [v1]
|
||
|
for i in range(n):
|
||
|
A[i] = matrix(F, A[i])
|
||
|
A[i] = A[i].transpose()
|
||
|
return A
|
||
|
|
||
|
def group_action_matrices_log(C_AS):
|
||
|
F = C_AS.base_ring
|
||
|
n = C_AS.height
|
||
|
holo = C_AS.at_most_poles_forms(1)
|
||
|
holo_forms = [omega.form for omega in holo]
|
||
|
denom = LCM([denominator(omega) for omega in holo_forms])
|
||
|
variable_names = 'x, y'
|
||
|
for j in range(n):
|
||
|
variable_names += ', z' + str(j)
|
||
|
Rxyz = PolynomialRing(F, n+2, variable_names)
|
||
|
x, y = Rxyz.gens()[:2]
|
||
|
z = Rxyz.gens()[2:]
|
||
|
holo_forms = [Rxyz(omega*denom) for omega in holo_forms]
|
||
|
A = [[] for i in range(n)]
|
||
|
for omega in holo:
|
||
|
for i in range(n):
|
||
|
ei = n*[0]
|
||
|
ei[i] = 1
|
||
|
omega1 = omega.group_action(ei)
|
||
|
omega1 = denom * omega1
|
||
|
v1 = omega1.coordinates(holo_forms)
|
||
|
A[i] += [v1]
|
||
|
for i in range(n):
|
||
|
A[i] = matrix(F, A[i])
|
||
|
A[i] = A[i].transpose()
|
||
|
return A
|