# almostLexModule -- compute an almost lex module with the same Hilbert sequence of the module in input

## Synopsis

• Usage:
almostLexModule M
• Inputs:
• M, a monomial module over an exterior algebra
• Outputs:
• , an almost lex submodule of the ambient module with the same Hilbert sequence of M

## Description

Let $\{g_1,g_2,\ldots,g_r\}$ be a graded basis of F and let $M=\oplus_{i=1}^{r}{I_ig_i}$ be a monomial submodule of F. The almost lex module associated to M is the monomial module $M^{alex}=\oplus_{i=1}^{r}{J_ig_i}$ with $J_i=\mathrm{lexIdeal}\ I_i$ for each $i$, i.e., the lex ideal associated to $I_i$ for each $i.$

Example:

 i1 : E = QQ[e_1..e_4, SkewCommutative => true] o1 = E o1 : PolynomialRing, 4 skew commutative variables i2 : F=E^{0,0} 2 o2 = E o2 : E-module, free i3 : I_1=ideal(e_1*e_2,e_1*e_3,e_2*e_3) o3 = ideal (e e , e e , e e ) 1 2 1 3 2 3 o3 : Ideal of E i4 : I_2=ideal(e_1*e_2,e_1*e_3) o4 = ideal (e e , e e ) 1 2 1 3 o4 : Ideal of E i5 : M=createModule({I_1,I_2},F) o5 = image | e_2e_3 e_1e_3 e_1e_2 0 0 | | 0 0 0 e_1e_3 e_1e_2 | 2 o5 : E-module, submodule of E i6 : almostLexModule M o6 = image | e_1e_4 e_1e_3 e_1e_2 e_2e_3e_4 0 0 | | 0 0 0 0 e_1e_3 e_1e_2 | 2 o6 : E-module, submodule of E