# Singularity Type

Hello, so in Singular, there is a way to give an affine equation and determine the singularity type. For example, if we just take the standard equation, x^(2)+y^(2)+z^(2), the singularity is an ordinary double point (type A1 if you like). If we take x^(2)+y^(2)+z^(3), this gives an A2 singularity. Is there a function on Sage that gives the singularity type, maybe assuming the singularity is at origin.

So like is there something like f.singularitytype() and then Sage returns like A1 or A2.

edit retag close merge delete

Sort by » oldest newest most voted

It seems that the classify function in Singular only prints the singularity type, but does not return it in any way (only the equation of the normal form is returned). So at least you can achieve the same in SageMath:

singular.lib('classify.lib')
r = singular.ring(0, '(x,y,z)', 'ds')
f = singular.new('x^2 + y^2 + z^3')
print(singular.eval('classify({})'.format(f.name())))


Output (just as in Singular):

About the singularity :
Milnor number(f)   = 2
Corank(f)          = 1
Determinacy       <= 3
Guessing type via Milnorcode:  A[2]

Computing normal form ...
Arnold step number 2
The singularity
x2+y2+z3
is R-equivalent to A[2].
Milnor number = 2
modality      = 0
y^2+z^2+x^3


You could try extracting the type by parsing the string (yuck).

more