
    wg                       d dl mZ ddlmZmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZmZmZmZ d dlmZmZ d dlmZ d dlmZ d dl m!Z! dZ"ddl#m$Z$ d dl%m&Z& ddl'm(Z( ddl)m*Z* d Z+d Z,d Z- G d dee      Z.e.Z/ G d de.      Z0e0Z1 G d de.      Z2e2Z3 G d de.      Z4 G d  d!e4      Z5 G d" d#e4      Z6 G d$ d%e5      Z7e7Z8 G d& d'e6      Z9e9Z: G d( d)e5      Z;e;Z< G d* d+e6      Z=e=Z>e0e0e0e2e2e2e7e7e9e9e;e;e=e=d,e._?        d- Z@ e&e$e$      d.        ZA e&ee      d/        ZB e&e(e$      d0        ZB e&e(e
      d1        ZB e&e(e*      d2        ZB e&e(e(      d3        ZBd;d5ZCd;d6ZDd;d7ZEd;d8ZFd;d9ZGd;d:ZHy4)<    )annotations   )AtomBasic)ordered)
EvalfMixin)AppliedUndef)
int_valued)S)_sympifySympifyError)global_parameters)
fuzzy_bool	fuzzy_xor	fuzzy_and	fuzzy_not)BooleanBooleanAtom)sift)
filldedent)sympy_deprecation_warning)RelEqNeLtLeGtGe
RelationalEquality
UnequalityStrictLessThanLessThanStrictGreaterThanGreaterThanExpr)dispatch)Tuple)Symbolc                H    t        | t              xr t        | t               S N)
isinstancer   r   )sides    Z/home/mcse/projects/flask/flask-venv/lib/python3.12/site-packages/sympy/core/relational.py_nontrivBoolr0      s#    dG$ &$%%&    c                    | j                  t              D ci c]  }||j                   }}| j                  |      S c c}w r,   )atomsr   	canonicalxreplace)condrrepss      r/   
_canonicalr9   (   s:    $(JJz$:;qAq{{N;D;== <s   ?c                T   | j                   } | j                  r| j                  j                  r| S | j                  j                  d      \  }}|j                  d      \  }}| j                  |z
  |z  }|dk  r| j                  j                  ||      S | j                  ||      S )NT)rationalr   )	r4   is_Relationalrhs
is_Booleanlhsas_coeff_Addas_coeff_Mulreversedfunc)relblmr?   r=   s         r/   _canonical_coeffrH   0   s     --C 2 2
77.DAq^^T^*FAs77Q;/C1u||  c**88Cr1   c                      e Zd ZU dZdZi Zded<   dZddZe	d        Z
e	d	        Ze	d
        Ze	d        Ze	d        Ze	d        Ze	d        Zd Ze	d        ZddZd Zd Zd Zd Zd Ze	d        Zy)r   a  Base class for all relation types.

    Explanation
    ===========

    Subclasses of Relational should generally be instantiated directly, but
    Relational can be instantiated with a valid ``rop`` value to dispatch to
    the appropriate subclass.

    Parameters
    ==========

    rop : str or None
        Indicates what subclass to instantiate.  Valid values can be found
        in the keys of Relational.ValidRelationOperator.

    Examples
    ========

    >>> from sympy import Rel
    >>> from sympy.abc import x, y
    >>> Rel(y, x + x**2, '==')
    Eq(y, x**2 + x)

    A relation's type can be defined upon creation using ``rop``.
    The relation type of an existing expression can be obtained
    using its ``rel_op`` property.
    Here is a table of all the relation types, along with their
    ``rop`` and ``rel_op`` values:

    +---------------------+----------------------------+------------+
    |Relation             |``rop``                     |``rel_op``  |
    +=====================+============================+============+
    |``Equality``         |``==`` or ``eq`` or ``None``|``==``      |
    +---------------------+----------------------------+------------+
    |``Unequality``       |``!=`` or ``ne``            |``!=``      |
    +---------------------+----------------------------+------------+
    |``GreaterThan``      |``>=`` or ``ge``            |``>=``      |
    +---------------------+----------------------------+------------+
    |``LessThan``         |``<=`` or ``le``            |``<=``      |
    +---------------------+----------------------------+------------+
    |``StrictGreaterThan``|``>`` or ``gt``             |``>``       |
    +---------------------+----------------------------+------------+
    |``StrictLessThan``   |``<`` or ``lt``             |``<``       |
    +---------------------+----------------------------+------------+

    For example, setting ``rop`` to ``==`` produces an
    ``Equality`` relation, ``Eq()``.
    So does setting ``rop`` to ``eq``, or leaving ``rop`` unspecified.
    That is, the first three ``Rel()`` below all produce the same result.
    Using a ``rop`` from a different row in the table produces a
    different relation type.
    For example, the fourth ``Rel()`` below using ``lt`` for ``rop``
    produces a ``StrictLessThan`` inequality:

    >>> from sympy import Rel
    >>> from sympy.abc import x, y
    >>> Rel(y, x + x**2, '==')
        Eq(y, x**2 + x)
    >>> Rel(y, x + x**2, 'eq')
        Eq(y, x**2 + x)
    >>> Rel(y, x + x**2)
        Eq(y, x**2 + x)
    >>> Rel(y, x + x**2, 'lt')
        y < x**2 + x

    To obtain the relation type of an existing expression,
    get its ``rel_op`` property.
    For example, ``rel_op`` is ``==`` for the ``Equality`` relation above,
    and ``<`` for the strict less than inequality above:

    >>> from sympy import Rel
    >>> from sympy.abc import x, y
    >>> my_equality = Rel(y, x + x**2, '==')
    >>> my_equality.rel_op
        '=='
    >>> my_inequality = Rel(y, x + x**2, 'lt')
    >>> my_inequality.rel_op
        '<'

     z"dict[str | None, type[Relational]]ValidRelationOperatorTNc                8   | t         urt        j                  | ||fi |S | j                  j	                  |d       } | t        d|z        t        | t        t        f      s/t        t        t        ||f            rt        t        d             | ||fi |S )Nz&Invalid relational operator symbol: %rz
                    A Boolean argument can only be used in
                    Eq and Ne; all other relationals expect
                    real expressions.
                )r   r   __new__rK   get
