Ë
    7^(h8«  ã                  ó>  — U d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZmZ ddlmZ ddlZddlZddlmZ ddlZddl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$ ddl%m&Z&m'Z' dZ(e)e*e+f   Z,e-e+ef   Z.ee/e,   e.e.ge/e,   f   Z0d8d„Z1d9d:d„Z2d;d„Z3 G d„ de/e,   «      Z4 G d„ d«      Z5d<d„Z6d=d„Z7d>d„Z8d?d„Z9d?d„Z:d@d„Z;dAd„Z< e<e1«      Z=	 	 	 	 dBd„Z>	 	 	 	 dBd„Z?	 	 	 	 dCd „Z@d@d!„ZAd@d"„ZBd@d#„ZCd@d$„ZDd@d%„ZEd@d&„ZFd@d'„ZGd@d(„ZH	 	 	 	 dBd)„ZIeBeAeEeFeCfZJd*eKd+<   	 	 	 	 dDd,„ZLdEd-„ZMdeJdd.f	 	 	 dFd/„ZNdGd0„ZO G d1„ d2ej                   «      ZQeBeAeEeFeCe@eDe?e>eIe;eGd3œZRd4j§                  d5„ eRj©                  «       D «       «      ZU G d6„ d7«      ZV eV«       ZWy)HzGTransform a string with Python-like source code into SymPy expression. é    )Úannotations)
Úgenerate_tokensÚ
untokenizeÚ
TokenErrorÚNUMBERÚSTRINGÚNAMEÚOPÚ	ENDMARKERÚ
ERRORTOKENÚNEWLINE)Ú	iskeywordN)ÚStringIO)ÚAnyÚCallable)Úreduce)ÚAssumptionKeys)ÚBasic)ÚSymbol)ÚFunction©Ú	func_name)ÚMaxÚMinÚ c                óz   — d| v ry	 t        j                  d| z   «       S # t        $ r t        | «      dkD  cY S w xY w)a  
    Predicate for whether a token name can be split into multiple tokens.

    A token is splittable if it does not contain an underscore character and
    it is not the name of a Greek letter. This is used to implicitly convert
    expressions like 'xyz' into 'x*y*z'.
    Ú_FzGREEK SMALL LETTER é   )ÚunicodedataÚlookupÚKeyErrorÚlen)Ú
token_names    úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/parsing/sympy_parser.pyÚ_token_splittabler%      sL   € ð ˆjÑØð#Ü×%Ñ%Ð&;¸jÑ&HÓIÐIÐIøÜò #Ü�:‹ Ñ"Ò"ð#ús   ‡   :¹:c                ó’   — |j                  | d   «      }|s|j                  | d   «      }t        |«      xr t        |t        «       S )z¬
    Predicate for whether a token name represents a callable function.

    Essentially wraps ``callable``, but looks up the token name in the
    locals and globals.
    r   )ÚgetÚcallableÚ
isinstancer   )ÚtokenÚ
local_dictÚglobal_dictÚ	nextTokenÚfuncs        r$   Ú_token_callabler/   -   sD   € ð �>‰>˜% ™(Ó#€DÙØ�‰˜u Q™xÓ(ˆÜ�D‹>Ò:¤*¨T´6Ó":Ð:Ð:ó    c                ó’  — |g k(  s|d   d   dk(  r
t        «       ‚t        | ft        dfg}t        dfg}d}t        |«      }t	        |d d d…   «      D ]r  \  }}|\  }}	||z
  dz
  }
|	dk(  r|dz  }n
|	dk(  r|dz  }|dk(  sŒ.|
dz
  dk\  r+||
dz
     d   t        k(  r|d |
dz
   |z   ||
dz
  d  z   |z   c S |d |
 |z   ||
d  z   |z   c S  |S )Néÿÿÿÿr   ú(ú)r   )r   r	   r
   r"   Ú	enumerate)ÚnameÚresultÚ	beginningÚendÚdiffÚlengthÚindexr*   ÚtoknumÚtokvalÚis              r$   Ú_add_factorial_tokensr@   :   s  € Ø�‚|�v˜b‘z !‘}¨Ò+Ü‹lÐä˜�¤ C˜yÐ)€IÜ�ˆ9ˆ+€Cà€DÜ�‹[€Fä! &©¨2¨¡,Ó/ò A‰ˆˆuØ‰ˆ�Ø�U‰N˜QÑˆà�SŠ=Ø�A‰I‰DØ�sŠ]Ø�A‰IˆDà�1‹9Ø�1‰u˜Šz˜f Q¨¡U™m¨AÑ.´$Ò6Ø˜f˜q 1™u�~¨	Ñ1°F¸1¸q¹5¸6°NÑBÀSÑHÒHà˜b˜q�z IÑ-°°q°r°
Ñ:¸SÑ@Ò@ðAð €Mr0   c                  ó   — e Zd ZdZy)ÚParenthesisGroupz9List of tokens representing an expression in parentheses.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r0   r$   rB   rB   V   s   „ ÙCØr0   rB   c                  ó.   — e Zd ZdZddd„Zd	d„Zd„ Zd„ Zy)
ÚAppliedFunctionz†
    A group of tokens representing a function and its arguments.

    `exponent` is for handling the shorthand sin^2, ln^2, etc.
    Nc                óH   — |€g }|| _         || _        || _        g d¢| _        y )N©ÚfunctionÚargsÚexponent)rL   rM   rN   Úitems)ÚselfrL   rM   rN   s       r$   Ú__init__zAppliedFunction.__init__a   s)   € ØÐØˆHØ ˆŒØˆŒ	Ø ˆŒÚ5ˆ�
r0   c                ó4   — | j                   g| j                  ¢S )z1Return a list of tokens representing the function)rL   rM   ©rP   s    r$   ÚexpandzAppliedFunction.expandi   s   € à—‘Ð* §	¡	Ð*Ð*r0   c                ó4   — t        | | j                  |   «      S ©N)ÚgetattrrO   )rP   r<   s     r$   Ú__getitem__zAppliedFunction.__getitem__m   s   € Ü�t˜TŸZ™Z¨Ñ.Ó/Ð/r0   c                óV   — d| j                   ›d| j                  ›d| j                  ›d�S )NzAppliedFunction(z, r4   rK   rS   s    r$   Ú__repr__zAppliedFunction.__repr__p   s    � Ø04·³¸t¿y»yØ04·³ð?ð 	?r0   rV   )rL   ÚTOKENrM   rB   )Úreturnúlist[TOKEN])rC   rD   rE   rF   rQ   rT   rX   rZ   rG   r0   r$   rI   rI   [   s   „ ñô
6ó+ò0ó?r0   rI   c                óš   — g }| D ]C  }t        |t        «      r |j                  |j                  «       «       Œ3|j	                  |«       ŒE |S rV   )r)   rI   ÚextendrT   Úappend)r7   Úresult2Útoks      r$   Ú_flattenrc   u   sE   € Ø€GØò  ˆÜ�cœ?Ô+Ø�N‰N˜3Ÿ:™:›<Õ(à�N‰N˜3Õð	 ð
 €Nr0   c                ó   ‡ — dˆ fd„}|S )Nc                ó  •— g }g }d}| D ]ì  }|d   t         k(  r¶|d   dk(  r |j                  t        g «      «       |dz  }nŽ|d   dk(  r†|d   j                  |«       |j                  «       }t	        |«      dkD  r|d   j                  |«       n9|dd } ‰
