2024-02-12 20:06:26 +01:00
|
|
|
def holomorphic_combinations(S):
|
|
|
|
"""Given a list S of pairs (form, corresponding Laurent series at some pt), find their combinations holomorphic at that pt."""
|
|
|
|
C_AS = S[0][0].curve
|
|
|
|
p = C_AS.characteristic
|
|
|
|
F = C_AS.base_ring
|
|
|
|
prec = C_AS.prec
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
|
|
|
|
RtQ = FractionField(Rt)
|
|
|
|
minimal_valuation = min([g[1].valuation() for g in S])
|
|
|
|
if minimal_valuation >= 0:
|
|
|
|
return [s[0] for s in S]
|
|
|
|
list_of_lists = [] #to będzie lista złożona z list współczynników część nieholomorficznych rozwinięcia form z S
|
|
|
|
for eta, eta_exp in S:
|
|
|
|
a = -minimal_valuation + eta_exp.valuation()
|
|
|
|
list_coeffs = a*[0] + eta_exp.list() + (-minimal_valuation)*[0]
|
|
|
|
list_coeffs = list_coeffs[:-minimal_valuation]
|
|
|
|
list_of_lists += [list_coeffs]
|
|
|
|
M = matrix(F, list_of_lists)
|
|
|
|
V = M.kernel() #chcemy wyzerować części nieholomorficzne, biorąc kombinacje form z S
|
|
|
|
|
|
|
|
|
|
|
|
# Sprawdzamy, jakim formom odpowiadają elementy V.
|
|
|
|
forms = []
|
|
|
|
for vec in V.basis():
|
2024-06-10 19:55:49 +02:00
|
|
|
forma_holo = 0*S[0][0]
|
2024-02-12 20:06:26 +01:00
|
|
|
forma_holo_power_series = Rt(0)
|
|
|
|
for vec_wspolrzedna, elt_S in zip(vec, S):
|
|
|
|
eta = elt_S[0]
|
|
|
|
#eta_exp = elt_S[1]
|
|
|
|
forma_holo += vec_wspolrzedna*eta
|
|
|
|
#forma_holo_power_series += vec_wspolrzedna*eta_exp
|
|
|
|
forms += [forma_holo]
|
|
|
|
return forms
|
|
|
|
|
2024-06-10 19:55:49 +02:00
|
|
|
def holomorphic_combinations_mixed(S):
|
|
|
|
"""Given a list S of pairs (form, corresponding Laurent series at some pt), find their combinations holomorphic at that pt."""
|
|
|
|
C_AS = S[0][0].curve
|
|
|
|
p = C_AS.characteristic
|
|
|
|
F = C_AS.base_ring
|
|
|
|
prec = C_AS.prec
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
|
|
|
|
RtQ = FractionField(Rt)
|
|
|
|
minimal_valuation = min([g[1].valuation() for g in S])
|
|
|
|
print(minimal_valuation)
|
|
|
|
if minimal_valuation >= 0:
|
|
|
|
return [s[0] for s in S]
|
|
|
|
list_of_lists = [] #to będzie lista złożona z list współczynników część nieholomorficznych rozwinięcia form z S
|
|
|
|
for eta, eta_exp in S:
|
|
|
|
a = -minimal_valuation + eta_exp.valuation()
|
|
|
|
list_coeffs = a*[0] + eta_exp.list() + (-minimal_valuation)*[0]
|
|
|
|
list_coeffs = list_coeffs[:-minimal_valuation]
|
|
|
|
list_of_lists += [list_coeffs]
|
|
|
|
M = matrix(F, list_of_lists)
|
|
|
|
V = M.kernel() #chcemy wyzerować części nieholomorficzne, biorąc kombinacje form z S
|
|
|
|
|
|
|
|
|
|
|
|
# Sprawdzamy, jakim formom odpowiadają elementy V.
|
|
|
|
forms = []
|
|
|
|
for vec in V.basis():
|
|
|
|
forma_holo = 0*S[0][0]
|
|
|
|
forma_holo_power_series = Rt(0)
|
|
|
|
res1 = 0*C_AS.dx
|
|
|
|
res2 = 0*C_AS.x
|
|
|
|
res = 0*C_AS.dx
|
|
|
|
for vec_wspolrzedna, elt_S in zip(vec, S):
|
|
|
|
eta = elt_S[0]
|
|
|
|
if isinstance(eta, as_form):
|
|
|
|
res += vec_wspolrzedna*eta
|
|
|
|
res1 += vec_wspolrzedna*eta
|
|
|
|
if isinstance(eta, as_function):
|
|
|
|
res += vec_wspolrzedna*eta.diffn()
|
|
|
|
res2 += vec_wspolrzedna*eta
|
|
|
|
#eta_exp = elt_S[1]
|
|
|
|
#forma_holo_power_series += vec_wspolrzedna*eta_exp
|
|
|
|
forms += [(res1, res2)]
|
|
|
|
return forms
|
|
|
|
|
2024-02-12 20:06:26 +01:00
|
|
|
def holomorphic_combinations_fcts(S, pole_order):
|
|
|
|
'''given a set S of (form, corresponding Laurent series at some pt), find their combinations holomorphic at that pt'''
|
|
|
|
C_AS = S[0][0].curve
|
|
|
|
p = C_AS.characteristic
|
|
|
|
F = C_AS.base_ring
|
|
|
|
prec = C_AS.prec
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
|
|
|
|
RtQ = FractionField(Rt)
|
|
|
|
minimal_valuation = min([Rt(g[1]).valuation() for g in S])
|
|
|
|
if minimal_valuation >= -pole_order:
|
|
|
|
return [s[0] for s in S]
|
|
|
|
list_of_lists = [] #to będzie lista złożona z list współczynników część nieholomorficznych rozwinięcia form z S
|
|
|
|
for eta, eta_exp in S:
|
|
|
|
a = -minimal_valuation + Rt(eta_exp).valuation()
|
|
|
|
if eta_exp !=0:
|
|
|
|
list_coeffs = a*[0] + Rt(eta_exp).list() + (-minimal_valuation)*[0]
|
|
|
|
list_coeffs = list_coeffs[:-minimal_valuation - pole_order]
|
|
|
|
else:
|
|
|
|
list_coeffs = (-minimal_valuation - pole_order)*[0]
|
|
|
|
list_of_lists += [list_coeffs]
|
|
|
|
M = matrix(F, list_of_lists)
|
|
|
|
V = M.kernel() #chcemy wyzerować części nieholomorficzne, biorąc kombinacje form z S
|
|
|
|
|
|
|
|
|
|
|
|
# Sprawdzamy, jakim formom odpowiadają elementy V.
|
|
|
|
forms = []
|
|
|
|
for vec in V.basis():
|
|
|
|
forma_holo = 0*C_AS.x
|
|
|
|
forma_holo_power_series = Rt(0)
|
|
|
|
for vec_wspolrzedna, elt_S in zip(vec, S):
|
|
|
|
eta = elt_S[0]
|
|
|
|
#eta_exp = elt_S[1]
|
|
|
|
forma_holo += vec_wspolrzedna*eta
|
|
|
|
#forma_holo_power_series += vec_wspolrzedna*eta_exp
|
|
|
|
forms += [forma_holo]
|
|
|
|
return forms
|
|
|
|
|
|
|
|
def holomorphic_combinations_forms(S, pole_order):
|
|
|
|
'''given a set S of (form, corresponding Laurent series at some pt), find their combinations holomorphic at that pt'''
|
|
|
|
C_AS = S[0][0].curve
|
|
|
|
p = C_AS.characteristic
|
|
|
|
F = C_AS.base_ring
|
|
|
|
prec = C_AS.prec
|
|
|
|
Rt.<t> = LaurentSeriesRing(F, default_prec=prec)
|
|
|
|
RtQ = FractionField(Rt)
|
|
|
|
minimal_valuation = min([Rt(g[1]).valuation() for g in S])
|
|
|
|
if minimal_valuation >= -pole_order:
|
|
|
|
return [s[0] for s in S]
|
|
|
|
list_of_lists = [] #to będzie lista złożona z list współczynników część nieholomorficznych rozwinięcia form z S
|
|
|
|
for eta, eta_exp in S:
|
|
|
|
a = -minimal_valuation + Rt(eta_exp).valuation()
|
|
|
|
list_coeffs = a*[0] + Rt(eta_exp).list() + (-minimal_valuation)*[0]
|
|
|
|
list_coeffs = list_coeffs[:-minimal_valuation - pole_order]
|
|
|
|
list_of_lists += [list_coeffs]
|
|
|
|
M = matrix(F, list_of_lists)
|
|
|
|
V = M.kernel() #chcemy wyzerować części nieholomorficzne, biorąc kombinacje form z S
|
|
|
|
|
|
|
|
|
|
|
|
# Sprawdzamy, jakim formom odpowiadają elementy V.
|
|
|
|
forms = []
|
|
|
|
for vec in V.basis():
|
|
|
|
forma_holo = 0*C_AS.dx
|
|
|
|
forma_holo_power_series = Rt(0)
|
|
|
|
for vec_wspolrzedna, elt_S in zip(vec, S):
|
|
|
|
eta = elt_S[0]
|
|
|
|
#eta_exp = elt_S[1]
|
|
|
|
forma_holo += vec_wspolrzedna*eta
|
|
|
|
#forma_holo_power_series += vec_wspolrzedna*eta_exp
|
|
|
|
forms += [forma_holo]
|
|
|
|
return forms
|
|
|
|
|
|
|
|
#print only forms that are log at the branch pts, but not holomorphic
|