Opened 13 years ago

Last modified 4 years ago

#4656 needs_work defect

[with patch, needs work] power series with zero p-adic coefficients

Reported by: wuthrich Owned by: was
Priority: minor Milestone: sage-6.4
Component: padics Keywords: padic powerseries padicIMA
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps: todo

Status badges

Description (last modified by wuthrich)

The following _repr_ does not look good to me

sage: R.<T> = Qp(5,5)[[]]
sage: O(5^3)*T
0
sage: 1+O(5^3)*T
1 + O(5^5) + O(5^3)*T

But that is due to

sage: s= O(5^3)*T
sage: s.is_zero()
True
sage: s == R(0)
False

This I consider to be a bug according to the docstring of s.is_zero? saying

Return True if self equals self.parent()(0).

Attachments (3)

4656.patch (5.6 KB) - added by roed 13 years ago.
4656.second.patch (5.5 KB) - added by wuthrich 13 years ago.
this patch replaces the previous patch. It is the same, but some changes in page lines in order to make it applicable to sage 3.4
trac_4656_new.patch (5.5 KB) - added by wuthrich 12 years ago.
exported against 4.3.2.alpha1

Download all attachments as: .zip

Change History (20)

comment:1 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.2.1 to sage-3.2.2

Changed 13 years ago by roed

comment:2 Changed 13 years ago by roed

  • Summary changed from power series with zero p-adic coefficients to [with patch, needs review] power series with zero p-adic coefficients

comment:3 Changed 13 years ago by wuthrich

  • Description modified (diff)
  • Milestone changed from sage-3.4.2 to sage-3.4.1
  • Summary changed from [with patch, needs review] power series with zero p-adic coefficients to [with patch, positive review] power series with zero p-adic coefficients

Looks good to me and passes all tests. I changed the patch as the orinigally posted patch does not apply against sage 3.4. Thanks!

Changed 13 years ago by wuthrich

this patch replaces the previous patch. It is the same, but some changes in page lines in order to make it applicable to sage 3.4

comment:4 Changed 13 years ago by mabshoff

  • Summary changed from [with patch, positive review] power series with zero p-adic coefficients to [with patch, needs work] power series with zero p-adic coefficients

4656.second.patch causes the following doctest failure:

sage -t -long "devel/sage/sage/schemes/elliptic_curves/sha_tate.py"
**********************************************************************
File "/scratch/mabshoff/sage-3.4.1.alpha0/devel/sage/sage/schemes/elliptic_curves/sha_tate.py", line 299:
    sage: EllipticCurve('1483a1').sha().an_padic(5) # rank 2   (long time)
Exception raised:
    Traceback (most recent call last):
      File "/scratch/mabshoff/sage-3.4/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/scratch/mabshoff/sage-3.4/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/scratch/mabshoff/sage-3.4/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_3[11]>", line 1, in <module>
        EllipticCurve('1483a1').sha().an_padic(Integer(5)) # rank 2   (long time)###line 299:
    sage: EllipticCurve('1483a1').sha().an_padic(5) # rank 2   (long time)
      File "/scratch/mabshoff/sage-3.4.1.alpha0/local/lib/python/site-packages/sage/schemes/elliptic_curves/sha_tate.py", line 418, in an_padic
        raise RuntimeError, "There must be a bug in the supersingular routines for the p-adic BSD."
    RuntimeError: There must be a bug in the supersingular routines for the p-adic BSD.
**********************************************************************

Cheers,

Michael

comment:5 Changed 13 years ago by wuthrich

That doctest failure is serious and I have to look into that once #4667 is in.

comment:6 Changed 13 years ago by wuthrich

I looked into the problem. It is not due to a bug in supersingular, but due to the following strange behaviour. This happens to me with the above second patch.

I don't think that is ok :

sage: R = Qp(5,10)
sage: RT.<T> = R[[]]
sage: f = O(5^3) + O(5)*T +O(T^2)
sage: f
O(5^3) + O(5)*T + O(T^2)
sage: f[1]
0

f is now printed correctly, but the coefficient is not. In fact the precision of the coefficient is lost (and that happens without the patch, too):

sage: a= f[1]
sage: a
0
sage: a.precision_absolute()
+Infinity

Now, this looks really bad:

sage: v = matrix([[1,0],[0,1]])*vector([1,f])
sage: v
(1 + O(5^10), )
sage: v[1]

sage: type(v[1])
<type 'sage.rings.power_series_poly.PowerSeries_poly'>

I must admit that I do not understand what is going on and if this ticket is in fact related to other known issues with p-adic series.

comment:7 follow-up: Changed 13 years ago by roed

I'm working on p-adic polynomials, and thus on p-adic power series. If you want a status report on this ticket, let me know.

comment:8 in reply to: ↑ 7 Changed 13 years ago by kedlaya

Replying to roed:

I'm working on p-adic polynomials, and thus on p-adic power series. If you want a status report on this ticket, let me know.

More specifically, this appears to be related to #5075. That ticket will (we hope) be resolved by the omnibus patch on #6084.

comment:9 Changed 12 years ago by wuthrich

  • Report Upstream set to N/A

Finally, I came back to this. I will attach a rebased patch. This patch solves the problem of this ticket, but the doctest failure in sha_tate.py is still present. But this is caused by another problem. I opened a new ticket #8198 for this. Once this new ticket is solved this ticket here should hopefully be resolved with this patch.

Changed 12 years ago by wuthrich

exported against 4.3.2.alpha1

comment:10 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:11 Changed 8 years ago by wuthrich

The proposed solutions at #9457 are solving this here partially and the problems there are the same as here.

comment:12 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:13 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:14 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:15 Changed 7 years ago by jakobkroeker

  • Stopgaps set to todo

comment:16 Changed 5 years ago by kedlaya

Ping. Does anyone know what is going on here?

comment:17 Changed 4 years ago by saraedum

  • Component changed from number theory to padics
  • Keywords padicIMA added
Note: See TracTickets for help on using tickets.