|||«      }|d   g|z   |d   gz   }	|j                  t        |	«      «       |dz  }ŒÅ|r|d   j                  |«       ŒÜ|j                  |«       Œî |rt        d«      ‚|S )zsGroup tokens between parentheses with ParenthesisGroup.

        Also processes those tokens recursively.

        r   r   r3   r4   r2   zMismatched parentheses)r
   r`   rB   Úpopr"   r_   r   )Útokensr+   r,   r7   ÚstacksÚ
stacklevelr*   ÚstackÚinnerÚ
parenGroupÚrecursors             €r$   Ú_innerz"_group_parentheses.<locals>._inner€   s,  ø€ ð 24ˆØ)+ˆØˆ
Øò 	%ˆEØ�Q‰xœ2Š~Ø˜‘8˜s’?Ø—M‘MÔ"2°2Ó"6Ô7Ø !‘O‘JØ˜1‘X ’_Ø˜2‘J×%Ñ% eÔ,Ø"ŸJ™J›L�Eä˜6“{ Q’ð ˜r™
×)Ñ)¨%Õ0ð !& a¨ ˜Ù (¨Ø)3Ø)4ó!6˜ð ',¨A¡h Z°%Ñ%7¸5À¹9¸+Ñ%E˜
ØŸ™Ô&6°zÓ&BÔCØ !‘O�JØÙØ�r‘
×!Ñ! %Õ(à—‘˜eÕ$ð7	%ñ8 ÜÐ5Ó6Ð6Øˆr0   ©rg   r]   r+   ÚDICTr,   rp   rG   )rm   rn   s   ` r$   Ú_group_parenthesesrq      s   ø€ õ'ðP €Mr0   c                ó  — g }d}| D ]x  }t        |t        «      r3|rt        |||«      rt        ||«      |d<   d}Œ4|j	                  |«       ŒF|d   t
        k(  r|}|j                  |«       Œfd}|j                  |«       Œz |S )zµConvert a NAME token + ParenthesisGroup into an AppliedFunction.

    Note that ParenthesisGroups, if not applied to any function, are
    converted back into lists of tokens.

    Nr2   r   )r)   rB   r/   rI   r_   r	   r`   )rg   r+   r,   r7   Úsymbolrb   s         r$   Ú_apply_functionsrt   «   s‹   € ð -/€FØ€FØò ˆÜ�cÔ+Ô,Ùœ/¨&°*¸kÔJÜ,¨V°SÓ9��r‘
Ø‘à—‘˜cÕ"Ø�‰V”tŠ^ØˆFØ�M‰M˜#ÕàˆFØ�M‰M˜#Õðð €Mr0   c                ó|  — g }d}t        | | dd «      D �]  \  }}|j                  |«       |rd}Œ|d   t        k(  r|d   dk(  r|d   t        k(  rd}Œ@t	        |t
        «      r˜t	        |t
        «      r|j                  t        df«       Œx|t        dfk(  r@|j                  d   d	k(  r|j                  d   d
f|_        |j                  t        df«       ŒÃ|d   t        k(  sŒÐ|j                  t        df«       Œè|t        dfk(  rtt	        |t
        «      r|j                  t        df«       �Œ|d   t        k(  r|j                  t        df«       �ŒA|t        dfk(  s�ŒN|j                  t        df«       �Œg|d   t        k(  s�Œut        |||«      r�Œ„t	        |t
        «      s|d   t        k(  r&t        |||«      r|j                  t        df«       �ŒÆ|t        dfk(  r|j                  t        df«       �Œê|d   t        k(  s�Œø|j                  t        df«       �Œ | r|j                  | d   «       |S )aŽ  Implicitly adds '*' tokens.

    Cases:

    - Two AppliedFunctions next to each other ("sin(x)cos(x)")

    - AppliedFunction next to an open parenthesis ("sin x (cos x + 1)")

    - A close parenthesis next to an AppliedFunction ("(x+2)sin x")
    - A close parenthesis next to an open parenthesis ("(x+2)(x+3)")

    - AppliedFunction next to an implicitly applied function ("sin(x)cos x")

    Fr   Nr   ú.TÚ*r3   r   r   r4   r2   )Úzipr`   r
   r	   r)   rI   rL   r/   )rg   r+   r,   r7   Úskiprb   ÚnextToks          r$   Ú_implicit_multiplicationr{   Ä   sç  € ð  -/€FØ€DÜ˜F F¨1¨2 JÓ/ó )-‰ˆˆWØ�‰�cÔÙØˆDØØˆq‰6”RŠ<˜C ™F cšM¨g°a©j¼DÒ.@àˆDØÜ�cœ?Ô+Ü˜'¤?Ô3Ø—‘œr 3˜iÕ(ØœR ˜IÒ%à—<‘< ‘? jÒ0Ø$'§L¡L°¡O°XÐ#>�C”LØ—‘œr 3˜iÕ(Ø˜‘œtÓ#à—‘œr 3˜iÕ(à”r˜3�iÒÜ˜g¤Ô7à—M‘M¤2 s )Ö,Ø˜Q‘Z¤4Ò'à—M‘M¤2 s )Ö,Ø¤ S 	Ô)à—M‘M¤2 s )Ö,Ø�Q‘œ4”¬¸¸ZÈÖ(UÜ˜g¤Ô7Ø˜Q‘Z¤4Ò'¬O¸GÀZÐQ\Ô,]à—M‘M¤2 s )Ö,Ø¤ S 	Ò)à—M‘M¤2 s )Ö,Ø˜Q‘Z¤4Ô'à—M‘M¤2 s )Ö,ðS)-ñT Ø�‰�f˜R‘jÔ!Ø€Mr0   c                ó0  — g }d}d}d}t        | | dd «      D �]G  \  }}|j                  |«       |d   t        k(  rB|d   t        t        t
        fvr,t        ||||«      sŒI|j                  t        df«       |dz  }Œf|d   t        k(  r%|d   t        k(  r|d   dk(  rt        |||«      sŒ”d}Œ—|rot        |t        «      s|d   t        k(  sŒ¶|d   dk(  sŒ¿|d   t        k(  r	|d   dk(  rŒÔ|d   t        k(  r|d   dk(  s|j                  t        df«       |dz  }d}�Œ|s�Œ|d   t        k(  r|d   d	v rd}�Œ#|r|dz  }�Œ,|j                  t        d
f«       |dz  }�ŒJ | r|j                  | d   «       |r|j                  t        d
fg|z  «       |S )z+Adds parentheses as needed after functions.r   Fr   Nr3   ú**Trw   )ú^r}   rw   r4   r2   )
rx   r`   r	   r
   r   r   r/   r)   rI   r_   )	rg   r+   r,   r7   ÚappendParenry   ÚexponentSkiprb   rz   s	            r$   Ú_implicit_applicationr�     s®  € à,.€FØ€KØ€Dà€Lä˜F F¨1¨2 JÓ/ó !‰ˆˆWØ�‰�cÔØ�‰F”dŠN˜w q™z´"´iÄÐ1IÑIÜ˜s J°¸WÕEØ—‘œr 3˜iÔ(Ø˜qÑ ‘à�!‰fœŠn ¨¡¬rÒ!1°g¸a±jÀDÒ6HÜ˜s J°Õ<Ø#‘Ùô
 ˜3¤Ô0Ø˜‘Fœb“L S¨¡V¨s£]ð   ™
¤bÒ(¨W°Q©Z¸3Ó->Ø" 1™:¬Ò+°¸±
¸cÒ0AØŸ™¤r¨3 iÔ0Ø# qÑ(˜Ø#(’LÛØ�q‰zœRÒ G¨A¡JÐ2BÑ$BØ�ÙÙØ˜‘	�ÙØ�M‰Mœ2˜s˜)Ô$Ø˜1ÑŠKðC!ñF Ø�‰�f˜R‘jÔ!áØ�‰œ˜C�y�k KÑ/Ô0Ø€Mr0   c                óÖ  — g }g }d}d}t        | | dd «      D �]$  \  }}|d   t        k(  r$|d   t        k(  r|d   dk(  rt        |||«      ràd}nÝ|r…|d   t        k(  r|d   dk(  rt        df}|j	                  |«       |d   |d   cxk(  r	t        k(  rn n|d   d	k(  r
|d   d
k(  rd}|d   |d   cxk(  r	t        k(  rn n|d   dk(  r|d   d
k(  rd}|d= Œ¾|rT|sR|d   t        k(  r|d   d
k(  r|dz  }n|d   d	k(  r|dz  }|dk(  r&|j	                  |«       |j                  |«       g }�Œ|j	                  |«       �Œ' | r|j	                  | d   «       |r|j                  |«       |S )ap  Allows functions to be exponentiated, e.g. ``cos**2(x)``.

    Examples
    ========

    >>> from sympy.parsing.sympy_parser import (parse_expr,
    ... standard_transformations, function_exponentiation)
    >>> transformations = standard_transformations + (function_exponentiation,)
    >>> parse_expr('sin**4(x)', transformations=transformations)
    sin(x)**4
    Fr   r   Nr}   Tr   r   r4   r3   rw   r2   )rx   r	   r
   r/   r`   r_   )	rg   r+   r,   r7   rN   Úconsuming_exponentÚlevelrb   rz   s	            r$   Úfunction_exponentiationr…   8  sœ  € ð €FØ€HØÐØ€EÜ˜F F¨1¨2 JÓ/ó ‰ˆˆWØˆq‰6”TŠ>˜g a™j¬BÒ.°7¸1±:ÀÒ3EÜ˜s J°Ô<Ø%)Ñ"ÙØ�1‰vœŠ~ # a¡&¨JÒ"6Ü˜XÐ&�Ø�O‰O˜CÔ ð �1‰v˜ ™Ô)¤rÕ)¨c°!©f¸ªmÀÈÁ