ValueError
issubclassr   r   anymapr0   	TypeErrorr   )clsr?   r=   ropassumptionss        r/   rM   zRelational.__new__   s    j ==c3>+>> ''++C6;EKLL#Bx(
 3|c3Z01
 , !   3+{++r1   c                     | j                   d   S )z#The left-hand side of the relation.r   _argsselfs    r/   r?   zRelational.lhs        zz!}r1   c                     | j                   d   S )z$The right-hand side of the relation.r   rX   rZ   s    r/   r=   zRelational.rhs   r\   r1   c                   t         t         t        t        t        t        t        t        t        t        t
        t
        i}| j                  \  }}t        j                  |j                  | j                  | j                        ||      S )a1  Return the relationship with sides reversed.

        Examples
        ========

        >>> from sympy import Eq
        >>> from sympy.abc import x
        >>> Eq(x, 1)
        Eq(x, 1)
        >>> _.reversed
        Eq(1, x)
        >>> x < 1
        x < 1
        >>> _.reversed
        1 > x
        )r   r   r   r   r   r   argsr   rM   rN   rC   )r[   opsarE   s       r/   rB   zRelational.reversed   sW    $ 2r2r2r2r2r2>yy1!!#''$))TYY"?AFFr1   c                Z   | j                   \  }}t        |t              st        |t              s{t        t        t        t
        t        t        t
        t        t        t        t        t        i}t        j                  |j                  | j                  | j                        | |       S | S )a=  Return the relationship with signs reversed.

        Examples
        ========

        >>> from sympy import Eq
        >>> from sympy.abc import x
        >>> Eq(x, 1)
        Eq(x, 1)
        >>> _.reversedsign
        Eq(-x, -1)
        >>> x < 1
        x < 1
        >>> _.reversedsign
        -x > -1
        )r_   r-   r   r   r   r   r   r   r   r   rM   rN   rC   )r[   ra   rE   r`   s       r/   reversedsignzRelational.reversedsign   ss    $ yy11k*jK.Hr2r2r2r2r2rBC%%cggdii&CaR!LLKr1   c                    t         t        t        t        t        t
        t
        t        t        t        t        t         i}t        j                  |j                  | j                        g| j                   S )az  Return the negated relationship.

        Examples
        ========

        >>> from sympy import Eq
        >>> from sympy.abc import x
        >>> Eq(x, 1)
        Eq(x, 1)
        >>> _.negated
        Ne(x, 1)
        >>> x < 1
        x < 1
        >>> _.negated
        x >= 1

        Notes
        =====

        This works more or less identical to ``~``/``Not``. The difference is
        that ``negated`` returns the relationship even if ``evaluate=False``.
        Hence, this is useful in code when checking for e.g. negated relations
        to existing ones as it will not be affected by the `evaluate` flag.

        )r   r   r   r   r   r   r   rM   rN   rC   r_   )r[   r`   s     r/   negatedzRelational.negated   sK    6 2r2r2r2r2r2>
 !!#''$))"4AtyyAAr1   c                    | S )zreturn the non-strict version of the inequality or self

        EXAMPLES
        ========

        >>> from sympy.abc import x
        >>> (x < 1).weak
        x <= 1
        >>> _.weak
        x <= 1
        rJ   rZ   s    r/   weakzRelational.weak  	     r1   c                    | S )zreturn the strict version of the inequality or self

        EXAMPLES
        ========

        >>> from sympy.abc import x
        >>> (x <= 1).strict
        x < 1
        >>> _.strict
        x < 1
        rJ   rZ   s    r/   strictzRelational.strict  rh   r1   c                x     | j                   | j                  D cg c]  }|j                  |       c} S c c}w r,   )rC   r_   _evalf)r[   precss      r/   _eval_evalfzRelational._eval_evalf.  s-    tyy499=a188D>=>>=s   7c           	        t        | j                  D cg c]   }t        |t              r|j                  n|" c}      }|| j                  k7  r! | j
                  | }t        |t              s|S | }|j                  j                  rR|j                  j                  r|j                  j                  rl|j                  |j                  kD  rS|j                  }nF|j                  j                  r|j                  }n#t        t        |            |k7  r|j                  }t        |j                  dd      }t        |j                  dd      }t        |j                  t              st        |j                  t              r|S |r |       r|j                  S |j                  j                  sS|rQ |       rJt        |j                  |j                   g      \  }}||j                  k7  r|j                  j                  S |S c c}w )a  Return a canonical form of the relational by putting a
        number on the rhs, canonically removing a sign or else
        ordering the args canonically. No other simplification is
        attempted.

        Examples
        ========

        >>> from sympy.abc import x, y
        >>> x < 2
        x < 2
        >>> _.reversed.canonical
        x < 2
        >>> (-y < x).canonical
        x > -y
        >>> (-y > x).canonical
        x < -y
        >>> (-y < -x).canonical
        x < y

        The canonicalization is recursively applied:

        >>> from sympy import Eq
        >>> Eq(x < y, y > x).canonical
        True
        could_extract_minus_signN)tupler_   r-   r   r4   rC   r=   	is_number	is_Numberr?   rB   r   getattrr   rc   )r[   ir_   r7   LHS_CEMSRHS_CEMSexpr1_s           r/   r4   zRelational.canonical1  ss   8 tyyY!Z:%>akkAEYZ499		4 Aa,A55??uu155??quuquu}JJUU__

A74=!T)

A155"<dC155"<dCaee[)Z{-KH 
>>!X(* v/HE1~zz...E Zs   %Hc                   t        |t              r|| | j                  fv ry| |}}|j                  t        t
        fv s|j                  t        t
        fv r|j                  |j                  k7  ryt        |j                  |j                        D cg c]  \  }}|j                  ||       c}}\  }}|du r|S |du r|S t        |j                  |j                  j                        D cg c]  \  }}|j                  ||       c}}\  }	}
|	du r|
S |
du r|	S |||	|
f}t        d |D              ry|D ]
  }|dvs|c S  y|j                  |j                  k7  r|j                  }|j                  |j                  k7  ry|j                  j                  |j                  |      }|du ry|j                  j                  |j                  |      }|du ry|du r|S |S yc c}}w c c}}w )zReturn True if the sides of the relationship are mathematically
        identical and the type of relationship is the same.
        If failing_expression is True, return the expression whose truth value
        was unknown.TF)failing_expressionc              3  $   K   | ]  }|d u  
 yw)FNrJ   .0rv   s     r/   	<genexpr>z$Relational.equals.<locals>.<genexpr>  s     -aqEz-s   )TFN)r-   r   rB   rC   r   r   zipr_   equalsallr?   r=   )r[   otherr|   ra   rE   rv   jleftrightlrrles               r/   r   zRelational.equalsq  s   
 eZ(t}}--qAvv"b!QVVBx%766QVV#  ,/qvvqvv+>@#'1a  !xx;M  (  O @e 4< LD=K&)!&&!**//&BD"a ((19K(L DB:I:I5"b)-1--  !A- ! 66QVV#

A66QVV# uu||AEE7I $ K5= QUU8J % LE> 4< LS )@Ds   G*1G0c                	   ddl m} ddlm} | } |j                  |j
                  D cg c]  } |j                  di | c} }|j                  r?t        |j                  |      rt        |j                  |      s|S |j                  |j                  z
  }d }|j                  rx|j                  d      }t        d |j                         D              rh|j                         D cg c]  }|j                  d       c}\  }}	|t        j                   |	z  z   }n!|j#                  d      rt        j$                  }|*|j                  j'                  |t        j$                        }|j(                  }t+        t-        d |j.                              }
