| LIB "ffmodstd.lib";
ring rr=0,(x,y),dp;
list lpr = 2,3; // assign 2 for x and 3 for y
list La = 150,3204,79272,2245968,70411680, 2352815424, 81496927872;
// La[i] = number(subst(f,y,lpr[1]^i,z,lpr[2]^i)); for f = x2y2+2x2y+5xy2 and i=1,...,7
poly Br = BerlekampMassey(La,1)[1];
Br;
==> x3-66x2+1296x-7776
sparseInterpolation(Br,La,lpr,0); // reconstruct f default
==> x2y2+2x2y+5xy2
La = 97,275,793,2315,6817;
// La[i] = number(subst(g,y,lpr[1]^i,z,lpr[2]^i)); for g = x+y and i=4,...,8
Br = BerlekampMassey(La,1)[1];
Br;
==> x2-5x+6
sparseInterpolation(Br,La,lpr,0,4);
==> x+y
|