regSeqInIdeal I
regSeqInIdeal(I, n)
regSeqInIdeal(I, n, c, t)
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 CohenMacaulay) ring, so that codim I = grade I.



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.




The object regSeqInIdeal is a method function with options.