Opened 7 years ago

# Implement power_sums and power_sums_to_poly

Reported by: Owned by: Vincent Delecroix major sage-7.2 number fields N/A

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.

### comment:1 Changed 7 years ago by Vincent Delecroix

Description: modified (diff)

### comment:2 follow-up:  3 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 sage-7.1 → sage-7.2

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.