[top][index]
search for:

RingElement _ Ring -- generator of a ring with a given name

Synopsis:

  • Usage: r = x_R
  • Operator: _
  • Input:
  • x, an instance of class RingElement.
  • R, an instance of class Ring.
  • Output:
  • r, an instance of class RingElement: the generator of the ring R whose name is the same as that of x.
  • Code:

         -- ../../../Macaulay2/m2/ofcm.m2:182-189
         RingElement _ Ring := RingElement => (x,R) -> (
              if ring x === R then x
              else try x * 1_R
              else try (baseName x)_R
              ---- we might enable the line below if map(R,S) would insist on finding every variable
              -- else try (map(R,ring x)) x
              else error "failed to interpret ring element in ring"
              )

    [top][index]
    search for: