We’re two weeks into the second half of GSoC 2016. The current goal is implementing resolution of singularities for algebraic curves via blow-ups. My mentors and I have discussed ways to implement blow-ups for curves in Sage, and settled on describing the blow-ups with collections of affine charts.

Progress in weeks 6, 7 has been to finish tickets #20811 and #20848, and to work on ticket #20895 which will implement functionality for computing ordinary models of plane curves. I also worked on #20930 which implements multiplicity for arbitrary affine/projective subschemes, and multiplicity/intersection multiplicity for subschemes of products of projective spaces. Helper functions in the corresponding point classes to access this functionality are being implemented as well.

Implementing the ordinary model functionality has proven to be somewhat tricky. Theoretically, there is a straightforward method for transforming a plane curve into one with only ordinary singularities that works in a finite number of steps. Before describing it, here’s some preliminaries:

We use the birational automorphism of known as the *standard Cremona transformation*, and will denote it as . This is the map defined for , and is undefined at the points which we will call the *fundamental points* of for convenience. We also call the lines the *exceptional lines* of . Next consider the open subset , the complement of the union of the exceptional lines. Note that is defined everywhere in , and that the exceptional lines are exactly the fibers of above the fundamental points, so the image of is contained in . We then also see that, when restricted to , is its own inverse: for , , since . So is an isomorphism of to itself, and thus is indeed a birational automorphism of .

Next, given a plane curve for some homogeneous polynomial , algebraically closed (our base field), a defining polynomial for the image of by is , which we can write as for a homogeneous and for some such that no positive power of or divides . We call the *quadratic transformation* of .

We also define the *apparent genus* of a plane curve as , where is the set of singular points of , and is the multiplicity of . Finally, if has degree , we say is in *excellent position* if is a point of multiplicity of , no exceptional line is tangent to at a fundamental point, the exceptional lines intersect each in distinct points aside from , transversally, and the exceptional line intersects transversally in distinct, non-fundamental points.

The main result is that if is a non-ordinary singularity of , and if is in excellent position, then its quadratic transformation either has one less non-ordinary singularity, or has a smaller apparent genus. The apparent genus can be shown to always be a nonnegative integer, thus we have the following algorithm to resolve the non-ordinary singularities of a plane curve:

Input: a plane curve

- while has non-ordinary singularities,
- pick a non-ordinary singularity of
- find a change of coordinates sending to , and putting into excellent position
- compute the quadratic transformation
- replace with

- return the plane curve

The output plane curve will be birational to the original curve, and will have only ordinary singularities. By the above note, this algorithm will always terminate. It isn’t difficult to prove that such change of coordinates maps exist, but this is where the difficulties of actual implementation begin.

Currently, the approach in #20895 to constructing a change of coordinates map to put a curve with non-ordinary singular point into excellent position is to incrementally generate two points such that are not collinear until the lines connecting the points satisfy the excellent position conditions. That is, ideally we would map to , and the curve would then be in excellent position.

With some care taken to incrementally choose the points the selection process will eventually terminate after finitely many choices. However, checking whether the transformation constructed from a choice of points will put the curve into excellent position can be an extremely expensive operation. Most of the cost is due to finding and analyzing the intersections of the lines connecting the points with . We currently work over the implementation of the algebraic closure of the rationals in Sage so that we can find all non-ordinary singular points and all intersections of lines with without needing to extend the field we start with, but computations over this field can be quite slow.

To get around this, our current approach is to bypass the explicit checking process; we just apply the transformation and repeat. To verify that the transformations will work, we instead check that the procedure terminates after steps, where is our starting curve, and is the number of non-ordinary singularities of . If the change of coordinate maps all put the curve into excellent position, then the algorithm should terminate in at most steps, otherwise something went wrong, and we choose points differently in the next attempt.

Most of the time, the first choices of points works, but the resulting transformations can be quite messy. Here is a simple example with only one non-ordinary singularity:

sage: set_verbose(-1) sage: P.<x,y,z> = ProjectiveSpace(QQbar, 2) sage: C = Curve([y^2*z - x^3], P) sage: C.singular_points() [(0 : 0 : 1)] sage: C.tangents(P([0,0,1])) # higher multiplicity tangent [y] sage: D = C.ordinary_model() sage: D (Scheme morphism: From: Projective Plane Curve over Algebraic Field defined by -x^3 + y^2*z To: Projective Space of dimension 2 over Algebraic Field Defn: Defined on coordinates by sending (x : y : z) to ((-1/16)*x^2 + (-1/4)*x*y + (-1/4)*y^2 + 1/4*x*z + 1/2*y*z : 1/16*x^2 + (-1/4)*y^2 + (-1/4)*x*z + 1/2*y*z : (-1/16)*x^2 + 1/4*y^2), Projective Plane Curve over Algebraic Field defined by x^3*y + 2*x^2*y^2 + x*y^3 + (-7)*x^3*z + 26*x^2*y*z + (-23)*x*y^2*z + 8*y^3*z) D[1].singular_points() [(0 : 0 : 1)] D[1].tangents(P([0,0,1])) # singularity is now ordinary [x + (-2.630294284738199?)*y, x + (-0.5419957147737579? + 0.3751512615427921?*I)*y, x + (-0.5419957147737579? - 0.3751512615427921?*I)*y]