�
��g�E � � � d dl mZ d dlmZ d dlmZmZ d dlmZ d dl m
Z
d dlmZ d dl
mZ d dlmZmZmZ d d lmZ d d
lmZ d dlmZmZ d dlmZ d d
lmZ d dlmZ d dlm Z m!Z! d dl"m#Z# d� Z$dd�Z%d� Z&d� Z'd� Z(dd�d�Z)dS )� )�Add)�factor_terms)�
expand_log�_mexpand)�Pow)�S)�ordered)�Dummy)�LambertW�exp�log)�root)�roots)�Poly�factor)�separatevars)�collect)�powsimp)�solve�_invert)�uniqc �� �� �fd�| j D � � }t |� � D ]L}d|z }||v rA||v r=|� � � d t j ur|}|� |� � �M|S )a� process the generators of ``poly``, returning the set of generators that
have ``symbol``. If there are two generators that are inverses of each other,
prefer the one that has no denominator.
Examples
========
>>> from sympy.solvers.bivariate import _filtered_gens
>>> from sympy import Poly, exp
>>> from sympy.abc import x
>>> _filtered_gens(Poly(x + 1/x + exp(x)), x)
{x, exp(x)}
c �&