..nodoctest
Basic¶
x.__init__(...) initializes x; see help(type(x)) for signature
-
recip.basic.
lift_small
(a)¶ Given a in Z/muZ, output b in ZZ with |b| <= mu/2 and (b mod mu) = a. Given a in Z, output a.
EXAMPLES:
sage: from recip import * sage: lift_small(Zmod(8)(7)) -1 sage: lift_small(Zmod(7)(10)) 3 sage: lift_small(Zmod(12)(20)) -4 sage: lift_small(-501) -501 sage: lift_small(QQ(7)) 7
-
recip.basic.
mat_convert
(M, ring_or_map)¶ Applies \(ring_or_map\) to the coefficients of M, i.e. given M = (m_ij)_ij, returns (ring_or_map(m_ij))_ij
EXAMPLES:
sage: from recip import * sage: M = Matrix([[1/2, 1/5], [7, 9/2]]) sage: mat_convert(M, floor) [0 0] [7 4] sage: mat_convert(M, GF(3)) [2 2] [1 0]
-
recip.basic.
uniformizer
(p)¶ Given a prime ideal p, returns a uniformizer.
EXAMPLES:
sage: from recip import * sage: P = QuadraticField(-5,'a').ideal(5).factor()[0][0] sage: uniformizer(P) a