|  |  A.1.1 Basic programming 
We show in the example below the following:
 
For a more basic introduction to programming in SINGULAR, we refer
to  Getting started.
define the ring Rof characteristic 32003, variablesx,y,z, monomial
  orderingdp(implementing F_32003[x,y,z])
list the information about Rby typing its name
check the order of the variables
define the integers a,b,c,t
define a polynomial f(depending ona,b,c,t) and display it
define the jacobian ideal ioff
compute a Groebner basis of i
compute the dimension of the algebraic set defined by i(requires
the computation of a Groebner basis)
create and display a string in order to comment the result (text between
quotes "  "; is a 'string')
load a library (see  primdec_lib)
compute a primary decomposition for iand assign the result to a
listL(which is a list of lists of ideals)
display the number of primary components and the first primary and prime
components (entries of the list L[1])
implement the localization of F_32003[x,y,z] at the homogeneous maximal
ideal (generated by x,y,z) by defining a ring with local monomial
ordering (dsin place ofdp)
map i to this ring (see  imap) - we may use the same name i,
since ideals are ring dependent data
compute the local dimension of the algebraic set defined by iat
the origin (= dimension of the ideal generated byiin the localization)
compute the local dimension of the algebraic set defined by iat
the point (-2000,-6961,-7944) (by applying a linear coordinate transformation) 
 |  | ring R = 32003,(x,y,z),dp;
R;
==> // coefficients: ZZ/32003
==> // number of vars : 3
==> //        block   1 : ordering dp
==> //                  : names    x y z
==> //        block   2 : ordering C
x > y;
==> 1
y > z;
==> 1
int a,b,c,t = 1,2,-1,4;
poly f = a*x3+b*xy3-c*xz3+t*xy2z2;
f;
==> 4xy2z2+2xy3+xz3+x3
ideal i = jacob(f);    // Jacobian Ideal of f
ideal si = std(i);     // compute Groebner basis
int dimi = dim(si);
string s = "The dimension of V(i) is "+string(dimi)+".";
s;
==> The dimension of V(i) is 1.
LIB "primdec.lib";     // load library primdec.lib
list L = primdecGTZ(i);
size(L);               // number of prime components
==> 6
L[1][1];               // first primary component
==> _[1]=2y2z2+y3-16001z3
==> _[2]=x
L[1][2];               // corresponding prime component
==> _[1]=2y2z2+y3-16001z3
==> _[2]=x
ring Rloc = 32003,(x,y,z),ds;   // ds = local monomial ordering
ideal i = imap(R,i);
dim(std(i));
==> 1
map phi = R, x-2000, y-6961, z-7944;
dim(std(phi(i)));
==> 0
 | 
 
 |