Skip to content

Commit

Permalink
sagemathgh-37023: Parent in plural
Browse files Browse the repository at this point in the history
    
Using `Parent` and `CommutativeRing` in the plural file

This is a little move towards getting rid of the old coercion framework.

### 📝 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
    
URL: sagemath#37023
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Jan 16, 2024
2 parents 1ff2907 + 1f95cb0 commit b13f43f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sage/rings/polynomial/plural.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomialRing_
from sage.rings.polynomial.multi_polynomial_ideal import NCPolynomialIdeal

from sage.rings.polynomial.polydict import ETuple
from sage.rings.ring import check_default_category, Ring
from sage.rings.ring import check_default_category, CommutativeRing
from sage.structure.element cimport CommutativeRingElement, Element, RingElement
from sage.structure.factory import UniqueFactory
from sage.structure.richcmp cimport rich_to_bool
Expand Down Expand Up @@ -334,7 +334,7 @@ cdef class NCPolynomialRing_plural(Ring):
self._ngens = n
self._term_order = order

Ring.__init__(self, base_ring, names, category=category)
Parent.__init__(self, base=base_ring, names=names, category=category)
self._populate_coercion_lists_()

assert n == len(self._names)
Expand Down Expand Up @@ -2878,8 +2878,8 @@ cpdef MPolynomialRing_libsingular new_CRing(RingWrap rw, base_ring) noexcept:
self._term_order = TermOrder(rw.ordering_string(), force=True)

names = tuple(rw.var_names())
Ring.__init__(self, base_ring, names, category=Algebras(base_ring),
normalize=False)
CommutativeRing.__init__(self, base_ring, names, category=Algebras(base_ring),
normalize=False)

self._has_singular = True

Expand Down Expand Up @@ -2946,7 +2946,7 @@ cpdef NCPolynomialRing_plural new_NRing(RingWrap rw, base_ring) noexcept:
self._ngens = rw.ngens()
self._term_order = TermOrder(rw.ordering_string(), force=True)

Ring.__init__(self, base_ring, rw.var_names(), category=Algebras(base_ring))
Parent.__init__(self, base=base_ring, names=rw.var_names(), category=Algebras(base_ring))

self._has_singular = True
self._relations = self.relations()
Expand Down

0 comments on commit b13f43f

Please sign in to comment.