# regSeqInIdeal -- a regular sequence contained in an ideal

## Synopsis

• Usage:
regSeqInIdeal I
regSeqInIdeal(I, n)
regSeqInIdeal(I, n, c, t)
• Inputs:
• I, an ideal,
• n, an integer, the length of the regular sequence returned
• c, an integer, the codimension of I if known
• t, an integer, a limit on the time spent (in seconds) for each trial
• Optional inputs:
• Strategy => ..., default value Quick
• Outputs:
• an ideal, generated by a regular sequence of length n contained in I

## Description

This method computes a regular sequence of length n contained in a given ideal I. It attempts to do so by first trying "sparse" combinations of the generators, i.e. elements which are either generators or sums of two generators. If a sparse regular sequence is not found, then dense combinations of generators will be tried.

If the length n is either unspecified or greater than the codimension of I then it is silently replaced with the codimension of I. The ideal I should be in a polynomial (or at least Cohen-Macaulay) ring, so that codim I = grade I.

 i1 : R = QQ[x_0..x_7] o1 = R o1 : PolynomialRing i2 : I = intersect(ideal(x_0,x_1,x_2,x_3), ideal(x_4,x_5,x_6,x_7), ideal(x_0,x_2,x_4,x_6), ideal(x_1,x_3,x_5,7)) o2 = ideal (x x , x x , x x , x x , x x , x x , x x , x x , x x , x x , x x , 2 7 0 7 3 6 2 6 1 6 0 6 2 5 0 5 3 4 2 4 1 4 ------------------------------------------------------------------------ x x ) 0 4 o2 : Ideal of R i3 : elapsedTime regSeqInIdeal I -- 0.048216 seconds elapsed o3 = ideal (x x , x x + x x , x x + x x , x x + x x ) 2 7 3 6 0 7 2 5 0 7 1 4 0 7 o3 : Ideal of R

If I is the unit ideal, then an ideal of variables of the ring is returned.

If the codimension of I is already known, then one can specify this, along with a time limit for each trial (normally this is taken from the length of time for computing codim I). This can result in a significant speedup: in the following example, codim I takes more than a minute to complete.

 i4 : R = QQ[h,l,s,x,y,z] o4 = R o4 : PolynomialRing i5 : I = ideal(h*l-l^2-4*l*s+h*y,h^2*s-6*l*s^3+h^2*z,x*h^2-l^2*s-h^3,h^8,l^8,s^8) 2 3 2 2 3 2 2 8 o5 = ideal (h*l - l - 4l*s + h*y, - 6l*s + h s + h z, - h - l s + h x, h , ------------------------------------------------------------------------ 8 8 l , s ) o5 : Ideal of R i6 : isSubset(I, ideal(s,l,h)) -- implies codim I == 3 o6 = true i7 : elapsedTime regSeqInIdeal(I, 3, 3, 1) -- 0.00555284 seconds elapsed 2 3 2 2 8 3 2 2 o7 = ideal (h*l - l - 4l*s + h*y, h + l s - h x, s + h + l s - h x) o7 : Ideal of R