Skip to content

Commit

Permalink
gh-38930: expunge is_commutative from plural
Browse files Browse the repository at this point in the history
    
to really fix #38047

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: #38930
Reported by: Frédéric Chapoton
Reviewer(s): Martin Rubey
  • Loading branch information
Release Manager committed Nov 14, 2024
2 parents b2f2a43 + f13aa2e commit 7254cca
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/sage/rings/polynomial/plural.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ TESTS::
sage: TestSuite(P).run()
sage: loads(dumps(P)) is P
True
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: P = A.g_algebra(relations={y*x:-x*y}, order = 'lex')
sage: P.is_commutative()
False
sage: R.<x,y,z> = FreeAlgebra(QQ, 3)
sage: P = R.g_algebra(relations={}, order='lex')
sage: P.is_commutative()
True
"""
from cysignals.memory cimport sig_malloc, sig_free

Expand Down Expand Up @@ -676,22 +686,7 @@ cdef class NCPolynomialRing_plural(Ring):
"""
return self._term_order

def is_commutative(self):
"""
Return ``False``.
.. TODO:: Provide a mathematically correct answer.
EXAMPLES::
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: P = A.g_algebra(relations={y*x:-x*y}, order = 'lex')
sage: P.is_commutative()
False
"""
return False

def is_field(self, *args, **kwargs):
def is_field(self, *args, **kwargs) -> bool:
"""
Return ``False``.

Expand Down

0 comments on commit 7254cca

Please sign in to comment.