-
-
Notifications
You must be signed in to change notification settings - Fork 701
Description
This ticket cleans up the PolynomialRing() function in many ways. Mainly:
-
Use
normalize_names()as much as possible to deal with variable names. -
Fix indentation in docstring.
-
Pass arguments like
sparseandimplementationas**kwdsto the single-variate or multi-variate polynomial constructor. -
Make the code easier to understand.
-
Allow
PolynomialRing(..., implementation="singular")which forces Singular. This allows simplifying some code insrc/sage/algebras/free_algebra.pywhich currently needs to jump through hoops to get aMPolynomialRing_libsingular. -
Check more error conditions, for example currently we have
sage: PolynomialRing(QQ, name="x", names="y")
Univariate Polynomial Ring in y over Rational Field
- Change some arguments of
PolynomialRing()to keyword-only arguments. This does break some existing uses ofPolynomialRing(), although much more likely in library code and not user code (some code in Sage gets this even wrong and was passingsparse="lex"instead oforder="lex")
Apart from items 6 and 7, no existing functionality is changed.
CC: @tscrim
Component: algebra
Author: Jeroen Demeyer
Branch/Commit: fc75734
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/23338