ÈcÒ@QØ%*Ð"à�1‰v˜ ™Ô)¤rÕ)¨c°!©f¸ªmÀÈÁ
ÈcÒ@QØ%*Ð"Ø˜R�LØÙÑ0Ø�1‰vœŠ|Ø�q‘6˜S’=Ø˜Q‘J‘EØ˜‘V˜s’]Ø˜Q‘J�EØ˜ŠzØ—‘˜cÔ"Ø—‘˜hÔ'Ø�ÙØ�‰�cÖð9ñ: Ø�‰�f˜R‘jÔ!ÙØ�‰�hÔØ€Mr0   c                ó   ‡ — dˆ fd„}|S )a2  Creates a transformation that splits symbol names.

    ``predicate`` should return True if the symbol name is to be split.

    For instance, to retain the default behavior but avoid splitting certain
    symbol names, a predicate like this would work:


    >>> from sympy.parsing.sympy_parser import (parse_expr, _token_splittable,
    ... standard_transformations, implicit_multiplication,
    ... split_symbols_custom)
    >>> def can_split(symbol):
    ...     if symbol not in ('list', 'of', 'unsplittable', 'names'):
    ...             return _token_splittable(symbol)
    ...     return False
    ...
    >>> transformation = split_symbols_custom(can_split)
    >>> parse_expr('unsplittable', transformations=standard_transformations +
    ... (transformation, implicit_multiplication))
    unsplittable
    c                óP  •— g }d}d}| D �]˜  }|rd}Œ	d}|d   t         k(  r|d   dv rd}�nf|�rc|d   t         k(  �rV|d   dd } ‰|«      �rC|d   d   }|dd …= d}	|	t        |«      k  �r||	   }
|
|v s|
|v r|j                  t         d|
z  f«       nâ|
j                  «       r�|
g}t	        |	dz   t        |«      «      D ]0  }	||	   j                  «       s|	dz  }	 n|j                  ||	   «       Œ2 d	j                  |«      }
|j                  t         d
ft        dft         d|
z  ft        dfg«       nB|	t        |«      k(  r|nd}|j                  t         |ft        dft         d|
z  ft        dfg«       |	dz  }	|	t        |«      k  r�Œd}d}�Œ†d}|j                  |«       �Œ› |S )NFr   r   )r   r   Tr2   éþÿÿÿz%sr   ÚNumberr3   z'%s'r4   r   )r	   r"   r`   ÚisdigitÚrangeÚjoinr_   r
   )rg   r+   r,   r7   ÚsplitÚsplit_previousrb   rs   Útok_typer?   ÚcharÚcharsÚuseÚ	predicates                €r$   Ú_split_symbolsz,split_symbols_custom.<locals>._split_symbols‚  så  ø€ Ø ˆØˆØˆàó /	ˆCÙà$�ØØ ˆNà�1‰vœŠ~ # a¡&Ð,BÑ"BØ’â˜3˜q™6¤T›>Ø˜Q™  "˜�á˜VÕ$Ø% b™z¨!™}�HØ˜r™s˜à�AØœc &›k›/Ø% a™y˜Ø :Ñ-°¸Ñ1DØ"ŸM™M¬4°¸±Ð*=Õ>Ø!Ÿ\™\œ^Ø%) F˜EÜ%*¨1¨q©5´#°f³+Ó%>ò 8 Ø'-¨a¡y×'8Ñ'8Ô':Ø$%¨¡F AÙ$)Ø %§¡¨V°A©YÕ 7ð	8ð
 $&§7¡7¨5£>˜DØ"ŸM™M¬D°(Ð+;¼bÀ#¸YÜ,0°&¸4±-Ð+@Ä2ÀsÀ)ð+Mõ Nð /0´3°v³;Ò.>¡(ÀH˜CØ"ŸM™M¬D°#¨;¼¸S¸	Ü,0°&¸4±-Ð+@Ä2ÀsÀ)ð+Mô Nà˜Q™˜ð% œc &›kœ/ð, "�EØ%)�NÙð "�Eà�M‰M˜#Öð_/	ðb ˆr0   ro   rG   )r“   r”   s   ` r$   Úsplit_symbols_customr•   l  s   ø€ õ,6ðp Ðr0   c                ó~   —  t        t        «      | ||«      }t        |||«      }t        |||«      }t	        |«      }|S )a   Makes the multiplication operator optional in most cases.

    Use this before :func:`implicit_application`, otherwise expressions like
    ``sin 2x`` will be parsed as ``x * sin(2)`` rather than ``sin(2*x)``.

    Examples
    ========

    >>> from sympy.parsing.sympy_parser import (parse_expr,
    ... standard_transformations, implicit_multiplication)
    >>> transformations = standard_transformations + (implicit_multiplication,)
    >>> parse_expr('3 x y', transformations=transformations)
    3*x*y
    )rq   Úimplicit_multiplicationrt   r{   rc   ©rg   r+   r,   Úres1Úres2Úres3r7   s          r$   r—   r—   Æ  sE   € ð" 7ÔÔ5Ó6°v¸zÈ;ÓW€DÜ˜D *¨kÓ:€DÜ# D¨*°kÓB€DÜ�d‹^€FØ€Mr0   c                ó~   —  t        t        «      | ||«      }t        |||«      }t        |||«      }t	        |«      }|S )a  Makes parentheses optional in some cases for function calls.

    Use this after :func:`implicit_multiplication`, otherwise expressions
    like ``sin 2x`` will be parsed as ``x * sin(2)`` rather than
    ``sin(2*x)``.

    Examples
    ========

    >>> from sympy.parsing.sympy_parser import (parse_expr,
    ... standard_transformations, implicit_application)
    >>> transformations = standard_transformations + (implicit_application,)
    >>> parse_expr('cot z + csc z', transformations=transformations)
    cot(z) + csc(z)
    )rq   Úimplicit_applicationrt   r�   rc   r˜   s          r$   r�   r�   Þ  sE   € ð" 4ÔÔ2Ó3°F¸JÈÓT€DÜ˜D *¨kÓ:€DÜ   z°;Ó?€DÜ�d‹^€FØ€Mr0   c                óP   — t         t        t        t        fD ]  } || ||«      } Œ | S )an  Allows a slightly relaxed syntax.

    - Parentheses for single-argument method calls are optional.

    - Multiplication is implicit.

    - Symbol names can be split (i.e. spaces are not needed between
      symbols).

    - Functions can be exponentiated.

    Examples
    ========

    >>> from sympy.parsing.sympy_parser import (parse_expr,
    ... standard_transformations, implicit_multiplication_application)
    >>> parse_expr("10sin**2 x**2 + 3xyz + tan theta",
    ... transformations=(standard_transformations +
    ... (implicit_multiplication_application,)))
    3*x*y*z + 10*sin(x**2)**2 + tan(theta)

    )Úsplit_symbolsr—   r�   r…   )r7   r+   r,   Ústeps       r$   Ú#implicit_multiplication_applicationr¡   ö  s7   € ô0 Ô 7Ü%Ô'>ð@ò 7ˆá�f˜j¨+Ó6‰ð7ð €Mr0   c                ó†  — g }d}| j                  d«       t        | | dd «      D �]˜  \  }}|\  }}|\  }	}