t1        |
      dk(  r	 ddlm} |
j7                         }|j                  |j                  z
  } |||      \  }}|j8                  d	u r:|j:                  r|j	                  | |z  |      }n7|j	                  || |z        }n |j	                  |t        j$                        }nEt1        |
      dk\  r6	 ddlm} ddl!m"} t+        tQ        |
            }
|j                  |j                  z
  } ||g|
 }|d   }|d=  ||      }|D cg c]  }||z  	 }}t+        t-        d t+        tS        ||
                        }|j8                  d	u rz|dk7  r2 ||D cg c]
  \  }}||z   c}} }|j	                  || |z        }nc|d   d   |d   d   z  }|d=  ||D cg c]
  \  }}||z   c}} }|j	                  ||       }n |j	                  |t        j$                        }|j(                  }|d   } ||      |d    ||       z  k  r|S | S c c}w c c}w # t<        $ r dd
lm } ddl!m"}m#}m$} 	  ||      }|jK                         }|d   }d|d<    ||      }|D cg c]  }||z  	 nc c}w }}|j	                  |jM                  ||      jO                         | |z        }n# |$ r Y nw xY wY w xY wc c}w c c}}w c c}}w # t<        $ r Y w xY w)Nr   Addr&      c              3  :   K   | ]  }|j                   d k(    yw)r   N)_precr~   s     r/   r   z,Relational._eval_simplify.<locals>.<genexpr>  s     >qww!|>s   r   c                    | j                   duS NF)is_real)xs    r/   <lambda>z+Relational._eval_simplify.<locals>.<lambda>  s    %)? r1   linear_coeffsF)PolynomialError)gcdPolypoly)r   c                    | d   dk7  S Nr   rJ   )fs    r/   r   z+Relational._eval_simplify.<locals>.<lambda>  s    !	 r1   measureratiorJ   )*addr   exprr'   rC   r_   simplifyr<   r-   r?   r=   is_comparablenrQ   as_real_imagr   ImaginaryUnitr   Zero_eval_relationr4   listfilterfree_symbolslensympy.solvers.solvesetr   popis_zerois_negativerO   sympy.polys.polyerrorsr   sympy.polys.polytoolsr   r   r   
all_coeffs	from_listas_exprr   r   )r[   kwargsr   r'   r7   rv   difvrvivfreer   r   rG   rE   r   r   r   r   pcconstantscalectmpmtmpnzmr   newexprlhstermr   s                                 r/   _eval_simplifyzRelational._eval_simplify  s   AFF166:aZQZZ)&):;??aeeT**QUUD2I%%!%%-C A  EE!H>Q^^-=>>.1.>.>.@Aacc!fAFBQ__R//AAFF}FF))!QVV4A ?PQD4yA~D
A%%!%%-C(a0DAqyyE)== !"rAvq 1A !q1"q& 1AFF1aff- TaD9.D%%!%%-C%c1D1A uH"FE234$4A4v&94At;MNOC}}-#q=&)c+BdaAE+B&CG !w	E0A BA '*!fQi#a&)&;G #A&)c+BdaAE+B&CG !w 9A FF8QVV4 KK#1:w'$-77HKi ; B2 " FEE	 aLLLN#$R5 !" #A678dTE\888FF4>>!Q#7#?#?#AH9uCTU* 0 5
 ,C ,C
 " s   N>+O(B#O AQ< 3Q+?AQ< Q0
7Q< 
Q6
9Q< Q("/QP<QQ(Q"Q(!Q""Q('Q(+Q< <	RRc                v    ddl m} | j                   || j                  fi | || j                  fi |      S )Nr   )trigsimp)sympy.simplify.trigsimpr   rC   r?   r=   )r[   optsr   s      r/   _eval_trigsimpzRelational._eval_trigsimp  s2    4yy$((3d3Xdhh5O$5OPPr1   c                L    fd| j                   D        } | j                  | S )Nc              3  B   K   | ]  } |j                   di   y wNrJ   )expand)r   argr   s     r/   r   z$Relational.expand.<locals>.<genexpr>   s     :


$V$:s   )r_   rC   )r[   r   r_   s    ` r/   r   zRelational.expand  s"    :		:tyy$r1   c                    t        d      )Nz*cannot determine truth value of Relational)rS   rZ   s    r/   __bool__zRelational.__bool__  s    DEEr1   c                    ddl m} ddlm} | j                  }t        |      dk(  sJ |j                         }	  || |d      }|S # t        $ r  ||| t        j                        }Y |S w xY w)Nr   )solve_univariate_inequality)ConditionSetr   F)
relational)
sympy.solvers.inequalitiesr   sympy.sets.conditionsetr   r   r   r   NotImplementedErrorr   Reals)r[   r   r   symsr   xsets         r/   _eval_as_setzRelational._eval_as_set  sr    J8  4yA~~HHJ	2.tQ5ID
 	 # 	2  41D		2s   A !A,+A,c                    t               S r,   )setrZ   s    r/   binary_symbolszRelational.binary_symbols  s     ur1   r,   )F)__name__
__module____qualname____doc__	__slots__rK   __annotations__r<   rM   propertyr?   r=   rB   rc   re   rg   rj   ro   r4   r   r   r   r   r   r   r   rJ   r1   r/   r   r   >   s   Pb I@B=BM
,8     G G*  0 B BB    ? = =~.`XtQ F  r1   r   c                  h     e Zd ZdZdZdZdZd Zed        Z	ddZ
ed        Z fd	Zd
 Zd Z xZS )r    a  
    An equal relation between two objects.

    Explanation
    ===========

    Represents that two objects are equal.  If they can be easily shown
    to be definitively equal (or unequal), this will reduce to True (or
    False).  Otherwise, the relation is maintained as an unevaluated
    Equality object.  Use the ``simplify`` function on this object for
    more nontrivial evaluation of the equality relation.

    As usual, the keyword argument ``evaluate=False`` can be used to
    prevent any evaluation.

    Examples
    ========

    >>> from sympy import Eq, simplify, exp, cos
    >>> from sympy.abc import x, y
    >>> Eq(y, x + x**2)
    Eq(y, x**2 + x)
    >>> Eq(2, 5)
    False
    >>> Eq(2, 5, evaluate=False)
    Eq(2, 5)
    >>> _.doit()
    False
    >>> Eq(exp(x), exp(x).rewrite(cos))
    Eq(exp(x), sinh(x) + cosh(x))
    >>> simplify(_)
    True

    See Also
    ========

    sympy.logic.boolalg.Equivalent : for representing equality between two
        boolean expressions

    Notes
    =====

    Python treats 1 and True (and 0 and False) as being equal; SymPy
    does not. And integer will always compare as unequal to a Boolean:

    >>> Eq(True, 1), True == 1
    (False, True)

    This class is not the same as the == operator.  The == operator tests
    for exact structural equality between two expressions; this class
    compares expressions mathematically.

    If either object defines an ``_eval_Eq`` method, it can be used in place of
    the default algorithm.  If ``lhs._eval_Eq(rhs)`` or ``rhs._eval_Eq(lhs)``
    returns anything other than None, that return value will be substituted for
    the Equality.  If None is returned by ``_eval_Eq``, an Equality object will
    be created as usual.

    Since this object is already an expression, it does not respond to
    the method ``as_expr`` if one tries to create `x - y` from ``Eq(x, y)``.
    If ``eq = Eq(x, y)`` then write `eq.lhs - eq.rhs` to get ``x - y``.

    .. deprecated:: 1.5

       ``Eq(expr)`` with a single argument is a shorthand for ``Eq(expr, 0)``,
       but this behavior is deprecated and will be removed in a future version
       of SymPy.

    ==rJ   Tc                    |j                  dt        j                        }t        |      }t        |      }|r$t	        ||      }| | ||d      S t        |      S t
        j                  | ||      S NevaluateFr   )r   r   r   r   is_eqr   rM   rT   r?   r=   optionsr   vals         r/   rM   zEquality.__new__j  sl    ;;z+<+E+EFsmsmS/C{3e44}$!!#sC00r1   c                    t        ||k(        S r,   r   rT   r?   r=   s      r/   r   zEquality._eval_relationw      s
