### A.4.2 Critical points

The same computation which computes the Milnor, resp. the Tjurina, number, but with ordering `dp` instead of `ds` (i.e., in instead of gives:

- the number of critical points of `f` in the affine space (counted with multiplicities)
- the number of singular points of `f` on the affine hypersurface `f`=0 (counted with multiplicities).

We start with the ring `r1` from 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 `r2` of characteristic 32003 with variables `x,y,z` and monomial ordering `dp` (= 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 `f` and `jacob(f)` again in `r2`. Since these objects are local to a ring, we may use the same names. Instead of defining `f` again we map it from ring `r1` to `r2` by using the `imap` command (`imap` is 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 with `fetch` which 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) = 250 (previously computed) while = 536. Hence `f` has 286 critical points, counted with multiplicity, outside the origin. Moreover, since = 195 = ,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

User manual for Singular version 4-0-3, 2016, generated by texi2html.