#8800: Doctest coverage of categories
--------------------------+-------------------------------------------------
   Reporter:  SimonKing   |       Owner:  Simon King         
       Type:  defect      |      Status:  new                
   Priority:  major       |   Milestone:  sage-4.4.2         
  Component:  categories  |    Keywords:  categories doctests
     Author:  Simon King  |    Upstream:  N/A                
   Reviewer:              |      Merged:                     
Work_issues:              |  
--------------------------+-------------------------------------------------

Comment(by SimonKing):

 Concerning algebraic extension of algebraically complete fields: sage-
 devel expressed the opinion that it is better to do the construction
 (namely quotient of a univariate polynomial ring) in any case. So, I leave
 it as it is.

 Here is another problem:
 {{{
 sage: R1.<x> = Zp(5)[]
 sage: R2 = Qp(5)
 sage: R2(1)+x
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/SimonKing/<ipython console> in <module>()

 /usr/local/sage/local/lib/python2.6/site-
 packages/sage/structure/element.so in
 sage.structure.element.RingElement.__add__
 (sage/structure/element.c:10830)()

 /usr/local/sage/local/lib/python2.6/site-packages/sage/structure/coerce.so
 in sage.structure.coerce.CoercionModel_cache_maps.bin_op
 (sage/structure/coerce.c:6966)()

 TypeError: unsupported operand parent(s) for '+': '5-adic Field with
 capped relative precision 20' and 'Univariate Polynomial Ring in x over
 5-adic Ring with capped relative precision 20'
 }}}

 The reason is
 {{{
 sage: from sage.categories.pushout import pushout
 sage: pushout(R1,R2)
 ---------------------------------------------------------------------------
 CoercionException                         Traceback (most recent call
 last)

 /home/SimonKing/<ipython console> in <module>()

 /usr/local/sage/local/lib/python2.6/site-
 packages/sage/categories/pushout.pyc in pushout(R, S)
    1109         # make sense, and in this case simply want to return that
 a pushout
    1110         # couldn't be found.
 -> 1111         raise CoercionException(ex)
    1112
    1113

 CoercionException: 'pAdicFieldCappedRelative' object has no attribute
 'completion'
 }}}

 Rather than implementing a completion of p-adic fields, I suggest to give
 the construction functors of fraction fields and of completions the same
 rank. This would already suffice (together with the existing merge method
 of the completion functor) so that one has
 {{{
 sage: R1.<x> = Zp(5)[]
 sage: R2 = Qp(5)
 sage: R2(1) + x
 (1 + O(5^20))*x + (1 + O(5^20))
 }}}

 Note that there is an additional problem, namely that there is no coercion
 from a p-adic field of high precision to a p-adic field of lower
 precision. I hope sage-devel will answer whether this issue is worth a
 separate ticket.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8800#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to