Opened 7 years ago

Last modified 3 years ago

#20004 new enhancement

Implement power_sums and power_sums_to_poly

Reported by: Vincent Delecroix Owned by:
Priority: major Milestone: sage-7.2
Component: number fields Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Vincent Delecroix)

After flint pull request 213 and flint pull request 221 flint will have a native support for going back and forth between an integer polynomial and its power sums series.

We provide generic methods power_sums and power_sums_to_poly for any polynomial and use direct call to flint when available.

Change History (6)

comment:1 Changed 7 years ago by Vincent Delecroix

Description: modified (diff)

comment:2 Changed 7 years ago by Kiran Kedlaya

When FLINT is not applicable, power_sums can also try calling PARI's polsym, although I don't think the implementation therein is anything special.

comment:3 in reply to:  2 Changed 7 years ago by Vincent Delecroix

Dependencies: #18356#20399
Milestone: sage-7.1sage-7.2

Replying to kedlaya:

When FLINT is not applicable, power_sums can also try calling PARI's polsym, although I don't think the implementation therein is anything special.

Indeed, it uses Newton formula. However, there is #20399 to review first because

sage: x = polygen(ZZ)
sage: p = x^2 + 4
sage: c = p._pari_().polsym(5)
sage: c
[2, 0, -8, 0, 32, 0]~
sage: c.sage()
Traceback (most recent call last):
...
TypeError: Object (=[2, 0, -8, 0, 32, 0]~) must be of type t_VEC.

comment:4 Changed 5 years ago by Kiran Kedlaya

Now that #20399 is resolved, maybe time for another look?

comment:5 Changed 5 years ago by Vincent Delecroix

Dependencies: #20399
  1. Indeed, the pari way does now work
    sage: x = polygen(ZZ)
    sage: p = x^2 + 4
    sage: c = p.__pari__().polsym(5)
    sage: c
    [2, 0, -8, 0, 32, 0]~
    sage: c.sage()
    [2, 0, -8, 0, 32, 0]
    
  1. Concerning the original goal of the ticket, there is no release of flint yet...

comment:6 Changed 3 years ago by Kiran Kedlaya

Did this make it into FLINT 2.6.0? If so, we should add #29719 as a dependency.

Note: See TracTickets for help on using tickets.