selectInSubring

selectInSubring(i,m) -- Form the submatrix of the matrix 'm' consisting of those columns which lie in the subring generated by the first 'i' parts of the monomial order.

For example, consider the graded lexicographic order

i1 : R = ZZ/101[a..d,MonomialOrder=>Lex]

o1 = R

o1 : PolynomialRing
i2 : m = matrix{{b^2-c^2, a^2 - b^2, c*d}}

o2 = {0} | b2-c2 a2-b2 cd |

             1       3
o2 : Matrix R  <--- R
i3 : selectInSubring(1,m)

o3 = {0} | b2-c2 cd |

             1       2
o3 : Matrix R  <--- R
i4 : selectInSubring(2,m)

o4 = {0} | cd |

             1       1
o4 : Matrix R  <--- R
i5 : selectInSubring(3,m)

o5 = 0

             1
o5 : Matrix R  <--- 0

Caveats: this routine doesn't do what one would expect for graded orders such as 'GLex'. There, the first part of the monomial order is the degree, which is usually not zero. This routine should detect and correct this.


topindexpreviousupnext