+
    ‹°³j7  ã                   ó^   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt R t	R t
R tR tR	 tR
 tR# )é    ©ÚPermutation)Úsymbols©ÚMatrix)Ú
variationsÚrotate_leftc              #  óZ   "  € R \        \        V 4      V 4       4        Rj  x€L
  R#  L5i)zÃ
Generates the symmetric group of order n, Sn.

Examples
========

>>> from sympy.combinatorics.generators import symmetric
>>> list(symmetric(3))
[(2), (1 2), (2)(0 1), (0 1 2), (0 2 1), (0 2)]
c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5i©Nr   )Ú.0Úperms   & Ú_/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/combinatorics/generators.pyÚ	<genexpr>Úsymmetric.<locals>.<genexpr>   s   é € ÐFÑ.E d”˜D×!Ð!Ó.Eùs   ‚N)r   Úrange)Úns   &r   Ú	symmetricr      s!   é € ñ G¬j¼¸q»À1Ô.EÓF×FÔFùs   ‚ +¢)£+c              #  óŒ   "  € \        \        V 4      4      p\        V 4       F  p\        V4      x € \        V^4      pK  	  R# 5i)zâ
Generates the cyclic group of order n, Cn.

Examples
========

>>> from sympy.combinatorics.generators import cyclic
>>> list(cyclic(5))
[(4), (0 1 2 3 4), (0 2 4 1 3),
 (0 3 1 4 2), (0 4 3 2 1)]

See Also
========

dihedral
N)Úlistr   r   r	   ©r   ÚgenÚis   &  r   Úcyclicr      s9   é € ô" Œu�Q‹x‹.€CÜ�1ŽXˆÜ˜#ÓÒÜ˜#˜qÓ!Šó ùs   ‚AAc              #  óŒ   "  € \        \        V 4      V 4       F&  p\        V4      pVP                  '       g   K"  Vx € K(  	  R# 5i)z±
Generates the alternating group of order n, An.

Examples
========

>>> from sympy.combinatorics.generators import alternating
>>> list(alternating(3))
[(2), (0 1 2), (0 2 1)]
N)r   r   r   Úis_even)r   r   Úps   &  r   Úalternatingr   ,   s4   é € ô œ5 ›8 QÖ'ˆÜ˜ÓˆØ�9�9Š9ØŒGó (ùs
   ‚3Aº
Ac              #  ó’  "  € V ^8X  d!   \        ^ ^.4      x € \        ^^ .4      x € R# V ^8X  d?   \        . RO4      x € \        . RO4      x € \        . RO4      x € \        . RO4      x € R# \        \        V 4      4      p\        V 4       F3  p\        V4      x € \        VRRR1,          4      x € \        V^4      pK5  	  R# 5i)a   
Generates the dihedral group of order 2n, Dn.

The result is given as a subgroup of Sn, except for the special cases n=1
(the group S2) and n=2 (the Klein 4-group) where that's not possible
and embeddings in S2 and S4 respectively are given.

Examples
========

>>> from sympy.combinatorics.generators import dihedral
>>> list(dihedral(3))
[(2), (0 2), (0 1 2), (1 2), (0 2 1), (2)(0 1)]

See Also
========

