flintlib / flint

FLINT (Fast Library for Number Theory)
http://www.flintlib.org
GNU Lesser General Public License v3.0
444 stars 245 forks source link

Generic power series module #1517

Open fredrik-johansson opened 1 year ago

fredrik-johansson commented 1 year ago

To do: create a gr_series module based on the code already in gr/series.c and document it.

fredrik-johansson commented 1 year ago

In line with the comments about type names in #1516, maybe the type name should be gr_ser_t rather than gr_series_t.

One could also try to implement power series based on a generic polynomial interface instead of assuming the gr_poly representation. Then one could, for example, support series over Q with fmpq_poly as the underlying representation.

edgarcosta commented 1 year ago

Are we making the rule that the abbreviated names mean dense representation?

fredrik-johansson commented 1 year ago

Well, that has just been the convention so far. Sparse stuff could be sparse_mat / sparse_vec.

Except in the case of multivariate polynomials where mpoly already means sparse... but where no one cares about dense anyway :-)

fredrik-johansson commented 7 months ago

Currently gr_series_t is used for both R[[x]] and R[[x]] mod x^n. This has two potential upsides: 1) one can reuse a lot of code (e.g. for special functions) for both kinds of rings, 2) it is possible to have inexact representations of elements mod x^n. However, I don't think 2) is really worth the trouble, and the code duplication in 1) should be manageable in other ways.

I think I will refactor this code so that an element of R[[x]] mod x^n is just a gr_poly_t (or a typedef for one), with a separate gr_ser_t used only for R[[x]] (and maybe in the future Laurent/Puiseux series).