Given an equigenerated monomial ideal $I$ over a polynomial ring, I am trying to check if a sequence $L={l_1,\ldots,l_t}$ is almost $I$-regular, i.e. for each $i$, the kernel of the multiplication map $.l_i: \frac{I}{(l_1,\ldots,l_{i-1})I}\to \frac{I}{(l_1,\ldots,l_{i-1})I}$ is of finite length. How is it possible to check this using Macaulay2? Actually, I am not able to define the map using the code "map()" for modules. Next the code "length" only computes the length of a list. Does the code "degree" measure the length of a module? Since the kernel of the above map is $$\{f\in I:\ fl_i\in (l_1,\ldots,l_{i-1})I\},$$, one way is to check the length of this ideal. How can one define thisideal in Macaulay2?
I am also wondering if there is a way to check if the list L is a regular sequence of I. The code "isRegularSequence" only works for the ring.