as_witt_form addition works at least partially
This commit is contained in:
parent
2face76a9e
commit
c952ad5001
@ -15,6 +15,18 @@ class as_function:
|
||||
|
||||
def __repr__(self):
|
||||
return str(self.function)
|
||||
|
||||
def __eq__(self, other):
|
||||
AS = self.curve
|
||||
RxyzQ, Rxyz, x, y, z = AS.fct_field
|
||||
aux = self - other
|
||||
aux = RxyzQ(aux.function)
|
||||
aux = aux.numerator()
|
||||
aux = as_function(AS, aux)
|
||||
aux = aux.expansion_at_infty()
|
||||
if aux.valuation() >= 1:
|
||||
return True
|
||||
return False
|
||||
|
||||
def __add__(self, other):
|
||||
C = self.curve
|
||||
@ -33,7 +45,7 @@ class as_function:
|
||||
g = self.function
|
||||
return as_function(C, constant*g)
|
||||
|
||||
def __neg__(self, other):
|
||||
def __neg__(self):
|
||||
C = self.curve
|
||||
g = self.function
|
||||
return as_function(C, -g)
|
||||
|
@ -2,4 +2,18 @@ def teichmuller(self, n):
|
||||
AS = self.curve
|
||||
return as_witt([self] + n*[0*AS.x])
|
||||
|
||||
as_function.teichmuller = teichmuller
|
||||
def Vd(self, n, m = 1):
|
||||
'''Return V^m([f] d[x]) in W_n Omega'''
|
||||
AS = self.curve
|
||||
if m == 0:
|
||||
return as_witt_form([self] + n*[0*AS.x], (n+1)*[0*AS.x])
|
||||
return as_witt_form(m*[0*AS.x] + [self] + (n-m)*[0*AS.x], (n+1)*[0*AS.x])
|
||||
|
||||
def dV(self, n, m = 1):
|
||||
'''Return dV^m([f] d[x]) in W_n Omega'''
|
||||
AS = self.curve
|
||||
return as_witt_form((n+1)*[0*AS.x], m*[0*AS.x] + [self] + (n-m)*[0*AS.x])
|
||||
|
||||
as_function.teichmuller = teichmuller
|
||||
as_function.Vd = Vd
|
||||
as_function.dV = dV
|
@ -4,6 +4,10 @@ class as_witt_form:
|
||||
self.dVs = fcts2
|
||||
self.n = len(fcts1) - 1
|
||||
self.curve = fcts1[0].curve
|
||||
if self.dVs[0].function!=0:
|
||||
raise ValueError('First dV should be zero!')
|
||||
if len(fcts1) != len(fcts2):
|
||||
raise ValueError('Both lists should be of the same length!')
|
||||
|
||||
def __repr__(self):
|
||||
result = ''
|
||||
@ -15,61 +19,74 @@ class as_witt_form:
|
||||
result += '[' + str(f) + '] d[x] +'
|
||||
i+=1
|
||||
i = 1
|
||||
for f in self.Vs:
|
||||
for f in self.dVs[1:]:
|
||||
result += 'dV^' + str(i) + '([' + str(f) + ']) +'
|
||||
i+=1
|
||||
return result
|
||||
|
||||
def __add__(self, other):
|
||||
print(self, other)
|
||||
n = self.n
|
||||
AS = self.curve
|
||||
result = as_witt_form((n+1)*[0 * AS.x], (n+1)*[0 * AS.x])
|
||||
flag = 1
|
||||
for i in range(0, n+1):
|
||||
if self.Vs[i] != 0 and other.Vs[i] != 0:
|
||||
flag = 0
|
||||
if flag == 1:
|
||||
aux = [self.Vs[i] + other.Vs[i] for i in range(0, n+1)]
|
||||
aux = as_witt_form(aux, (n+1)*[0*AS.x])
|
||||
other1 = as_witt_form((n+1)*[0*AS.x], other.dVs)
|
||||
return aux + other1
|
||||
flag = 1
|
||||
for i in range(0, n+1):
|
||||
if self.dVs[i] != 0 and other.dVs[i] != 0:
|
||||
flag = 0
|
||||
if flag == 1:
|
||||
aux = [self.dVs[i] + other.dVs[i] for i in range(0, n+1)]
|
||||
aux = as_witt_form((n+1)*[0*AS.x], aux)
|
||||
other1 = as_witt_form(other.Vs, (n+1)*[0*AS.x])
|
||||
return aux + other1
|
||||
##################
|
||||
########
|
||||
i = 0
|
||||
while(self.Vs[i].function == 0 or other.Vs[i].function == 0):
|
||||
while(i <= n and self.Vs[i].function == 0 and other.Vs[i].function == 0):
|
||||
i+=1
|
||||
self1 = self.Vs[:i] + [0*AS.x] + self.Vs[i+1 : ]
|
||||
self1 = as_witt_form(self1, self.dVs)
|
||||
other1 = other.Vs[:i] + [0*AS.x] + other.Vs[i+1 : ]
|
||||
other1 = as_witt_form(other1, other.dVs)
|
||||
fct = self.Vs[i].teichmuller(n+1 - i) + other.Vs[i].teichmuller(n+1 - i)
|
||||
result = self1 + other1
|
||||
for j in range(0, n+1 - i):
|
||||
aux = as_witt_form((n+1)*[0*AS.x], (n+1)*[0*AS.x]) ####? write Verschiebung
|
||||
aux.Vs[i + j] = fct[j]
|
||||
result = result + aux
|
||||
|
||||
#############
|
||||
if [a.function for a in other.Vs] == (n+1)*[0] and [a.function for a in other.dVs] == (n+1)*[0]:
|
||||
return self
|
||||
if [a.function for a in other.Vs] != (n+1)*[0]:
|
||||
|
||||
f1 = self.f[i]
|
||||
f2 = other.f[i]
|
||||
f = f1.teichmuller(n) + f2.teichmuller(n)
|
||||
for j in range(i, i+1):
|
||||
result[i] += self.f[i] + other.f[i]
|
||||
|
||||
|
||||
|
||||
if i<=n:
|
||||
print('a')
|
||||
if (i <= n and self.Vs[i].function != 0 and other.Vs[i].function != 0):
|
||||
self1 = self.cutVs(i)
|
||||
other1 = other.cutVs(i)
|
||||
result = self1 + other1
|
||||
self_first = self.Vs[i].teichmuller(n)
|
||||
other_first = other.Vs[i].teichmuller(n)
|
||||
aux = self_first + other_first
|
||||
for j in range(0, n+1 - i):
|
||||
print(i, j)
|
||||
result += aux.f[j].Vd(n, i+j)
|
||||
return result
|
||||
if (i <= n and self.Vs[i].function != 0 and other.Vs[i].function == 0):
|
||||
self1 = self.cutVs(i)
|
||||
other1 = other.cutVs(i)
|
||||
result = self1 + other1
|
||||
result.Vs[i] = self.Vs[i]
|
||||
return result
|
||||
if (i <= n and self.Vs[i].function == 0 and other.Vs[i].function != 0):
|
||||
self1 = self.cutVs(i)
|
||||
other1 = other.cutVs(i)
|
||||
result = self1 + other1
|
||||
result.Vs[i] = other.Vs[i]
|
||||
return result
|
||||
########
|
||||
i = 0
|
||||
while(i <= n and self.dVs[i].function == 0 and other.dVs[i].function == 0):
|
||||
i+=1
|
||||
if i<=n:
|
||||
print('b', i)
|
||||
if (i <= n and self.dVs[i].function != 0 and other.dVs[i].function != 0):
|
||||
self1 = self.cutdVs(i)
|
||||
other1 = other.cutdVs(i)
|
||||
result = self1 + other1
|
||||
self_first = self.dVs[i].teichmuller(n)
|
||||
other_first = other.dVs[i].teichmuller(n)
|
||||
aux = self_first + other_first
|
||||
for j in range(0, n+1 - i):
|
||||
result += aux.f[j].dV(n, i+j)
|
||||
return result
|
||||
if (i <= n and self.dVs[i].function != 0 and other.dVs[i].function == 0):
|
||||
self1 = self.cutdVs(i)
|
||||
other1 = other.cutdVs(i)
|
||||
result = self1 + other1
|
||||
result.dVs[i] = self.dVs[i]
|
||||
return result
|
||||
if (i <= n and self.dVs[i].function == 0 and other.dVs[i].function != 0):
|
||||
self1 = self.cutdVs(i)
|
||||
other1 = other.cutdVs(i)
|
||||
result = self1 + other1
|
||||
result.dVs[i] = other.dVs[i]
|
||||
return result
|
||||
return (0*AS.x).Vd(n)
|
||||
|
||||
def verschiebung(self, i = 1):
|
||||
AS = self.curve
|
||||
p = AS.base_ring.characteristic()
|
||||
@ -79,4 +96,16 @@ class as_witt_form:
|
||||
result_dVs = 2*[0*AS.x] + self.Vs[2:]
|
||||
result_dVs = [a^p for a in result_dVs]
|
||||
return as_witt_form(result_Vs, result_dVs)
|
||||
return self.verschiebung().verschiebung(i = i-1)
|
||||
return self.verschiebung().verschiebung(i = i-1)
|
||||
|
||||
def cutVs(self, i):
|
||||
n = self.n
|
||||
AS = self.curve
|
||||
result_Vs = self.Vs[:i] + (n+1 - i)*[0*AS.x]
|
||||
return as_witt_form(result_Vs, self.dVs)
|
||||
|
||||
def cutdVs(self, i):
|
||||
n = self.n
|
||||
AS = self.curve
|
||||
result_dVs = self.dVs[:i] + (n+1 - i)*[0*AS.x]
|
||||
return as_witt_form(self.Vs, result_dVs)
|
@ -26,6 +26,10 @@ load('auxilliaries/reverse.sage')
|
||||
load('auxilliaries/hensel.sage')
|
||||
load('auxilliaries/linear_combination_polynomials.sage')
|
||||
load('auxilliaries/laurent_analytic_part.sage')
|
||||
load('as_drw/witt_polynomials.sage')
|
||||
load('as_drw/as_witt.sage')
|
||||
load('as_drw/as_witt_form.sage')
|
||||
load('as_drw/as_compability.sage')
|
||||
##############
|
||||
##############
|
||||
def init(lista, tests = False, init=True):
|
||||
|
Loading…
Reference in New Issue
Block a user