|t        k(  �rg|}|dv sOt        |«      sD|d   t        k(  r|d   dk(  s0|d   t        k(  r|d   dv r|	t        k(  r|
dk(  s||v r#||   t
        ur|j                  t        |f«       Œˆ||v rg|j                  t
        t        «       «      j                  |«       |
d	k(  rt        |«      ||<   nt        |«      ||<   |j                  t        |f«       Œó||v rD||   }t        |t        t        t        f«      st        |«      r|j                  t        |f«       �Œ;|j!                  t        |
d	k7  rd
ndft        d	ft        t#        t%        |«      «      ft        dfg«       n|j                  ||f«       ||f}�Œ› |S )zAInserts calls to ``Symbol``/``Function`` for undefined variables.)r2   r   r   N)ÚTrueÚFalseÚNoner   rv   )r3   ú,ú=r3   r   r   r4   )r`   rx   r	   r   r
   ÚnullÚ
setdefaultÚsetÚaddr   r   r)   r   r   Útyper(   r_   ÚreprÚstr)rg   r+   r,   r7   ÚprevTokrb   rz   ÚtokNumÚtokValÚ
nextTokNumÚ
nextTokValr6   Úobjs                r$   Úauto_symbolrµ     sÉ  € à€FØ€Gà
‡M�M�(ÔÜ˜F F¨1¨2 JÓ/ó (#‰ˆˆWØ‰ˆ�Ø!(Ñˆ
�JØ”T‹>ØˆDàÐ1Ñ1Ü  ”à ™
¤bÒ(¨W°Q©Z¸3Ò->à ™
¤bÒ(¨W°Q©Z¸:Ñ-EØ&¬"Ò,°¸sÒ1Bà˜zÑ)¨j¸Ñ.>ÄdÑ.JØ—‘œt T˜lÔ+ØØ˜Ñ#Ø×%Ñ%¤d¬C«EÓ2×6Ñ6°tÔ<Ø Ò$Ü'/°£~�J˜tÒ$ä'-¨d£|�J˜tÑ$Ø—‘œt T˜lÔ+ØØ˜Ñ$Ø! $Ñ'�Ü˜c¤N´E¼4Ð#@ÔAÄXÈcÄ]Ø—M‘M¤4¨ ,Ô/Ùà�M‰MÜ :°Ò#4‘x¸*ÐEÜ�S�	Ü”tœC ›I“Ð'Ü�S�	ð	õ ð �M‰M˜6 6Ð*Ô+à˜6Ð"ŠðQ(#ðT €Mr0   c                ó  — g }d}| d   \  }}t        | «      }|t        k(  rÐ|dk(  rË|dk(  s|dk(  r"| d   d   t        k(  r|j                  | «       |S |dkD  r˜|j                  t        dft        dft        dft        d	ft        d	fg«       | dd
 D ]\  \  }}	|t        k(  r	|	dk(  rd}	d}|s|t        k(  r|	dv rt        d«      ‚|r|j                  d||	f«       ŒI|j                  d||	f«       Œ^ |S |j                  | «       |S )z­Substitutes "lambda" with its SymPy equivalent Lambda().
    However, the conversion does not take place if only "lambda"
    is passed because that is a syntax error.

    Fr   Úlambdaé   é   r   ÚLambdar3   r4   Nú:r¦   T)rw   r}   z)Starred arguments in lambda not supportedr2   rˆ   )r"   r	   r   r_   r
   r   Úinsert)
rg   r+   r,   r7   Úflagr=   r>   ÚtokLenr°   r±   s
             r$   Úlambda_notationr¿   H  s2  € ð €FØ€DØ˜A‘Y�N€FˆFÜ�‹[€Fà”‚~˜& HÒ,Ø�QŠ;˜& Aš+¨&°©)°A©,¼'Ò*Að �M‰M˜&Ô!ð, €Mð+ �aŠZØ�M‰MÜ�xÐ Ü�S�	Ü�S�	Ü�S�	Ü�S�	ðô ð #)¨¨ *ò 	8‘�˜ØœR’< F¨c¢MØ �FØ�DÙ ¬"¢°¸;Ñ1FÜ$Ð%PÓQÐQÙØ—M‘M " v¨vÐ&6Õ7à—M‘M " v¨vÐ&6Õ7ð	8ð €Mð 	�‰�fÔà€Mr0   c                ó2  — g }d}| D ]�  \  }}|t         k(  r|dk(  r|dz  }Œ|t        k(  r'|}|dk(  r|dz  }Œ0d}|j                  t         |f«       ŒJ|dk(  rt        d|«      }n|dk(  rt        d|«      }n|dkD  rt        ‚d}|j                  ||f«       Œ� |S )z'Allows standard notation for factorial.r   ú!r   Ú	factorialr¸   Ú
