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 a 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 : I = ideal(a^2,a^3,a^4)
2 3 4
o11 = ideal (a , a , a )
o11 : Ideal of R
|
i12 : promote(I,S)
2
o12 = ideal (b + 1, a*b + a, b + 2b + 1)
o12 : Ideal of S
|
i13 : m = image matrix{{a^2,a^3,a^4}}
o13 = image | a2 a3 a4 |
1
o13 : R-module, submodule of R
|
i14 : promote(gens m,S)
o14 = | b+1 ab+a b2+2b+1 |
1 3
o14 : Matrix S <--- S
|
i15 : G m
o15 = image | b+1 ab+a b2+2b+1 |
1
o15 : S-module, submodule of S
|
i16 : m ** S
o16 = cokernel {2} | a 0 |
{3} | -1 a |
{4} | 0 -1 |
3
o16 : S-module, quotient 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.