#13215: Skew polynomials
-------------------------------------+-------------------------------------
Reporter: caruso | Owner: tbd
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-7.3
Component: algebra | Resolution:
Keywords: skew polynomials | Merged in:
Authors: Xavier Caruso | Reviewers: Burcin Erocal
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/arpitdm/skew_polynomials | e189fec13d005a7fba39a429876c501fe95c05da
Dependencies: #13214, #13303, | Stopgaps:
#13640, #13641, #13642 |
-------------------------------------+-------------------------------------
Comment (by tscrim):
You do want to use `names`:
{{{
sage: preparse('R.<x> = PolynomialRing(ZZ)')
"R = PolynomialRing(ZZ, names=('x',)); (x,) = R._first_ngens(1)"
}}}
Some notes on the code from a skim through:
- You seem to be using the exact same format of polynomials, which
contains a lot of old code. For example, don't implement a `_repr_()` that
just calls (a ''Python'' function) `_repr()`. This is useless (even in the
usual polynomial ring code it seems); instead just implement `_repr_()`.
Similarly, there are a number of methods you could simply `cpdef`.
- Kill with fire and holy water `is_*` methods. They just trivially call
`isinstance`.
- You can use
{{{
self._no_generic_basering_coercion = True
}}}
to avoid constructing the coercion from the base ring when initializing
the skew polynomial ring.
- `_cmp_` is planned to be removed. Use `_richcmp_` instead.
- You should lazy import the ring constructor.
- You are double importing things in the element class; only keep the
`cimport`'s.
--
Ticket URL: <https://trac.sagemath.org/ticket/13215#comment:75>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.