Macaulay2 » Documentation
Packages » Macaulay2Doc » rings » substitution and maps between rings » working with multiple rings » promote » setupPromote
next | previous | forward | backward | up | index | toc

# setupPromote -- set up promote from one ring to another

- Usage:
    `setupPromote f`
- Inputs:
  - f, a ring map,

## Description

This defines promotion from one ring to another as the application of a ring map. After calling setupPromote, any operation that is given an element of the source of f but expects an element of the target of f will automatically promote it by applying f.

    i1 : R=QQ[x_1,x_2]

    o1 = R

    o1 : PolynomialRing

    i2 : R'=QQ[e_1,e_2,Degrees=>{1,2}]

    o2 = R'

    o2 : PolynomialRing

    i3 : setupPromote map(R,R',{x_1+x_2,x_1*x_2})

    i4 : promote(e_1^2,R)

          2            2
    o4 = x  + 2x x  + x
          1     1 2    2

    o4 : R

    i5 : e_1*x_1

          2
    o5 = x  + x x
          1    1 2

    o5 : R

    i6 : e_2==x_1*x_2

    o6 = true

## See also

- setupLift -- set up lift from one ring to another

## Ways to use setupPromote:

- `setupPromote(RingMap)`

## For the programmer

The object setupPromote is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/setupPromote-doc.m2:33:0.