##r1   c                    t        dddd       ddlm}m} |dk(  r|S |dk(  r|S |r||z
  S |j	                  |      |j	                  |       z   }| || S |j                  |      S )	ar  
        return Eq(L, R) as L - R. To control the evaluation of
        the result set pass `evaluate=True` to give L - R;
        if `evaluate=None` then terms in L and R will not cancel
        but they will be listed in canonical order; otherwise
        non-canonical args will be returned. If one side is 0, the
        non-zero side will be returned.

        .. deprecated:: 1.13

           The method ``Eq.rewrite(Add)`` is deprecated.
           See :ref:`eq-rewrite-Add` for details.

        Examples
        ========

        >>> from sympy import Eq, Add
        >>> from sympy.abc import b, x
        >>> eq = Eq(x + b, x - b)
        >>> eq.rewrite(Add)  #doctest: +SKIP
        2*b
        >>> eq.rewrite(Add, evaluate=None).args  #doctest: +SKIP
        (b, b, x, -x)
        >>> eq.rewrite(Add, evaluate=False).args  #doctest: +SKIP
        (b, x, b, -x)
        z
        Eq.rewrite(Add) is deprecated.

        For ``eq = Eq(a, b)`` use ``eq.lhs - eq.rhs`` to obtain
        ``a - b``.
        z1.13zeq-rewrite-Add   )deprecated_since_versionactive_deprecations_target
stacklevelr   )_unevaluated_Addr   r   )r   r   r   r   	make_args
_from_args)r[   LRr   r   r   r   r_   s           r/   _eval_rewrite_as_AddzEquality._eval_rewrite_as_Add{  s    6 	" # &,'7		
 	/6H6Hq5L}}Q#--"33#T**~~d##r1   c                   t         j                  | j                  v st         j                  | j                  v rF| j                  j
                  r| j                  hS | j                  j
                  r| j                  hS t               S r,   r   truer_   falser?   	is_Symbolr=   r   rZ   s    r/   r   zEquality.binary_symbols  Z    66TYY!''TYY"6xx!!z!##z!ur1   c                   t        |   d
i |}t        |t              s|S ddlm} t        |j                  |      rt        |j                  |      s|S | j                  }t        |      dk(  r	 ddl
m} ddlm} |j                         } | ||j                  |j                   d      |      \  }}	|j                  du r|j!                  ||	 |z        }
n|j!                  ||z  |	       }
|d   } ||
      |d	    ||      z  k  r|
}|j$                  S |j$                  S # t"        $ r Y |j$                  S w xY w)Nr   r&   r   r   r   Fr   r   r   rJ   )superr   r-   r    r   r'   r?   r=   r   r   r   r   r   r   r   r   rC   rO   r4   )r[   r   r   r'   r   r   r   r   rG   rE   enewr   	__class__s               r/   r   zEquality._eval_simplify  s,   G",V,!X&H!%%&j.EH  t9>$@HHJ$v6;199%66!aR!V,D66!a%!,D +4=F7Ogaj$@@A {{q{{  {{s   2BD) )	E ?E c                &    ddl m}  || g|i |S )z-See the integrate function in sympy.integralsr   )	integrate)sympy.integrals.integralsr  )r[   r_   r   r  s       r/   r  zEquality.integrate  s    7////r1   c                T     | j                   | j                  z
  j                  |i |S )zReturns lhs-rhs as a Poly

        Examples
        ========

        >>> from sympy import Eq
        >>> from sympy.abc import x
        >>> Eq(x**2, 1).as_poly(x)
        Poly(x**2 - 1, x, domain='ZZ')
        )r?   r=   as_poly)r[   gensr   s      r/   r  zEquality.as_poly  s)     -488#,,d=f==r1   )T)r   r   r   r   rel_opr   is_EqualityrM   classmethodr   r  r   r   r   r  r  __classcell__)r  s   @r/   r    r      s]    DJ FIK1 $ $2$h  60
