Opened 7 years ago
Closed 7 years ago
#14751 closed defect (fixed)
Regression in representation of CombinatorialFreeModules (introduced #13735)
Reported by: | agd | Owned by: | agd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.11 |
Component: | misc | Keywords: | |
Cc: | vittucek novoselt jdemeyer | Merged in: | sage-5.11.beta2 |
Authors: | John Palmieri | Reviewers: | Andrew Gainer-Dewar |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The patch applied by ticket #13735 changes the behavior of the repr_lincomb method in misc/misc.py so that it now evaluates the comparison "c < 0" for every coefficient. However, since this method is called by CombinatorialFreeModule?, which can create lienar combinations whose coefficients are elements of arbitrary rings, this comparison is not always mathematically meaningful.
For example, in the code I submitted in #14347, I build a CombinatorialFreeModule? whose basis is a specified finite group G and whose coefficients are elements of a CycleIndexSeriesRing?. In 5.9, this was perfectly functional; in 5.10-rc2, with the new patch, any call to _repr_ on an element of this CombinatorialFreeModule? results in a NotImplementedError? because of this comparison.
Attachments (1)
Change History (5)
comment:1 Changed 7 years ago by
- Status changed from new to needs_review
Changed 7 years ago by
comment:2 Changed 7 years ago by
- Status changed from needs_review to positive_review
This seems to do the trick, and the code looks good to me! All doctests pass on my system, including those added in #14347. Thanks for taking the time to look at this.
comment:3 Changed 7 years ago by
- Reviewers set to Andrew Gainer-Dewar
comment:4 Changed 7 years ago by
- Merged in set to sage-5.11.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
Here is an attempt at a patch. It seems to work with the patch at #14347.