|  |  A.4.2 Critical points 
The same computation which computes the Milnor, resp. the Tjurina,
number, but with ordering dpinstead ofds(i.e., in![$K[x_1,\ldots,x_n]$](sing_60.png) instead of ![$\hbox{Loc}_{(x)}K[x_1,\ldots,x_n])$](sing_61.png) gives: 
the number of critical points of fin the affine space
(counted with multiplicities)
the number of singular points of fon the affine hypersurfacef=0
(counted with multiplicities). 
We start with the ring r1from section  Milnor and Tjurina number and its elements. 
The following will be implemented below:
 
reset the protocol option and activate the timer
define the ring r2of characteristic 32003 with variablesx,y,zand monomial
  orderingdp(= degrevlex) (i.e., the polynomial ring = K[x,y,z]).
Note that polynomials, ideals, matrices (of polys), vectors,
  modules belong to a ring, hence we have to define fandjacob(f)again inr2. Since these objects are local to a ring, we may use
  the same names.
  Instead of definingfagain we map it from ringr1tor2by using theimapcommand
  (imapis a convenient way to map variables
  from some ring identically to variables with the same name in the
  basering, even if the ground field is different. Compare withfetchwhich works for almost identical rings,
  e.g., if the rings differ only by the ordering or by the names of the
  variables and which may be used to rename variables).
  Integers and strings, however, do not belong to any ring. Once
  defined they are globally known.
The result of the computation here (together with the previous one in
  Milnor and Tjurina number) shows that (for t=0)![$\hbox{dim}_K(\hbox{Loc}_{(x,y,z)}K[x,y,z]/\hbox{jacob}(f))$](sing_459.png) = 250 (previously computed) while ![$\hbox{dim}_K(K[x,y,z]/\hbox{jacob}(f))$](sing_460.png) = 536. Hence fhas 286 critical points,
  counted with multiplicity, outside the origin.
  Moreover, since![$\hbox{dim}_K(\hbox{Loc}_{(x,y,z)}K[x,y,z]/(\hbox{jacob}(f)+(f)))$](sing_461.png) = 195 = ![$\hbox{dim}_K(K[x,y,z]/(\hbox{jacob}(f)+(f)))$](sing_462.png) ,the affine surface f=0 is smooth outside the origin. 
 |  |   ring r1 = 32003,(x,y,z),ds;
  int a,b,c,t=11,5,3,0;
  poly f = x^a+y^b+z^(3*c)+x^(c+2)*y^(c-1)+x^(c-1)*y^(c-1)*z3+
           x^(c-2)*y^c*(y^2+t*x)^2;
  option(noprot);
  timer=1;
  ring r2 = 32003,(x,y,z),dp;
  poly f=imap(r1,f);
  ideal j=jacob(f);
  vdim(std(j));
==> 536
  vdim(std(j+f));
==> 195
  timer=0;  // reset timer
 | 
 |