Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Gauss Sums Argument

62 views
# **************************************************************** # Computing Quadratic Gauss Sums # **************************************************************** p=7 # Pick a prime (for now) G=DirichletGroup(p) # Group of Dirichlet characters c=G[1] # select a generator for characters L=c^ZZ((p-1)/2) # This is the only quadratic character: Legendre symbol print "Legendre symbol:", L print "L^2=", L^2 print " " GS=L.gauss_sum()/p^(1/2); GS P=(real_part(GS), imag_part(GS)); P a = plot([],figsize=(3,3),title='Gauss Sums for p='+str(p),frame=True,axes_labels=['$x$-axis','$y$-axis']) a+=circle((0.0,0.0),1,color='blue') a+=point(P,color='red', size=20) show(a) print "Numeric values" z=CC(GS); ord=2; print "order=",ord, " Arg(g(c))=", z print "z^4=", z^4 k=2*pi.n()/z.argument(); print "2 Pi/Arg = ", k, " ", floor(k)
Legendre symbol: Dirichlet character modulo 7 of conductor 7 mapping 3 |--> -1 L^2= Dirichlet character modulo 7 of conductor 1 mapping 3 |--> 1 -1/7*sqrt(7)*(2*e^(11/21*I*pi) - 2*e^(3/7*I*pi) - 2*e^(8/21*I*pi) - 2*e^(4/21*I*pi) + 2*e^(1/21*I*pi) + 1) (2/7*sqrt(7)*cos(10/21*pi) + 2/7*sqrt(7)*cos(3/7*pi) + 2/7*sqrt(7)*cos(8/21*pi) + 2/7*sqrt(7)*cos(4/21*pi) - 2/7*sqrt(7)*cos(1/21*pi) - 1/7*sqrt(7), -2/7*sqrt(7)*sin(10/21*pi) + 2/7*sqrt(7)*sin(3/7*pi) + 2/7*sqrt(7)*sin(8/21*pi) + 2/7*sqrt(7)*sin(4/21*pi) - 2/7*sqrt(7)*sin(1/21*pi))
Numeric values order= 2 Arg(g(c))= 2.93737402297610e-16 + 1.00000000000000*I z^4= 0.999999999999999 - 1.17494960919044e-15*I 2 Pi/Arg = 4.00000000000000 4
# ************************************************************** # Gauss Sums and Computations in Cyclotomic Fields # ************************************************************** # The Gauss sum g(c) of a character c mod p # belongs to the cyclotomic field of p*(p-1) roots of unity # To compute the argument of g(c) divide g(c) by the corresponding # primitive root. p=7; pp=p*(p-1)*2; L=CyclotomicField(pp); L # special case of number field defined by x^p-1 zp=L.gen(); zp
Cyclotomic Field of order 84 and degree 24 zeta84
# *********************************************************** # Computing the quadratic Gauss sum # *********************************************************** G=DirichletGroup(p) # Group of Dirichlet characters c=G[1] # select a generator for characters L=c^ZZ((p-1)/2) # This is the only quadratic character: Legendre symbol print "Legendre symbol:", L GS=L.gauss_sum()/p^(1/2); print "Gauss sum / sqrt(p):", GS
Legendre symbol: Dirichlet character modulo 7 of conductor 7 mapping 3 |--> -1 Gauss sum / sqrt(p): -1/7*sqrt(7)*(2*e^(11/21*I*pi) - 2*e^(3/7*I*pi) - 2*e^(8/21*I*pi) - 2*e^(4/21*I*pi) + 2*e^(1/21*I*pi) + 1)
# *********************************************************** # Find the argument as a power of zeta#p*(p-1)*2 # [Note: because of sqrt(p) we look into a quadratic extension of Q(p*(p-1))] # *********************************************************** eps=abs(zp-1)/3 # distance bound to a cyclotomic root root=p*(p-1)*2 # quadratic extension of Q(zeta#p(p-1)) print "Cyclotomic field of order:", root, " snap-grid eps=", eps print "p=", p, " Quadratic GS=", CC(GS) for j in range(root): z1=CC(GS-zp^j) # print j, z1, abs(z1) if abs(z1)<eps: n=root/j print "Abs(GS-z^j)=", abs(z1), " for j=",j, "GS order n=", n, " i.e. Arg(GS)=2Pi/", n
Cyclotomic field of order: 84 snap-grid eps= 0.0249274628508837 p= 7 Quadratic GS= 3.14718645318868e-16 + 1.00000000000000*I Abs(GS-z^j)= 4.58237264425372e-16 for j= 21 GS order n= 4 i.e. Arg(GS)=2Pi/ 4