cyclic
N)r   é   é   é   )r    r   r"   r!   )r!   r"   r   r    )r"   r!   r    r   éÿÿÿÿ)r   r   r   r	   r   s   &  r   Údihedralr$   =   s¤   é € ð( 	ˆA„vÜ˜1˜a˜&Ó!Ò!Ü˜1˜a˜&Ó!Ô!Ø	
ˆaŒÜš,Ó'Ò'Üš,Ó'Ò'Üš,Ó'Ò'Üš,Ó'Ô'ä”5˜“8‹nˆÜ�q–ˆAÜ˜cÓ"Ò"Ü˜c¡$ B $�iÓ(Ò(Ü˜c 1Ó%ŠCó ùs   ‚CCc                 óÞ   € . RO. RO. RO. RO. RO. RO.p V  UUUu. uF7  p\        V UUu. uF  q" Uu. uF  q3^,
          NK  	  upNK  	  upp^0R7      NK9  	  uppp# u upi u uppi u upppi )zhReturn the permutations of the 3x3 Rubik's cube, see
https://www.gap-system.org/Doc/Examples/rubik.html
)Úsize))r    r"   é   é   )r!   é   é   é   )é	   é!   é   é   )é
   é"   é   é   )é   é#   é   é   ))r,   r4   é   é   )r0   é   é   é   )r    r/   é)   é(   )r+   é   é,   é%   )r(   é   é.   r5   ))r/   r7   é   rB   )r3   é   é   r?   )r(   r.   é+   r8   )r*   é   é*   r:   )r'   é   r=   r4   ))r.   r6   é    rJ   )r2   é   é   rH   )r"   é&   rG   r7   )r)   é$   é-   rE   )r'   r-   é0   rD   ))r-   r5   r>   rN   )r1   rA   é'   rO   )r"   r,   rC   rK   )r!   r<   é/   rL   )r    r9   rQ   r6   ))r=   rG   rQ   rC   )rI   rP   rS   r@   )r9   rB   rJ   rN   )r;   rF   rM   rR   )r8   rD   rK   r>   r   )ÚaÚxÚxir   s       r   Úrubik_cube_generatorsrW   a   sr   € ò
	ò	ò	ò	ò	ò	-ð	€Añ NOÕOÉQÈŒK±qÔ9±q°¨Ó,© A˜aŸ%˜%©Ô,±qÒ9À×CÉQÓOÐOùÒ,ùÓ9ùÔOs'   ›A(ªA"²AÁA"Á
