[next][previous][up][top][index]
search for:

Ring _ ZZ -- get a variable by number

Synopsis:

  • Operator: _
  • Input:
  • an instance of class Ring.
  • an instance of class ZZ.
  • Output:
  • an instance of class RingElement.
  • R_i -- produce the i-th generator of a ring R.

    The indexing of generators is based on 0, so R_0 would be the first one, and so on.

    i1 : R = ZZ[a..d]

    o1 = R

    o1 : PolynomialRing
    i2 : R_2

    o2 = c

    o2 : R

    Code:

         -- ../m2/enginering.m2:213-217
         Ring _ ZZ := RingElement => (R,i) -> (
              if R.?generators 
              then R.generators#i
              else error "ring has no generators"
              )

    [next][previous][up][top][index]
    search for: