# isCodimAtLeast -- returns true if we can quickly see whether the codim is at least a given number

## Synopsis

• Usage:
isCodimAtLeast(n, I)
• Inputs:
• n, an integer, an integer
• I, an ideal, an ideal in a polynomial ring over a field, or a quotient ring
• Optional inputs:
• SPairsFunction => , default value -*Function*-, a function to control how when the codimension of minors is computed, default is i->ceiling(1.5^i)
• PairLimit => , default value 100, the max value to be plugged into SPairsFunction
• Verbose => ..., default value false
• Outputs:
• true if the codimension of I is at least n or null if the function cannot tell whether the codimension is at least n

## Description

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.00464558 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 11 8 1 9 12 6 5 10 2 4 3 7 i9 : time isCodimAtLeast(5, I, PairLimit => 5, Verbose=>true) isCodimAtLeast: Computing codim of monomials based on ideal generators. -- used 0.0515079 seconds o9 = true i10 : time isCodimAtLeast(5, I, PairLimit => 200, Verbose=>false) -- used 0.0032589 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).

## Ways to use isCodimAtLeast :

• "isCodimAtLeast(ZZ,Ideal)"

## For the programmer

The object isCodimAtLeast is .