Opened 22 months ago
Closed 22 months ago
#30496 closed defect (fixed)
fix conversion of GAP univariate rat functions, which are polynomial with valuation>0
Reported by: | dimpase | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | sage-9.2 |
Component: | interfaces | Keywords: | |
Cc: | chapoton, tscrim | Merged in: | |
Authors: | Frédéric Chapoton | Reviewers: | Dima Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | c582e80 (Commits, GitHub, GitLab) | Commit: | c582e80d55dbd0ba2fc4003a3e5cb2d8638621c4 |
Dependencies: | Stopgaps: |
Description (last modified by )
sage: x = libgap.Indeterminate(libgap.Integers, "x") sage: x.sage() 1
oops. This is due to
sage: (2*x).CoefficientsOfUnivariateRationalFunction() [ [ 2 ], [ 1 ], 1 ]
where 3rd 1
is valuation v, so that the function is xv(2/1)=2x.
But the corresponding code added in #21020
if self.IsUnivariatePolynomial(): from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing R = PolynomialRing(base_ring, var) return R(num)
forgets about the case of valuation>0.
Change History (6)
comment:1 Changed 22 months ago by
comment:2 Changed 22 months ago by
- Description modified (diff)
comment:3 Changed 22 months ago by
- Branch set to u/chapoton/30496
- Commit set to 82191ca6058fa0bf84eace353984c9b7c683b90b
- Status changed from new to needs_review
comment:4 Changed 22 months ago by
could you write this x = libgap.eval('Indeterminate(Integers, "x")')
(and the other place there where x
is set) as
sage: x = libgap.Integers.Indeterminate('x')
This is less ugly.
comment:5 Changed 22 months ago by
- Branch changed from u/chapoton/30496 to public/packages/30496
- Commit changed from 82191ca6058fa0bf84eace353984c9b7c683b90b to c582e80d55dbd0ba2fc4003a3e5cb2d8638621c4
- Reviewers set to Dima Pasechnik
- Status changed from needs_review to positive_review
comment:6 Changed 22 months ago by
- Branch changed from public/packages/30496 to c582e80d55dbd0ba2fc4003a3e5cb2d8638621c4
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
discovered by chance, while working on #29314