factorial2)r
   r   r`   r@   r   )rg   r+   r,   r7   Ú
nfactorialr=   r>   Úops           r$   Úfactorial_notationrÆ   p  s·   € à€FØ€JØ ò ,‰ˆ�Ø”RŠ<˜F cšMà˜!‰O‰JØ”zÒ!ØˆBØ�SŠyØ˜a‘‘
à�
Ø—‘œr 2˜hÕ'à˜QŠÜ.¨{¸FÓC‘Ø˜q’Ü.¨|¸VÓD‘Ø˜a’Ü Ð ØˆJØ�M‰M˜6 6Ð*Õ+ð',ð( €Mr0   c                ó¸   — g }| D ]R  \  }}|t         k(  r1|dk(  r|j                  t         df«       Œ,|j                  ||f«       Œ@|j                  ||f«       ŒT |S )z-Treats XOR, ``^``, as exponentiation, ``**``.r~   r}   )r
   r`   )rg   r+   r,   r7   r=   r>   s         r$   Úconvert_xorrÈ   ‹  sa   € à€FØ ò ,‰ˆ�Ø”RŠ<Ø˜Š}Ø—‘œr 4˜jÕ)à—‘˜v vÐ.Õ/à�M‰M˜6 6Ð*Õ+ð,ð €Mr0   c                ó’  — g }d„ }g }| D �]´  \  }}|t         k(  r‡|s<d|v r8d|j                  «       vr&d|j                  «       vr|j                  ||f«       nÌ ||«      r>t        |«      dk(  st        |«      dk(  r" ||d   d   «      r|j                  ||f«       n†g }nƒ|t        k(  rx|d	k(  r&t        |«      dk(  r|j                  t        |f«       nO|d
k(  r&t        |«      dk\  r|j                  t        |f«       n$|dk(  r|s|j                  t         df«       ng }ng }|j                  ||f«       |s�Œ1|d   d   d
k(  s�Œ>|dt        |«        }|d   d   j                  d«      \  }}	|d   d   }
t        |«      dk(  r|
|d   d   z  }
|j                  dd«      }|	j                  dd«      }	|
j                  dd«      }
dt        |	«      z  }|	|
fD �cg c]  }|j                  d«      ‘Œ c}\  }	}|xs d}|	xs dd|z   }}|dt        |
«      z  |z   }}t        dft        dft        dft         |ft        dft        dft        dft        dft         |ft        dft         |ft        dft        dft        dft        dft         |ft        dft         |ft        dft        dfg}|j                  |«       g }�Œ· |S c c}w )zw
    Allows 0.2[1] notation to represent the repeated decimal 0.2111... (19/90)

    Run this before auto_number.

    c                ó&   — t        d„ | D «       «      S )Nc              3  ó$   K  — | ]  }|d v –— Œ
 y­w)Ú0123456789_NrG   )Ú.0r?   s     r$   ú	<genexpr>z6repeated_decimals.<locals>.is_digit.<locals>.<genexpr>¤  s   è ø€ Ò1¨!�1˜Ô%Ñ1ùs   ‚)Úall)Úss    r$   Úis_digitz#repeated_decimals.<locals>.is_digit£  s   € ÜÑ1¨qÔ1Ó1Ð1r0   rv   ÚeÚjr¸   r¹   r2   r   ú[ú]z0.Nr   é   r   r   Ú0Ú1Ú9r3   ÚIntegerr4   ú+ÚRationalr¦   )
r   Úlowerr`   r"   r
   r�   ÚreplaceÚlstripr	   r_   )rg   r+   r,   r7   rÑ   Únumr=   r>   ÚpreÚpostÚrepetendÚzerosÚwÚ	repetendsÚaÚbÚcÚdrÒ   Úseqs                       r$   Úrepeated_decimalsrì   š  sÞ  € ð €Fò2ð €CØ ó E‰ˆ�Ø”VÒÙ˜C 6™M¨c¸¿¹»Ñ.GØ˜6Ÿ<™<›>Ñ)Ø—
‘
˜F FÐ+Õ,Ù˜&Ô!¤s¨3£x°1¢}Ü˜“H ’M¡h¨s°2©w°q©zÔ&:Ø—
‘
˜F FÐ+Õ,à‘Ø”rŠ\Ø˜Š}¤ S£¨Q¢Ø—
‘
œB ˜<Õ(Ø˜3’¤3 s£8¨q¢=Ø—
‘
œB ˜<Õ(Ø˜3’¡sà—
‘
œF D˜>Õ*à‘àˆCà�‰�v˜vÐ&Ô'ã�3�r‘7˜1‘: Ô$ð ˜Jœc #›h˜YÐ'ˆFØ˜A™˜q™	Ÿ™¨Ó,‰IˆC�Ø˜1‘v˜a‘yˆHÜ�3‹x˜1Š}Ø˜C ™F 1™IÑ%�à—+‘+˜c 2Ó&ˆCØ—<‘<  RÓ(ˆDØ×'Ñ'¨¨RÓ0ˆHàœ˜D›	‘MˆEØ7;¸XÐ6FÖG°˜qŸx™x¨�}ÒG‰OˆD�)ð ’
�sˆAØ’;˜3  e¡ˆqˆAØ˜s¤3 x£=Ñ0°EÑ9ˆqˆAô �S�	Ü˜9Ð%Ü˜�IÜ ˜Ü˜�IÜ˜�IÜ˜:Ð&Ü˜�IÜ ˜Ü˜S˜	Ü ˜Ü˜�IÜ˜�IÜ˜:Ð&Ü˜�IÜ ˜Ü˜S˜	Ü ˜Ü˜�IÜ�S�	ð)ˆCð, �M‰M˜#ÔØŠCðKEðN €MùòA Hs   ÇKc           	     ó¬  — g }| D ]Ì  \  }}|t         k(  r«|}g }|j                  d«      r|dd }t        dft        dfg}d|v sd|v sd|v rB|j	                  d	«      s1t        d
ft        dft         t        t        |«      «      ft        dfg}nt        dft        dft         |ft        dfg}|j                  ||z   «       Œº|j                  ||f«       ŒÎ |S )z¦
    Converts numeric literals to use SymPy equivalents.

    Complex numbers use ``I``, integer literals use ``Integer``, and float
    literals use ``Float``.

    )rÓ   ÚJNr2   rw   ÚIrv   rÒ   ÚE)Ú0xÚ0XÚFloatr3   r4   rÚ   )	r   Úendswithr
   r	   Ú
startswithr­   r®   r_   r`   )	rg   r+   r,   r7   r=   r>   ÚnumberÚpostfixrë   s	            r$   Úauto_numberrø   ò  sõ   € ð €Fà ò ,‰ˆ�Ø”VÒØˆFØˆGà�‰˜zÔ*Ø  ˜�Ü ˜9¤t¨S kÐ2�à�f‰} #¨¡-°3¸&±=Ø×*Ñ*¨<Ô8Ü˜g�¬¨S¨	ÜœT¤# f£+Ó.Ð/´"°c°ð<‘ô ˜iÐ(¬2¨s¨)Ü˜Fð6$Ü&(¨# Yð0�ð �M‰M˜# ™-Õ(à�M‰M˜6 6Ð*Õ+ð',ð* €Mr0   c                óä   — g }d}| D ]f  \  }}|t         k(  r|dk(  rd}d}|j                  ||f«       Œ,|dk(  r#|t        k(  rd}|j                  t        |f«       ŒT|j                  ||f«       Œh |S )z=Converts floats into ``Rational``. Run AFTER ``auto_number``.Fró   TrÜ   )r	   r`   r   r   )rg   r+   r,   r7   Úpassed_floatr=   r>   s          r$   Úrationalizerû     s†   € à€FØ€LØ ò 
,‰ˆ�Ø”TŠ>Ø˜Ò Ø#�Ø#�Ø�M‰M˜6 6Ð*Õ+Ø˜TÒ! f´Ò&6Ø ˆLØ�M‰Mœ6 6Ð*Õ+à�M‰M˜6 6Ð*Õ+ð
,ð €Mr0   c                ó&  — g }t         df| v r‚|j                  t        df«       |j                  t         df«       | D ]6  }|t         dfk(  r|j                  t         df«       Œ&|j                  |«       Œ8 |j                  t         df«       |S | }|S )a«  Transforms the equals sign ``=`` to instances of Eq.

    This is a helper function for ``convert_equals_signs``.
    Works with expressions containing one equals sign and no
    nesting. Expressions like ``(1=2)=False`` will not work with this
    and should be used with ``convert_equals_signs``.

    Examples: 1=2     to Eq(1,2)
              1*2=x   to Eq(1*2, x)

    This does not deal with function arguments yet.

    r§   ÚEqr3   r¦   r4   )r
   r`   r	   )rg   r+   r,   r7   r*   s        r$   Ú_transform_equals_signrþ   '  s”   € ð €FÜ
ˆC€y�FÑØ�‰”t˜T�lÔ#Ø�‰”r˜3�iÔ Øò 	!ˆEØœ˜S˜	Ò!Ø—‘œr 3˜iÔ(ØØ�M‰M˜%Õ ð		!ð
 	�‰”r˜3�iÔ ð €Mð ˆØ€Mr0   c                ó~   —  t        t        «      | ||«      }t        |||«      }t        |||«      }t	        |«      }|S )a{   Transforms all the equals signs ``=`` to instances of Eq.

    Parses the equals signs in the expression and replaces them with
    appropriate Eq instances. Also works with nested equals signs.

    Does not yet play well with function arguments.
    For example, the expression ``(x=y)`` is ambiguous and can be interpreted
    as x being an argument to a function and ``convert_equals_signs`` will not
    work for this.

    See also
    ========
    convert_equality_operators

    Examples
    ========

    >>> from sympy.parsing.sympy_parser import (parse_expr,
    ... standard_transformations, convert_equals_signs)
    >>> parse_expr("1*2=x", transformations=(
    ... standard_transformations + (convert_equals_signs,)))
    Eq(2, x)
    >>> parse_expr("(1*2=x)=False", transformations=(
    ... standard_transformations + (convert_equals_signs,)))
    Eq(Eq(2, x), False)

    )rq   Úconvert_equals_signsrt   rþ   rc   r˜   s          r$   r   r   D  sE   € ð: 4ÔÔ2Ó3°F¸JÈÓT€DÜ˜D *¨kÓ:€DÜ! $¨
°KÓ@€DÜ�d‹^€FØ€Mr0   útuple[TRANS, ...]Ústandard_transformationsc                óÖ   — g }t        | j                  «       «      }t        |j                  «      D ]  \  }}}}}|j	                  ||f«       Œ |D ]  }	 |	|||«      }Œ t        |«      S )zt
    Converts the string ``s`` to Python code, in ``local_dict``

    Generally, ``parse_expr`` should be used.
    )r   Ústripr   Úreadliner`   r   )
