// Example code from paper 6: // _Graded rings and special K3 surfaces_ by Gavin Brown // print "Examples from: Graded rings and special K3 surfaces"; load "Paper06_funcs"; ei := GetEchoInput(); SetEchoInput(true); // Section 1: Introduction P3 := ProjectiveSpace(Rationals(), 3); X := Scheme(P3, x^4 + y^4 + z^4 + w^4); X; R := CoordinateRing(X); P := HilbertSeries(R); P; S := PowerSeriesRing(Rationals()); S ! P; // Section 2: Elementary example T := PowerSeriesRing(Rationals() : Precision := 50); P := 1 + t + t^2 + t^3 + 2*t^4 + 3*t^5 + 4*t^6 + &+[ (n - 3)*t^n : n in [7..49] ] + O(t^50); (1 - t)*P; (1 - t^4)*(1 - t)*P; (1 - t^5)*(1 - t^4)*(1 - t)*P; (1 - t^6)*(1 - t^5)*(1 - t^4)*(1 - t)*P; P3 := ProjectiveSpace(Rationals(), [ 1, 4, 5, 6 ]); f := w*y + z^2 + x^10; g := w^2 + (x*z)^2 + y^3; X := Scheme(P3, [ f, g ]); IsNonsingular(X); p0 := P3 ! [ 0, -1, 1, 1 ]; p0 in Intersection(X, Scheme(P3, x)); P := ProjectiveSpace(Rationals(), 3); phi := map< P3 -> P | [ x^6, x^2*y, x*z, w ] >; Y := phi(X); Y; p1 := phi(p0); p1; p1 in Y; P2 := ProjectiveSpace(Rationals(), 2); psi := Projection(P, P2); p2 := psi(p1); Z := psi(Y); Z; p2 in Z; IsCurve(Z); _,C := IsCurve(Z); C; Genus(C); p := C ! p2; IsNonsingular(p); GapNumbers(p); [ Dimension(RiemannRochSpace(n*Place(p))) : n in [0..8] ]; IsCanonical(6*Place(p)); // Section 4: Subcanonical curves R := PolynomialRing(Rationals()); SubcanonicalCurve(7, 6, [1,3]); SubcanonicalCurve(7, 6, [1,2]); // Section 5: K3 database g := 0; B := [ [2,1], [2,1], [3,1], [4,1] ]; X := K3Surface(g, B); X; D := K3Database(); #D; K3Surface(D, [ 1, 2, 3, 4 ]); // Section 6: Simple degenerations of the famous 95 D := K3Database(); K3s := [ K3SurfaceWithCodimension(D, 1, i) : i in [1..95] ]; E := degenerations(K3s); #E; for e in E do P := ProjectiveSpace(Rationals(), Weights(e[1]) cat [ e[2] ]); Le := LinearSystem(P, e[2]); Ld := LinearSystem(P, e[3]); f := &+[ Random([1..5])*m : m in Sections(Ld) ]; g := &+[ Random([1..5])*m : m in Prune(Sections(Le)) ]; X := Scheme(P, [ f, g ]); IsNonsingular(X); end for; // Section 8: Special K3 surfaces in Fletcher's 84 K3Surface(D, 0, 274) : Minimal; K3Surface(D, 0, 273) : Minimal; res := [ ]; for i in [1..#E] do X := E[i][1]; W := Weights(X); P := ProjectiveSpace(Rationals(), W); e := E[i][2]; /* the degree of the small equation */ for p1 in unproj_divs(RawBasket(X)) do i1 := Index(W, p1[1]); /* this is 0 if p1[1] not in W */ if p1 eq [1,1] then inds := [ i : i in [1..#W] | W[i] eq 1 ]; case #inds ge 2: when true: i2 := inds[2]; else continue p1; end case; else i2 := Index(W, p1[2]); end if; if i1*i2 ne 0 then line := Scheme(P, [ P.i : i in [1..Length(P)] | i notin [i1,i2] ]); Le := LinearSystem(P, e); M := Sections(LinearSystem(Le, line)); if TotalDegree(GCD(M)) eq 0 and #[ P.i : i in [1..Length(P)] | IsDivisibleBy(&*M, P.i) ] ge 3 then Append(~res, ); end if; end if; end for; end for; SetEchoInput(ei);