as_de_rham_witt differentials
This commit is contained in:
parent
e468a3fe54
commit
2face76a9e
5
as_drw/as_compability.sage
Normal file
5
as_drw/as_compability.sage
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
def teichmuller(self, n):
|
||||||
|
AS = self.curve
|
||||||
|
return as_witt([self] + n*[0*AS.x])
|
||||||
|
|
||||||
|
as_function.teichmuller = teichmuller
|
54
as_drw/as_witt.sage
Normal file
54
as_drw/as_witt.sage
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
class as_witt:
|
||||||
|
def __init__(self, list_of_fcts):
|
||||||
|
self.f = list_of_fcts
|
||||||
|
self.n = len(list_of_fcts) - 1
|
||||||
|
self.curve = list_of_fcts[0].curve
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return str(self.f)
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
#not working, because comparing as_fcts not working
|
||||||
|
return self.f == other.f
|
||||||
|
|
||||||
|
def __add__(self, other):
|
||||||
|
result = []
|
||||||
|
C = self.curve
|
||||||
|
n = self.n
|
||||||
|
for k in range(0, n+1):
|
||||||
|
aux = WS[k].subs({X[i] : (self.f)[i].function for i in range(0, n+1)} | {Y[i] : (other.f)[i].function for i in range(0, n+1)})
|
||||||
|
result += [aux]
|
||||||
|
result = [as_function(C, a) for a in result]
|
||||||
|
return as_witt(result)
|
||||||
|
|
||||||
|
def __neg__(self):
|
||||||
|
result = [-a for a in self.f]
|
||||||
|
return as_witt(result)
|
||||||
|
|
||||||
|
def __sub__(self, other):
|
||||||
|
return self + (-other)
|
||||||
|
|
||||||
|
def __mul__(self, other):
|
||||||
|
result = []
|
||||||
|
C = self.curve
|
||||||
|
n = self.n
|
||||||
|
for k in range(0, n+1):
|
||||||
|
aux = WP[k].subs({X[i] : (self.f)[i].function for i in range(0, n+1)} | {Y[i] : (other.f)[i].function for i in range(0, n+1)})
|
||||||
|
result += [aux]
|
||||||
|
result = [as_function(C, a) for a in result]
|
||||||
|
return as_witt(result)
|
||||||
|
|
||||||
|
def verschiebung(self):
|
||||||
|
AS = self.curve
|
||||||
|
return as_witt([0*AS.x] + self.f)
|
||||||
|
|
||||||
|
def R(self):
|
||||||
|
n = self.n
|
||||||
|
return as_witt(self.f[:n])
|
||||||
|
|
||||||
|
def frobenius(self):
|
||||||
|
n= self.n
|
||||||
|
p = self.curve.base_ring.characteristic()
|
||||||
|
result = self.f[:n]
|
||||||
|
result = [a^p for a in result]
|
||||||
|
return as_witt(result)
|
82
as_drw/as_witt_form.sage
Normal file
82
as_drw/as_witt_form.sage
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
class as_witt_form:
|
||||||
|
def __init__(self, fcts1, fcts2):
|
||||||
|
self.Vs = fcts1
|
||||||
|
self.dVs = fcts2
|
||||||
|
self.n = len(fcts1) - 1
|
||||||
|
self.curve = fcts1[0].curve
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
result = ''
|
||||||
|
i = 0
|
||||||
|
for f in self.Vs:
|
||||||
|
if i != 0:
|
||||||
|
result += 'V^' + str(i) + '([' + str(f) + '] d[x]) +'
|
||||||
|
else:
|
||||||
|
result += '[' + str(f) + '] d[x] +'
|
||||||
|
i+=1
|
||||||
|
i = 1
|
||||||
|
for f in self.Vs:
|
||||||
|
result += 'dV^' + str(i) + '([' + str(f) + ']) +'
|
||||||
|
i+=1
|
||||||
|
return result
|
||||||
|
|
||||||
|
def __add__(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):
|
||||||
|
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]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def verschiebung(self, i = 1):
|
||||||
|
AS = self.curve
|
||||||
|
p = AS.base_ring.characteristic()
|
||||||
|
n = self.n
|
||||||
|
if i == 1:
|
||||||
|
result_Vs = [0*AS.x] + self.Vs[1:]
|
||||||
|
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)
|
82
as_drw/witt_polynomials.sage
Normal file
82
as_drw/witt_polynomials.sage
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
def witt_pol(X, p, n):
|
||||||
|
n = len(X)
|
||||||
|
return sum(p^i*X[i]^(p^(n-i-1)) for i in range(0, n))
|
||||||
|
|
||||||
|
def witt_sum(p, n):
|
||||||
|
variables = ''
|
||||||
|
for i in range(0, n+1):
|
||||||
|
variables += 'X' + str(i) + ','
|
||||||
|
for i in range(0, n+1):
|
||||||
|
variables += 'Y' + str(i)
|
||||||
|
if i!=n:
|
||||||
|
variables += ','
|
||||||
|
RQ = PolynomialRing(QQ, variables, 2*(n+1))
|
||||||
|
X = RQ.gens()[:n+1]
|
||||||
|
Y = RQ.gens()[n+1:]
|
||||||
|
Rpx.<x> = PolynomialRing(GF(p), 1)
|
||||||
|
RQx.<x> = PolynomialRing(QQ, 1)
|
||||||
|
if n == 0:
|
||||||
|
return X[0] + Y[0]
|
||||||
|
WS = []
|
||||||
|
for k in range(0, n):
|
||||||
|
aux = witt_sum(p, k)
|
||||||
|
Rold = aux.parent()
|
||||||
|
Xold = Rold.gens()[:k+1]
|
||||||
|
Yold = Rold.gens()[k+1:]
|
||||||
|
WS+= [aux.subs({Xold[i] : X[i] for i in range(0, k)} | {Yold[i] : Y[i] for i in range(0, k)})]
|
||||||
|
return 1/p^n*(witt_pol(X[:n+1], p, n) + witt_pol(Y[:n+1], p, n) - sum(p^k*WS[k]^(p^(n-k)) for k in range(0, n)))
|
||||||
|
|
||||||
|
def witt_prod(p, n):
|
||||||
|
variables = ''
|
||||||
|
for i in range(0, n+1):
|
||||||
|
variables += 'X' + str(i) + ','
|
||||||
|
for i in range(0, n+1):
|
||||||
|
variables += 'Y' + str(i)
|
||||||
|
if i!=n:
|
||||||
|
variables += ','
|
||||||
|
RQ = PolynomialRing(QQ, variables, 2*(n+1))
|
||||||
|
X = RQ.gens()[:n+1]
|
||||||
|
Y = RQ.gens()[n+1:]
|
||||||
|
Rpx.<x> = PolynomialRing(GF(p), 1)
|
||||||
|
RQx.<x> = PolynomialRing(QQ, 1)
|
||||||
|
if n == 0:
|
||||||
|
return X[0] * Y[0]
|
||||||
|
WP = []
|
||||||
|
for k in range(0, n):
|
||||||
|
aux = witt_prod(p, k)
|
||||||
|
Rold = aux.parent()
|
||||||
|
Xold = Rold.gens()[:k+1]
|
||||||
|
Yold = Rold.gens()[k+1:]
|
||||||
|
WP+= [aux.subs({Xold[i] : X[i] for i in range(0, k)} | {Yold[i] : Y[i] for i in range(0, k)})]
|
||||||
|
return 1/p^n*(witt_pol(X[:n+1], p, n) * witt_pol(Y[:n+1], p, n) - sum(p^k*WP[k]^(p^(n-k)) for k in range(0, n)))
|
||||||
|
|
||||||
|
p = 5
|
||||||
|
n = 1
|
||||||
|
variables = ''
|
||||||
|
for i in range(0, n+1):
|
||||||
|
variables += 'X' + str(i) + ','
|
||||||
|
for i in range(0, n+1):
|
||||||
|
variables += 'Y' + str(i)
|
||||||
|
if i!=n:
|
||||||
|
variables += ','
|
||||||
|
RQ = PolynomialRing(QQ, variables, 2*(n+1))
|
||||||
|
X = RQ.gens()[:n+1]
|
||||||
|
Y = RQ.gens()[n+1:]
|
||||||
|
|
||||||
|
WS = []
|
||||||
|
WP = []
|
||||||
|
for k in range(0, n+1):
|
||||||
|
aux1 = witt_sum(p, k)
|
||||||
|
aux2 = witt_prod(p, k)
|
||||||
|
Rold = aux1.parent()
|
||||||
|
aux2 = Rold(aux2)
|
||||||
|
Xold = Rold.gens()[:k+1]
|
||||||
|
Yold = Rold.gens()[k+1:]
|
||||||
|
WS+= [RQ(aux1.subs({Xold[i] : X[i] for i in range(0, k)} | {Yold[i] : Y[i] for i in range(0, k)}))]
|
||||||
|
WP+= [RQ(aux2.subs({Xold[i] : X[i] for i in range(0, k)} | {Yold[i] : Y[i] for i in range(0, k)}))]
|
||||||
|
|
||||||
|
Rp2n = PolynomialRing(GF(p), variables, 2*(n+1))
|
||||||
|
X = Rp2n.gens()[:n+1]
|
||||||
|
Y = Rp2n.gens()[n+1:]
|
||||||
|
WS = [Rp2n(a) for a in WS]
|
||||||
|
WP = [Rp2n(a) for a in WP]
|
Loading…
Reference in New Issue
Block a user