Ë
    7^(h]  ã                   óV   — 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	  G d„ de	«      Z
y)	é    )ÚIndexed)ÚTuple)ÚDummy)Úsympify)ÚIntegralc                   ó8   ‡ — e Zd ZdZd„ Zˆ fd„Zed„ «       Zˆ xZS )ÚIndexedIntegrala/  
    Experimental class to test integration by indexed variables.

    Usage is analogue to ``Integral``, it simply adds awareness of
    integration over indices.

    Contraction of non-identical index symbols referring to the same
    ``IndexedBase`` is not yet supported.

    Examples
    ========

    >>> from sympy.sandbox.indexed_integrals import IndexedIntegral
    >>> from sympy import IndexedBase, symbols
    >>> A = IndexedBase('A')
    >>> i, j = symbols('i j', integer=True)
    >>> ii = IndexedIntegral(A[i], A[i])
    >>> ii
    Integral(_A[i], _A[i])
    >>> ii.doit()
    A[i]**2/2

    If the indices are different, indexed objects are considered to be
    different variables:

    >>> i2 = IndexedIntegral(A[j], A[i])
    >>> i2
    Integral(A[j], _A[i])
    >>> i2.doit()
    A[i]*A[j]
    c                 ó  — t         j                  |«      \  }}t        |«      }|j                  |«      }t	        j
                  | |g|¢­i |¤Ž}||_        |j                  «       D ��ci c]  \  }}||“Œ
 c}}|_        |S c c}}w ©N)	r	   Ú_indexed_process_limitsr   Úxreplacer   Ú__new__Ú_indexed_replÚitemsÚ_indexed_reverse_repl)ÚclsÚfunctionÚlimitsÚassumptionsÚreplÚobjÚkeyÚvals           ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/sandbox/indexed_integrals.pyr   zIndexedIntegral.__new__)   s€   € Ü&×>Ñ>¸vÓF‰ˆˆfÜ˜8Ó$ˆØ×$Ñ$ TÓ*ˆÜ×Ñ˜s HÐE¨vÒE¸ÑEˆØ ˆÔØ>B¿j¹j»l×$K±(°#°s S¨#¡XÓ$KˆÔ!Øˆ
ùó %Ls   Á)Bc                 óV   •— t         ‰| �  «       }|j                  | j                  «      S r   )ÚsuperÚdoitr   r   )ÚselfÚresÚ	__class__s     €r   r   zIndexedIntegral.doit2   s#   ø€ Ü‰g‰l‹nˆØ�|‰|˜D×6Ñ6Ó7Ð7ó    c                 ó  — i }g }| D ]€  }t        |t        t        t        f«      r|d   }|dd  }n|}d}t        |t        «      r3||vrt        t        |«      «      }|||<   |j                  f|z   «       Œp|j                  |«       Œ‚ ||fS )Nr   é   © )Ú
isinstanceÚtupleÚlistr   r   r   ÚstrÚappend)r   r   Ú	newlimitsÚiÚvÚvrestÚrs          r   r   z'IndexedIntegral._indexed_process_limits6   sŸ   € àˆØˆ	Øò 	$ˆAÜ˜!œe¤T¬5Ð1Ô2Ø�a‘D�Ø˜!˜"˜‘à�Ø�Ü˜!œWÔ%Ø˜D‘=Üœc !›f›�AØ�D˜‘GØ× Ñ  !  e¡Õ,à× Ñ  Õ#ð	$ð �YˆÐr!   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ústaticmethodr   Ú__classcell__)r    s   @r   r	   r	      s'   ø„ ñò@ô8ð ñó ôr!   r	   N)Úsympy.tensorr   Úsympy.core.containersr   Úsympy.core.symbolr   Úsympy.core.sympifyr   Úsympy.integrals.integralsr   r	   r$   r!   r   ú<module>r:      s"   ðÝ  Ý 'Ý #Ý &Ý .ô@�hõ @r!   