sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 467 forks source link

Remove stray factors of 2 in Coleman integration #8304

Closed kedlaya closed 14 years ago

kedlaya commented 14 years ago

Jen discovered some stray factors of 2 buried in the Coleman integration code. (Apply patches at #7927 before trying these examples.)

On one hand, the invariant differential sometimes thinks it's dx/2y (as it should):

sage: R.<x> = QQ['x']
sage: H = HyperellipticCurve(x^3+1)
sage: K = Qp(5,8)
sage: HK = H.change_ring(K)
sage: w = HK.invariant_differential()
sage: P = HK(0,1)
sage: Q = HK.lift_x(5)
sage: x,y = HK.monsky_washnitzer_gens()
sage: (2*y*w).coleman_integral(P,Q)
5 + O(5^9)

but on the other hand, it sometimes behaves as if it were dx/y (as it shouldn't):

sage: x,y,z = HK.local_analytic_interpolation(P,Q)
sage: I1 = (x.derivative()/y).integral()
sage: I2 = (x.derivative()/(2*y)).integral()
sage: I1(1)-I1(0)
5 + 3*5^4 + 3*5^6 + 3*5^7 + O(5^9)
sage: I2(1)-I2(0)
3*5 + 2*5^2 + 2*5^3 + 5^4 + 4*5^6 + 5^7 + O(5^9)
sage: HK.coleman_integral(w,P,Q)
5 + 3*5^4 + 3*5^6 + 3*5^7 + O(5^9)

The apparent fix is to insert an extra division by two in tiny_integrals (which then needs a corrected docstring and some doctests, and similarly for tiny_integrals_on_basis) and then remove the multiplication by 2 in coleman_integrals_on_basis. Then correct all the doctests which currently give answers which are off by a factor of 2.

CC: @jbalakrishnan @robertwb

Component: number theory

Keywords: Coleman integration, hyperelliptic curves

Author: Jennifer Balakrishnan

Reviewer: Kiran Kedlaya

Merged: sage-4.3.4.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8304

jbalakrishnan commented 14 years ago
comment:1

Attachment: 13542.patch.gz

The attached patch should fix these issues (+doctests), so that invariant differential always behaves as dx/2y:

sage: R.<x> = QQ['x']
sage: H = HyperellipticCurve(x^3+1)
sage: K = Qp(5,8)
sage: HK = H.change_ring(K)
sage: w = HK.invariant_differential()
sage: P = HK(0,1)
sage: Q = HK.lift_x(5)
sage: x,y = HK.monsky_washnitzer_gens()
sage: (2*y*w).coleman_integral(P,Q)
5 + O(5^9)
sage: x,y,z = HK.local_analytic_interpolation(P,Q)
sage: I2 = (x.derivative()/(2*y)).integral()
sage: I2(1)-I2(0)
3*5 + 2*5^2 + 2*5^3 + 5^4 + 4*5^6 + 5^7 + O(5^9)
sage: HK.coleman_integral(w,P,Q)
3*5 + 2*5^2 + 2*5^3 + 5^4 + 4*5^6 + 5^7 + O(5^9)
jbalakrishnan commented 14 years ago

Attachment: 13543.patch.gz

added doctests for tiny_integrals

kedlaya commented 14 years ago
comment:3

Looks good, passes long doctests in sage/schemes/ (after applying patches at #7927). Positive review.

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 14 years ago

Author: Jennifer Balakrishnan

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 14 years ago
comment:4

Merged in this order:

  1. 13542.patch
  2. 13543.patch
7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 14 years ago

Merged: sage-4.3.4.alpha0

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 14 years ago

Reviewer: Kiran Kedlaya