index of a Variable

94 views
Skip to first unread message

Bryson Kagy

unread,
Mar 9, 2022, 10:12:24 AM3/9/22
to Macaulay2
Is there a way to get an index of a variable? Like if I am consider q_(1,1,1) to get (1,1,1) from it? I can't find a method in the documentation, but also i have trouble navigating it.

Daniel R. Grayson

unread,
Mar 10, 2022, 6:47:57 PM3/10/22
to Macaulay2
Try something like this:

Macaulay2, version 1.19.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems,
               LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra,
               Saturation, TangentCone

i1 : R = QQ[x_1]

o1 = R

o1 : PolynomialRing

i2 : x_1

o2 = x
      1

o2 : R

i3 : baseName x_1

o3 = x
      1

o3 : IndexedVariable

i4 : peek oo

o4 = IndexedVariable{x, 1}

i5 : (baseName x_1)#1

o5 = 1

Reply all
Reply to author
Forward
0 new messages