>r1   r    c                  D    e Zd ZdZdZdZd Zed        Ze	d        Z
d Zy)	r!   aT  An unequal relation between two objects.

    Explanation
    ===========

    Represents that two objects are not equal.  If they can be shown to be
    definitively equal, this will reduce to False; if definitively unequal,
    this will reduce to True.  Otherwise, the relation is maintained as an
    Unequality object.

    Examples
    ========

    >>> from sympy import Ne
    >>> from sympy.abc import x, y
    >>> Ne(y, x+x**2)
    Ne(y, x**2 + x)

    See Also
    ========
    Equality

    Notes
    =====
    This class is not the same as the != operator.  The != operator tests
    for exact structural equality between two expressions; this class
    compares expressions mathematically.

    This class is effectively the inverse of Equality.  As such, it uses the
    same algorithms, including any available `_eval_Eq` methods.

    !=rJ   c                    t        |      }t        |      }|j                  dt        j                        }|r$t	        ||      }| | ||d      S t        |      S t        j                  | ||fi |S r   )r   r   r   r   is_neqr   rM   r   s         r/   rM   zUnequality.__new__  sr    smsm;;z+<+E+EFc"C{3e44}$!!#sC;7;;r1   c                    t        ||k7        S r,   r   r   s      r/   r   zUnequality._eval_relation  r   r1   c                   t         j                  | j                  v st         j                  | j                  v rF| j                  j
                  r| j                  hS | j                  j
                  r| j                  hS t               S r,   r  rZ   s    r/   r   zUnequality.binary_symbols  r  r1   c                     t        | j                   j                  di |}t        |t               r | j                  |j                   S |j
                  S r   )r    r_   r   r-   rC   re   )r[   r   eqs      r/   r   zUnequality._eval_simplify(  sI    0Xtyy!00:6:b(#499bgg&&zzr1   N)r   r   r   r   r  r   rM   r  r   r   r   r   rJ   r1   r/   r!   r!     sF    @ FI< $ $  r1   r!   c                  *    e Zd ZdZdZd Zed        Zy)_InequalityzInternal base class for all *Than types.

    Each subclass must implement _eval_relation to provide the method for
    comparing two real numbers.

    rJ   c                z   	 t        |      }t        |      }|j                  dt        j
                        }|rV||fD ];  }|j                  du rt        d|z        |t        j                  u s2t        d        | j                  ||fi |S t        j                  | ||fi |S # t        $ r	 t        cY S w xY w)Nr   Fz!Invalid comparison of non-real %szInvalid NaN comparison)r   r   NotImplementedr   r   r   is_extended_realrS   r   NaNr   r   rM   )rT   r?   r=   r   r   mes         r/   rM   z_Inequality.__new__=  s    	"3-C3-C ;;z+<+E+EFCj >&&%/#$G"$LMM;#$<==	> &3%%c3:':: !!#sC;7;;+  	"!!	"s   B( (B:9B:c                V    | j                  ||      }| | ||d      S t        |      S )NFr   )_eval_fuzzy_relationr   )rT   r?   r=   r   r   s        r/   r   z_Inequality._eval_relationY  s2    &&sC0;sC%00C= r1   N)r   r   r   r   r   rM   r  r   rJ   r1   r/   r  r  4  s'     I<8 ! !r1   r  c                  4    e Zd ZdZdZed        Zed        Zy)_GreaterzNot intended for general use

    _Greater is only used so that GreaterThan and StrictGreaterThan may
    subclass it for the .gts and .lts properties.

    rJ   c                     | j                   d   S r   rX   rZ   s    r/   gtsz_Greater.gtsk      zz!}r1   c                     | j                   d   S Nr   rX   rZ   s    r/   ltsz_Greater.ltso  r+  r1   Nr   r   r   r   r   r   r*  r.  rJ   r1   r/   r(  r(  b  4     I   r1   r(  c                  4    e Zd ZdZdZed        Zed        Zy)_LesszNot intended for general use.

    _Less is only used so that LessThan and StrictLessThan may subclass it for
    the .gts and .lts properties.

    rJ   c                     | j                   d   S r-  rX   rZ   s    r/   r*  z	_Less.gts}  r+  r1   c                     | j                   d   S r   rX   rZ   s    r/   r.  z	_Less.lts  r+  r1   Nr/  rJ   r1   r/   r2  r2  t  r0  r1   r2  c                  8    e Zd ZdZdZdZed        Zed        Z	y)r%   a  Class representations of inequalities.

    Explanation
    ===========

    The ``*Than`` classes represent inequal relationships, where the left-hand
    side is generally bigger or smaller than the right-hand side.  For example,
    the GreaterThan class represents an inequal relationship where the
    left-hand side is at least as big as the right side, if not bigger.  In
    mathematical notation:

    lhs $\ge$ rhs

    In total, there are four ``*Than`` classes, to represent the four
    inequalities:

    +-----------------+--------+
    |Class Name       | Symbol |
    +=================+========+
    |GreaterThan      | ``>=`` |
    +-----------------+--------+
    |LessThan         | ``<=`` |
    +-----------------+--------+
    |StrictGreaterThan| ``>``  |
    +-----------------+--------+
    |StrictLessThan   | ``<``  |
    +-----------------+--------+

    All classes take two arguments, lhs and rhs.

    +----------------------------+-----------------+
    |Signature Example           | Math Equivalent |
    +============================+=================+
    |GreaterThan(lhs, rhs)       |   lhs $\ge$ rhs |
    +----------------------------+-----------------+
    |LessThan(lhs, rhs)          |   lhs $\le$ rhs |
    +----------------------------+-----------------+
    |StrictGreaterThan(lhs, rhs) |   lhs $>$ rhs   |
    +----------------------------+-----------------+
    |StrictLessThan(lhs, rhs)    |   lhs $<$ rhs   |
    +----------------------------+-----------------+

    In addition to the normal .lhs and .rhs of Relations, ``*Than`` inequality
    objects also have the .lts and .gts properties, which represent the "less
    than side" and "greater than side" of the operator.  Use of .lts and .gts
    in an algorithm rather than .lhs and .rhs as an assumption of inequality
    direction will make more explicit the intent of a certain section of code,
    and will make it similarly more robust to client code changes:

    >>> from sympy import GreaterThan, StrictGreaterThan
    >>> from sympy import LessThan, StrictLessThan
    >>> from sympy import And, Ge, Gt, Le, Lt, Rel, S
    >>> from sympy.abc import x, y, z
    >>> from sympy.core.relational import Relational

    >>> e = GreaterThan(x, 1)
    >>> e
    x >= 1
    >>> '%s >= %s is the same as %s <= %s' % (e.gts, e.lts, e.lts, e.gts)
    'x >= 1 is the same as 1 <= x'

    Examples
    ========

    One generally does not instantiate these classes directly, but uses various
    convenience methods:

    >>> for f in [Ge, Gt, Le, Lt]:  # convenience wrappers
    ...     print(f(x, 2))
    x >= 2
    x > 2
    x <= 2
    x < 2

    Another option is to use the Python inequality operators (``>=``, ``>``,
    ``<=``, ``<``) directly.  Their main advantage over the ``Ge``, ``Gt``,
    ``Le``, and ``Lt`` counterparts, is that one can write a more
    "mathematical looking" statement rather than littering the math with
    oddball function calls.  However there are certain (minor) caveats of
    which to be aware (search for 'gotcha', below).

    >>> x >= 2
    x >= 2
    >>> _ == Ge(x, 2)
    True

    However, it is also perfectly valid to instantiate a ``*Than`` class less
    succinctly and less conveniently:

    >>> Rel(x, 1, ">")
    x > 1
    >>> Relational(x, 1, ">")
    x > 1

    >>> StrictGreaterThan(x, 1)
    x > 1
    >>> GreaterThan(x, 1)
    x >= 1
    >>> LessThan(x, 1)
    x <= 1
    >>> StrictLessThan(x, 1)
    x < 1

    Notes
    =====

    There are a couple of "gotchas" to be aware of when using Python's
    operators.

    The first is that what your write is not always what you get:

        >>> 1 < x
        x > 1

        Due to the order that Python parses a statement, it may
        not immediately find two objects comparable.  When ``1 < x``
        is evaluated, Python recognizes that the number 1 is a native
        number and that x is *not*.  Because a native Python number does
        not know how to compare itself with a SymPy object
        Python will try the reflective operation, ``x > 1`` and that is the
        form that gets evaluated, hence returned.

        If the order of the statement is important (for visual output to
        the console, perhaps), one can work around this annoyance in a
        couple ways:

        (1) "sympify" the literal before comparison

        >>> S(1) < x
        1 < x

        (2) use one of the wrappers or less succinct methods described
        above

        >>> Lt(1, x)
        1 < x
        >>> Relational(1, x, "<")
        1 < x

    The second gotcha involves writing equality tests between relationals
    when one or both sides of the test involve a literal relational:

        >>> e = x < 1; e
        x < 1
        >>> e == e  # neither side is a literal
        True
        >>> e == x < 1  # expecting True, too
        False
        >>> e != x < 1  # expecting False
        x < 1
        >>> x < 1 != x < 1  # expecting False or the same thing as before
        Traceback (most recent call last):
        ...
        TypeError: cannot determine truth value of Relational

        The solution for this case is to wrap literal relationals in
        parentheses:

        >>> e == (x < 1)
        True
        >>> e != (x < 1)
        False
        >>> (x < 1) != (x < 1)
        False

    The third gotcha involves chained inequalities not involving
    ``==`` or ``!=``. Occasionally, one may be tempted to write:

        >>> e = x < y < z
        Traceback (most recent call last):
        ...
        TypeError: symbolic boolean expression has no truth value.

        Due to an implementation detail or decision of Python [1]_,
        there is no way for SymPy to create a chained inequality with
        that syntax so one must use And:

        >>> e = And(x < y, y < z)
        >>> type( e )
        And
        >>> e
        (x < y) & (y < z)

        Although this can also be done with the '&' operator, it cannot
        be done with the 'and' operarator:

        >>> (x < y) & (y < z)
        (x < y) & (y < z)
        >>> (x < y) and (y < z)
        Traceback (most recent call last):
        ...
        TypeError: cannot determine truth value of Relational

    .. [1] This implementation detail is that Python provides no reliable
       method to determine that a chained inequality is being built.
       Chained comparison operators are evaluated pairwise, using "and"
       logic (see
       https://docs.python.org/3/reference/expressions.html#not-in). This
       is done in an efficient way, so that each object being compared
       is only evaluated once and the comparison can short-circuit. For
       example, ``1 > 2 > 3`` is evaluated by Python as ``(1 > 2) and (2
       > 3)``. The ``and`` operator coerces each side into a bool,
       returning the object itself when it short-circuits. The bool of
       the --Than operators will raise TypeError on purpose, because
       SymPy cannot determine the mathematical ordering of symbolic
       expressions. Thus, if we were to compute ``x > y > z``, with
       ``x``, ``y``, and ``z`` being Symbols, Python converts the
       statement (roughly) into these steps:

        (1) x > y > z
        (2) (x > y) and (y > z)
        (3) (GreaterThanObject) and (y > z)
        (4) (GreaterThanObject.__bool__()) and (y > z)
        (5) TypeError

       Because of the ``and`` added at step 2, the statement gets turned into a
       weak ternary statement, and the first object's ``__bool__`` method will
       raise TypeError.  Thus, creating a chained inequality is not possible.

           In Python, there is no way to override the ``and`` operator, or to
           control how it short circuits, so it is impossible to make something
           like ``x > y > z`` work.  There was a PEP to change this,
           :pep:`335`, but it was officially closed in March, 2012.

    rJ   >=c                    t        ||      S r,   is_ger   s      r/   r&  z GreaterThan._eval_fuzzy_relationl      S#r1   c                &    t        | j                   S r,   )r   r_   rZ   s    r/   rj   zGreaterThan.strictp      499~r1   N)
r   r   r   r   r   r  r  r&  r   rj   rJ   r1   r/   r%   r%     s;    `B IF   r1   r%   c                  L    e Zd Zej                  ZdZdZed        Ze	d        Z
y)r#   rJ   <=c                    t        ||      S r,   )is_ler   s      r/   r&  zLessThan._eval_fuzzy_relation}  r:  r1   c                &    t        | j                   S r,   )r   r_   rZ   s    r/   rj   zLessThan.strict  r<  r1   N)r   r   r   r%   r   r   r  r  r&  r   rj   rJ   r1   r/   r#   r#   w  s=    !!GIF   r1   r#   c                  L    e Zd Zej                  ZdZdZed        Ze	d        Z
y)r$   rJ   >c                    t        ||      S r,   )is_gtr   s      r/   r&  z&StrictGreaterThan._eval_fuzzy_relation  r:  r1   c                &    t        | j                   S r,   )r   r_   rZ   s    r/   rg   zStrictGreaterThan.weak  r<  r1   Nr   r   r   r%   r   r   r  r  r&  r   rg   rJ   r1   r/   r$   r$     =    !!GIF   r1   r$   c                  L    e Zd Zej                  ZdZdZed        Ze	d        Z
y)r"   rJ   <c                    t        ||      S r,   )is_ltr   s      r/   r&  z#StrictLessThan._eval_fuzzy_relation  r:  r1   c                &    t        | j                   S r,   )r   r_   rZ   s    r/   rg   zStrictLessThan.weak  r<  r1   NrG  rJ   r1   r/   r"   r"     rH  r1   r"   )Nr   r  r  z<>ner6  ger>  lerC  gtrJ  ltc                |    | j                   r0|j                   r#| |z
  j                  d      }|j                   r|S yyy)zReturn (a - b).evalf(2) if a and b are comparable, else None.
    This should only be used when a and b are already sympified.
    r   N)r   evalf)ra   rE   r   s      r/   _n2rU    s=     	1??1ummAJ  +r1   c                     y r,   rJ   r?   r=   s     r/   _eval_is_gerX        r1   c                     y r,   rJ   rW  s     r/   _eval_is_eqr[    rY  r1   c                     yr   rJ   rW  s     r/   r[  r[    s    r1   c                     y r,   rJ   rW  s     r/   r[  r[    rY  r1   c                     y r,   rJ   rW  s     r/   r[  r[    rY  r1   c                j    t        |       t        |      k7  ryt        d t        | |      D              S )NFc              3  L   K   | ]  \  }}t        t        ||              y wr,   )r   r   )r   rn   os      r/   r   z_eval_is_eq.<locals>.<genexpr>  s     GAZa,Gs   "$)r   r   r   rW  s     r/   r[  r[    s,    
3x3s8GS#GGGr1   Nc                .    t        t        | ||            S )zgFuzzy bool for lhs is strictly less than rhs.

    See the docstring for :func:`~.is_ge` for more.
    )r   r9  r?   r=   rV   s      r/   rL  rL        
 U3[122r1   c                .    t        t        | ||            S )zjFuzzy bool for lhs is strictly greater than rhs.

    See the docstring for :func:`~.is_ge` for more.
    )r   r@  rc  s      r/   rE  rE    rd  r1   c                    t        || |      S )zjFuzzy bool for lhs is less than or equal to rhs.

    See the docstring for :func:`~.is_ge` for more.
    r8  rc  s      r/   r@  r@    s    
 c;''r1   c                   ddl m}m} t        | t              rt        |t              st        d      t        | |      }||S t        | |      }|2|t        j                  t        j                  fv rt        |      }|dk\  S  || |      } |||      }|j                  rd|j                  rW|j                  r|j                  s|j                  r|j                  ry| |z
  }	|	t        j                   ur ||	|      }
|
|
S yyyy)a
  
    Fuzzy bool for *lhs* is greater than or equal to *rhs*.

    Parameters
    ==========

    lhs : Expr
        The left-hand side of the expression, must be sympified,
        and an instance of expression. Throws an exception if
        lhs is not an instance of expression.

    rhs : Expr
        The right-hand side of the expression, must be sympified
        and an instance of expression. Throws an exception if
        lhs is not an instance of expression.

    assumptions: Boolean, optional
        Assumptions taken to evaluate the inequality.

    Returns
    =======

    ``True`` if *lhs* is greater than or equal to *rhs*, ``False`` if *lhs*
    is less than *rhs*, and ``None`` if the comparison between *lhs* and
    *rhs* is indeterminate.

    Explanation
    ===========

    This function is intended to give a relatively fast determination and
    deliberately does not attempt slow calculations that might help in
    obtaining a determination of True or False in more difficult cases.

    The four comparison functions ``is_le``, ``is_lt``, ``is_ge``, and ``is_gt`` are
    each implemented in terms of ``is_ge`` in the following way:

    is_ge(x, y) := is_ge(x, y)
    is_le(x, y) := is_ge(y, x)
    is_lt(x, y) := fuzzy_not(is_ge(x, y))
    is_gt(x, y) := fuzzy_not(is_ge(y, x))

    Therefore, supporting new type with this function will ensure behavior for
    other three functions as well.

    To maintain these equivalences in fuzzy logic it is important that in cases where
    either x or y is non-real all comparisons will give None.

    Examples
    ========

    >>> from sympy import S, Q
    >>> from sympy.core.relational import is_ge, is_le, is_gt, is_lt
    >>> from sympy.abc import x
    >>> is_ge(S(2), S(0))
    True
    >>> is_ge(S(0), S(2))
    False
    >>> is_le(S(0), S(2))
    True
    >>> is_gt(S(0), S(2))
    False
    >>> is_lt(S(2), S(0))
    False

    Assumptions can be passed to evaluate the quality which is otherwise
    indeterminate.

    >>> print(is_ge(x, S(0)))
    None
    >>> is_ge(x, S(0), assumptions=Q.positive(x))
    True

    New types can be supported by dispatching to ``_eval_is_ge``.

    >>> from sympy import Expr, sympify
    >>> from sympy.multipledispatch import dispatch
    >>> class MyExpr(Expr):
    ...     def __new__(cls, arg):
    ...         return super().__new__(cls, sympify(arg))
    ...     @property
    ...     def value(self):
    ...         return self.args[0]
    >>> @dispatch(MyExpr, MyExpr)
    ... def _eval_is_ge(a, b):
    ...     return is_ge(a.value, b.value)
    >>> a = MyExpr(1)
    >>> b = MyExpr(2)
    >>> is_ge(b, a)
    True
    >>> is_le(a, b)
    True
    r   )AssumptionsWrapperis_extended_nonnegativez'Can only compare inequalities with ExprNT)sympy.assumptions.wrapperrh  ri  r-   r'   rS   rX  rU  r   InfinityNegativeInfinityfloatr"  is_infiniteis_extended_positiveis_extended_negativer#  )r?   r=   rV   rh  ri  retvaln2_lhs_rhsdiffr   s              r/   r9  r9    s   z VsD!jd&;ABBc"Fc]> ajj!"4"4552Y7N!#{3!#{3  T%:%:  T%>%>DDTDTY]YrYr9D155 ,T;?>I " !	 &; r1   c                .    t        t        | ||            S )z`Fuzzy bool for lhs does not equal rhs.

    See the docstring for :func:`~.is_eq` for more.
    )r   r   rc  s      r/   r  r    rd  r1   c                z  "#$% | |f|| ffD ]#  \  }}t        |dd      }| ||      }|!|c S  t        | |      }||S t        t        |       t        |            t        t        |      t        |             k7  rt        ||       }||S | |k(  ryt	        d || fD              ry| j
                  s.|j
                  s"t        | t              t        |t              k7  ryddlm	}m
