# selectVariables(List,PolynomialRing) -- make a subring of a polynomial ring generated by selected variables

## Synopsis

• Usage:
(S,f) = selectVariables(v,R)
• Function: selectVariables
• Inputs:
• v, a list, a sorted list of numbers specifying which variables to select
• R,
• Outputs:
• S, , a polynomial ring generated as a subring of R by the variables whose indices occur in the list v, together with the induced monomial ordering
• f, , the inclusion map from S to R

## Description

 `i1 : (S,f) = selectVariables({2,4}, QQ[a..h,Weights=>1..8]);` ```i2 : describe S o2 = QQ[c, e, Degrees => {2:1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1] {Weights => {3, 5} } {GRevLex => {2:1} } {Position => Up }``` ```i3 : options S o3 = OptionTable{Constants => false } DegreeLift => null DegreeMap => null DegreeRank => 1 Degrees => {{1}, {1}} Global => true Heft => {1} Inverses => false Join => null Local => false MonomialOrder => {MonomialSize => 32} {Weights => {3, 5} } {GRevLex => {1, 1} } {Position => Up } SkewCommutative => {} Variables => {c, e} WeylAlgebra => {} o3 : OptionTable``` ```i4 : f o4 = map(QQ[a, b, c, d, e, f, g, h],S,{c, e}) o4 : RingMap QQ[a, b, c, d, e, f, g, h] <--- S```