Opened 5 years ago
Closed 5 years ago
#20435 closed defect (fixed)
factorisation of polynomials over integers has wrong parent
Reported by:  chapoton  Owned by:  

Priority:  critical  Milestone:  sage7.2 
Component:  algebra  Keywords:  factor, polynomial, parent 
Cc:  tscrim, jdemeyer  Merged in:  
Authors:  Frédéric Chapoton  Reviewers:  Bruno Grenet 
Report Upstream:  N/A  Work issues:  
Branch:  3e28bfc (Commits, GitHub, GitLab)  Commit:  3e28bfc536ac1b69c365213f4ff385874b6aee1e 
Dependencies:  Stopgaps: 
Description (last modified by )
sage: x,y=polygen(ZZ,'x,y') sage: p=x**2y**2 sage: p.parent() Multivariate Polynomial Ring in x, y over Integer Ring sage: factor(p) (x  y) * (x + y) sage: factor(p)[0][0].parent() Multivariate Polynomial Ring in x, y over Multivariate Polynomial Ring in x, y over Integer Ring
but no problem over QQ
Change History (7)
comment:1 Changed 5 years ago by
 Cc tscrim jdemeyer added
 Description modified (diff)
comment:2 Changed 5 years ago by
 Keywords factor polynomial parent added
 Priority changed from major to critical
comment:3 Changed 5 years ago by
comment:4 Changed 5 years ago by
 Branch set to public/20435
 Commit set to 5ec9040c9bbf46103eec0505cfec1e350f414dbf
 Status changed from new to needs_review
New commits:
5ec9040  trac #20435 fixing the parents in factorisation of integer multipolynomials

comment:5 Changed 5 years ago by
 Commit changed from 5ec9040c9bbf46103eec0505cfec1e350f414dbf to 3e28bfc536ac1b69c365213f4ff385874b6aee1e
Branch pushed to git repo; I updated commit sha1. New commits:
3e28bfc  trac #20435 correct link to trac

comment:6 Changed 5 years ago by
 Reviewers set to Bruno Grenet
 Status changed from needs_review to positive_review
Sorry for that! The correction looks good to me.
P.S.: I suspected that using f[0].change_ring(self._parent.base_ring())
would have been faster than the conversion self._parent(f[0])
but it appears not to be the case!
comment:7 Changed 5 years ago by
 Branch changed from public/20435 to 3e28bfc536ac1b69c365213f4ff385874b6aee1e
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
caused by the line
in #17840