Macaulay2 » Documentation
Packages » Padic » PadicNumber » lift(PadicNumber,type of ZZ)
next | previous | forward | backward | up | index | toc

lift(PadicNumber,type of ZZ) -- lift a p-adic number to another ring

Description

Lift a $p$-adic number to an other ring. This is only well-defined when R to ZZ, QQ, or the $p$-adic field containing x.

i1 : x = QQ_7 49

o1 = 1*7^2

o1 : QQ  (of precision 20)
       7
i2 : lift(x, ZZ)

o2 = 49
i3 : lift(x, QQ)

o3 = 49

o3 : QQ
i4 : lift(x, QQ_7)

o4 = 1*7^2

o4 : QQ  (of precision 20)
       7

As usual, the ^ operator is a shorthand for this operation.

i5 : x^ZZ

o5 = 49
i6 : x^QQ

o6 = 49

o6 : QQ
i7 : x^(QQ_7)

o7 = 1*7^2

o7 : QQ  (of precision 20)
       7

Caveat

Lifting to ZZ raises an error if the $p$-adic valuation of x is negative.

See also

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/Padic.m2:1028:0.