2022-12-22 14:44:57 +01:00
|
|
|
def group_action_matrices(space, list_of_group_elements, basis):
|
|
|
|
n = len(list_of_group_elements)
|
|
|
|
d = len(space)
|
|
|
|
A = [matrix(F, d, d) for i in range(n)]
|
|
|
|
for i, g in enumerate(list_of_group_elements):
|
|
|
|
for j, omega in enumerate(space):
|
|
|
|
omega1 = omega.group_action(g)
|
|
|
|
v1 = omega1.coordinates(basis = basis)
|
|
|
|
A[i][:, j] = vector(v1)
|
|
|
|
return A
|
|
|
|
|
|
|
|
def group_action_matrices_holo(AS):
|
|
|
|
n = AS.height
|
|
|
|
generators = []
|
|
|
|
for i in range(n):
|
|
|
|
ei = n*[0]
|
|
|
|
ei[i] = 1
|
|
|
|
generators += [ei]
|
|
|
|
return group_action_matrices(AS.holomorphic_differentials_basis(), generators, basis = AS.holomorphic_differentials_basis())
|
|
|
|
|
|
|
|
def group_action_matrices_dR(AS, threshold=8):
|
|
|
|
n = AS.height
|
|
|
|
generators = []
|
|
|
|
for i in range(n):
|
|
|
|
ei = n*[0]
|
|
|
|
ei[i] = 1
|
|
|
|
generators += [ei]
|
|
|
|
basis = [AS.holomorphic_differentials_basis(), AS.cohomology_of_structure_sheaf_basis(), AS.de_rham_basis(threshold=threshold)]
|
|
|
|
return group_action_matrices(basis[2], generators, basis = basis)
|
|
|
|
|
|
|
|
def group_action_matrices_old(C_AS):
|
2022-11-18 15:00:34 +01:00
|
|
|
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
|