Procedure from library classify.lib (see section classify_lib).
classify.lib
corank(f); f=poly
the corank of the Hessian matrix of f, of type int
corank(f) is the number of variables occurring in the residual singularity after applying ’morsesplit’ to f
Example:
LIB "classify.lib"; ring r=0,(x,y,z),ds; poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3; corank(f); → 2