//This code accompanies the the article "Order 5 Brauer-Manin obstruction to the integral Hasse principle on log K3 surfaces" by Julian Lyczak.
//It checks all the claims made in Section 3 and 4.
//One is advised to completely execute the code and from the output at the end look back at the relevant section if necessary.
//
//============General objects================
//
R := PolynomialRing(Rationals(),3);
P2 := ProjectiveSpace(R);
S := PolynomialRing(Rationals(),6);
P5 := ProjectiveSpace(S);
T := PolynomialRing(Rationals(),9,"elim",[1,2,3]);
map := homT| [xx,yy,zz]>;
map2 := homS| [0,0,0,u0,u1,u2,u3,u4,u5]>;
//
//=============Example with splitting field of conductor 11==============
//
//First fix the splitting field 'K' and a generator 'a' of 'K' over the rationals
K := Subfields(CyclotomicField(11),5)[1,1];
a := K.1;
ma := MinimalPolynomial(a);
disc := Integers()!Discriminant(MinimalPolynomial(a));
//We compute the ideal defining (alpha^2, alpha, 1) and its conjugates
I := Ideal(Cluster(P2(K)![a^2,a,1]));
//Next we compute a Groebner basis for polynomial vanishing of order at least 2 at all 5 points.
O5 := LinearSystem(P2,5);
LinSys := LinearSystem(O5,Scheme(P2,I^2));
sections := Sections(LinSys);
GroebnerSections := GroebnerBasis(sections);
//To compute the image of the morphism coming from the linear system S, we will need to do an explicit Groebner basis computation to keep track of inverted primes.
groebnerGraph, invertedprimes := GroebnerBasis([T.(i+3) - map(sections[i]): i in [1..6]]: ReturnDenominators := true);
Equs := [map2(equ): equ in groebnerGraph| &and[Degree(equ,var) eq 0: var in [xx,yy,zz]]];
XX := Scheme(P5,Equs);
//The following two linear equation should define the special hyperplane sections on XX
l1 := u0 + 22*u1 - 363*u2 + 165*u3 - 1859*u4 + 484*u5;
l2 := u0 + 22*u1 - 352*u2 + 143*u3 - 1595*u4 + 363*u5;
//Primes over which the fibres are singular
primes := PrimeFactors(disc);
P5mod11 := ProjectiveSpace(GF(11),5);
XX11 := Reduction(XX,11: ambient := P5mod11);
L := ReducedSubscheme(Scheme(XX11,l1));
Ldiv := Divisor(XX11,L);
RR3L := RiemannRochBasis(3*Ldiv);
RR4L := RiemannRochBasis(4*Ldiv);
ptsmod11 := Points(XX11);
//A birational map from this singular fibre XX11 to the projective plane
P211 := ProjectiveSpace(GF(11),2);
psi := map P211| RR3L>;
IsInvertible(psi);
psiinv := Inverse(psi);
//These induce an isomorphism of affine schemes, which we will write a composition
//L is given by the vanishing of l1, which is just w0 mod 11
XX11minusL := AffinePatch(XX11,6);
map1 := mapXX11| [1] cat [XX11minusL.i: i in [1..5]]>;
IsInvertible(map1);
//And we remove a line in P2 over GF(11)
A211 := AffineSpace(GF(11),2);
map2 := map A211| [yy/xx,zz/xx]>;
IsInvertible(map2);
mapXX11A2 := map A211 | DefiningPolynomials(psi * map2), InverseDefiningPolynomials(psi * map2)>;
//This should be the isomorphism
isom := map A211 | DefiningPolynomials(map1 * mapXX11A2), InverseDefiningPolynomials(map1 * mapXX11A2)>;
//
//==========Local solubility===============
//
//To prove local solubility at all primes we use the following points
pts:= [[ 1, 0, 0, 0, 0, 0 ],
[ -693, -88, -11, 0, 1, 1 ],
[ -725, -120, -11, 1, 0, 1 ],
[ 967, 122, 11, -1, 0, 1 ],
[ -3345, -328, -46, -4, 4, 4 ],
[ -3497, -331, -34, 1, 1, 0 ],
[ -6138, -407, -44, 0, 1, 0 ]];
//
//========The invariant map at 11==========
//
//Let us split the hyperplanes into the cases we are interested in
//We can consider these hyperplanes up to scalar multiple, since this does not change the size of the image of the invariant map. (This speeds up this part of the computation by a factor of 10).
hyperplaneswhichdonotcutoutL := [Polynomial([a0,a1,a2,a3,a4,1],[XX11.i: i in [1..6]]): a0,a1,a2,a3,a4 in GF(11)];
//For these hyperplane sections the invariant map does not need to assume 5 values and we are interested in when 0 is an invariant. So we consider all hyperplanes.
hyperplaneswhichcutoutL := [Polynomial([a0,a1,a2,a3,a4],[XX11.i: i in [1..5]]): a0,a1,a2,a3,a4 in GF(11)| not {a0,a1,a2,a3,a4} eq {0}];
//surjectivity of invariant map if h does not cut out L
//(We have sped this up by only considering hyperplanes up to scalar multiples)
imagesize1 := {* Integers()| *};
for h in hyperplaneswhichdonotcutoutL do
invs := {PowerSequence(GF(11))| };
for pt in ptsmod11 do
if Evaluate(h,Coordinates(pt)) ne 0 then
val := Evaluate(l1, Coordinates(pt))*Evaluate(h,Coordinates(pt))^4;
Include(~invs,[val,-val]);
if #invs eq 5 then
Include(~imagesize1,5);
continue h;
end if;
end if;
end for;
Include(~imagesize1,#invs);
end for;
//For the remaining hyperplanes we have more cases
hyperplaneswhichcutoutL1invs := [h: h in hyperplaneswhichcutoutL| Degree(f,y11) eq 0 and Degree(f,z11) eq 0 where f := mapXX11A2(h)];
hyperplaneswhichcutoutL4invs := [h: h in hyperplaneswhichcutoutL| Degree(f,z11) eq 0 and Degree(f,y11) eq 2 and 1 in Ideal([f,Derivative(f,y11)]) where f := mapXX11A2(h)];
hyperplaneswhichcutoutL5invs := [h: h in hyperplaneswhichcutoutL| not h in hyperplaneswhichcutoutL1invs and not h in hyperplaneswhichcutoutL4invs];
//Those hyperplanes for which inv assumes 1 value
numberofhyperplanestype2and0isinv := 0;
imagesize2 := {* Integers()| *};
for h in hyperplaneswhichcutoutL1invs do
f := mapXX11A2(h);
invs := {PowerSequence(GF(11))| };
for pt in Points(A211) do
if Evaluate(f,Coordinates(pt)) ne 0 then
val := Evaluate(mapXX11A2(l1), Coordinates(pt))*Evaluate(f,Coordinates(pt))^4;
Include(~invs,[val,-val]);
end if;
end for;
if [1,-1] in invs then numberofhyperplanestype2and0isinv := numberofhyperplanestype2and0isinv +1; end if;
Include(~imagesize2,#invs);
end for;
//Those hyperplanes for which inv assumes 4 values
numberofhyperplanestype3and0isinv := 0;
imagesize3 := {* Integers()| *};
for h in hyperplaneswhichcutoutL4invs do
f := mapXX11A2(h);
invs := {PowerSequence(GF(11))| };
for pt in Points(A211) do
if Evaluate(f,Coordinates(pt)) ne 0 then
val := Evaluate(mapXX11A2(l1), Coordinates(pt))*Evaluate(f,Coordinates(pt))^4;
Include(~invs,[val,-val]);
end if;
end for;
if [1,-1] in invs then numberofhyperplanestype3and0isinv := numberofhyperplanestype3and0isinv +1; end if;
Include(~imagesize3,#invs);
end for;
//Those for which inv still surjective (again we can do this up to scalar multiple}
imagesize4 := {* Integers()| *};
for hs in {{a*h: a in [1..10]}: h in hyperplaneswhichcutoutL5invs} do
f := mapXX11A2(Random(hs));
invs := {PowerSequence(GF(11))| };
for pt in Points(A211) do
if Evaluate(f,Coordinates(pt)) ne 0 then
val := Evaluate(mapXX11A2(l1), Coordinates(pt))*Evaluate(f,Coordinates(pt))^4;
Include(~invs,[val,-val]);
if #invs eq 5 then
Include(~imagesize4,5);
continue hs;
end if;
end if;
end for;
Include(~imagesize4,#invs);
end for;
//
//===========The output========
//
print "
\n\n\n\n\n
=====================================================================\n
You can start reading here and look back in the code where specific computations are done.\n
=====================================================================\n
\n\n\n
We have picked a generator 'a' which is of degree ", Degree(ma), " and lies in the field 'K':", K,"\n\n",
"A basis for the quintics which vanish at least twice at the point (a^2:a:1) and its conjugates is ", sections, "\n\n",
"The same equations also define a basis over the integers: ", IsGroebner(GroebnerSections),&and[&and[IsIntegral(coef): coef in Coefficients(g)]: g in GroebnerSections], &and[LeadingCoefficient(s)^2 eq 1: s in GroebnerSections],"\n\n",
"We will now compute the image of the birational map P^2 -> P^5 given by these quintics. This involves a Groebner basis computation over the integers. We will use the Groebner basis over the rationals and check no primes were inverted along the way: ", IsGroebner(groebnerGraph), &and[&and[IsIntegral(coef): coef in Coefficients(g)]: g in groebnerGraph], &and[LeadingCoefficient(g)^2 eq 1: g in groebnerGraph],"\n\n",
"Hence XX in P^5 over the integers is given by", Equs, "By construction this is directly a Groebner basis for XX over the integers","\n\n",
"Consider the two hyperplanes given by: \nl1 =", l1, "l2 = ", l2, "These are the two hyperlane sections on XX which are not geometrically irreducible: ", not IsIrreducible(Scheme(BaseChange(XX,K),l1)), not IsIrreducible(Scheme(BaseChange(XX,K),l2)), "\n\n",
"The only prime divisor of the discrimant of 'a' is 11, indeed primes=", primes , "\n Hence a prime l is inert/split in K precisely if the minimal polynomial is irreducible/splits completely over 'GF(l)'.\n\n",
"The fibre XX11 over 11 is the ", XX11, "The zero-locus of l1 is ", L, "and hence a line in P5.\n\n",
"The anticanonical sections vanishing on L are those in", RR4L, "\n\n",
"The complete linear system of 3*L defines a morphism to P2 over GF(11)", psi, "and restricted to l1=/=0 on XX11 and xx=/=0 on P2 gives an isomorphism: ", IsIsomorphism(mapXX11A2), "\n\n",
"Consider the points pts=",pts, "which lie on XX: ",&and[P5!pt in XX: pt in pts],"\n","The lattice spanned by these points is", Rowspace(Matrix(pts)), "has rank 6 and index 2, we conclude that any affine UU in XX is locally soluble except possibly at the prime 2 \n\n",
"At the prime 2 we have that all points lie on the hyperplane:" ,
Polynomial(ChangeUniverse(ElementToSequence(Basis(Kernel(Transpose(Matrix([Coordinates(pt): pt in Points(Reduction(XX,2))]))))[1]),Integers()),[S.i: i in [1..6]]),"\n\n",
"The invariant map of the cyclic algebra (l_1/h,K) on U_h is constant on local points on UU_h, except posibbly for primes in ", primes, "\n\n",
"For the prime l=11 we check the following: \n
1. The invariant map is surjective on UU\\L (and hence on UU) for hyperplane section which do not cut out L. This number of such hyperplane sections (up to scaling) equals ", #hyperplaneswhichdonotcutoutL, "\n The image of the invariant map for each hyperplane (and its scalar multiples): ", imagesize1,"\n\n
For the remaining hyperplane sections we use that UU\\L=UU is isormorphic to an affine open of A2 over GF(11). Then h/l_1 corresponds to a cubic polynomial f on A2 in variables y11 and z11.\n
2. For the hyperplane sections for which f is constant inv assumes one value. The number of such hyperplane sections (not! up to scaling) equals ", #hyperplaneswhichcutoutL1invs, "\n The image of the invariant map for each hyperplane: ", imagesize2,"\n
3. For the hyperplane sections for which f is a separable quadratic polynomial in y11 (hence independent of z11) inv assumes four values. The number of such hyperplane sections (not! up to scaling) equals ", #hyperplaneswhichcutoutL1invs, "\n The image of the invariant map for each hyperplane: ", imagesize3,"\n
4. For the remaining hyperplane sections inv assumes five values. The number of such hyperplane sections (not! up to scaling) equals ", #hyperplaneswhichcutoutL5invs, "\n The image of the invariant map for each hyperplane (and its scalar multiples): ", imagesize4,"\n\n
The total number of hyperplane sections of type 2 for which 0 is an invariant equals ", #hyperplaneswhichcutoutL1invs-numberofhyperplanestype2and0isinv, " and those of type 3: ", #hyperplaneswhichcutoutL4invs-numberofhyperplanestype3and0isinv, "\n\n",
"Hence there are ", #hyperplaneswhichcutoutL1invs-numberofhyperplanestype2and0isinv+ #hyperplaneswhichcutoutL4invs-numberofhyperplanestype3and0isinv, "hyperplane sections modulo 11 out of the possible ", 11^6-1, "for which the sum of all invariant maps is 0.";