§
    OŠtjå  ã                   ó>   — d dl mZ d dlmZ d dlmZ ej        Zd„ ZdS )é    )ÚPermutationGroup)ÚPermutation)Úuniqc                  óÔ  ‡— g }g }d}d}| D ]Q}|j         Št          |j        ¦  «        }|                     ‰¦  «         |‰z  }|                     |¦  «         ||z  }ŒRg }t	          |¦  «        D ]1}|                     t          t	          |¦  «        ¦  «        ¦  «         Œ2d}	dŠt	          t          |¦  «        ¦  «        D ]q}t	          |	|	||         z   ¦  «        D ]?}
| |         j        |
|	z
           j        }ˆfd„|D ¦   «         ||
         ‰‰||         z   …<   Œ@|	||         z  }	‰||         z  ŠŒrt          t          d„ |D ¦   «         ¦  «        ¦  «        }t          |d¬¦  «        S )a8  
    Returns the direct product of several groups as a permutation group.

    Explanation
    ===========

    This is implemented much like the __mul__ procedure for taking the direct
    product of two permutation groups, but the idea of shifting the
    generators is realized in the case of an arbitrary number of groups.
    A call to DirectProduct(G1, G2, ..., Gn) is generally expected to be faster
    than a call to G1*G2*...*Gn (and thus the need for this algorithm).

    Examples
    ========

    >>> from sympy.combinatorics.group_constructs import DirectProduct
    >>> from sympy.combinatorics.named_groups import CyclicGroup
    >>> C = CyclicGroup(4)
    >>> G = DirectProduct(C, C, C)
    >>> G.order()
    64

    See Also
    ========

    sympy.combinatorics.perm_groups.PermutationGroup.__mul__

    r   c                 ó   •— g | ]}|‰z   ‘ŒS © r   )Ú.0ÚxÚcurrent_degs     €úb/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/combinatorics/group_constructs.pyú
<listcomp>z!DirectProduct.<locals>.<listcomp>9   s   ø€ Ð.Ð.Ð. Q��[‘Ð.Ð.Ð.ó    c                 óF   — g | ]}t          t          |¦  «        ¦  «        ‘ŒS r   )Ú_af_newÚlist)r	   Úas     r   r   z!DirectProduct.<locals>.<listcomp><   s&   € Ð@Ð@Ð@°�7¥4¨¡7¤7Ñ+Ô+Ð@Ð@Ð@r   F)Údups)	ÚdegreeÚlenÚ
generatorsÚappendÚranger   Ú
array_formr   r   )ÚgroupsÚdegreesÚ
gens_countÚtotal_degreeÚ
total_gensÚgroupÚcurrent_num_gensÚ
array_gensÚiÚcurrent_genÚjÚgenÚ	perm_gensr   s                @r   ÚDirectProductr'      s­  ø€ ð: €GØ€JØ€LØ€JØð 'ð 'ˆØ”lˆÝ˜uÔ/Ñ0Ô0ÐØ�Š�{Ñ#Ô#Ð#Ø˜Ñ#ˆØ×ÒÐ*Ñ+Ô+Ð+ØÐ&Ñ&ˆ
ˆ
Ø€JÝ�:ÑÔð 5ð 5ˆØ×Ò�$�u \Ñ2Ô2Ñ3Ô3Ñ4Ô4Ð4Ð4Ø€KØ€KÝ•3�z‘?”?Ñ#Ô#ð "ð "ˆÝ�{ K°*¸Q´-Ñ$?Ñ@Ô@ð 	/ð 	/ˆAØ˜1”IÔ(¨!¨k©/Ô:ÔFˆCà.Ð.Ð.Ð.¨#Ð.Ñ.Ô.ð �qŒM˜+ k°G¸A´JÑ&>Ð>Ñ?Ð?à�z !”}Ñ$ˆØ�w˜q”zÑ!ˆˆÝ•TÐ@Ð@°ZÐ@Ñ@Ô@ÑAÔAÑBÔB€IÝ˜I¨EÐ2Ñ2Ô2Ð2r   N)Úsympy.combinatorics.perm_groupsr   Ú sympy.combinatorics.permutationsr   Úsympy.utilities.iterablesr   r   r'   r   r   r   ú<module>r+      s\   ðØ <Ð <Ð <Ð <Ð <Ð <Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø *Ð *Ð *Ð *Ð *Ð *à
Ô
€ð53ð 53ð 53ð 53ð 53r   