rÐ   r+   r,   Útransformationsrg   Ú
input_coder=   r>   r   Ú	transforms
             r$   Ústringify_exprr	  p  s{   € ð €FÜ˜!Ÿ'™'›)Ó$€JÜ#2°:×3FÑ3FÓ#Gò (Ñˆ�˜˜1˜aØ�‰�v˜vÐ&Õ'ð(ð %ò <ˆ	Ù˜6 :¨{Ó;‰ð<ô �fÓÐr0   c                ó    — t        | ||«      }|S )zn
    Evaluate Python code generated by ``stringify_expr``.

    Generally, ``parse_expr`` should be used.
    )Úeval)Úcoder+   r,   Úexprs       r$   Ú	eval_exprr  ƒ  s   € ô Øˆk˜:ó'€Dà€Kr0   Tc                ó0  — |€i }n.t        |t        «      st        d«      ‚t        |v rt	        d«      ‚|€hi }t        d|«       t        t        «      }|j                  «       D ]%  \  }}t        |t        j                  «      sŒ!|||<   Œ' t        |d<   t        |d<   nt        |t        «      st        d«      ‚|xs d}t        |t        «      r)|d	k(  r
t        dd }n|d
k(  r
t        dd }nt	        d«      ‚|}t        | |||«      }	|st!        t#        |	«      dd«      }		 t%        |	||«      }
|j'                  t        d«      D ]  }t        ||<   Œ |
S # t(        $ r8}|j'                  t        d«      D ]  }t        ||<   Œ |t	        d|	›�«      ‚d}~ww xY w)a  Converts the string ``s`` to a SymPy expression, in ``local_dict``.

    .. warning::
        Note that this function uses ``eval``, and thus shouldn't be used on
        unsanitized input.

    Parameters
    ==========

    s : str
        The string to parse.

    local_dict : dict, optional
        A dictionary of local variables to use when parsing.

    global_dict : dict, optional
        A dictionary of global variables. By default, this is initialized
        with ``from sympy import *``; provide this parameter to override
        this behavior (for instance, to parse ``"Q & S"``).

    transformations : tuple or str
        A tuple of transformation functions used to modify the tokens of the
        parsed expression before evaluation. The default transformations
        convert numeric literals into their SymPy equivalents, convert
        undefined variables into SymPy symbols, and allow the use of standard
        mathematical factorial notation (e.g. ``x!``). Selection via
        string is available (see below).

    evaluate : bool, optional
        When False, the order of the arguments will remain as they were in the
        string and automatic simplification that would normally occur is
        suppressed. (see examples)

    Examples
    ========

    >>> from sympy.parsing.sympy_parser import parse_expr
    >>> parse_expr("1/2")
    1/2
    >>> type(_)
    <class 'sympy.core.numbers.Half'>
    >>> from sympy.parsing.sympy_parser import standard_transformations,\
    ... implicit_multiplication_application
    >>> transformations = (standard_transformations +
    ...     (implicit_multiplication_application,))
    >>> parse_expr("2x", transformations=transformations)
    2*x

    When evaluate=False, some automatic simplifications will not occur:

    >>> parse_expr("2**3"), parse_expr("2**3", evaluate=False)
    (8, 2**3)

    In addition the order of the arguments will not be made canonical.
    This feature allows one to tell exactly how the expression was entered:

    >>> a = parse_expr('1 + x', evaluate=False)
    >>> b = parse_expr('x + 1', evaluate=False)
    >>> a == b
    False
    >>> a.args
    (1, x)
    >>> b.args
    (x, 1)

    Note, however, that when these expressions are printed they will
    appear the same:

    >>> assert str(a) == str(b)

    As a convenience, transformations can be seen by printing ``transformations``:

    >>> from sympy.parsing.sympy_parser import transformations

    >>> print(transformations)
    0: lambda_notation
    1: auto_symbol
    2: repeated_decimals
    3: auto_number
    4: factorial_notation
    5: implicit_multiplication_application
    6: convert_xor
    7: implicit_application
    8: implicit_multiplication
    9: convert_equals_signs
    10: function_exponentiation
    11: rationalize

    The ``T`` object provides a way to select these transformations:

    >>> from sympy.parsing.sympy_parser import T

    If you print it, you will see the same list as shown above.

    >>> str(T) == str(transformations)
    True

    Standard slicing will return a tuple of transformations:

    >>> T[:5] == standard_transformations
    True

    So ``T`` can be used to specify the parsing transformations:

    >>> parse_expr("2x", transformations=T[:5])
    Traceback (most recent call last):
    ...
    SyntaxError: invalid syntax
    >>> parse_expr("2x", transformations=T[:6])
    2*x
    >>> parse_expr('.3', transformations=T[3, 11])
    3/10
    >>> parse_expr('.3x', transformations=T[:])
    3*x/10

    As a further convenience, strings 'implicit' and 'all' can be used
    to select 0-5 and all the transformations, respectively.

    >>> parse_expr('.3x', transformations='all')
    3*x/10

    See Also
    ========

    stringify_expr, eval_expr, standard_transformations,
    implicit_multiplication_application

    Nz!expecting local_dict to be a dictzcannot use "" in local_dictzfrom sympy import *ÚmaxÚminz"expecting global_dict to be a dictrG   rÏ   Úimplicité   z!unknown transformation group namez<string>r  z-Error from parse_expr with transformed code: )r)   ÚdictÚ	TypeErrorr¨   Ú
