K iFddlmZddlmZddlmZej ZdZy))PermutationGroup) Permutation)uniqc g}g}d}d}|D]O}|j}t|j}|j|||z }|j|||z }Qg}t |D]%} |jt t |'d} d}t t|D]g} t | | || zD]@} || j| | z j } | D cgc]} | |z c} || |||| zB| || z } ||| z }it t|Dcgc]}tt |c}}t|dScc} wcc}w)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__ rF)dups) degreelen generatorsappendrangelist array_formr_af_newr)groupsdegrees gens_count total_degree total_gensgroup current_degcurrent_num_gens array_gensi current_genjgenxa perm_genss j/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/combinatorics/group_constructs.py DirectProductr!s:GJLJ'll u//0{# # *+&& 'J : 5$u\2345KK 3z? #"{K*Q-$?@ /A1I((!k/:FFC*-.Q[. qM+kGAJ&> ? / z!}$ wqz! "TZ@747+@ABI IE 22 /As % E"E N)sympy.combinatorics.perm_groupsr sympy.combinatorics.permutationsrsympy.utilities.iterablesrrr!r r's<8*   53r&