Macaulay2 » Documentation
Packages » Macaulay2Doc :: selectInSubring
next | previous | forward | backward | up | index | toc

selectInSubring -- select columns in a subring

Synopsis

Description

For example, consider the following block (or product) order.
i1 : R = QQ[x,y,a..d,t,MonomialOrder=>{2,4,1}];
i2 : m = matrix{{x*a-d^2, a^3-1, x-a^100, a*b*d+t*c^3, t^3-t^2-t+1}}

o2 = | xa-d2 a3-1 x-a100 c3t+abd t3-t2-t+1 |

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

o3 = | a3-1 c3t+abd t3-t2-t+1 |

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

o4 = | t3-t2-t+1 |

             1      1
o4 : Matrix R  <-- R

The lexicographic order is considered as one block, as in the following example.
i5 : S = QQ[a..d,MonomialOrder=>Lex];
i6 : m = matrix{{a^2-b, b^2-c, c^2-d, d^2-1}}

o6 = | a2-b b2-c c2-d d2-1 |

             1      4
o6 : Matrix S  <-- S
i7 : selectInSubring(1,m)

o7 = 0

             1
o7 : Matrix S  <-- 0

If you wish to be able to pick out the elements not involving a, or a and b, etc, then create a block monomial order.
i8 : S = QQ[a..d,MonomialOrder=>{4:1}];
i9 : m = matrix{{a^2-b, b^2-c, c^2-d, d^2-1}}

o9 = | a2-b b2-c c2-d d2-1 |

             1      4
o9 : Matrix S  <-- S
i10 : selectInSubring(1,m)

o10 = | b2-c c2-d d2-1 |

              1      3
o10 : Matrix S  <-- S
i11 : selectInSubring(2,m)

o11 = | c2-d d2-1 |

              1      2
o11 : Matrix S  <-- S
i12 : selectInSubring(3,m)	  

o12 = | d2-1 |

              1      1
o12 : Matrix S  <-- S

Caveat

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.

See also

Ways to use selectInSubring :

For the programmer

The object selectInSubring is a method function.