Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
36 views
ubuntu2004
# ************************************************************* # Computes Jacobi Sums: J(c,c')=Sum c(t) c'(1-t) # Syntax: e.jacobi_sum(f) where e and f are Dirichlet characters from # the same group DirichletGroup(p) # ************************************************************* # Referece: # https://mvngu.googlecode.com/hg/onepage/sage/modular/dirichlet/sage.modular.dirichlet.DirichletCharacter.jacobi_sum.html # Example p=7 DP = DirichletGroup(p); DP
Group of Dirichlet characters modulo 7 with values in Cyclotomic Field of order 6 and degree 2
c1=DP[1]; c1 c2=DP[2]; c2
Dirichlet character modulo 7 of conductor 7 mapping 3 |--> zeta6 Dirichlet character modulo 7 of conductor 7 mapping 3 |--> zeta6 - 1
c1.jacobi_sum(c2)
2*zeta6 + 1
# Example 2 and check by hand p=3; print "p=",p DP=DirichletGroup(p); DP
p= 3 Group of Dirichlet characters modulo 3 with values in Cyclotomic Field of order 2 and degree 1
e=DP[0]; e f=DP[1]; f
Dirichlet character modulo 3 of conductor 1 mapping 2 |--> 1 Dirichlet character modulo 3 of conductor 3 mapping 2 |--> -1
# DirichletGroup(3) has only 2 characters e.jacobi_sum(f) e.jacobi_sum(e) f.jacobi_sum(f)
-1 1 1
# Check by hand ...
# ***************************************************************** # Jacobi sums J(c,c) # Getting used to Dirichlet characters ... p=19; DP = DirichletGroup(p); DP for k in range(len(list(DP))): DP[k] print "\n" c=DP[1] # is a generator for k in range(p-1): c^k
Group of Dirichlet characters of modulus 19 over Cyclotomic Field of order 18 and degree 6 Dirichlet character modulo 19 of conductor 1 mapping 2 |--> 1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^2 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^3 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^4 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^5 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^3 - 1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^4 - zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^5 - zeta18^2 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^2 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^3 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^4 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^5 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^3 + 1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^4 + zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^5 + zeta18^2 Dirichlet character modulo 19 of conductor 1 mapping 2 |--> 1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^2 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^3 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^4 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^5 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^3 - 1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^4 - zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^5 - zeta18^2 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^2 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^3 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^4 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^5 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^3 + 1 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^4 + zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^5 + zeta18^2
# ************************************************************************** # Part II: Comparing Jacobi sum with Wen Wang # EC y^2=x^3+D, p=19, D=5 # ************************************************************************** # Constructing c1: a Dirichlet Character of order 2 ("rho" in WW-paper) # and computing J(c,c) m=2; n=ZZ((p-1)/m); print m,n c=DP[1]; c # generator of Dirichlet characters c1=c^n; c1 # character of order m=2 (Legendre) if c1^m==DP[0]: print "char of order:", m print "J(c,c)=", c1.jacobi_sum(c1) # J(c,c), ord(c)=2
2 9 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18 Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -1 char of order: 2 J(c,c)= 1
# Constructing c2: a Dirichlet Cjaracter of order 3 # and computing its Jacobi sum J(c2,c2) # m=3; c2=DP[1]^ZZ((p-1)/m); c2 # character of order m=3 J=c2.jacobi_sum(c2) print "ord(c)=",m, " J(c,c)=", J # J(c,c), ord(c)=3
Dirichlet character modulo 19 of conductor 19 mapping 2 |--> zeta18^3 - 1 ord(c)= 3 J(c,c)= -3*zeta18^3 + 5
# In WW paper J(c,c)=5+3*zeta3 ... we got 5-3*zeta6, but -zeta6=zeta3^2=conj(zeta3) # so our J=5+3*zeta3^2 # Now in Weil zeros for x^3+D file we got w=-(5+3zeta3^2), so w=-J ... close enough :) D=5 cc=c1*c2; cc d=(c1*c2)(4*D) print c1(4*D), c2(4*D), d
Dirichlet character modulo 19 of conductor 19 mapping 2 |--> -zeta18^3 + 1 1 1 1
# Checking N=p+1+2*Re[cc(4D) J(c2,c2)] p+1+d*J+conjugate(d*J)
27
# As expected! N=p+1-a, a=-7 (see Weil zeros file)