SINGULAR / Development A Computer Algebra System for Polynomial Computations / version 4.1.1 0< by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \ Feb 2018 FB Mathematik der Universitaet, D-67653 Kaiserslautern \ //First we define a ring in 3 variables; the monomial ordering in this case is "dp" // You always need a ring before you start any computation with polynomials ring r=0,(x,y,z),dp; // Next we define a polynomial f and print it poly f=x^3+y^6; print(f); y6+x3 // We define another polynomial g and perform a few elementary operations poly g=z^7+11*x^4*y; f+g; z7+y6+11x4y+x3 f*g; y6z7+11x4y7+x3z7+11x7y //You can create lists of elements list L = f,g,2*f+g; L; [1]: y6+x3 [2]: z7+11x4y [3]: z7+2y6+11x4y+2x3 // And lists of lists: list LL = L,L; LL; [1]: [1]: y6+x3 [2]: z7+11x4y [3]: z7+2y6+11x4y+2x3 [2]: [1]: y6+x3 [2]: z7+11x4y [3]: z7+2y6+11x4y+2x3 //From a mathematical point of view we can also define ideals and perform elementary operations //with them ideal I=f,g; ideal J=f*f, f+g; I; I[1]=y6+x3 I[2]=z7+11x4y > J; J[1]=y12+2x3y6+x6 J[2]=z7+y6+11x4y+x3 I*J; _[1]=y18+3x3y12+3x6y6+x9 _[2]=y6z7+y12+11x4y7+x3z7+2x3y6+11x7y+x6 _[3]=y12z7+11x4y13+2x3y6z7+22x7y7+x6z7+11x10y _[4]=z14+y6z7+22x4yz7+11x4y7+121x8y2+x3z7+11x7y I+J; _[1]=y6+x3 _[2]=z7+11x4y _[3]=y12+2x3y6+x6 _[4]=z7+y6+11x4y+x3 //Finally we can load libraries and call functions defined in them LIB "CompAlg.LIB"; idealsum(I,3); _[1]=y6+x3 _[2]=z7+11x4y example idealsum; // proc idealsum from lib Schreibtisch/CompAlgSingular/CompAlg.lib EXAMPLE: ring r=0,(x,y),dp; poly f=x^2+y^3*x+y^5; poly g=y^7+x^5; ideal I=f,g,f*g,f^2; ideal J=idealsum(I,5); J; J[1]=y5+xy3+x2 J[2]=y7+x5 J[3]=y12+xy10+x5y5+x6y3+x2y7+x7 J[4]=y10+2xy8+x2y6+2x2y5+2x3y3+x4