
    JThm                        % S SK r S SKJr  S SKrS SKJr  \ R                  " \5      r\R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  0r\\\R$                     \\R&                     4   \S'   \R                  \R                  \R                  \R                  4rS\S\\\R&                        4S jr  SS\R$                  S	\R$                  S
\S\S\\\R&                  \R4                  4      4
S jjrS\R$                  S	\R$                  S\S\R$                  4S jrg)    N)Optional)FloorDiv_MIRROR_REL_OPtypereturnc                 .    [         R                  U S 5      $ N)r   get)r   s    P/var/www/auris/envauris/lib/python3.13/site-packages/torch/utils/_sympy/solve.pymirror_rel_opr      s    dD))    exprthingtrialsfloordiv_inequalityc                 T   [        [        U 5      5      n[        U [        R                  5      (       a  Uc   [
        R                  S[        U 5      5        g U R                  R                  U5      nU R                  R                  U5      nU(       a  U(       a  [
        R                  SX5        g / nU(       a  UR                  U 5        U(       a,  UR                  U" U R                  U R                  5      5        U H  nUc  M  [        U[        R                  5      (       d   e[        U5       H  n	[        XUS9n
X:X  a    OU
nM     [        U[        R                  5      (       d  Mo  UR                  U:X  d  M  [
        R                  SX5        XR                  4s  $    g )Nz$expression with unsupported type: %sz0thing (%s) found in both sides of expression: %s)r   zsolved: %s ---> %s)r   r   
isinstancesympyRellogdebuglhshasrhsappendrange_try_isolate_lhs)r   r   r   r   mirrorlhs_has_thingrhs_has_thingexpressionse_trials              r   	try_solver%   )   sC    4:&F
 dEII&&&.		8$t*EHHLL'MHHLL'M
 		DeR K 4 6$((DHH569!UYY''''vA$QCVWEzA  a##II*D4ee8O! $ r   r"   c                 	  ^ [        U 5      n[        U [        R                  5      (       aw  [        U R                  [        R
                  5      (       a)  [        U4S jU R                  R                   5       5      OSnU" U R                  U-
  U R                  U-
  5      n [        U [        R                  5      (       Ga
  [        U R                  [        R                  5      (       a  U R                  u  pV[        R                  " UR                   Vs/ s H  owR                  T5      (       a  M  UPM     sn6 n[        U [        5      (       a  UR                  bl  [        U [        5      (       d  UR                  (       dF  XX-  nXh-  n[        U [        5      (       a  UR                  (       a  [        U5      nUc   eU" XV5      n U(       Ga  [        U [        R                  5      (       Ga  [        U R                  [        5      (       Ga  U R                  R                   R"                  (       Ga  U R                  R$                  (       Ga  [        U [        R&                  5      (       at  U R                  R                  u  p[        R(                  " [        R*                  " XR                  U
-  5      [        R,                  " XR                  S-   U
-  5      5      $ [        U [        R.                  5      (       at  U R                  R                  u  p[        R0                  " [        R,                  " XR                  U
-  5      [        R*                  " XR                  S-   U
-  5      5      $ [        U [        R2                  [        R*                  45      (       a  [        U [        R*                  5      (       a  U R                  OU R                  S-   n[        R*                  " U R                  R                  S   XR                  R                  S   -  5      $ [        U [        R,                  [        R4                  45      (       a  [        U [        R,                  5      (       a  U R                  OU R                  S-   n[        R,                  " U R                  R                  S   XR                  R                  S   -  5      $ U $ s  snf )Nc              3   V   >#    U  H  oR                  T5      (       a  M  Uv   M      g 7fr	   )r   ).0ar   s     r   	<genexpr>#_try_isolate_lhs.<locals>.<genexpr>i   s     ::aUU5\:s   )	)r      )r   r   r   r   r   Addsumargsr   Mulr   INEQUALITY_TYPESis_negativeis_zeror   r   divisoris_positive
is_integerEqAndGeLtNeOrGtLe)r"   r   r   oplhs_not_thingr   r   r)   other	numeratordenominatorquotients    `          r   r   r   a   s6    
aB!UYY !%%++ :155:::: 	
 quu}$aeem&;< !UYYJquueii$@$@66		sxxDx!uuU|AxDE
 1.//E4E4E4M1.//CKK +C+C !-..53D3D"2&>!>3A 	q%))$$quuh''EEMM%%%EE a""%&UUZZ"I99UU[%8:eeai;%>@  a""%&UUZZ"I88UU[%8:eeai;%>@  a%((EHH-.. *1ehh 7 7quuaeeaiH88AEEJJqMHuuzz!},DFF a%((EHH-.. *1ehh 7 7quuaeeaiH88AEEJJqMHuuzz!},DFFHA Es   S5S)   T)loggingtypingr   r   torch.utils._sympy.functionsr   	getLogger__name__r   r7   r;   r9   r>   r=   r:   r   dictr   Basicr   __annotations__r1   r   intbooltupleExprr%   r    r   r   <module>rS      sn      1 ! 
HHehh	HHehh	HHehh	HHehh	HHehh	HHehh<T%++&UYY78  HHehh%((; * *$uyy/!: **  $	5
++5;;5 5 	5
 eEIIuzz)*+5pQ{{Q ;;Q=AQ
[[Qr   