ValueErrorÚexecÚvarsÚbuiltinsrO   ÚtypesÚBuiltinFunctionTyper   r   r®   ÚTr	  ÚcompileÚevaluateFalser  rf   Ú	Exception)rÐ   r+   r  r,   ÚevaluateÚbuiltins_dictr6   r´   Ú_transformationsr  Úrvr?   rÒ   s                r$   Ú
parse_exprr$  Ž  sµ  € ðJ ÐØ‰
Ü˜
¤DÔ)ÜÐ;Ó<Ð<Ü	�Ñ	ÜÐ6Ó7Ð7àÐØˆÜÐ" KÔ0äœX›ˆØ&×,Ñ,Ó.ò 	(‰IˆD�#Ü˜#œu×8Ñ8Õ9Ø$'�˜DÒ!ð	(ô !ˆ�EÑÜ ˆ�EÒä˜¤TÔ*ÜÐ<Ó=Ð=à%Ò+¨€OÜ�/¤3Ô'Ø˜eÒ#Ü ¡˜tÑØ 
Ò*Ü   !˜uÑäÐ@ÓAÐAà*Ðä˜!˜Z¨Ð6FÓG€DáÜ”} TÓ*¨J¸Ó?ˆð
ZÜ�t˜Z¨Ó5ˆà—‘¤ bÓ)ò 	!ˆAÜ ˆJ�qŠMð	!àˆ	øÜò Zà—‘¤ bÓ)ò 	!ˆAÜ ˆJ�qŠMð	!à”ZÐ"OÐPTÈxÐ XÓYÐYûð	Zús   Ä!2E Å	FÅ3FÆFc                óà   — t        j                  | «      }t        «       j                  |«      }t        j                  |j
                  d   j                  «      }t        j                  |«      S )zO
    Replaces operators with the SymPy equivalent and sets evaluate=False.
    r   )ÚastÚparseÚEvaluateFalseTransformerÚvisitÚ
ExpressionÚbodyÚvalueÚfix_missing_locations)rÐ   ÚnodeÚtransformed_nodes      r$   r  r  E  sX   € ô �9‰9�Q‹<€DÜ/Ó1×7Ñ7¸Ó=Ðä—~‘~Ð&6×&;Ñ&;¸AÑ&>×&DÑ&DÓEÐä×$Ñ$Ð%5Ó6Ð6r0   c                  ó€  — e Zd Zej                  dej
                  dej                  dej                  dej                  dej                  dej                  dej                  diZdZej                  dej                  d	ej                   d
ej"                  dej$                  dej&                  diZd„ Zd„ Zd„ Zd„ Zy)r(  ÚAddÚMulÚPowÚOrÚAndÚNot)#ÚAbsÚimÚreÚsignÚargÚ	conjugateÚacosÚacotÚacscÚasecÚasinÚatanÚacoshÚacothÚacschÚasechÚasinhÚatanhÚcosÚcotÚcscÚsecÚsinÚtanÚcoshÚcothÚcschÚsechÚsinhÚtanhÚexpÚlnÚlogÚsqrtÚcbrtÚNeÚLtÚLeÚGtÚGerý   c           
     ó°  ‡ — ˆ fd„}t        |t        |j                  |j                  «      g |j                  f«      \  }}t        |«      dk(  r|d   S t        j                  t        j                  ‰ j                  t        j                     t        j                  «       ¬«      |t        j                  dt        j                  d¬«      ¬«      g¬	«      S )
Nc           
     ó®  •— | \  }}|\  }}|j                   ‰j                  vrt        d«      ‚t        j                  t        j
                  ‰j                  |j                      t        j                  «       ¬«      ‰j                  |«      ‰j                  |«      gt        j                  dt        j                  d¬«      ¬«      g¬«      }||gz   |fS )Nz3Only equation or inequality operators are supported©ÚidÚctxr   F©r,  ©r;  r,  ©r.   rM   Úkeywords)
Ú	__class__Úrelational_operatorsr  r&  ÚCallÚNameÚLoadr)  ÚkeywordÚConstant)ÚaccÚop_rightr7   ÚleftrÅ   ÚrightÚnewrP   s          €r$   Úreducerz7EvaluateFalseTransformer.visit_Compare.<locals>.reducern  s°   ø€ Ø‰LˆF�DØ ‰IˆB�Ø�|‰| 4×#<Ñ#<Ñ<Ü Ð!VÓWÐWÜ—(‘(Ü—X‘XØ×0Ñ0°·±Ñ>ÄCÇHÁHÃJôð —j‘j Ó&¨¯
©
°5Ó(9Ð:ÜŸ+™+¨*¼C¿L¹LÈuÔ<UÔVÐWôˆCð ˜S˜E‘> 5Ð(Ð(r0   r   r   ra  r   Frd  re  rf  )r   rx   ÚopsÚcomparatorsrq  r"   r&  rj  rk  Ú	operatorsÚBitAndrl  rm  rn  )rP   r.  rt  rM   r   s   `    r$   Úvisit_Comparez&EvaluateFalseTransformer.visit_Comparem  s�   ø€ ô	)ô Ø”S˜Ÿ™ 4×#3Ñ#3Ó4°r¸4¿9¹9°oó
‰ˆˆaô ˆt‹9˜Š>Ø˜‘7ˆNÜ�x‰xÜ—‘˜TŸ^™^¬C¯J©JÑ7¼S¿X¹X»ZÔHØÜ—k‘k j¼¿¹È5Ô8QÔRÐSô
ð 	
r0   c                ól  — g }|D ]¬  }t        |t        j                  «      r|j                  }t        |t        j                  «      r|j                  }|j                  |k(  r,|j                  | j                  |j                  |«      «       ŒŠ|j                  |«       Œœ|j                  |«       Œ® |S rV   )	r)   r&  rj  r.   rb  r_   ÚflattenrM   r`   )rP   rM   r.   r7   r;  Úarg_funcs         r$   r{  z EvaluateFalseTransformer.flatten‡  sŠ   € ØˆØò 
	#ˆCÜ˜#œsŸx™xÔ(ØŸ8™8�Ü˜h¬¯©Ô1Ø'Ÿ}™}�HØ—;‘; $Ò&Ø—M‘M $§,¡,¨s¯x©x¸Ó">Õ?à—M‘M #Õ&à—‘˜cÕ"ð
	#ð ˆr0   c           
     óü  — |j                   j                  | j                  v �rX| j                  |j                   j                     }| j                  |j                  «      }| j                  |j
                  «      }d}t        |j                   t        j                  «      r§t        j                  t        j                  dt        j                  «       ¬«      t        j                  t        j                  «       t        j                  d«      ¬«      |gt        j                  dt        j                  d¬«      ¬«      g¬	«      }�nšt        |j                   t        j                   «      �rut        |j
                  t        j                  «      r¬||}}d
}t        j                  t        j                  dt        j                  «       ¬«      |t        j                  t        j                  «       t        j                  d«      ¬«      gt        j                  dt        j                  d¬«      ¬«      g¬	«      }n¥t        j                  t        j                  dt        j                  «       ¬«      |t        j                  t        j                  «       t        j                  d«      ¬«      gt        j                  dt        j                  d¬«      ¬«      g¬	«      }|r||}}t        j                  t        j                  |t        j                  «       ¬«      ||gt        j                  dt        j                  d¬«      ¬«      g¬	«      }|dv r!| j#                  |j$                  |«      |_        |S |S )NFr2  ra  r   )rÅ   Úoperandr   rd  re  rf  Tr3  )r1  r2  )rÅ   rh  rw  r)  rr  rq  r)   r&  ÚSubrj  rk  rl  ÚUnaryOpÚUSubrn  rm  ÚDivr{  rM   )rP   r.  Úsympy_classrr  rq  ÚrevÚnew_nodes          r$   Úvisit_BinOpz$EvaluateFalseTransformer.visit_BinOp–  s8  € Ø�7‰7×Ñ §¡Ò.ØŸ.™.¨¯©×):Ñ):Ñ;ˆKØ—J‘J˜tŸz™zÓ*ˆEØ—:‘:˜dŸi™iÓ(ˆDàˆCÜ˜$Ÿ'™'¤3§7¡7Ô+ÜŸ™ÜŸ™ U´·±³
Ô;ÜŸ+™+¬¯©«¼S¿\¹\È!»_ÔMÈuÐUÜ!Ÿk™k¨jÄÇÁÐSXÔ@YÔZÐ[ô’ô
 ˜DŸG™G¤S§W¡WÕ-Ü˜dŸi™i¬¯©Ô5Ø"'¨˜%�DØ�CÜŸ8™8ÜŸ™ U´·±³
Ô;Ø¤§¡¬s¯x©x«zÄ3Ç<Á<ÐPQÃ?Ô SÐTÜ!Ÿk™k¨jÄÇÁÐSXÔ@YÔZÐ[ô‘Dô  ŸH™HÜŸ™ U´·±³
Ô;Ø¤§¡´·±³
ÄCÇLÁLÐQRÃOÔ!TÐUÜ!Ÿk™k¨jÄÇÁÐSXÔ@YÔZÐ[ô�Eñ Ø# T�e�Ü—x‘xÜ—X‘X ´#·(±(³*Ô=Ø˜E�]ÜŸ+™+¨*¼C¿L¹LÈuÔ<UÔVÐWôˆHð ˜nÑ,à $§¡¨X¯]©]¸KÓ H�”àˆOØˆr0   c                ó<  — | j                  |«      }t        |j                  t        j                  «      rf|j                  j
                  | j                  v rD|j                  j                  t        j                  dt        j                  d¬«      ¬«      «       |S )Nr   Frd  re  )Úgeneric_visitr)   r.   r&  rk  rb  Ú	functionsrg  r`   rm  rn  )rP   r.  r…  s      r$   Ú
