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 |
Description (last modified by )
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)
Change History (20)
comment:1 Changed 13 years ago by
- Milestone changed from sage-3.2.1 to sage-3.2.2
Changed 13 years ago by
comment:2 Changed 13 years ago by
- 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
- 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
Changed 13 years ago by
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
- 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
That doctest failure is serious and I have to look into that once #4667 is in.
comment:6 Changed 13 years ago by
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: ↓ 8 Changed 13 years ago by
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
comment:9 Changed 12 years ago by
- 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.
comment:10 Changed 9 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:11 Changed 8 years ago by
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
- Milestone changed from sage-6.1 to sage-6.2
comment:13 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:14 Changed 8 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:15 Changed 7 years ago by
- Stopgaps set to todo
comment:16 Changed 5 years ago by
Ping. Does anyone know what is going on here?
comment:17 Changed 4 years ago by
- Component changed from number theory to padics
- Keywords padicIMA added
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!