#11900: Serious regression caused by #9138
----------------------------------------------------------------+-----------
Reporter: SimonKing |
Owner: tbd
Type: defect |
Status: needs_work
Priority: critical |
Milestone: sage-4.8
Component: performance |
Keywords: categories regression
Work_issues: Laurent series rings are fields. CFF is a field. |
Upstream: N/A
Reviewer: Jeroen Demeyer, Nicolas M. ThiƩry |
Author: Simon King
Merged: |
Dependencies: #9138 #11911
----------------------------------------------------------------+-----------
Changes (by SimonKing):
* work_issues: Laurent series rings are fields. Add docs. Don't use
is_ring and friends => Laurent series
rings are fields. CFF is a field.
Comment:
I fixed the "when to override _mul_" logic.
Also, I fixed some instances of a very bad phenomenon: There are many
parents that inherit from classes such as `sage.rings.ring.Field` or
`sage.rings.ring.CommutativeRing` -- but then they only call
`ParentWithGens.__init__`!
For example, consider `CFF.__init__`. Before #9138, we used to have a
custom `Field.category()` method, but I think there are only very rare
cases in which `CategoryObject.category()` needs to be overridden.
Moreover, #9138 made `Field.__init__` initialise the category. But that
won't help if we have subclasses of `Field` that are not calling
`Field.__init__`. That is so annoying!
According to `search_src('ParentWithGens\.__init__')`, in order to really
fix all issues, we'd still have to look at
{{{
tensor/differential_forms.py:110: ParentWithGens.__init__(self, SR,
\
groups/group.pyx:55:
sage.structure.parent_gens.ParentWithGens.__init__(self,
rings/real_mpfi.pyx:451: ParentWithGens.__init__(self, self,
tuple([]), False, category = Fields())
rings/multi_power_series_ring.py:305: ParentWithGens.__init__(self,
base_ring, name_list)
rings/complex_field.py:185: ParentWithGens.__init__(self,
self._real_field(), ('I',), False, category = Fields())
rings/integer_ring.pyx:236: ParentWithGens.__init__(self, self,
('x',), normalize=False, category = EuclideanDomains())
rings/complex_mpc.pyx:297: ParentWithGens.__init__(self,
self._real_field(), ('I',), False)
rings/complex_double.pyx:158: ParentWithGens.__init__(self, self,
('I',), normalize=False, category = Fields())
rings/complex_interval_field.py:144: ParentWithGens.__init__(self,
self._real_field(), ('I',), False, category = Fields())
rings/infinity.py:472: ParentWithGens.__init__(self, self,
names=('oo',), normalize=False)
rings/infinity.py:783: ParentWithGens.__init__(self, self,
names=('oo',), normalize=False)
rings/real_mpfr.pyx:308: ParentWithGens.__init__(self, self,
tuple([]), False, category = Fields())
rings/rational_field.py:213: ParentWithGens.__init__(self, self,
category = QuotientFields())
rings/number_field/number_field.py:1005:
ParentWithGens.__init__(self, QQ, name, category=category)
coding/linear_code.py:706: ParentWithGens.__init__(self, base_ring)
}}}
This should go on a different ticket, that I am opening in a minute. Here,
I'll just fix enough of these cases so that doc tests pass.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11900#comment:140>
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.