[top][index]
search for:

Ring _ String -- get a variable by name

Synopsis:

  • Operator: _
  • Input:
  • an instance of class Ring.
  • an instance of class String.
  • Output:
  • an instance of class RingElement.
  • R_"x" -- produce the variable of the polynomial ring R whose name is x.

    i1 : R = ZZ[x,y,z];
    i2 : R_"x"

    o2 = x

    o2 : R

    Eventually we will implement this for monoids, too.

    Code:

         -- ../../../Macaulay2/m2/enginering.m2:688
         Ring _ String := RingElement => (x,s) -> x#s

    [top][index]
    search for: