#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):
I noticed the following:
{{{
sage: P.<x> = ZZ[]
sage: C = P.completion(x).construction()[0]
sage: R = FractionField(P)
sage: hasattr(R,'completion')
False
sage: C(R)
Traceback (most recent call last):
...
AttributeError: 'FractionField_generic' object has no attribute
'completion'
}}}
This is since the completion functor simply tries to call the completion
method of its argument. However, one can use that the fraction field
construction functor and the completion functor commute.
So, I first try to apply a completion method of the argument, R. If it
fails with an AttributeError or NotImplementedError, I look at R's
construction (F,R1). If F merges with completion, then I apply the result
of merging to R1. Otherwise, if the completion commutes with F, I try to
first apply the completion to R1 and then apply F to the result, and
obtain:
{{{
sage: C(R)
Fraction Field of Power Series Ring in x over Integer Ring
}}}
Note that this would ''not'' be the first place where merging and
commutation of construction functors is used outside the ``pushout``
function. The other place is the construction of infinite polynomial
rings, which I wrote as well. Indeed I believe that construction functors
should be used more intensely...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8800#comment:18>
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.