// yz_cells.m -- counting the lines on a surface V(F) in P^3 through the Schubert-cell // decomposition of Gr(2,4) (shared by 07_aut.m and 08_section5.m). // // A line is V(l1, l2); its 2x4 equation matrix has a unique "reverse reduced echelon form": // row i has its LAST nonzero entry (= 1) in the pivot column p_i, p1 < p2, all entries right of // a pivot vanish, and r2[p1] = 0. Free entries: r1[j] (j < p1), r2[j] (j < p2, j <> p1). // Pivots {3,4}: a x1 + b x2 + x3 = c x1 + d x2 + x4 = 0 (4 parameters) // {2,4}: a x1 + x2 = b x1 + c x3 + x4 = 0 (3 parameters) // {1,4}: x1 = a x2 + b x3 + x4 = 0, {2,3}: a x1 + x2 = b x1 + x3 = 0 (2 parameters) // {1,3}: x1 = a x2 + x3 = 0 (1 parameter) // {1,2}: x1 = x2 = 0 (0 parameters) // These six cells partition Gr(2,4). For each cell, the line is parametrised by the two // non-pivot coordinates (s,u) and F restricted to it is a binary form of degree d whose d+1 // coefficients (polynomials in the cell parameters) define the scheme of lines of the cell. CELLS := [ [3,4], [2,4], [1,4], [2,3], [1,3], [1,2] ]; // CellIdeal(F, pv): F a homogeneous polynomial in 4 variables over a field k, pv = [p1,p2]. // Returns the ideal of the cell in k[params] (or a boolean when there are no parameters), // together with a function mapping a parameter point to the 2x4 equation matrix. CellIdeal := function(F, pv) k := BaseRing(Parent(F)); p1 := pv[1]; p2 := pv[2]; nfree := (p1 - 1) + (p2 - 2); np := [ j : j in [1..4] | j notin pv ]; if nfree eq 0 then S := PolynomialRing(k, 2); pt := [S| 0, 0, 0, 0]; pt[np[1]] := s; pt[np[2]] := u; return Evaluate(F, pt) eq 0, func< P | Matrix(k, 2, 4, [ j eq p1 select 1 else 0 : j in [1..4] ] cat [ j eq p2 select 1 else 0 : j in [1..4] ]) >; end if; R := PolynomialRing(k, nfree); r1 := [R| 0, 0, 0, 0]; r2 := [R| 0, 0, 0, 0]; r1[p1] := 1; r2[p2] := 1; idx := 1; pos1 := []; pos2 := []; for j in [1..p1-1] do r1[j] := R.idx; Append(~pos1, ); idx +:= 1; end for; for j in [1..p2-1] do if j ne p1 then r2[j] := R.idx; Append(~pos2, ); idx +:= 1; end if; end for; S := PolynomialRing(R, 2); pt := [S| 0, 0, 0, 0]; pt[np[1]] := s; pt[np[2]] := u; pt[p1] := -(r1[np[1]]*s + r1[np[2]]*u); pt[p2] := -(r2[np[1]]*s + r2[np[2]]*u); G := Evaluate(F, pt); d := TotalDegree(F); eqs := [ MonomialCoefficient(G, s^(d-i)*u^i) : i in [0..d] ]; assert G eq &+[ eqs[i+1]*s^(d-i)*u^i : i in [0..d] ]; toM := function(P) // P: sequence of parameter values in an extension field L := Universe(P); e1 := [L| 0, 0, 0, 0]; e2 := [L| 0, 0, 0, 0]; e1[p1] := 1; e2[p2] := 1; for t in pos1 do e1[t[1]] := P[t[2]]; end for; for t in pos2 do e2[t[1]] := P[t[2]]; end for; return Matrix(L, 2, 4, e1 cat e2); end function; return ideal< R | eqs >, toM; end function; // CountCell(I): number of distinct points of V(I) over the algebraic closure, the vector-space // dimension of k[params]/I (length of the scheme), and whether I is radical. CountCell := function(I) if Type(I) eq BoolElt then return (I select 1 else 0), (I select 1 else 0), true; end if; if 1 in I then return 0, 0, true; end if; assert Dimension(I) eq 0; len := QuotientDimension(I); npts := QuotientDimension(Radical(I)); return npts, len, npts eq len; end function; // CountLines(F): table of (#points, length, radical?) per cell and the total number of lines. CountLines := function(F : verbose := true) tot := 0; tab := []; for pv in CELLS do tc := Cputime(); I := CellIdeal(F, pv); n, l, rad := CountCell(I); tot +:= n; Append(~tab, ); if verbose then printf " cell %o: %o lines (scheme length %o, radical %o) [%o s]\n", pv, n, l, rad, Cputime(tc); end if; end for; return tot, tab; end function;