We will work with the following example, the cone over a product of an elliptic curve and a genus 3 planar curve, embedded with a Segre embedding, so the cone over a surface, embedded in $P^8$ (defined by 31 equations). The Jacobian is a relatively sparse $9 \times 31$ matrix and to compute the full Jacobian ideal we would need to compute the 61,847,604 minors of size $6 \times 6$.
|
|
|
getSubmatrixOfRank: We begin by exploring submatrices of this matrix, chosen using different strategies. We try to select submatrices of rank 6 with the command getSubmatrixOfRank. The Random strategy for instance selects a smallest matrix. On the other hand, GRevLexSmallest (respectively GRevLexLargest) tries to choose a matrix with minimal (respectively maximal) values with respect to a random GRevLex order. LexSmallest and LexLargest selects a smallest submatrix whose terms have smallest and largest value with respect to a random Lex monomial order. Points first finds a point on $V(J)$ and then finds a submatrix where the matrix has full rank after being evaluated at that point. For more details on how these strategies work, see getSubmatrixOfRank(...,Strategy=>...).
|
|
|
|
|
|
|
|
|
|
You can see that different strategies typically produce submatrices which can appear quite different in their complexity. We left off the strategies GRevLexLargest, GRevLexSmallest, GRevLexSmallestTerm as they behave very poorly on this example (indeed, we had to increase MaxMinors, the number of submatrices considered, for both LexSmallest and LexLargest as they did not find a submatrix in the default number of attempts). Of course, one can view the matrix over $S$, instead of $S/J$, where it's easier to choose a submatrix.
|
|
|
|
|
|
chooseGoodMinors: In many cases, we want to consider the determinant of the submatrices we just found, perhaps to append the determinant to an ideal. The function chooseGoodMinors helps us do that. Note that chooseGoodMinors does not check that the submatrix we are computing has full rank (except by computing its determinant and adding it to our working ideal).
|
|
|
|
|
|
|
|
Here the $1$ passed to the function says how many minors to compute. For instance, let's compute 8 minors for each of these strategies and see if that was enough to verify that the ring is regular in codimension 1. In other words, if the dimension of $J$ plus the ideal of partial minors is $\leq 1$ (since $S/J$ has dimension 3).
|
|
|
|
|
|
|
|
Indeed, in this example, even computing determinants of 1,000 random submatrices is not typically enough to verify that $V(J)$ is regular in codimension 1. On the other hand, Points is almost always quite effective at finding valuable submatrices, but can be quite slow. In this particular example, we can see that LexSmallestTerm also performs very well (and does it quickly). Since different strategies work better or worse on different examples, the default strategy actually mixes and matches various strategies. The default strategy, which we now elucidate,
|
says that we should use GRevLexSmallest, GRevLexSmallestTerm, LexSmallest, LexSmallestTerm, Random, RandomNonzero all with equal probability (note RandomNonzero, which we have not yet discussed chooses random submatrices where no row or column is zero, which is good for working in sparse matrices). For instance, if we run:
|
we can see different minors being chosen via different strategies.
Note, if one asks chooseGoodMinors for more than one minor, then any time a Points strategy is selected, the point is found on $J$ plus the ideal of all minors computed thus far.
Let us take a look at some other built-in strategies.
|
|
|
StrategyDefaultNonRandom is like StrategyDefault but removes random submatrices (which can be surprisingly beneficial in some cases). StrategyDefaultWithPoints removes randomness but adds in points instead.
A warning on chooseGoodMinors: The strategies LexSmallest and LexSmallestTerm will very frequently repeatedly choose the same submatrix of the given matrix. Hence if one tries to run chooseGoodMinors and choose too many minors with such a strategy, one can get into a long loop (the function give up eventually, but only after doing way too much work). The GRevLex strategies periodically temporarily change the underlying matrix to avoid this sort of loop.
Points: Notice that Strategy => StrategyPoints and Strategy => Points do the same thing. We briefly describe how chooseGoodMinors interacts with Points. Indeed Points forms the ideal of minors computed so far (plus $J$), finds a point where that ideal vanishes (which can be slow), evaluates the matrix $M$ at that point, and then finally computes the corresponding determinant of the submatrix. This submatrix will always produce a minor which shrinks our vanishing locus.
By default, the Points strategy actually finds geometric points. Which can be sometimes slower (but which are almost certain to exist, and are less likely to hang if the function has trouble finding a point). For instance, we can control that as follows.
|
|
|
|
|
|
Other options may also be passed to the RandomPoints package via the PointOptions option.
regularInCodimension: It is reasonable to think that you should find a few minors (with one strategy or another), and see if perhaps the minors you have computed so far are enough to verify our ring is regular in codimension 1. This is exactly what regularInCodimension does. One can control at a fine level how frequently new minors are computed, and how frequently the dimension of what we have computed so far is checked, by the option codimCheckFunction. For more on that, see RegularInCodimensionTutorial and regularInCodimension. Let us finish running regularInCodimension on our example with several different strategies.
|
|
|
|
|
|
|
|
|
If regularInCodimension outputs nothing, then it couldn't verify that the ring was regular in that codimension. We set MaxMinors => 100 to keep it from running too long with an ineffective strategy. Again, even though GRevLexSmallest and GRevLexSmallestTerm are not effective in this particular example, in others they perform better than other strategies. Note similar considerations also apply to projDim.
The object FastMinorsStrategyTutorial is a symbol.