# Deformation Theory Dream Code

(This is coming from Daniel Erman. A trac ticket has been opened for this, see http://trac.sagemath.org/sage_trac/ticket/5528 )

I'd love to be able to compute a versal deformation base (and a versal deformation) of a projective variety or of an affine variety with isolated singularity.

The following is `dream code' for such deformations with a projective variety.

P3=ProjectiveSpace(3,QQ,'xyzw') X=P3.subscheme([x^2,x*y,x*z,y^4*z,y^5]) EDEFS=X.embedded_deformations()

I want this to be the vector space of embedded deformations of X in P3. Maybe P3 should be an input too. So this should just compute H^0(X,N_{X/P3}) i.e. the global sections of the normal bundle of X in P3.

H2=X.embedded_versal_deformation_base(2)

I want this to compute the embedded versal deformation ring up to the maximal ideal squared In other words, if (R,m) is the local ring of X at the Hilbert scheme, then this would output R/m^{2. Since m/m}2=EDEFS from above, this is essentially equivalent to computing first order deformations.

H3=X.embedded_versal_deformation_base(3)

This is what I really want. There is no good implementation that I know of for computing R/m^3 (with notation as above). But it is absolutely computable and I know several people (myself included) who have worked out shoddy code in M2 for these types of computations.

In fact, I'd like to be able to compute R/m^n for any n. And it is possible that after some n, you can check that you have found all of the necessary relations. In other words, I'd like Sage to tell me when the process has terminated so that we actually can find a representation of R itself

DEFS=X.deformations()

I want this to compute the vector space of abstract deformations of X. So this should just be H^1(X,T_X), where T_X is the tangent bundle of X.

D2=X.versal_deformation_base(2)

I want this to give me a versal deformation base S/m^{2 up to m}2.

D3=X.versal_deformation_base(3)

I want this to give me a versal deformation base S/m^{3 up to m}3. And so on.

In a dream world, I'd like all sorts of additional features. Like if I tell Sage that my variety X comes with a GG_m action, then I'd like the vector spaces of (embedded) deformations and the (embedded) versal deformation bases to inherit that grading as well.

Also, it may be worth noting that Bernd Martin implemented some deformation theory code in Singular, so you may not need to totally reinvent the wheel there.