%m$ dd	lm"  ||       } ||      }	|j                  s|	j                  rft        |j                  |	j                  g      ryt        |j                  |	j                  g      ryt        |j                  |	j                  g      r*t        |j                   t#        |	j                         g      S t$        j&                  #"#$fd
}
 |
|       }|d   s` |
|      }|d   sSt)         "|d     "|d          }t)        # "|d    z  # "|d    z        }t        t+        t,        ||g            S ddlm}  ||       } ||      }|t$        j2                  k(  r|t$        j2                  k(  st-        t)        ||            S t	        d | |fD              r| |z
  } ||      }|j4                  }||du r|j6                  ry|ry|j9                         \  }}|j:                  r)t=        |      r|j>                  du ry|j@                  du rytC        | |      }|tE        |dk(        S |jG                         \  }}d} ||      } ||      }|j4                  r|jH                  }n|jJ                  r|j                  rd}n|j4                  du r|j                  }|ddl&m'}  ||t$        jP                        \  }}| |fD  cg c]  } | jS                  ||       }!} |!| |gk7  rCt-        t)        g |!       }|du r)d}n&tU        %fd"jW                  |      D              rd}||S yyc c} w )a  
    Fuzzy bool representing mathematical equality between *lhs* and *rhs*.

    Parameters
    ==========

    lhs : Expr
        The left-hand side of the expression, must be sympified.

    rhs : Expr
        The right-hand side of the expression, must be sympified.

    assumptions: Boolean, optional
        Assumptions taken to evaluate the equality.

    Returns
    =======

    ``True`` if *lhs* is equal to *rhs*, ``False`` is *lhs* is not equal to *rhs*,
    and ``None`` if the comparison between *lhs* and *rhs* is indeterminate.

    Explanation
    ===========

    This function is intended to give a relatively fast determination and
    deliberately does not attempt slow calculations that might help in
    obtaining a determination of True or False in more difficult cases.

    :func:`~.is_neq` calls this function to return its value, so supporting
    new type with this function will ensure correct behavior for ``is_neq``
    as well.

    Examples
    ========

    >>> from sympy import Q, S
    >>> from sympy.core.relational import is_eq, is_neq
    >>> from sympy.abc import x
    >>> is_eq(S(0), S(0))
    True
    >>> is_neq(S(0), S(0))
    False
    >>> is_eq(S(0), S(2))
    False
    >>> is_neq(S(0), S(2))
    True

    Assumptions can be passed to evaluate the equality which is otherwise
    indeterminate.

    >>> print(is_eq(x, S(0)))
    None
    >>> is_eq(x, S(0), assumptions=Q.zero(x))
    True

    New types can be supported by dispatching to ``_eval_is_eq``.

    >>> from sympy import Basic, sympify
    >>> from sympy.multipledispatch import dispatch
    >>> class MyBasic(Basic):
    ...     def __new__(cls, arg):
    ...         return Basic.__new__(cls, sympify(arg))
    ...     @property
    ...     def value(self):
    ...         return self.args[0]
    ...
    >>> @dispatch(MyBasic, MyBasic)
    ... def _eval_is_eq(a, b):
    ...     return is_eq(a.value, b.value)
    ...
    >>> a = MyBasic(1)
    >>> b = MyBasic(1)
    >>> is_eq(a, b)
    True
    >>> is_neq(a, b)
    False

    _eval_EqNTc              3  <   K   | ]  }t        |t                y wr,   )r-   r   r~   s     r/   r   zis_eq.<locals>.<genexpr>  s     <AZ;'<   Fr   )rh  rn  r"  r   r   c                H    fd}t        j                  |       |      S )Nc                :     |       rdS  | z        rdS d S )NrealimagrJ   )tIrV   r"  s    r/   r   z0is_eq.<locals>.split_real_imag.<locals>.<lambda>  s1    *1k: *1Q3< BF r1   )r   r   )r   	real_imagr   r  rV   r"  s     r/   split_real_imagzis_eq.<locals>.split_real_imag  s#    HI d+Y77r1   r}  r~  )r   c              3  <   K   | ]  }t        |t                y wr,   )r-   r'   r~   s     r/   r   zis_eq.<locals>.<genexpr>  s     
31:a
3rz  )clear_coefficientsc              3  0   K   | ]  } |        y wr,   rJ   )r   ra   rV   rn  s     r/   r   zis_eq.<locals>.<genexpr>K  s     GQ,Gs   ),ru   r[  r(   typer   r  r-   r   rj  rh  rn  r"  r   r   r   r   ro  r   r   r   r   rR   r   $sympy.functions.elementary.complexesr   r#  r   is_commutativer@   is_Floatr
   
is_integeris_rationalrU  r   as_numer_denom
is_nonzero	is_finitesympy.simplify.simplifyr  rk  subsrQ   r   )&r?   r=   rV   side1side2	eval_funcrq  rh  rs  rt  r  lhs_rirhs_rieq_realeq_imagr   arglhsargrhsr   _difzr   r  rr  r   dr   _n_dr  rF   r7   rz   r_   r   r  r"  rn  s&     `                               @@@@r/   r   r     s&   d c
S#J. uE:t4	 u%F! c"FS	49%$s)T#Y)GGS#&M cz	<#s<	<mms}}3 3 	!' 'c;/Dc;/D4++d&&(8(89:d++T-B-BCDd++T-B-BCDd774C\C\9]^__ OO	8 !%d|$S)F$<VF^ 4c6&>6JKXC$8 8!c6&>>R:RT_` Z'71C!DEE<SS!%%FaeeOeFFK@AA

3c

33Ci!#{3LL=Ezd11 !1::!}<<5( %'c]>B!G$$ !!#1;/;/::B\\~~u$^^: K-a<DAq36*=QAFF1aL=D=Sz)'(At(A[(AB:!%BGcmmA6FGGB>I e 4T >s   P8r,   )I
__future__r   basicr   r   sortingr   rT  r   functionr	   numbersr
   	singletonr   sympifyr   r   
parametersr   logicr   r   r   r   sympy.logic.boolalgr   r   sympy.utilities.iterablesr   sympy.utilities.miscr   sympy.utilities.exceptionsr   __all__r   r'   sympy.multipledispatchr(   
containersr)   symbolr*   r0   r9   rH   r   r   r    r   r!   r   r  r(  r2  r%   r   r#   r   r$   r   r"   r   rK   rU  rX  r[  rL  rE  r@  r9  r  r   rJ   r1   r/   <module>r     s   "    "   + ) > > 4 * + @  +  &Z* Zz E>z E>P E EP +!* +!\{ $K $l( l\ u    U   








	
	
$
  $	 
$  
%  
%  
%  
%  
%H H33(xv3Hr1   