NZMATH
1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
![]() ![]() |
Public Member Functions | |
def | __init__ (self, target, factors, cofactors, ladder, p, q=None) |
def | from_factors (cls, target, factors, p) |
def | lift_factors (self) |
def | lift_ladder (self) |
def | lift (self) |
Public Attributes | |
f | |
a | |
r | |
b | |
s | |
t | |
p | |
q | |
Properties | |
factors = property(_get_factors) | |
Private Member Functions | |
def | _get_factors (self) |
A class represents integer polynomials which will be lifted by Hensel's lemma. If the number of factors is two, you should use HenselLiftPair.
def nzmath.poly.hensel.HenselLiftMulti.__init__ | ( | self, | |
target, | |||
factors, | |||
cofactors, | |||
ladder, | |||
p, | |||
q = None |
|||
) |
HenselLiftMulti(f, factors, ladder, p, q) The parameters satisfy that: + ai's of factors and f are all monic + bi's of cofactors are product of aj's for i < j + f == a1*...*ar (mod q) + ladder is a tuple (sis, tis) and si's of sis and ti's of tis satisfy: ai*si + bi*ti == 1 (mod p), with positive integers p dividing q. If p==q, q can be omit from the argument.
|
private |
getter for factors of target mod q
Definition at line 268 of file hensel.py.
References nzmath.elliptic.ECGeneric.a, nzmath.poly.hensel.HenselLiftMulti.a, and nzmath.elliptic.ECoverGF.a.
def nzmath.poly.hensel.HenselLiftMulti.from_factors | ( | cls, | |
target, | |||
factors, | |||
p | |||
) |
Create and return an instance of HenselLiftMulti. HenselLiftMulti.from_factors(f, factors, p) The parameters satisfy that: f == a1*...*ar (mod p) with a prime number p and ai's in factors.
Definition at line 197 of file hensel.py.
References nzmath.poly.hensel._extgcdp(), and nzmath.poly.hensel._init_cofactors().
def nzmath.poly.hensel.HenselLiftMulti.lift | ( | self | ) |
The lift.
Definition at line 261 of file hensel.py.
References nzmath.poly.hensel.HenselLiftPair.lift_factors(), nzmath.poly.hensel.HenselLiftMulti.lift_factors(), nzmath.poly.hensel.HenselLiftPair.lift_ladder(), and nzmath.poly.hensel.HenselLiftMulti.lift_ladder().
def nzmath.poly.hensel.HenselLiftMulti.lift_factors | ( | self | ) |
Find a lifted integer coefficient polynomials such that: f = A1*A2*...*Ar (mod q*p), Ai = ai (mod q) (i=1,2,...,r), then, update q with q*p. PRECONDITIONS (automatically satisfied): f = a1*a2*...*ar (mod q), ai*si + bi*ti = 1 (mod p) (i=1,2,...,r) and p | q.
Definition at line 215 of file hensel.py.
References nzmath.elliptic.ECGeneric.a, nzmath.poly.hensel.HenselLiftMulti.a, nzmath.elliptic.ECoverGF.a, nzmath.elliptic.ECGeneric.b, nzmath.ecpp.Elliptic.b, nzmath.poly.hensel.HenselLiftMulti.b, nzmath.elliptic.ECoverGF.b, nzmath.poly.hensel.HenselLiftPair.f, nzmath.ecpp.Elliptic.f, nzmath.poly.hensel.HenselLiftMulti.f, nzmath.poly.hensel.HenselLiftPair.p, nzmath.poly.hensel.HenselLiftMulti.p, nzmath.poly.hensel.HenselLiftPair.q, nzmath.poly.hensel.HenselLiftMulti.q, nzmath.poly.hensel.HenselLiftMulti.r, nzmath.bigrange.range(), nzmath.poly.hensel.HenselLiftMulti.s, and nzmath.poly.hensel.HenselLiftMulti.t.
Referenced by nzmath.poly.hensel.HenselLiftMulti.lift().
def nzmath.poly.hensel.HenselLiftMulti.lift_ladder | ( | self | ) |
Update ladder si's and ti's with Si's and Ti's: ai*Si + bi*Ti == 1 (mod p**2) (i = 1, 2, ..., r), Si == si (mod p) (i = 1, 2, ..., r) and Ti == ti (mod p) (i = 1, 2, ..., r) then, update p with p**2. PRECONDITIONS (automatically satisfied): ai*si + bi*ti == 1 (mod p)
Definition at line 241 of file hensel.py.
References nzmath.elliptic.ECGeneric.a, nzmath.poly.hensel.HenselLiftMulti.a, nzmath.elliptic.ECoverGF.a, nzmath.elliptic.ECGeneric.b, nzmath.ecpp.Elliptic.b, nzmath.poly.hensel.HenselLiftMulti.b, nzmath.elliptic.ECoverGF.b, nzmath.poly.hensel.HenselLiftPair.f, nzmath.ecpp.Elliptic.f, nzmath.poly.hensel.HenselLiftMulti.f, nzmath.poly.hensel.HenselLiftPair.p, nzmath.poly.hensel.HenselLiftMulti.p, nzmath.poly.hensel.HenselLiftPair.q, nzmath.poly.hensel.HenselLiftMulti.q, nzmath.poly.hensel.HenselLiftMulti.r, nzmath.bigrange.range(), nzmath.poly.hensel.HenselLiftMulti.s, and nzmath.poly.hensel.HenselLiftMulti.t.
Referenced by nzmath.poly.hensel.HenselLiftMulti.lift().
nzmath.poly.hensel.HenselLiftMulti.a |
Definition at line 185 of file hensel.py.
Referenced by nzmath.poly.hensel.HenselLiftMulti._get_factors(), nzmath.ecpp.Elliptic.add(), nzmath.poly.hensel.HenselLiftMulti.lift_factors(), and nzmath.poly.hensel.HenselLiftMulti.lift_ladder().
nzmath.poly.hensel.HenselLiftMulti.b |
Definition at line 187 of file hensel.py.
Referenced by nzmath.poly.hensel.HenselLiftMulti.lift_factors(), and nzmath.poly.hensel.HenselLiftMulti.lift_ladder().
nzmath.poly.hensel.HenselLiftMulti.f |
Definition at line 184 of file hensel.py.
Referenced by nzmath.poly.hensel.HenselLiftSimultaneously._init_dis(), nzmath.poly.hensel.HenselLiftSimultaneously.first_lift(), nzmath.poly.hensel.HenselLiftSimultaneously.general_lift(), nzmath.poly.hensel.HenselLiftMulti.lift_factors(), and nzmath.poly.hensel.HenselLiftMulti.lift_ladder().
nzmath.poly.hensel.HenselLiftMulti.p |
Definition at line 190 of file hensel.py.
Referenced by nzmath.poly.hensel.HenselLiftSimultaneously._init_dis(), nzmath.poly.hensel.HenselLiftSimultaneously._solve_yz(), nzmath.poly.hensel.HenselLiftSimultaneously.first_lift(), nzmath.poly.hensel.HenselLiftSimultaneously.general_lift(), nzmath.poly.hensel.HenselLiftMulti.lift_factors(), and nzmath.poly.hensel.HenselLiftMulti.lift_ladder().
nzmath.poly.hensel.HenselLiftMulti.q |
nzmath.poly.hensel.HenselLiftMulti.r |
nzmath.poly.hensel.HenselLiftMulti.s |
Definition at line 188 of file hensel.py.
Referenced by nzmath.poly.hensel.HenselLiftMulti.lift_factors(), and nzmath.poly.hensel.HenselLiftMulti.lift_ladder().
nzmath.poly.hensel.HenselLiftMulti.t |
Definition at line 189 of file hensel.py.
Referenced by nzmath.poly.hensel.HenselLiftMulti.lift_factors(), nzmath.poly.hensel.HenselLiftMulti.lift_ladder(), and nzmath.prime.TestPrime.next().
|
static |
Definition at line 274 of file hensel.py.
Referenced by nzmath.prime.FactoredInteger.__iter__(), nzmath.prime.FactoredInteger.__mod__(), nzmath.prime.FactoredInteger.__mul__(), nzmath.prime.FactoredInteger.__pow__(), nzmath.prime.FactoredInteger.copy(), nzmath.prime.FactoredInteger.divisors(), nzmath.prime.FactoredInteger.exact_division(), nzmath.prime.FactoredInteger.is_divisible_by(), and nzmath.prime.FactoredInteger.prime_divisors().