
    QVjim                     ,   U d dl Z d dlmZ d dlZd dlmZ  e j        e          Zej	        ej	        ej
        ej
        ej        ej        ej        ej        ej        ej        ej        ej        iZeeej                 eej                 f         ed<   ej        ej        ej        ej        fZdedeeej                          fdZ	 	 dd
ej        dej        dededeeej        ej        f                  f
dZdej        dej        dedej        fdZdS )    N)Optional)FloorDiv_MIRROR_REL_OPtypereturnc                 8    t                               | d           S N)r   get)r   s    R/root/voice-cloning/.venv/lib/python3.11/site-packages/torch/utils/_sympy/solve.pymirror_rel_opr      s    dD)))       Texprthingtrialsfloordiv_inequalityc                 :   t          t          |                     }t          | t          j                  r|*t
                              dt          |                      d S | j                            |          }| j	                            |          }|r |rt
                              d||            d S g }|r|
                    |            |r)|
                     || j	        | j                             |D ]}|t          |t          j                  sJ t          |          D ]}	t          |||          }
|
|k    r n|
}t          |t          j                  r2|j        |k    r't
                              d| |           ||j	        fc S d S )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&   )   s    4::&&F
 dEI&& &.		8$t**EEEtHLL''MHLL''M
   		DeTRRRt K  !4    766$(DH55666  9!UY'''''v 	 	A$QCVWWWEzzAA a## 	II*D!444ae8OOO4r   r#   c                    t          |           }t          | t          j                  rbt          | j        t          j                  r%t          fd| j        j        D                       nd} || j        |z
  | j        |z
            } t          | t          j                  rt          | j        t          j	                  r| j        \  }}t          j	        fd|j        D              }t          | t                    r|j        at          | t                    s|j        sE||z  }||z  }t          | t                    r|j        rt          |          }|J  |||          } |rUt          | t          j                  r:t          | j        t                    r| j        j        j        r| j        j        r t          | t          j                  r]| j        j        \  }}	t          j        t          j        || j        |	z            t          j        || j        dz   |	z                      S t          | t          j                  r]| j        j        \  }}	t          j        t          j        || j        |	z            t          j        || j        dz   |	z                      S t          | t          j        t          j        f          rct          | t          j                  r| j        n	| j        dz   }
t          j        | j        j        d         |
| j        j        d         z            S t          | t          j        t          j        f          rct          | t          j                  r| j        n	| j        dz   }
t          j        | j        j        d         |
| j        j        d         z            S | S )Nc              3   F   K   | ]}|                               |V  d S r	   r   .0ar   s     r   	<genexpr>z#_try_isolate_lhs.<locals>.<genexpr>i   s2      ::aQUU5\\:::::::r   r   c                 >    g | ]}|                               |S  r)   r*   s     r   
<listcomp>z$_try_isolate_lhs.<locals>.<listcomp>r   s(    DDD!quuU||DADDDr      )r   r   r   r   r   Addsumargsr   Mul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   other	numeratordenominatorquotients    `         r   r   r   a   st    
aB!UY = !%++C::::15::::::: 	
 Bqu}$aem&;<< !UY Jquei$@$@ 6S	DDDDsxDDDE
 1.// 	E4E4M1.// 5N47K 5N +C+C !-.. '53D '"2&&>>>3A 	"Gq%)$$"G quh''"G EM%	"G
 E"G a"" 	%&UZ"I{9QU[%8::aeai;%>@@   a"" 	%&UZ"I{8QU[%8::aeai;%>@@   a%(EH-.. 	G *1eh 7 7HquuaeaiH8AEJqMHquz!},DFFF a%(EH-.. 	G *1eh 7 7HquuaeaiH8AEJqMHquz!},DFFFHr   )r   T)loggingtypingr   r   torch.utils._sympy.functionsr   	getLogger__name__r   r<   r@   r>   rC   rB   r?   r   dictr   Basicr   __annotations__r6   r   intbooltupleExprr&   r   r/   r   r   <module>rV      s           1 1 1 1 1 1 g!! 
Heh	Heh	Heh	Heh	Heh	Heh<T%+&UY78    Heh%(; * *$uy/!: * * * **  $	5 5
+5;5 5 	5
 eEIuz)*+5 5 5 5pQ{Q ;Q=AQ
[Q Q Q Q Q Qr   