Module Expr Str ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad Str Call NameLoad NameLoad NameLoad If CompareEqEq Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Num body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If BoolOpAnd CompareLtE NameLoad Num CompareLtE NameLoad Num CompareLtE NameLoad Num CompareLtE NameLoad Num body TryExcept body Return Call NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad ListLoad NameLoad NameLoad If BoolOpAnd CompareEq Call NameLoad NameLoad Num AttributeLoad SubscriptLoad NameLoad Index Num attr body Return NameLoad If CompareNotEq Call NameLoad NameLoad Num body Raise NameLoad Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body For NameStore NameLoad body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body If Call NameLoad GeneratorExp CompareGt NameLoad Num comprehension NameStore SubscriptLoad NameLoad Slice Num body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Dict NameLoad NameLoad If CompareGtE Call AttributeLoad NameLoad attr NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareEqEq Call NameLoad NameLoad Call NameLoad NameLoad Num body Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num attr Return ListComp TupleLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad If BoolOpAnd CompareEq Call NameLoad NameLoad Num AttributeLoad SubscriptLoad NameLoad Index Num attr body If UnaryOpNot NameLoad body Return ListLoad orelse Return NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr orelse Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad attr If UnaryOpNot NameLoad body Return ListLoad If CompareEq Call NameLoad NameLoad Num body Return ListComp TupleLoad NameLoad comprehension NameStore NameLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore ListLoad Assign NameStore SubscriptLoad NameLoad Slice Num For NameStore SubscriptLoad NameLoad Slice Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad TupleLoad NameLoad Return NameLoad decorator_list TryExcept body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad handlers ExceptHandler type NameLoad body Raise NameLoad If CompareIsNot NameLoad NameLoad body Return Call NameLoad NameLoad keyword NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore TupleLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Num SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad ListLoad For TupleStore NameStore NameStore NameLoad body Assign TupleStore NameStore NameStore TupleLoad ListLoad Call NameLoad Call NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore BinOpAdd TupleLoad NameLoad NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr NameLoad CompareNotEq Call AttributeLoad NameLoad attr NameLoad Num body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call NameLoad NameLoad If CompareEq Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad BinOpAdd TupleLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Return Call NameLoad NameLoad keyword NameLoad decorator_list
N/A N/A Solvers of systems of polynomial equations.  __future__ print_function division sympy.core S sympy.polys Poly groebner roots sympy.polys.polytools parallel_poly_from_expr sympy.polys.polyerrors ComputationFailed PolificationFailed CoercionFailed sympy.simplify rcollect sympy.utilities default_sort_key postfixes SolveFailed N/A Exception N/A N/A Raised when solver's conditions weren't met.  N/A solve_poly_system N/A N/A seq N/A gens args N/A N/A 
    Solve a system of polynomial equations.

    Examples
    ========

    >>> from sympy import solve_poly_system
    >>> from sympy.abc import x, y

    >>> solve_poly_system([x*y - 2*y, 2*y**2 - x**2], x, y)
    [(0, 0), (2, -sqrt(2)), (2, sqrt(2))]

     N/A N/A N/A N/A polys opt N/A parallel_poly_from_expr seq gens args N/A N/A N/A PolificationFailed N/A exc N/A N/A N/A ComputationFailed solve_poly_system N/A len seq exc N/A N/A N/A len polys N/A len N/A opt gens 2 N/A N/A N/A f g polys N/A N/A a b N/A N/A f degree_list N/A N/A c d N/A N/A g degree_list N/A N/A N/A a 2 N/A b 2 N/A c 2 N/A d 2 N/A N/A N/A N/A N/A solve_biquadratic f g opt N/A N/A N/A SolveFailed N/A N/A N/A N/A solve_generic polys opt N/A solve_biquadratic N/A N/A f g opt N/A N/A N/A Solve a system of two bivariate quadratic polynomial equations.

    Examples
    ========

    >>> from sympy.polys import Options, Poly
    >>> from sympy.abc import x, y
    >>> from sympy.solvers.polysys import solve_biquadratic
    >>> NewOption = Options((x, y), {'domain': 'ZZ'})

    >>> a = Poly(y**2 - 4 + x, y, x, domain='ZZ')
    >>> b = Poly(y*2 + 3*x - 7, y, x, domain='ZZ')
    >>> solve_biquadratic(a, b, NewOption)
    [(1/3, 3), (41/27, 11/9)]

    >>> a = Poly(y + x**2 - 3, y, x, domain='ZZ')
    >>> b = Poly(-y + x - 4, y, x, domain='ZZ')
    >>> solve_biquadratic(a, b, NewOption)
    [(-sqrt(29)/2 + 7/2, -sqrt(29)/2 - 1/2), (sqrt(29)/2 + 7/2, -1/2 +       sqrt(29)/2)]
     N/A G N/A groebner N/A f g N/A N/A N/A N/A len G 1 N/A N/A G N/A 0 is_ground N/A N/A None N/A N/A N/A len G 2 N/A N/A SolveFailed N/A N/A p q G N/A N/A x y N/A opt gens N/A p N/A Poly p x expand False N/A q N/A N/A q ltrim -1 N/A p_roots N/A N/A rcollect expr y N/A expr N/A N/A N/A roots p keys N/A q_roots N/A list N/A N/A N/A roots q keys N/A solutions N/A N/A q_root q_roots N/A N/A p_root p_roots N/A N/A solution N/A N/A N/A p_root subs y q_root q_root N/A N/A N/A solutions append solution N/A N/A sorted solutions key default_sort_key N/A solve_generic N/A N/A polys opt N/A N/A N/A 
    Solve a generic system of polynomial equations.

    Returns all possible solutions over C[x_1, x_2, ..., x_m] of a
    set F = { f_1, f_2, ..., f_n } of polynomial equations,  using
    Groebner basis approach. For now only zero-dimensional systems
    are supported, which means F can have at most a finite number
    of solutions.

    The algorithm works by the fact that, supposing G is the basis
    of F with respect to an elimination order  (here lexicographic
    order is used), G and F generate the same ideal, they have the
    same set of solutions. By the elimination property,  if G is a
    reduced, zero-dimensional Groebner basis, then there exists an
    univariate polynomial in G (in its last variable). This can be
    solved by computing its roots. Substituting all computed roots
    for the last (eliminated) variable in other elements of G, new
    polynomial system is generated. Applying the above procedure
    recursively, a finite number of solutions can be found.

    The ability of finding all solutions by this procedure depends
    on the root finding algorithms. If no solutions were found, it
    means only that roots() failed, but the system is solvable. To
    overcome this difficulty use numerical algorithms instead.

    References
    ==========

    .. [Buchberger01] B. Buchberger, Groebner Bases: A Short
    Introduction for Systems Theorists, In: R. Moreno-Diaz,
    B. Buchberger, J.L. Freire, Proceedings of EUROCAST'01,
    February, 2001

    .. [Cox97] D. Cox, J. Little, D. O'Shea, Ideals, Varieties
    and Algorithms, Springer, Second Edition, 1997, pp. 112

    Examples
    ========

    >>> from sympy.polys import Poly, Options
    >>> from sympy.solvers.polysys import solve_generic
    >>> from sympy.abc import x, y
    >>> NewOption = Options((x, y), {'domain': 'ZZ'})

    >>> a = Poly(x - y + 5, x, y, domain='ZZ')
    >>> b = Poly(x + y - 3, x, y, domain='ZZ')
    >>> solve_generic([a, b], NewOption)
    [(-1, 4)]

    >>> a = Poly(x - 2*y + 5, x, y, domain='ZZ')
    >>> b = Poly(2*x - y - 3, x, y, domain='ZZ')
    >>> solve_generic([a, b], NewOption)
    [(11/3, 13/3)]

    >>> a = Poly(x**2 + y, x, y, domain='ZZ')
    >>> b = Poly(x + y*4, x, y, domain='ZZ')
    >>> solve_generic([a, b], NewOption)
    [(0, 0), (1/4, -1/16)]
     _is_univariate N/A N/A f N/A N/A N/A Returns True if 'f' is univariate in its last variable.  N/A monom N/A N/A f monoms N/A N/A N/A any N/A N/A m 0 N/A m N/A monom N/A -1 N/A N/A False N/A True N/A _subs_root N/A N/A f gen zero N/A N/A N/A Replace generator with a root so that the result is nice.  N/A p N/A N/A f as_expr N/A gen zero N/A N/A N/A N/A f degree gen 2 N/A N/A p N/A N/A p expand deep False N/A p N/A _solve_reduced_system N/A N/A system gens entry N/A False N/A N/A Recursively solves reduced polynomial systems.  N/A N/A N/A len system N/A len gens 1 N/A N/A zeros N/A list N/A N/A N/A roots N/A system N/A 0 N/A gens N/A -1 keys N/A N/A N/A zero N/A zero zeros N/A basis N/A groebner system gens polys True N/A N/A N/A N/A len basis 1 N/A N/A basis N/A 0 is_ground N/A N/A N/A entry N/A N/A N/A N/A N/A None N/A univariate N/A list N/A filter _is_univariate basis N/A N/A N/A len univariate 1 N/A N/A f N/A N/A univariate pop N/A N/A N/A NotImplementedError only zero-dimensional systems supported (finite number of solutions) N/A gens N/A f gens N/A gen N/A gens N/A -1 N/A zeros N/A list N/A N/A N/A roots N/A N/A f ltrim gen keys N/A N/A zeros N/A N/A N/A N/A N/A N/A len basis 1 N/A N/A N/A N/A zero N/A zero zeros N/A solutions N/A N/A zero zeros N/A N/A new_system N/A N/A new_gens N/A gens N/A -1 N/A b N/A basis N/A -1 N/A N/A eq N/A _subs_root b gen zero N/A N/A eq N/A S Zero N/A N/A N/A N/A new_system append eq N/A solution N/A _solve_reduced_system new_system new_gens N/A N/A N/A N/A solutions append N/A solution N/A zero N/A solutions N/A N/A N/A N/A result N/A _solve_reduced_system polys N/A opt gens entry True N/A N/A N/A CoercionFailed N/A N/A NotImplementedError N/A N/A result None N/A N/A N/A sorted result key default_sort_key N/A N/A None N/A solve_triangulated N/A N/A polys N/A gens args N/A N/A 
    Solve a polynomial system using Gianni-Kalkbrenner algorithm.

    The algorithm proceeds by computing one Groebner basis in the ground
    domain and then by iteratively computing polynomial factorizations in
    appropriately constructed algebraic extensions of the ground domain.

    Examples
    ========

    >>> from sympy.solvers.polysys import solve_triangulated
    >>> from sympy.abc import x, y, z

    >>> F = [x**2 + y + z - 1, x + y**2 + z - 1, x + y + z**2 - 1]

    >>> solve_triangulated(F, x, y, z)
    [(0, 0, 1), (0, 1, 0), (1, 0, 0)]

    References
    ==========

    1. Patrizia Gianni, Teo Mora, Algebraic Solution of System of
    Polynomial Equations using Groebner Bases, AAECC-5 on Applied Algebra,
    Algebraic Algorithms and Error-Correcting Codes, LNCS 356 247--257, 1989

     N/A G N/A groebner polys gens polys True N/A G N/A list N/A reversed G N/A domain N/A N/A args get domain N/A N/A domain None N/A N/A N/A i g N/A enumerate G N/A N/A N/A G N/A i N/A N/A g set_domain domain N/A N/A f G N/A N/A N/A N/A G N/A 0 ltrim -1 N/A G N/A 1 N/A dom N/A N/A f get_domain N/A zeros N/A N/A f ground_roots N/A solutions N/A set N/A N/A zero zeros N/A N/A N/A N/A solutions add N/A N/A zero dom N/A var_seq N/A reversed N/A gens N/A -1 N/A vars_seq N/A postfixes N/A gens N/A 1 N/A N/A var vars N/A zip var_seq vars_seq N/A N/A _solutions N/A set N/A N/A N/A values dom solutions N/A N/A N/A H mapping N/A N/A N/A list N/A zip vars values N/A g G N/A N/A _vars N/A N/A var vars N/A N/A N/A N/A g has_only_gens _vars N/A N/A N/A g degree var 0 N/A N/A h N/A N/A N/A N/A g ltrim var eval N/A dict mapping N/A N/A N/A N/A g degree var N/A N/A h degree N/A N/A N/A N/A H append h N/A p N/A min H key N/A N/A N/A h N/A N/A N/A h degree N/A zeros N/A N/A p ground_roots N/A zero zeros N/A N/A N/A N/A zero is_Rational N/A N/A dom_zero N/A N/A dom algebraic_field zero N/A N/A dom_zero dom N/A N/A N/A _solutions add N/A N/A N/A zero values dom_zero N/A solutions _solutions N/A solutions N/A list solutions N/A N/A i N/A solution _ N/A enumerate solutions N/A N/A N/A solutions N/A i solution N/A N/A sorted solutions key default_sort_key N/A