DeRhamComputation/as_covers/group_action_matrices.sage

95 lines
3.1 KiB
Python
Raw Normal View History

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
2023-11-29 09:50:29 +01:00
def group_action_matrices_holo(AS, basis=0, threshold=10):
n = AS.height
generators = []
for i in range(n):
ei = n*[0]
ei[i] = 1
generators += [ei]
2023-11-29 09:50:29 +01:00
if basis == 0:
basis = AS.holomorphic_differentials_basis(threshold=threshold)
2023-09-23 15:33:58 +02:00
return group_action_matrices(basis, generators, basis = 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(threshold = threshold), AS.cohomology_of_structure_sheaf_basis(threshold = threshold), 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
2023-09-22 08:45:48 +02:00
def group_action_matrices_log(AS):
n = AS.height
generators = []
for i in range(n):
ei = n*[0]
ei[i] = 1
generators += [ei]
return group_action_matrices(AS.at_most_poles_forms(1), generators, basis = AS.at_most_poles_forms(1))
def group_action_matrices_log_old(C_AS):
2022-11-18 15:00:34 +01:00
F = C_AS.base_ring
n = C_AS.height
holo = C_AS.at_most_poles_forms(1)
2023-09-22 08:45:48 +02:00
holo_forms = [omega for omega in holo]
2022-11-18 15:00:34 +01:00
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