A(ÁA"Á"A(c                ó  a aaaaaaaaaaaaaaaaaaaaaa € S ^8  d   \        R4      hVV 3R loV3R loV3R loVV 3R loVV 3R loVV 3R loVV 3R lo VV 3R	 loRVV 3R
 lloV3R loRVVVVVVVVVVVVVV 3R lloV3R lpRVVVVVVVVV3	R lloV3R lpRVVVVVVVVV3	R lloV3R lp\        R4      ;w  ooooooo/ o^ p\        ^4       FO  p. p\        S ^,          4       F  pVP                  V4       V^,          pK  	  \	        S S V4      SSV,          &   KQ  	  RVVV3R llp. o\        \        ^S ^,          ,          4      4      p	\        S ^,
          4       F  p
S! V
4       V! 4        V! V
4       K  	  V! ^4      V	8X  g   Q hS! 4        \        S ^,
          4       F(  p
S! V
4       V! 4        V! 4        S! 4        V! V
4       K*  	  V! 4        V! ^4      V	8X  g   Q hS! 4        V! 4        V! 4        \        S ^,
          4       FD  p
S! V
4       S! 4        S! 4        V! 4        V! 4        S! 4        V! 4        V! 4        V! V
4       KF  	  S! 4        S! 4        V! 4        V! ^4      V	8X  g   Q hS# )a  Return permutations for an nxn Rubik's cube.

Permutations returned are for rotation of each of the slice
from the face up to the last face for each of the 3 sides (in this order):
front, right and bottom. Hence, the first n - 1 permutations are for the
slices from the front.
zdimension of cube must be > 1c                 óB   <€ SV ,          P                  SV,
          4      # r   ©Úcol©Úfr   Úfacesr   s   &&€€r   ÚgetrÚrubik.<locals>.getrƒ   ó   ø€ Ø�Q�x�|‰|˜A �EÓ"Ð"ó    c                 óB   <€ SV ,          P                  V^,
          4      # ©r    rZ   ©r]   r   r^   s   &&€r   ÚgetlÚrubik.<locals>.getl†   ra   rb   c                 óB   <€ SV ,          P                  V^,
          4      # rd   ©Úrowre   s   &&€r   ÚgetuÚrubik.<locals>.getu‰   ra   rb   c                 óB   <€ SV ,          P                  SV,
          4      # r   ri   r\   s   &&€€r   ÚgetdÚrubik.<locals>.getdŒ   ra   rb   c                 óH   <€ \        S^V4      SV ,          RSV,
          3&   R# ©r    :NNNNr   ©r]   r   Úsr^   r   s   &&&€€r   ÚsetrÚrubik.<locals>.setr�   ó!   ø€ Ü# A q¨!›_ˆˆa���A˜•E�Órb   c                 óH   <€ \        S^V4      SV ,          RV^,
          3&   R# rq   r   rr   s   &&&€€r   ÚsetlÚrubik.<locals>.setl’   rv   rb   c                 óH   <€ \        ^SV4      SV ,          V^,
          R3&   R# rq   r   rr   s   &&&€€r   ÚsetuÚrubik.<locals>.setu•   ó!   ø€ Ü# A q¨!›_ˆˆa���Q•˜�Órb   c                 óH   <€ \        ^SV4      SV ,          SV,
          R3&   R# rq   r   rr   s   &&&€€r   ÚsetdÚrubik.<locals>.setd˜   r}   rb   c                 óî   <€ \        V4       Fd  pSV ,          p. p\        S4       F7  p\        S^,
          RR4       F  pVP                  W1V3,          4       K  	  K9  	  \        SSV4      SV &   Kf  	  R# )r    Nr#   )r   Úappendr   )ÚFÚrÚ_ÚfaceÚrvÚcr^   r   s   &&    €€r   ÚcwÚrubik.<locals>.cwœ   sj   ø€ Ü�q–ˆAØ˜•8ˆDØˆBÜ˜1–X�Ü˜q 1�u b¨"Ö-�AØ—I‘I˜d a 4�jÖ)ó .ñ ô ˜a  BÓ'ˆE�!‹Hó rb   c                 ó   <€ S! V ^4       R# ©r"   N© )rƒ   r‰   s   &€r   ÚccwÚrubik.<locals>.ccw¥   s   ø€ Ù
ˆ1ˆaŽrb   c                 óf  <€ \        V4       F   pV ^ 8X  d	   S	! S4       V ^,          p S! SV 4      pS! SV \        S! SV 4      4      4       S! SV \        \        S! SV 4      4      4      4       S! SV \        S
! SV 4      4      4       S! SV \        \        V4      4      4       V ^,          p K¢  	  R# )r   N)r   r   Úreversed)r   r„   r…   ÚtempÚDrƒ   ÚLÚRÚUr‰   rn   rf   r_   rk   r   rx   rt   r{   s   &&  €€€€€€€€€€€€€€r   ÚfcwÚrubik.<locals>.fcw«   s›   ø€ Ü�q–ˆAØ�AŒvÙ�1”Ø��FˆAÙ˜˜1“:ˆDÙ��A”t™D  A›JÓ'Ô(Ù��A”tœH¡T¨!¨Q£ZÓ0Ó1Ô2Ù��A”t™D  A›JÓ'Ô(Ù��A”tœH T›NÓ+Ô,Ø��FŠAó rb   c                 ó   <€ S! V ^4       R# rŒ   r�   )r   r—   s   &€r   ÚfccwÚrubik.<locals>.fccw·   s   ø€ ÙˆAˆqŽ	rb   c                 óð   <	€ \        V 4       Fe  pS
! S4       S	! S4       S
! S4       SS,          pS
! S4       SS,          SS&   S
! S4       SS,          SS&   S
! S4       SS,          SS&   VSS&   Kg  	  R # r   ©r   ©r„   r…   ÚtÚBr“   rƒ   r”   r•   r–   rŽ   r‰   r^   s   &  €€€€€€€€€r   ÚFCWÚrubik.<locals>.FCW»   st   ø€ Ü�q–ˆAÙˆqŒEÙ�ŒFÙˆqŒEØ�a•ˆAÙˆqŒEØ˜Q•xˆE�!‰HÙˆqŒEØ˜Q•xˆE�!‰HÙˆqŒEØ˜Q•xˆE�!‰HØˆE�!‹Hó rb   c                  ó   <€ S ! ^4       R# rŒ   r�   )r¡   s   €r   ÚFCCWÚrubik.<locals>.FCCWÉ   ó
   ø€ ÙˆAŽrb   c                 ó°   <	€ \        V 4       FE  pS
! S4       S	! S4       SS,          pSS,          SS&   SS,          SS&   SS,          SS&   VSS&   KG  	  R # r   r�   rž   s   &  €€€€€€€€€r   ÚUCWÚrubik.<locals>.UCWÍ   sX   ø€ Ü�q–ˆAÙˆqŒEÙ�ŒFØ�a•ˆAØ˜Q•xˆE�!‰HØ˜Q•xˆE�!‰HØ˜Q•xˆE�!‰HØˆE�!‹Hó rb   c                  ó   <€ S ! ^4       R# rŒ   r�   )r¨   s   €r   ÚUCCWÚrubik.<locals>.UCCW×   r¦   rb   zU, F, R, B, L, Dc                 ó–   <€ . pS F  pVP                  SV,          4       K  	  V '       d   V# SP                  \        V4      4       R # r   )Úextendr‚   r   )Úshowr   r]   r^   ÚgÚnamess   &  €€€r   r   Úrubik.<locals>.permê   s:   ø€ àˆÛˆAØ�H‰H�U˜1•XÖñ çØˆHØ	�‰”˜Q“Ö rb   rd   )r   )Ú
ValueErrorr   r   r‚   r   r   )!r   rš   r¤   r«   ÚcountÚfir]   rT   r   ÚIr   r    r“   rƒ   r¡   r”   r•   r–   r¨   rŽ   r‰   r^   r—   r°   rn   rf   r_   rk   r±   r   rx   rt   r{   s!   f          @@@@@@@@@@@@@@@@@@@@@@r   Úrubikr·   v   s*  ÿÿþ€ ð 	ˆ1„uÜÐ8Ó9Ð9ö#õ#õ#ö#ö-ö-ö-ö-÷(ð (õ÷
÷ 
ô 
õ÷÷ õ÷÷ õô
  'Ð'9Ó:Ð:Ñ€A€qˆ!ˆQ��1�uð €EØ€EÜ�AŽhˆØˆÜ�q˜!•t–ˆAØ�H‰H�UŒOØ�Q�JŠEñ ô " ! Q¨›?ˆˆe�B�iÓñ ÷!ñ !ð 	€AÜŒU�1�Q˜•T•6‹]Ó€Aô �1�q•5Ž\ˆÙˆAŒÙŒÙˆQŽñ ñ �‹7�aŒ<Ðˆ<ñ „EÜ�1�q•5Ž\ˆÙˆAŒáŒáŒñ 	ŒÙˆQŽñ ñ 	„FÙ�‹7�aŒ<Ðˆ<ñ „EÙ„FÙ„FÜ�1�q•5Ž\ˆáˆAŒáŒÙŒÙŒáŒñ 	ŒÙŒÙŒáˆQŽñ ñ" „EÙ„EÙ„FÙ�‹7�aŒ<Ðˆ<à€Hrb   N)Ú sympy.combinatorics.permutationsr   Úsympy.core.symbolr   Úsympy.matricesr   Úsympy.utilities.iterablesr   r	   r   r   r   r$   rW   r·   r�   rb   r   Ú<module>r¼      s3   ðÝ 8Ý %Ý !ß =òGò"ò.ò"!&òHPô*wrb   