Promote the given element or matrix
f to an element or matrix of
R, via the natural map to
R. This is semantically equivalent to creating the natural ring map from
ring f --> R and mapping f via this map.
i1 : R = QQ[a..d]; f = a^2;
|
i3 : S = R/(a^2-b-1);
|
i4 : promote(2/3,S)
2
o4 = -
3
o4 : S
|
i5 : F = map(R,QQ); F(2/3)
o5 : RingMap R <--- QQ
2
o6 = -
3
o6 : R
|
i7 : promote(f,S)
o7 = b + 1
o7 : S
|
i8 : G = map(S,R); G(f)
o8 : RingMap S <--- R
o9 = b + 1
o9 : S
|
If you wish to promote an ideal or module to another ring, either promote the corresponding matrices, use the natural ring map, or use tensor product of matrices or modules.
i10 : use R;
|
i11 : m = gens ideal(a^2,a^3,a^4)
o11 = | a2 a3 a4 |
1 3
o11 : Matrix R <--- R
|
i12 : G m
o12 = | b+1 ab+a b2+2b+1 |
1 3
o12 : Matrix S <--- S
|
i13 : m ** S
o13 = | b+1 ab+a b2+2b+1 |
1 3
o13 : Matrix S <--- S
|
i14 : ideal promote(m, S)
2
o14 = ideal (b + 1, a*b + a, b + 2b + 1)
o14 : Ideal of S
|
A special feature is that if
f is rational, and
R is not an algebra over
QQ, then an element of
R is provided by attempting the evident division.