# lift -- lift to another ring

## Description

(Disambiguation: for division of matrices, which is thought of as lifting one homomorphism over another, see instead Matrix // Matrix. For lifting a map between modules to a map between their free resolutions, see extend.)

The ring R should be one of the base rings associated with the ring of f. An error is raised if f cannot be lifted to R.

The first example is lifting from the fraction field of R to R.

 i1 : lift(4/2,ZZ) o1 = 2 i2 : R = ZZ[x]; i3 : f = ((x+1)^3*(x+4))/((x+4)*(x+1)) 2 o3 = x + 2x + 1 o3 : frac R i4 : lift(f,R) 2 o4 = x + 2x + 1 o4 : R

Another use of lift is to take polynomials in a quotient ring and lift them to the polynomial ring.

 i5 : A = QQ[a..d]; i6 : B = A/(a^2-b,c^2-d-a-3); i7 : f = c^5 2 o7 = 2a*c*d + c*d + 6a*c + b*c + 6c*d + 9c o7 : B i8 : lift(f,A) 2 o8 = 2a*c*d + c*d + 6a*c + b*c + 6c*d + 9c o8 : A i9 : jf = jacobian ideal f o9 = {1} | 2cd+6c | {1} | c | {1} | 2ad+d2+6a+b+6d+9 | {1} | 2ac+2cd+6c | 4 1 o9 : Matrix B <--- B i10 : lift(jf,A) o10 = {1} | 2cd+6c | {1} | c | {1} | 2ad+d2+6a+b+6d+9 | {1} | 2ac+2cd+6c | 4 1 o10 : Matrix A <--- A

Elements may be lifted to any base ring, if such a lift exists.

 i11 : use B; i12 : g = (a^2+2*a-3)-(a+1)^2 o12 = -4 o12 : B i13 : lift(g,A) o13 = -4 o13 : A i14 : lift(g,QQ) o14 = -4 o14 : QQ i15 : lift(lift(g,QQ),ZZ) o15 = -4

The functions lift and substitute are useful to move numbers from one kind of coefficient ring to another.

 i16 : lift(3.0,ZZ) o16 = 3 i17 : lift(3.0,QQ) o17 = 3 o17 : QQ

A continued fraction method is used to lift a real number to a rational number, whereas promote uses the internal binary representation.

 i18 : lift(123/2341.,QQ) 123 o18 = ---- 2341 o18 : QQ i19 : promote(123/2341.,QQ) 7572049608428139 o19 = ------------------ 144115188075855872 o19 : QQ i20 : factor oo 3*811*39877*78045679 o20 = -------------------- 57 2 o20 : Expression of class Divide

For numbers and ring elements, an alternate syntax with ^ is available, analogous to the use of _ for promote.

 i21 : .0001^QQ 1 o21 = ----- 10000 o21 : QQ i22 : .0001_QQ 7378697629483821 o22 = -------------------- 73786976294838206464 o22 : QQ

• baseRings -- store the list of base rings of a ring
• liftable -- whether lifting to another ring is possible
• promote -- promote to another ring

## Ways to use lift :

• "lift(BettiTally,type of ZZ)" -- see BettiTally -- the class of all Betti tallies
• "lift(CC,type of QQ)"
• "lift(CC,type of RR_*)"
• "lift(CC,type of ZZ)"
• "lift(Ideal,type of QQ)"
• "lift(Ideal,type of RingElement)"
• "lift(Ideal,type of ZZ)"
• "lift(Matrix,type of CC_*,type of QQ)"
• "lift(Matrix,type of CC_*,type of RR_*)"
• "lift(Matrix,type of CC_*,type of ZZ)"
• "lift(Matrix,type of Number)"
• "lift(Matrix,type of QQ,type of QQ)"
• "lift(Matrix,type of QQ,type of ZZ)"
• "lift(Matrix,type of RingElement)"
• "lift(Matrix,type of RR_*,type of QQ)"
• "lift(Matrix,type of RR_*,type of ZZ)"
• "lift(Matrix,type of RRi_*,type of QQ)"
• "lift(Matrix,type of RRi_*,type of RR_*)"
• "lift(Matrix,type of RRi_*,type of ZZ)"
• "lift(Matrix,type of ZZ,type of ZZ)"
• "lift(QQ,type of QQ)"
• "lift(QQ,type of ZZ)"
• "lift(RR,type of QQ)"
• "lift(RR,type of ZZ)"
• "lift(RRi,type of QQ)"
• "lift(RRi,type of RR_*)"
• "lift(RRi,type of ZZ)"
• "lift(ZZ,type of ZZ)"
• lift(Matrix,type of CC_*,type of CC_*) (missing documentation)
• lift(Matrix,type of RR_*,type of RR_*) (missing documentation)
• lift(Module,type of InexactNumber') (missing documentation)
• lift(Module,type of InexactNumber) (missing documentation)
• lift(Module,type of Number) (missing documentation)
• lift(Module,type of RingElement) (missing documentation)
• lift(MutableMatrix,type of InexactNumber') (missing documentation)
• lift(MutableMatrix,type of InexactNumber) (missing documentation)
• lift(MutableMatrix,type of Number) (missing documentation)
• lift(MutableMatrix,type of RingElement) (missing documentation)

## For the programmer

The object lift is .