+
    i                     |    ^ RI HtHt ^ RIHtHtHtHtHt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# )    )ordereddefault_sort_key)	PartitionIntegerPartitionRGS_enum
RGS_unrankRGS_rankrandom_integer_partition)raises)
partitions)Set	FiniteSetc                     \        \        R  4       \        \        R 4       \        \        R 4       \        \        R 4       \        . RO^^.4      \        ^^.. RO4      8X  g   Q h\        0 Rm^^04      \        . RO^^.4      8X  g   Q h\        ^^^4      p \        ^^4      p\        W4      \        . RO^^.4      8X  g   Q h\        W04      \        \        W4      4      8X  g   Q h\        W04      \        W4      8w  g   Q hR# )c                      \        . RO4      # )   )r   r      r        g/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/combinatorics/tests/test_partitions.py<lambda>,test_partition_constructor.<locals>.<lambda>   s	    y3r   c                  "    \        . RO. RO4      # )r   r   r      )r   r      r   r   r   r   r   r      s    yI>r   c                      \        ^^^4      # r   r   r   r   r   r   r      s    yAq1r   c                  8    \        \        \        ^4      4      !  # r   )r   listranger   r   r   r   r      s    y$uQx.9r   Nr   >   r   r   r   )r   
ValueErrorr   r   abs     r   test_partition_constructorr'   
   s    
:34
:>?
:12
:9:YA'9aVY+GGGGYA'9YA+GGGG!QA!QAQ?i	Aq6::::aV	)A/ ::::aV	!///r   c                     ^ RI Hp  \        . RO^.4      p\        ^^.^^.4      p\        V .4      pWV.pVP                  \        R7       WCW.8X  g   Q hVP                  R R7       WCW.8X  g   Q hW8H  RJ g   Q hW8:  g   Q hW8  RJ g   Q hW8w  g   Q hW8  g   Q hV^,           P
                  ^^.^^..8X  g   Q hV^,
          P
                  . RO^..8X  g   Q hV^,
          P
                  . RO.8X  g   Q hV^,           P
                  . RO^..8X  g   Q hV^,           P
                  ^^.^.^..8X  g   Q hVP                  ^8X  g   Q hVP                  ^8X  g   Q hVP                  R	8X  g   Q hVP                  R
8X  g   Q hR# )r   )x)keyc                     \        V R R7      # )zrev-lex)order)r   )ws   &r   r    test_partition.<locals>.<lambda>"   s    )!9=r   FNr   )r   r   r   )r   r   r   r   )r   r   r   r   )r   r   r   r   )	sympy.abcr)   r   sortr   	partitionrankRGS)r)   r%   r&   cls        r   test_partitionr6      s   )aS!A1a&1a&!A1#A	
q	AFFF A	>>FF=F>A	>>Fu6M6Ee6M65L5E!Q!Q 0000EQC 0000E...EQC 0000E!Q!qc 222266Q;;66Q;;55L   55L   r   c            	         \        \        R  4       \        \        R 4       \        ^. R
O4      p V P                  4       p\        . R
O4      p\        ^^^^^^^/4      pW8X  g   Q hV P                  VP                  8X  g   Q hV P
                  . RO8X  g   Q hW8H  RJ g   Q hW8:  g   Q hW8  RJ g   Q hW8w  g   Q h\        ^^4       F  p\        4       p\        4       p\        V.4      p \        V4       Uu0 uF  p\        V4      kK  	  pp\        V4      p	\        V	4       F9  p
VP                  V 4       V P                  4       p \        W@P                  4       K;  	  \        V	4       F9  p
VP                  V 4       V P                  4       p \        W@P                  4       K;  	  WX8X  g   Q hWh8X  d   K  Q h	  \        . RO4      P                  4       R8X  g   Q h\        . RO4      P                  R4      R8X  g   Q h\        \        . RO4      4      R8X  g   Q h\        . RO4      P                  . RO8X  g   Q h\        \        R 4       \        ^4      ^.8X  g   Q h\        ^
. ROR7      . RO8X  g   Q hR	# u upi )c                  <    \        \        \        ^4      4      4      # r    r   r!   r"   r   r   r   r   (test_integer_partition.<locals>.<lambda>;   s    /U1X?r   c            	      @    \        ^d\        \        ^^4      4      4      # )d   r9   r   r   r   r   r:   =   s    /T%1+5FGr   Fz###
##
#ozooo
o
oz	[3, 1, 1]c                      \        R4      # r   )r
   r   r   r   r   r:   `   s
    7;r   )seedN)r   r   r   )r   r   r   r   r   )r   r   r   )r   r   r   )r   r   r   r      r   )rB   r   r   r   r   )r   r#   r   next_lexinteger	conjugater"   setr   lenaddr1   prev_lex
as_ferrersstrr
   )r%   r&   r4   dinextprevpansnjs              r   test_integer_partitionrT   9   s0   
:?@
:GHI&A	

A#AQ1aA./A6M699		!!!;;,&&&Fu6M6Ee6M61b\uuaS!,6qM:Mq"M:HqAHHQK

AQ,  qAHHQK

AQ,  {{{{ " I&113|CCCI&11#6+EEE	*+{:::I&00I===
:;<#A&1#---#B-?  ! ! !) ;s   :I?c                     \        \        R  4       \        \        R 4       \        \        R 4       \        \        R 4       \        \        R 4       \        R4      ^ 8X  g   Q h\        ^4      ^8X  g   Q h\        ^^4      . RO8X  g   Q h\        ^^4      . RO8X  g   Q h\	        \        ^(^d4      4      ^(8X  g   Q hR# )	c                      \        R^4      # r?   r   r   r   r   r   test_rgs.<locals>.<lambda>g       z"a0r   c                      \        ^^ 4      # r    rW   r   r   r   r   rX   h   s    z!Q/r   c                      \        ^
^4      # )
   rW   r   r   r   r   rX   i   rY   r   c                  x    \         P                  ! \        \        ^4      4      \        \        ^4      4      4      # r    r   from_rgsr!   r"   r   r   r   r   rX   k   s!    y11$uQx.$uQx.Qr   c                  z    \         P                  ! \        \        ^^4      4      \        \        ^4      4      4      # r   r^   r   r   r   r   rX   l   s%    y11$uQ{2CT%PQ(^Tr   Nr@   )r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r#   r   r   r	   r   r   r   test_rgsra   f   s    
:01
:/0
:01
:QR
:TUB<1A;!a...b"!KKKKJr3'(B...r   c                      \        . RO^.4      p \        ^^.^^.4      p\        \        W.\        P                  4      4      '       g   Q hR# )r   Nr   )r   r!   r   r   _infimum_keyr$   s     r   test_ordered_partition_9608rd   s   sD    )aS!A1a&1a&!As//01111r   N)sympy.core.sortingr   r   sympy.combinatorics.partitionsr   r   r   r   r	   r
   sympy.testing.pytestr   sympy.utilities.iterablesr   sympy.sets.setsr   r   r'   r6   rT   ra   rd   r   r   r   <module>rj      s:    8F F ( 0 *0!@*!Z/2r   