
    shv                     h    S SK 7  S SKrS SKJr  S/rS\S\S\4S jrS\S\S\4S	 jr " S
 S5      r	g)    )*N)ConstantIntNodeNestedIntNodelhsrhsreturnc                     [        U [        5      =(       aP    [        U[        5      =(       a9    U R                  UR                  :H  =(       a    U R                  UR                  :H  $ N)
isinstancer   t_idcoeffr   r   s     u/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/torch/nested/_internal/nested_int.py_eqr      sL    3& 	#sM*	#HH 	# II"	    c                    [        U[        5      (       aS  [        U [        5      (       a>  U R                  UR                  :X  a  U R                  UR                  :  $ [	        S5      e[        U [        5      (       a5  UR                  5       (       a  UR                  5       S::  a  g[	        S5      e[        U[        5      (       a5  U R                  5       (       a  U R                  5       S:  a  g[	        S5      e[	        S5      e)Nzge: relation is indeterminate   TFzinputs unsupported)r   r   r   r   
ValueErroris_constantconstant_intr   s     r   _ger      s    #}%%*S-*H*H88sxx99		))899	C	'	'??!1!1!3q!8899	C	'	'??!1!1!3a!7899-..r   c                      \ rS rSrS\S\4S jrS\4S jrS\\   4S jrS\	4S jr
S\	4S	 jrS\	4S
 jrS\	4S jrS!S jrS\4S jrS\4S jrS\4S jrS\4S jrS\4S jrS\SS 4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\	4S jrS\4S jrS\	4S jrS\S\4S jr Sr!g )"r   %   r   r   c                     Xl         X l        g r
   )r   r   )selfr   r   s      r   __init__NestedIntNode.__init__&   s    	
r   r   c                     U R                   $ r
   )r   r   s    r   nested_int_coeffNestedIntNode.nested_int_coeff*   s    zzr   c                     g r
    r   s    r   maybe_as_intNestedIntNode.maybe_as_int-       r   c                     gNTr#   r   s    r   is_intNestedIntNode.is_int0   r&   r   c                     gNFr#   r   s    r   is_floatNestedIntNode.is_float3       r   c                     gr,   r#   r   s    r   is_boolNestedIntNode.is_bool6   r/   r   c                     gr(   r#   r   s    r   is_nested_intNestedIntNode.is_nested_int9   r&   r   c                     U $ r
   r#   r   s    r   cloneNestedIntNode.clone<   s    r   c                 v    U R                   S:X  a  SU R                   3$ U R                    SU R                   3$ )N   jz*jr   r   r   s    r   _strNestedIntNode._str?   s6    ::?tyyk?"**R		{++r   c                 "    U R                  5       $ r
   r=   r   s    r   strNestedIntNode.strD       yy{r   c                 "    U R                  5       $ r
   r@   r   s    r   __str__NestedIntNode.__str__G   rC   r   c                 "    U R                  5       $ r
   r@   r   s    r   __repr__NestedIntNode.__repr__J   rC   r   c                 "    U R                  5       $ r
   r@   r   s    r   _graph_reprNestedIntNode._graph_reprM   rC   r   otherc                     UR                  5       (       a  UR                  5       nO[        S[        U5       35      e[	        U R
                  U R                  U-  5      $ )Nzunsupported: )r   r   r   typer   r   r   r   rM   s     r   mulNestedIntNode.mulP   sO    &&(E}T%[M:;;TYY

U(:;;r   c                 R    [         R                  R                  [        X5      5      $ r
   torch_C_get_constant_bool_symnoder   rP   s     r   eqNestedIntNode.eqW       xx223t3CDDr   c                 \    [         R                  R                  [        X5      (       + 5      $ r
   rT   rP   s     r   neNestedIntNode.neZ       xx22s47G3GHHr   c                 \    [         R                  R                  [        X5      (       + 5      $ r
   rU   rV   rW   r   rP   s     r   gtNestedIntNode.gt]   s    xx22s57G3GHHr   c                 \    [         R                  R                  [        X5      (       + 5      $ r
   r`   rP   s     r   ltNestedIntNode.lt`   r^   r   c                 R    [         R                  R                  [        X5      5      $ r
   r`   rP   s     r   leNestedIntNode.lec   s    xx223u3CDDr   c                 R    [         R                  R                  [        X5      5      $ r
   r`   rP   s     r   geNestedIntNode.gef   rZ   r   c                     gr,   r#   r   s    r   is_symbolicNestedIntNode.is_symbolici   r/   r   c                     U R                   $ r
   )r   r   s    r   
nested_intNestedIntNode.nested_intl   s    yyr   c                     gr,   r#   r   s    r   r   NestedIntNode.is_constanto   r/   r   numc                 @    [        U5      [        L d   e[        U5      $ r
   )rO   intr   )r   rt   s     r   wrap_intNestedIntNode.wrap_intr   s    CyCs##r   r<   N)r   r   )"__name__
__module____qualname____firstlineno__rv   r   r    Optionalr$   boolr)   r-   r1   r4   r7   Anyr=   rA   rE   rH   rK   rQ   rX   r\   ra   rd   rg   rj   rm   rp   r   r   rw   __static_attributes__r#   r   r   r   r   %   sp   S  # hsm  $  t ,c ,
S  # S < < <E E EI I II I II I IE E EE E ET C T $C $O $r   )
typingrU   'torch.fx.experimental._constant_symnoder   __all__r   r~   r   r   r   r#   r   r   <module>r      sX      C 
S s t /S /s /t /"O$ O$r   