visit_Callz#EvaluateFalseTransformer.visit_CallÂ  se   € Ø×%Ñ% dÓ+ˆÜ�d—i‘i¤§¡Ô*¨t¯y©y¯|©|¸t¿~¹~Ñ/MØ×Ñ×$Ñ$¤S§[¡[°ZÄsÇ|Á|ÐZ_ÔG`Ô%aÔbØˆr0   N)rC   rD   rE   r&  r1  ÚMultr3  r  r‚  ÚBitOrrx  ÚBitXorrw  r‰  ÚNotEqr[  ÚLtEr]  ÚGtErý   ri  ry  r{  r†  rŠ  rG   r0   r$   r(  r(  Q  s­   „ à�‰�Ø�‰�%Ø�‰�Ø�‰�Ø�‰�Ø�	‰	�4Ø�
‰
�EØ�
‰
�Eð	€Ið€Ið 	�	‰	�4Ø�‰�Ø�‰�Ø�‰�Ø�‰�Ø�‰�ðÐò
ò4ò*óXr0   r(  )r   r   r¸   r¹   é   rÖ   r  é   é   é	   é
   é   ú
c              #  óB   K  — | ]  \  }}|›d t        |«      ›�–— Œ y­w)z: Nr   )rÍ   r?   Úfs      r$   rÎ   rÎ   ×  s   è ø€ Ò]¹T¸QÀª¬9°Q¬<Ô8Ñ]ùs   ‚c                  ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)Ú_TzÑclass to retrieve transformations from a given slice

    EXAMPLES
    ========

    >>> from sympy.parsing.sympy_parser import T, standard_transformations
    >>> assert T[:5] == standard_transformations
    c                ó,   — t        t        «      | _        y rV   )r"   Ú_transformationÚNrS   s    r$   rQ   z_T.__init__ã  s   € Ü”_Ó%ˆ�r0   c                ó   — t         S rV   )r  rS   s    r$   Ú__str__z
_T.__str__æ  s   € ÜÐr0   c                ó�  — t        |«      t        ur|f}g }|D ]‡  }t        |«      t        u r(|j                  t	        | j
                  «      |   «       Œ<t        |«      t        u r1|j                  t	        |j                  | j
                  «      Ž «       Œ~t        d«      ‚ t        |D �cg c]  }t        |   ‘Œ c}«      S c c}w )Nzunexpected slice arg)r¬   ÚtupleÚintr`   r‹   rž  Úslicer_   Úindicesr  r�  )rP   Útr?   Útir   s        r$   rX   z_T.__getitem__é  s£   € Ü�A‹wœ%ÑØ�ˆAØˆØò 	8ˆBÜ�B‹xœ3‰Ø—‘œ˜tŸv™v› rÑ*Õ+Ü�b“œUÑ"Ø—‘œ §
¡
¨4¯6©6Ó 2Ð3Õ4äÐ 6Ó7Ð7ð	8ô °!Ö4¨Q”o aÓ(Ò4Ó5Ð5ùÒ4s   Â,CN)rC   rD   rE   rF   rQ   r   rX   rG   r0   r$   r›  r›  Ú  s   „ ñò&òó6r0   r›  )r#   r®   r\   ÚboolrV   )r*   r[   r+   rp   r,   rp   )r6   r®   r7   r]   r\   r]   )r7   úlist[TOKEN | AppliedFunction])rm   ÚTRANS)rg   zlist[TOKEN | ParenthesisGroup]r+   rp   r,   rp   )rg   r©  r+   rp   r,   rp   ro   )r“   zCallable[[str], bool])rg   r]   r+   rp   r,   rp   r\   r]   )r7   r]   r+   rp   r,   rp   r\   r]   )
rÐ   r®   r+   rp   r,   rp   r  r  r\   r®   )r+   rp   r,   rp   )rÐ   r®   r+   úDICT | Noner  ztuple[TRANS, ...] | strr,   r«  )rÐ   r®   )XrF   Ú
__future__r   Útokenizer   r   r   r   r   r	   r
   r   r   r   rm  r   r&  r   Úior   r  r  Útypingr   r   Ú	functoolsr   Úsympy.assumptions.askr   Úsympy.core.basicr   Ú
sympy.corer   Úsympy.core.functionr   Úsympy.utilities.miscr   Ú(sympy.functions.elementary.miscellaneousr   r   r¨   r¢  r£  r®   r[   r  rp   Úlistrª  r%   r/   r@   rB   rI   rc   rq   rt   r{   r�   r…   r•   rŸ   r—   r�   r¡   rµ   r¿   rÆ   rÈ   rì   rø   rû   rþ   r   r  Ú__annotations__r	  r  r$  r  ÚNodeTransformerr(  r�  rŒ   rO   r  r›  r  rG   r0   r$   ú<module>rº     sE  ðÚ MÝ "÷>÷ >÷ >õ ã 
Û Ý Û Û ß  Ý Ý 0Ý "Ý Ý (Ý *ß =ð 
€àˆc�3ˆh‰€ØˆC�ˆH�~€Ø�$�u‘+˜t TÐ*¨D°©KÐ7Ñ8€ó#ô 
;óô8	�t˜E‘{ô 	÷
?ñ ?ó4ó)óXó2>óB0óf1óhNñn %Ð%6Ó7€ðØ)-ðØ2=óð0Ø&*ðØ/:óð0Ø59ðØ>Ióó>0óf%óPó6óUópóDó&ð:!Ø&*ð!Ø/:ó!ðP ˜Ð%6¸Øðð Ð+ó ð
Ø*ðØ/2óó&ð 26à-Ø*.¸ðtZØ 7ðtZð (ótZón	7ôu˜s×2Ñ2ô uðr ØØØØØ&ØØØØØØñ€ð —)‘)Ñ]À_×EZÑEZÓE\Ô]Ó]€÷6ñ 6ñ8 ƒD�r0   