Function: lift
Section: conversions
C-Name: lift0
Prototype: GDn
Help: lift(x,{v}): lifts every element of Z/nZ to Z or T[x]/PT[x] to T[x]
 for a type T if v is omitted, otherwise lift only polmods with main
 variable v. If v does not occur in x, lift only intmods.
Description:
 (pol):pol        lift($1)
 (vec):vec        lift($1)
 (gen):gen        lift($1)
 (pol, var):pol        lift0($1, $2)
 (vec, var):vec        lift0($1, $2)
 (gen, var):gen        lift0($1, $2)
Doc: lifts an element $x=a \bmod n$ of $\Z/n\Z$ to
 $a$ in $\Z$, and similarly lifts a polmod to a polynomial if $v$ is omitted.
 Otherwise, lifts only polmods whose modulus has main variable $v$ (if $v$
 does not occur in $x$, lifts only intmods). If $x$ is of recursive (non
 modular) type, the lift is done coefficientwise. For $p$-adics, this routine
 acts as \tet{truncate}. It is not allowed to have $x$ of type \typ{REAL}.
 \bprog
 ? lift(Mod(5,3))
 %1 = 2
 ? lift(3 + O(3^9))
 %2 = 3
 ? lift(Mod(x,x^2+1))
 %3 = x
 ? lift(x * Mod(1,3) + Mod(2,3))
 %4 = x + 2
 ? lift(x * Mod(y,y^2+1) + Mod(2,3))
 %5 = y*x + Mod(2, 3)   \\@com do you understand this one ?
 ? lift(x * Mod(y,y^2+1) + Mod(2,3), x)
 %6 = Mod(y, y^2+1) * x + Mod(2, y^2+1)
 @eprog
Variant: Also available is \fun{GEN}{lift}{GEN x} corresponding to
 \kbd{lift0(x,-1)}.
