An easy fix:
In the code change
# If exactly one is trivial, return 0
else:
return 0
to
# If exactly one is trivial, return -1
else:
return -1
(Some docstrings need changing too.)
At first I thought it should be 0 in this case because I
confused "trivial character" with "identically equal to 1".
This is http://trac.sagemath.org/sage_trac/ticket/6393
I'll post a patch soon.
I don't understand why
sage: parent(Z.jacobi_sum(Z))
Cyclotomic Field of order 20 and degree 8
is incorrect though.
On Wed, Jun 24, 2009 at 7:00 AM, rje<[email protected]> wrote:
>
> Curiously, Gauss sums are defined in the reference manual
>
> http://www.sagemath.org/doc/reference/sage/modular/dirichlet.html
>
> but Jacobi sums are not. Maybe that accounts for the following
> problem: "jacobi_sum()" incorrectly computes Jacobi sums J(Y, Z) when
> exactly one of the characters Y, Z is trivial.
>
> Example:
>
> sage: G=DirichletGroup(5); X=G.list(); Y=X[0]; Z=X[1]; #
> Y is trivial and Z is quartic
>
> sage: sum([Y(x)*Z(1-x) for x in IntegerModRing(5)])
> -1
> # The value -1 above is the correct value of the Jacobi sum J(Y, Z).
>
>
> sage: Y.jacobi_sum(Z); Z.jacobi_sum(Y)
> 0
> 0
> #The 0 values above are incorrect values of J(Y, Z).
>
> Remark: Since unlike Gauss sums mod p, Jacobi sums mod p never
> involve p-th roots of unity, the following is also a bit curious:
>
> sage: parent(Z.jacobi_sum(Z))
> Cyclotomic Field of order 20 and degree 8
>
> rje
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---