// --- Examples: declaration of coefficient rings ; poly f = 0; ring r1 = 0,x,dp; poly f = (x-1)*(x+1); f; ring r2 = (0,a,b),(x,y,z),dp; r2; ring r3 = 32003,(x(1..10)),dp; r3; ring r4 = (0,i),(x,y,z),dp; minpoly = i^2+1; r4; i^2; ring r5a = (7,a),(x,y,z),dp; minpoly = a^2+a+3; // a is an algebraic element over Z/7 with minimal polynomial a^2+a+3 r5a; ring r5b = (7^2,b),(x,y,z),dp; // b is some generator of the cyclic group of units of GF(49) r5b; ring r6 = (real,50),(x,y,z),dp; r6; ring r7 = (complex,10,i),(x,y,z),dp; r7; ring r8 = integer,(x,y,z), dp; r8; ring r9 = (integer,100),(x,y,z), dp; r9; -42; number(-42); 1/42; number(1)/number(42); 1/41; number(1)/number(41); ring r10 = (integer,6,3),(x,y,z), dp; r10; ring r11 = (integer,6^3),(x,y,z), dp; r11; // --- ; // --- Examples: Hilbert series ; ring RH = 0,(x,y,z,t),dp; ideal I = x^31-x^6-x-y, x^8-z, x^10-t; hilb(I); I = std(I); hilb(I); hilb(I,1); // WARNING: last entry is not part of Hilbert series hilb(I,2); // WARNING: last entry is not part of Hilbert series LIB "poly.lib"; hilbPoly(I); // --- ; // --- Examples: multiplicities ; // What is the multiplicity of K[x,y,z] / ? ; ring RM = 0,(x,y,z),dp; ideal I = x2-y3, x+y+z-1; mult(std(I)); // What is the multiplicity of K[x,y,z]_ / ? ; ring RM2 = 0,(x,y,z),ds; ideal I = imap(RM,I); mult(std(I)); // What is the multiplicity of K[x,y,z]_ / ? ; mult(std(subst(I,z,z+1))); // What is the multiplicity of K[x,y,z]_ / ? ; mult(std(subst(I,x,x-1,y,y+1,z,z+1)));