This computes a partial Groebner basis, takes the initial terms, and checks whether that (partial) initial ideal has codimension at least n. Consider the following example. We create an ideal of 15 minors of the matrix myDiff (a matrix constructed in a way typical of applications). We would like to verify that the codimension of this ideal is at least 3. The built-in codim function typically does not terminate. However, isCodimAtLeast is normally very fast.
i1 : R = ZZ/127[x_1 .. x_(12)]; |
i2 : P = minors(3,genericMatrix(R,x_1,3,4)); o2 : Ideal of R |
i3 : C = res (R^1/(P^3)); |
i4 : myDiff = C.dd_3; 30 12 o4 : Matrix R <--- R |
i5 : r = rank myDiff; |
i6 : J = chooseGoodMinors(15, r, myDiff, Strategy=>StrategyDefaultNonRandom); o6 : Ideal of R |
i7 : time isCodimAtLeast(3, J) -- used 0.00366476 seconds o7 = true |
The function works by computing gb(I, PairLimit=>f(i)) for successive values of i. Here f(i) is a function that takes t, some approximation of the base degree value of the polynomial ring (for example, in a standard graded polynomial ring, this is probably expected to be \{1\}). And i is a counting variable. You can provide your own function by calling isCodimAtLeast(n, I, SPairsFunction=>( (i) -> f(i) ), the default function is SPairsFunction=>i->ceiling(1.5^i) Perhaps more commonly however, the user may want to instead tell the function to compute for larger values of i. This is done via the option PairLimit. This is the max value of i to be plugged into SPairsFunction before the function gives up. In other words, PairLimit=>5 will tell the function to check codimension 5 times.
i8 : I = ideal(x_2^8*x_10^3-3*x_1*x_2^7*x_10^2*x_11+3*x_1^2*x_2^6*x_10*x_11^2-x_1^3*x_2^5*x_11^3,x_5^5*x_6^3*x_11^3-3*x_5^6*x_6^2*x_11^2*x_12+3*x_5^7*x_6*x_11*x_12^2-x_5^8*x_12^3,x_1^5*x_2^3*x_4^3-3*x_1^6*x_2^2*x_4^2*x_5+3*x_1^7*x_2*x_4*x_5^2-x_1^8*x_5^3,x_6^8*x_11^3-3*x_5*x_6^7*x_11^2*x_12+3*x_5^2*x_6^6*x_11*x_12^2-x_5^3*x_6^5*x_12^3,x_8^3*x_10^8-3*x_7*x_8^2*x_10^7*x_11+3*x_7^2*x_8*x_10^6*x_11^2-x_7^3*x_10^5*x_11^3,x_2^8*x_4^3-3*x_1*x_2^7*x_4^2*x_5+3*x_1^2*x_2^6*x_4*x_5^2-x_1^3*x_2^5*x_5^3,-x_6^3*x_11^8+3*x_5*x_6^2*x_11^7*x_12-3*x_5^2*x_6*x_11^6*x_12^2+x_5^3*x_11^5*x_12^3,-x_6^3*x_7^3*x_9^5+3*x_4*x_6^2*x_7^2*x_9^6-3*x_4^2*x_6*x_7*x_9^7+x_4^3*x_9^8,x_8^8*x_10^3-3*x_7*x_8^7*x_10^2*x_11+3*x_7^2*x_8^6*x_10*x_11^2-x_7^3*x_8^5*x_11^3,x_2^5*x_3^3*x_11^3-3*x_2^6*x_3^2*x_11^2*x_12+3*x_2^7*x_3*x_11*x_12^2-x_2^8*x_12^3); ZZ o8 : Ideal of ---[x , x , x , x , x , x , x , x , x ..x , x , x ] 127 5 12 6 2 1 10 3 11 8 9 4 7 |
i9 : time isCodimAtLeast(5, I, PairLimit => 5, Verbose=>true) isCodimAtLeast: Computing codim of monomials based on ideal generators. isCodimAtLeast: Didn't work, going to find the partial Groebner basis. isCodimAtLeast: about to compute gb PairLimit => 1 isCodimAtLeast: computed gb, now computing codim isCodimAtLeast: about to compute gb PairLimit => 3 isCodimAtLeast: computed gb, now computing codim isCodimAtLeast: about to compute gb PairLimit => 6 isCodimAtLeast: computed gb, now computing codim isCodimAtLeast: about to compute gb PairLimit => 8 isCodimAtLeast: computed gb, now computing codim isCodimAtLeast: about to compute gb PairLimit => 12 isCodimAtLeast: computed gb, now computing codim -- used 0.00524774 seconds |
i10 : time isCodimAtLeast(5, I, PairLimit => 200, Verbose=>false) -- used 0.605606 seconds o10 = true |
Notice in the first case the function returned null, because the depth of search was not high enough. It only computed codim 5 times. The second returned true, but it did so as soon as the answer was found (and before we hit the PairLimit limit).
The object isCodimAtLeast is a method function with options.