> <\body> <\tmdoc-title> The ring of sparse polynomials \; Sparse polynomials \ are represented as an ordered list of monomials. The corresponding type is , where is the type of coefficients. Here we describe the main functionnalities available for these polynomials. <\session|mathemagix|default> <\input> <|input> use "realroot" <\unfolded-io> <|unfolded-io> R := ZZ[x,y] <|unfolded-io> > <\unfolded-io> <|unfolded-io> ring (ZZ,'x,'y,'z) <|unfolded-io> > <\textput> <\textput> Construction of a polynomial from variables from the ring: <\unfolded-io> <|unfolded-io> x:= R[0]; p := 215*x^4+10*x-3232231 <|unfolded-io> +10*x-3232231> <\textput> Construction of a polynomial from a string: <\unfolded-io> <|unfolded-io> p:= R\\"215*x^4+10*x-3232231" <|unfolded-io> +10*x-3232231> <\unfolded-io> <|unfolded-io> q := polynomial(R,"3*x^3*z-x^2*y+2") <|unfolded-io> *z-x*y+2> <\textput> An equivalent construction with variables <\unfolded-io> <|unfolded-io> y:=R[1], z:= R[2]; q := 3*x^3*z-x^2*y+2 <|unfolded-io> *z-x*y+2> <\input> <|input> \; <\textput> <\textput> Arithmetic operations inherited from the coefficient ring are available: <\session|mathemagix|default> <\unfolded-io> <|unfolded-io> p+33455552 <|unfolded-io> +10*x+30223321> <\unfolded-io> <|unfolded-io> q+=p <|unfolded-io> +3*x*z-x*y+10*x-3232229> <\unfolded-io> <|unfolded-io> r:=q*p <|unfolded-io> +645*x*z-215*x*y+4300*x+30*x*z-1389858900*x-10*x*y-9696693*x*z+3232231*x*y+100*x-64644600*x+10447310772899> <\input> <|input> \; <\textput> <\textput> Coefficients with respect to variable > (the results is a list of multivariate polynomials): <\session|mathemagix|default> <\unfolded-io> <|unfolded-io> coefficients(r,0) <|unfolded-io> > <\unfolded-io> <|unfolded-io> coefficients r <|unfolded-io> > <\input> <|input> \; <\session|mathemagix|default> <\unfolded-io> <|unfolded-io> diff(r,'x) <|unfolded-io> +4515*x*z-1290*x*y+21500*x+120*x*z-5559435600*x-30*x*y-29090079*x*z+6464462*x*y+200*x-64644600> <\unfolded-io> <|unfolded-io> diff(r,0) <|unfolded-io> +4515*x*z-1290*x*y+21500*x+120*x*z-5559435600*x-30*x*y-29090079*x*z+6464462*x*y+200*x-64644600> <\input> <|input> \; <\session|mathemagix|default> <\unfolded-io> <|unfolded-io> homogenize(q,R\\'w) <|unfolded-io> +3*x*z-x*y*w+10*x*w-3232229*w> <\input> <|input> \; <\initial> <\collection>