I need to multiply 2 very large multivariate polynomials P and Q.
They have 16 variables x1,...x16 and around 2^30 monoms.
We can write P = sum(i=0..2^32 pi*x1^di1*x2*di2...x16*di16)
All the coefficients pi are less than 64.
All the powers dij are less than 32.
So the polynomials are very sparse (a matrix representation is a bad idea).
The naive polynomial multiplication would do this in O(n^2) which would clearly be difficult to achieve without large computation resources.
While using the FFT trick, it can be done in O(n.log(n)) which makes the problem tractable and an almost standard PC.
I would like to avoid implementing this and I'm pretty sure it's already implemented somewhere.
I tried: sympy, Pari/gp, Matlab. But in the 3 cases, the polynomials definition would take forever with my large polynomials. Would someone know a tool, library, piece of code ?
Thanks