�
��gq3 � � � d Z ddlZddlmZ ddlmZ ddlmZmZm Z ddl
mZ ddlm
Z
mZmZ ddlmZ dd lmZ dd
lmZ G d� de� � Zd
d�d�Zd� Zdd�Zd� ZdS )z,Solvers of systems of polynomial equations. � N)�S)�default_sort_key)�Poly�groebner�roots)�parallel_poly_from_expr)�ComputationFailed�PolificationFailed�CoercionFailed��rcollect)� postfixes)�
filldedentc � � e Zd ZdZdS )�SolveFailedz.Raised when solver's conditions were not met. N)�__name__�
__module__�__qualname__�__doc__� � �e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sympy/solvers/polysys.pyr r s � � � � � �8�8�8�8r r F��strictc �� � t | g|�R i |��\ }}n0# t $ r#}t dt | � � |� � �d}~ww xY wt |� � t |j � � cxk rdk rjn ng|\ }}t d� |� � � |� � � z D � � � � r" t |||� � S # t $ r Y nw xY wt |||�� � S )a�
Return a list of solutions for the system of polynomial equations
or else None.
Parameters
==========
seq: a list/tuple/set
Listing all the equations that are needed to be solved
gens: generators
generators of the equations in seq for which we want the
solutions
strict: a boolean (default is False)
if strict is True, NotImplementedError will be raised if
the solution is known to be incomplete (which can occur if
not all solutions are expressible in radicals)
args: Keyword arguments
Special options for solving the equations.
Returns
=======
List[Tuple]
a list of tuples with elements being solutions for the
symbols in the order they were passed as gens
None
None is returned when the computed basis contains only the ground.
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))]
>>> solve_poly_system([x**5 - x + y**3, y**2 - 1], x, y, strict=True)
Traceback (most recent call last):
...
UnsolvableFactorError
�solve_poly_systemN� c 3 �"