+
    i4                         R t ^ RIHtHtHt ^ RIHtHtHtH	t	H
t
Ht ^ RIHtHtHt ^ RIHt ^ RIHt R tR tR tR	 tR
 tR tR tR tR tR tR tR tR t R t!R t"R t#R# )zTest modules.py code.)
FreeModuleModuleOrderFreeModulePolyRing)CoercionFailedQQlexgrlexilexZZ)xyz)raises)Rationalc                    a \         P                  ! \        4      P                  ^4      p V P	                  ^\        \        ^,          .4      o\         P                  ! \        4      P	                  ^4      \         P                  ! \        4      P	                  \        4      \         P                  ! \        4      P	                  \        ^,          4      .p\        S4      V8X  g   Q hV^ ,          S^ ,          8X  g   Q hV^,          S^,          8X  g   Q hV^,          S^,          8X  g   Q h\        \        V3R l4       V P	                  \        ^ ^ .4      pSV,           V P	                  \        ^,           \        \        ^,          .4      8X  g   Q hW,           V P	                  \        ^,           \        \        ^,          .4      8X  g   Q hS) V P	                  R\        ) \        ^,          ) .4      8X  g   Q hSV,
          V P	                  ^\        ,
          \        \        ^,          .4      8X  g   Q hSV8w  g   Q hV P	                  \        \        \        .4      \         P                  ! \        4      P	                  \        4      ,          . RO8X  g   Q h\         P                  ! \        RR7      pVP                  ^4      P	                  \        .4      VP	                  \        4      ,          ^.8X  g   Q hR# )   c                     < S ^,          # )r    )es   a/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/polys/agca/tests/test_modules.py<lambda>(test_FreeModuleElement.<locals>.<lambda>   s	    qt    r	   orderN   r   r   )r   old_poly_ringr   free_moduleconvertlistr   
IndexError)MfgRr   s       @r   test_FreeModuleElementr'   
   s!   
''*A			1aA,A			!		$	$Q	')9)9!)<)D)DQ)GIYIYZ[I\IdIdefhieiIjkA7a<<Q41Q4<<Q41Q4<<Q41Q4<<
:|$			1a)Aq5AIIq1uaA.////5AIIq1uaA.////2BQTE?++++q5AIIq1uaA.////6M699aAY""2"21"5"="=a"@@IMMM
&)A==##QC(199Q<7A3>>>r   c                  H  aa \        \        P                  ! \        4      ^4      oS\        \        P                  ! \        4      ^4      8X  g   Q hS\        \        P                  ! \        4      ^4      8w  g   Q hS\        \        P                  ! \        4      ^4      8w  g   Q h\        \        P                  ! \        RR7      ^4      p \        ^.S9   g   Q h\        .S9  g   Q h^\        .S9  g   Q h^\        ^,           ,          ^.S9  g   Q hSP                  \        \        ^,          ^,           .4      p\        P                  ! \        4      P                  \        4      pWV^,          ^,           .8X  g   Q hV\        \        ^,          ^,           .8X  g   Q h^V,          ^\        ,          ^\        ^,          ,          ^,           .8X  g   Q hV^,          ^\        ,          ^\        ^,          ,          ^,           .8X  g   Q hV^,          \        ^,          \        ^,          ^,           ^,          .8X  g   Q h\        V,          \        ^,          \        ^,          \        ,           .8X  g   Q hV\        ,          \        ^,          \        ^,          \        ,           .8X  g   Q hW!,          \        ^,          \        ^,          \        ,           .8X  g   Q hW,          \        ^,          \        ^,          \        ,           .8X  g   Q h\        ^.V 9   g   Q h\        .V 9  g   Q h^\        .V 9  g   Q h^\        ^,           ,          ^.V 9   g   Q hV P                  \        \        ^,          ^,           .4      p\        P                  ! \        RR7      P                  \        4      pWV^,          ^,           .8X  g   Q hV\        \        ^,          ^,           .8X  g   Q h^V,          ^\        ,          ^\        ^,          ,          ^,           .8X  g   Q hV^,          ^\        ,          ^\        ^,          ,          ^,           .8X  g   Q hV^,          \        ^,          \        ^,          ^,           ^,          .8X  g   Q h\        V,          \        ^,          \        ^,          \        ,           .8X  g   Q hV\        ,          \        ^,          \        ^,          \        ,           .8X  g   Q hV^\        ,           ,          \        ^\        ,           ,          \        ^,          ^,           ^\        ,           ,          .8X  g   Q hW!,          \        ^,          \        ^,          \        ,           .8X  g   Q hW,          \        ^,          \        ^,          \        ,           .8X  g   Q h\        \        P                  ! \        \        4      ^4      oSP                  V4      SP                  \        \        ^,          ^,           .4      8X  g   Q hSP                  ^ 4      '       d   Q hSP                  4       '       d   Q h\        \        R 4       \        \        R 4       \        \        V3R l4       \        \        V3R l4       R# )   r	   r   c                  T    \         P                  ! \        4      P                  ^4      # r)   )r
   r   r   r   r   r   r   r   !test_FreeModule.<locals>.<lambda>P   s    (8(8(;(G(G(Jr   c                  "    \        \        ^4      # r+   )r   r
   r   r   r   r   r,   Q   s    (:2q(Ar   c                     < S P                  \        P                  ! \        4      P	                  ^4      P                  . RO4      4      # )r   r   r)   r   )r    r   r   r   r   )M1s   r   r   r,   R   s0    2::b.>.>q.A.M.Ma.PGI$ r   c                  &   < S P                  ^4      # r   )r    )M3s   r   r   r,   T   s    2::a=r   N)r   r   r   r   r   r    is_submoduleis_zeror   NotImplementedErrorr   )M2r   Xr0   r3   s      @@r   test_FreeModuler9       s   	B$$Q'	+BB,,Q/3333B,,Q/3333B,,Q/3333	B$$Qf5q	9Bq6R<<3b==q6q1uIq>###


Aq!tax=!A
##A&AAqD1HAqD1HQ31Q3!Q$
####Q31Q3!Q$
####Q31Q3A1%%%%Q31a4A""""Q31a4A""""31a4A""""31a4A""""q6R<<3b==q6q1uIq>R


Aq!tax=!A
&)11!4AAqD1HAqD1HQ31Q3!Q$
####Q31Q3!Q$
####Q31Q3A1%%%%Q31a4A""""Q31a4A""""a!e9AEQTAXA$6777731a4A""""31a4A""""	B$$Q*A	.B::a=BJJ1a4!8}5555q!!!!zz||
 JK
 AB
>   !
>01r   c                     \        \        \        R 4      p \        \        \        R 4      pV \        \        \        R 4      8X  g   Q hV \        \        \        R 4      8g  R J g   Q hW8w  g   Q hV ! R4      R8X  g   Q hV! R4      R8X  g   Q hR# )FNr/   )r   )   r)   r   )r   r<   )r   r   r   r	   )o1o2s     r   test_ModuleOrderr?   W   s    	S%	'B	T3	&BS%////+c5%00U:::8O8i=,,,,i=L(((r   c                    aa \         P                  ! \        \        4      oSP	                  ^4      p V P                  . RO. RO. R	O4      pV P                  \        ^,          \        ^,          ,           ^^ .\        \        ^.4      oW8X  g   Q hW8X  g   Q hV S8w  g   Q hSV 8w  g   Q hVS8w  g   Q hSV8w  g   Q hWP
                  ! V P                  4       !  8X  g   Q hVP                  4       '       g   Q hSP                  4       '       d   Q hVP                  4       '       d   Q hSP                  4       '       d   Q hVP                  4       P                  4       '       g   Q hSP                  \        ^,          \        ^,          ,           \        ,           ^\        ,           ^.4      '       g   Q hSP                  \        ^,          \        ^,          ,           \        ,           ^\        ,           ^.4      '       d   Q hSP                  \        ^,          ^\        \        ,          ,
          \        ) .4      '       g   Q hV P                  ^\        ,           ^ ^ .4      V P                  . RO4      8X  d   Q hV P                  . RO. R
O4      P                  V P                  . RO4      4      V 8X  g   Q hSP                  ^ 4      '       d   Q hV P                  \        ^,          \        ^,          ,           ^^ .4      pSP                  V4      pVP                  V J g   Q hVP                  SJ g   Q h\        \        V3R l4       \        \         V3R l4       \        \        VV3R l4       V P                  \        \        \        .4      V P                  \        \        \        .RR7      8w  g   Q hR# )r   c                  *   < S P                  . RO4      # r   r       rD   	submoduler#   s   r   r   /test_SubModulePolyRing_global.<locals>.<lambda>       q{{95r   c                  &   < S P                  ^4      # r2   )unionrG   s   r   r   rH      s    aggajr   c                  l   < S P                  SP                  ^4      P                  \        .4      4      # r2   )rK   r   rF   r   )r#   r&   s   r   r   rH      s$    qwwq}}Q'7'A'A1#'FGr   r	   r   NrC   r   r)   rD   r/   rD   r   rD   rD   rD   r   )r   r   r   r   r   rF   basisis_full_moduler5   containsrK   r4   r    moduler   
ValueError	TypeError)FFdmnr#   r&   s       @@r   test_SubModulePolyRing_globalrZ   c   s   
AA	aA	
Y	9	5B	QTAqD[!Q'!Q3A7N77N76M66M67N77N7aggi((((!!!!zz||yy{{?<<>!!####::q!tad{QAq12222zz1a4!Q$;?AE156666::q!tQ1Wqb)****{{AE1a=)Q[[-CCCC;;y),221;;y3IJaOOO~~a    			1a4!Q$;1%&A			!A88q==88q==
:56
9()
:GH;;1ay!Q[[!Q&[%IIIIr   c            	      .  a \         P                  ! \        \        \        R 7      p V P                  ^4      pVP                  ^\        ,           ^ ^ .^\        ,           ^^\        ,          ,           ^ .. RO4      pVP                  \        ^,          \        ^,          ,           ^^ .\        \        ^.4      oW8X  g   Q hW!8X  g   Q hVS8w  g   Q hSV8w  g   Q hVS8w  g   Q hSV8w  g   Q hW!P                  ! VP                  4       !  8X  g   Q hVP                  4       '       g   Q hSP                  4       '       d   Q hVP                  4       '       d   Q hSP                  4       '       d   Q hVP                  4       P                  4       '       g   Q hSP                  \        ^,          \        ^,          ,           \        ,           ^\        ,           ^.4      '       g   Q hSP                  \        ^,          \        ^,          ,           \        ,           ^\        ,           ^.4      '       d   Q hSP                  \        ^,          ^\        \        ,          ,
          \        ) .4      '       g   Q hVP                  ^\        ,           ^ ^ .4      VP                  . RO4      8X  g   Q hVP                  . RO. RO4      P                  VP                  ^ ^ ^\        \        ,          ,           .4      4      V8X  g   Q h\        \        V3R l4       R# )r   c                  *   < S P                  . RO4      # rB   rE   rG   s   r   r   .test_SubModulePolyRing_local.<locals>.<lambda>   rI   r   Nr/   rC   rN   )r   r   r   r   r	   r   rF   rP   rQ   r5   rR   rK   r   rT   )r&   rV   rW   r#   s      @r   test_SubModulePolyRing_localr^      sC   
AT*A	aA	
a!eQ]QUA!GQ$7	CB	QTAqD[!Q'!Q3A7N77N76M66M67N77N7aggi((((!!!!zz||yy{{?<<>!!####::q!tad{QAq12222zz1a4!Q$;?AE156666::q!tQ1Wqb)****;;Aq!}%Y)????;;9#eAKKAq1Q3w$@AQG G G :56r   c                  ~  a \         P                  ! \        \        \        4      p V P                  ^4      oV3R lpV! \        \        .\        4      '       g   Q hV! \        \        .\        \        ,           4      '       g   Q hV! \        \        .^4      '       d   Q hV! \        \        .\        4      '       d   Q hV! \        ^,          \        ,           \        ^,          \        ,           .\        \        ,
          4      '       g   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        ^,          4      '       d   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        ^,          4      '       g   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        ^,          4      '       g   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        \        ^,          ,          4      '       d   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        ^,          \        ^,          ,           ^\        ,          \        ,          \        ,          ,           4      '       g   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        \        ,          \        ,          4      '       g   Q hV! \        ^\        ,           \        ,           ^^\        ,          ,
          .^4      '       g   Q hV! \        ^,          \        ^,          ,           \        ^,          \        ^,          ,           \        ^,          \        ^,          ,           \        ^,          \        ,          \        ^,          \        ,          ,           \        ^,          \        ,          ,           .\        ^,          4      '       g   Q hV! \        ^,          \        ^,          ,           \        ^,          \        ^,          ,           \        ^,          \        ^,          ,           \        ^,          \        ,          \        ^,          \        ,          ,           \        ^,          \        ,          ,           .\        ^,          \        ^,          ,           4      '       d   Q hV! \        ^\        ,           \        ,           ,          \        ^\        ,           ,          .\        4      '       d   Q hV! \        ^\        ,           \        ,           ,          \        ^\        ,           ,          .\        \        ,           4      '       d   Q hR# )r   c                 n   < SP                   ! V  Uu. uF  q".NK  	  up!  P                  V.4      # u upi NrF   rR   Ir$   r%   rV   s   && r   rR   7test_SubModulePolyRing_nontriv_global.<locals>.contains   1    {{!,!QS!,-66s;;,   2N)r   r   r   r   r   r   r&   rR   rV   s     @r   %test_SubModulePolyRing_nontriv_globalri      s   
Aq!A	aA< QFAQFAE""""A""""A""""QTAXq!tax(!a%0000QAaC!A#I!OQqSU;QTBBBBQUQY!ac	AaC1Q7A>>>>QUQY!ac	AaC1Q7A>>>>QAaC!A#I!OQqSU;Qq!tVDDDDQUQY!ac	AaC1Q7A1qs1uQw9NOOOOQUQY!ac	AaC1Q71Q????QA	1qs7+Q////	
A1adQTk1a4!Q$;1QAa!Q$q&0HI	1    	
A1adQTk1a4!Q$;1QAa!Q$q&0HI	1q!t   
 AEAI1q5	2A6666AEAI1q5	2AE:::::r   c                    a \         P                  ! \        \        \        \
        R 7      p V P                  ^4      oV3R lpV! \        \        .\        4      '       g   Q hV! \        \        .\        \        ,           4      '       g   Q hV! \        \        .^4      '       d   Q hV! \        \        .\        4      '       d   Q hV! \        ^,          \        ,           \        ^,          \        ,           .\        \        ,
          4      '       g   Q hV! \        \        ,           \        ,           \        \        ,          \        \        ,          ,           \        \        ,          ,           \        \        ,          \        ,          .\        ^,          4      '       d   Q hV! \        ^\        ,           \        ,           ,          \        ^\        ,           ,          .\        4      '       g   Q hV! \        ^\        ,           \        ,           ,          \        ^\        ,           ,          .\        \        ,           4      '       g   Q hR# )r   c                 n   < SP                   ! V  Uu. uF  q".NK  	  up!  P                  V.4      # u upi ra   rb   rc   s   && r   rR   6test_SubModulePolyRing_nontriv_local.<locals>.contains   rf   rg   N)r   r   r   r   r   r	   r   rh   s     @r   $test_SubModulePolyRing_nontriv_localrm      sX   
Aq-A	aA< QFAQFAE""""A""""A""""QTAXq!tax(!a%0000QAaC!A#I!OQqSU;QTBBBBQA	]Aq1uI.2222QA	]Aq1uI.A6666r   c                     \         P                  ! \        \        \        4      p V P                  ^4      P                  \        \        ,          .\        \        ,          .\        \        ,          .4      pV P                  ^4      P                  ^ \        \        ) .\        \        ) ^ .4      pVP                  4       V8X  g   Q hV\        \        ,          \        ,          .3,          pV P                  ^4      P                  \        ^ ^ .^ \        ^ .^ ^ \        .4      pVP                  4       V8X  g   Q hV P                  ^4      pVP                  ! VP                  4       !  P                  4       VP                  4       8X  g   Q h\         P                  ! \        \        \        4      \        \        ,          \        ,          .,          pVP                  ^4      P                  \        \        ,          .\        \        ,          .\        \        ,          .4      pVP                  ^4      P                  \        ^ ^ .^ \        ^ .^ ^ \        .4      pVP                  4       V8X  g   Q hR# )r   N)	r   r   r   r   r   r   rF   syzygy_modulerP   )	r&   r#   Sr7   S2rV   R2r3   S3s	            r   test_syzygyrt      s   
Aq!A	a""AaC51Q3%!A#7A	a""Aq1":A2qz:A??!!!	
qs1ugZB	
q		#	#Q1I1ay1a)	DB###	aA;;	"002akkmCCC			!Q	"ac!eW	,B			$	$acUQqSEAaC5	9B			$	$aAYAq	Aq!9	EB###r   c                    a \         P                  ! \        R R7      p V P                  ^4      P	                  ^\        ,          ^ .^^.4      oSP                  \        \        .4      V P                  \        ^^4      4      V P                  \        ^,          4      .8X  g   Q h\        \        V3R l4       V P                  ^4      \        ^ .^^.3,          oSP	                  ^\        .4      pVP                  ^^ .4      V P                  R\        ^,
          ,          4      .8X  g   Q h\         P                  ! \        \        4      \        ^,          \        ^,          ,
          .,          p V P                  ^4      oSP	                  \        ^ .^ \        .4      pVP                  \        ^,          \        ^,          .4      V P                  \        4      V P                  \        4      .8X  g   Q hR# )r	   r   c                  *   < S P                  ^^ .4      # r2   )in_terms_of_generatorsrG   s   r   r   -test_in_terms_of_generators.<locals>.<lambda>   s    q77A?r   N)r   r   r   r   rF   rw   r    r   r   rT   r   )r&   SMr#   s     @r   test_in_terms_of_generatorsr{      s   
&)A	a""AaC8aV4A##	
AIIhq!n-qyy1~>? ? ?
:?@	aQFQF++A	
aV	B$$aV,2q1u:1F0GGGG
A!Q$A+.A	aA	
aVaV	$B$$	
Aq!t))A,		!56 6 6r   c                  
  aaaa	 \         P                  ! \        4      p V P                  ^4      pVP	                  ^\        \        ^,          .4      pW,          oSP                  \        ^,          ^^ .4      pSP                  \        ^,           \        ^,          \        ,           \        ^,          \        ^,          ,           .4      ^ 8X  g   Q hV\        ^,          ^^ .V,           u;8X  da   VP                  \        ^,          ^^ .4      V,           u;8X  d5   SP                  VP                  \        ^,          ^^ .4      4      8X  g   Q h Q hSP                  \        ^,          ^,           ^\        ,          ^,           \        ^,          .4      V^ \        ^ .,           u;8X  dJ   VSP                  ^ \        ^ .4      ,           u;8X  d%   W1P                  ^ \        ^ .4      ,           8X  g   Q h Q hSP                  \        ^,          ^,           ^\        ^,          .4      V^ \        ^ .,
          u;8X  dJ   VSP                  ^ \        ^ .4      ,
          u;8X  d%   W1P                  ^ \        ^ .4      ,
          8X  g   Q h Q hSP                  . RO4      SP                  \        ^,          ^^ .4      V,
          u;8X  dJ   \        ^,          ^^ .V,
          u;8X  d-   VP                  \        ^,          ^^ .4      V,
          8X  g   Q h Q hSP                  \        ^,          \        ^,          ,           ^\        ,          ^,           ^ .4      ^\        ,           V,          u;8X  dl   V P                  ^\        ,           4      V,          u;8X  dC   V^\        ,           ,          u;8X  d)   W0P                  ^\        ,           4      ,          8X  g   Q h Q hV) \        ^,          ) R^ .8X  g   Q h\        \        ^ .V,           pSP                  . RO4      V\        ,          u;8X  d"   W@P                  \        4      ,          8X  g   Q h Q hV^^\        ,          ^\        ^,          ,          3R.,          oV P                  ^4      oS^\        ..,          o	VP	                  ^\        \        ^,          .. R	O4      V,          p\        \        VV3R l4       \        \        VV	3R l4       \        \        VV3R l4       SP                  SP                  ^\        \        ^,          .4      4      ^\        ^ .8X  g   Q hSP                  VP                  . R
O4      4      . R
O8X  g   Q hR# )r   c                  P   < SP                  S P                  ^\        .4      4      # r2   r    r   )Gr#   s   r   r   ,test_QuotientModuleElement.<locals>.<lambda>  s    199QYY1v->#?r   c                  P   < S P                  SP                  ^\        .4      4      # r2   r~   )r#   r3   s   r   r   r     s    199RZZA-?#@r   c                  Z   < S P                  SP                  ^\        \        .4      4      # r2   r~   )r#   r7   s   r   r   r     s    199RZZAq	-B#Cr   N)rD   r)   rD   ry   )r   r   rD   rO   rC   r)   rD   rD   )r   r   r   r   rF   r    r   r   )
r&   rV   Nr   r$   M4r   r#   r7   r3   s
         @@@@r   test_QuotientModuleElementr      s)   
A	aA	Q1a4L!A	A			1a4A,A99a!eQTAXq!tad{34999Aq!q  +AIIq!tQl$;a$? +			!))QT1aL)*+ + + + + 99adQh!aA./11ay= =	AIIq!Qi  =$%		1a)(<$<= = = = =99adQh1a4()Q!Q] =	AIIq!Qi  =$%		1a)(<$<= = = = =99Y199adAq\#:Q#> 8	
Aq!q8IIq!tQl3a78 8 8 8 899adQTk1Q37A./AE19 >			!a%>Qi>+,YYq1u-=+=> > > > >21a4%Q	
Aq	AA99Y1q5<A		!,<<<<<<	
Q!Qq!tVi(	(B	aA	
QF8B	
aAqD\9	-	1B
>?@
>@A
>CD::aiiAq!t-.1a);;;99RZZ	*+y888r   c                    aaaa \         P                  ! \        4      oSP                  ^4      oSP	                  ^\        \        ^,          .4      oSS,          oSS8w  g   Q hSS8w  g   Q hSS^\        \        ^,          3.,          8X  g   Q hSP                  4       '       d   Q hSSP                  4       ,          P                  4       '       g   Q hSP	                  ^\        \        ^,          .. RO4      S,          p V SP	                  ^\        \        ^,          .4      8X  g   Q hV SP	                  . RO4      8w  g   Q hV S8w  g   Q hSP                  V 4      '       g   Q hV P                  4       '       d   Q h\        \        VV3R l4       \        \        VV3R l4       \        \        VV3R l4       \        \        VV3R l4       S. RO.,          pVP	                  . R	O. R
O4      pW8X  g   Q hR# )r   c                     < SS ,          # ra   r   rV   r   s   r   r   %test_QuotientModule.<locals>.<lambda>5  s	    qsr   c                  8   < S P                  . RO4      S,          # )r)   r   rE   r   s   r   r   r   6  s    q{{959r   c                  4   < SP                  ^4      S ,          # r+   )r   )rV   r&   s   r   r   r   7  s    q}}Q/1r   c                  h   < S P                  SP                  ^\        \        ^,          .4      4      # r2   r~   )rV   r#   s   r   r   r   8  s!    199QYY1ad|-D#Er   Nr   )r)   r   rD   r   rC   rN   )r   r   r   r   rF   r5   rP   r4   rQ   r   rT   r   )SQr0   r7   rV   r#   r   r&   s      @@@@r   test_QuotientModuler   "  s   
A	aA	Q1a4L!A	!A6M66M6aAqD\N""""yy{{?	M""$$$$	
aAqD\9	-	1BaAqD\****Y''''7N7>>"  """"
:{#
:9:
:12
>EF	
i[B	i	+B8O8r   c                     \         P                  ! \        \        R \        3R\        33R7      \        ^,          ^,           .,          p V P	                  ^4      pWP	                  ^4      8X  g   Q hV\         P                  ! \        4      P	                  ^4      8w  g   Q hWP	                  ^4      8w  g   Q h\        ^.V9   g   Q h\        .V9  g   Q h^V P                  \        4      ^,           ,          ^.V9   g   Q h^^^\        ,           ,          .V9   g   Q h^^\        ,          .V9  g   Q hVP                  \        ^,          \        .4      R\        .8X  g   Q hV P	                  ^4      pVP                  \        ^,          ^ ^ .. RO. RO4      pVP                  \        ^,          \        ^,          ,           ^^ .\        \        ^.4      pW#8X  g   Q hW28X  g   Q hW$8w  g   Q hWB8w  g   Q hW48w  g   Q hWC8w  g   Q hW2P                  ! VP                  4       !  8X  g   Q hVP                  4       '       g   Q hVP                  4       '       d   Q hVP                  4       '       d   Q hVP                  4       '       d   Q hVP                  4       P                  4       '       g   Q hVP                  \        ^,          \        ^,          ,           \        ,           \        ^,          ) \        ,           ^.4      '       g   Q hVP                  \        ^,          \        ^,          ,           \        ,           ^\        ,           ^.4      '       d   Q hVP                  \        ^,          ^\        \        ,          ,
          \        ) .4      '       g   Q hVP                  \        ^ ^ .4      VP                  . RO4      8X  g   Q hVP                  \        ^ ^ .4      VP                  . RO4      8X  d   Q hVP                  . RO. RO4      P                  VP                  . R	O4      4      V8X  g   Q hVP                  ^ 4      '       d   Q hR# )
r   r	   r   Nr   rM   r/   rC   rN   rO   )r   r   r   r   r   r    rF   rP   rQ   r5   rR   rK   r4   )r&   r0   rV   rW   r#   s        r   test_ModulesQuotientRingr   ?  sO   
Auaj61+%>?1a4!8*LA	
q	Bq!!!!!!!$003333q!!!!q6R<<3b==qyy|a !$***q!a%y>Rqs82::q!tQi RG+++	aA	
adAq\9i	8B	QTAqD[!Q'!Q3A7N77N76M66M67N77N7aggi((((!!!!zz||yy{{?<<>!!####::q!tad{QA	156666zz1a4!Q$;?AE156666::q!tQ1Wqb)****;;1ay!Q[[%;;;;{{Aq!9%Y)????;;y),221;;y3IJaOOO~~a     r   c                     \         P                  ! \        4      p V P                  ^4      pVP	                  \        ^ .^ \        .4      pVP	                  \        ^,          ^ .^ \        ^,          .4      pV P                  \        4      pWA,          W,          u;8X  d/   Tu;8X  d'   \        V,          u;8X  d   V\        ,          8X  g   Q h Q hWB,          Tu;8X  d   \        V,          8X  g   Q h Q hR# )r)   N)r   r   r   r   rF   ideal)r&   r#   S1rq   rd   s        r   test_module_mulr   j  s    
A	aA	
aVaV	$B	
adAYAqD		*B	
A3!#))qs)ac)))))422r   c            	         \         P                  ! \        \        4      P	                  ^4      p V P                  \        \        .\        ^.4      pV P                  ^ \        ^,
          .\        ^.\        \        .4      pV P                  \        \        .\        ^,          \        ,
          \        ^,
          .\        \        ,          \        ,           \        ^,           .4      pVP                  VRR7      w  rEpWBP                  V4      u;8X  d	   V8X  g   Q h Q h\        VP                  4       Fm  w  rxV\        R \        WW,          VP                  4       4       4      u;8X  d5   \        R \        Wg,          VP                  4       4       4      8X  d   Kj  Q h Q h	  V P                  \        \        .4      P                  V P                  \        \        .4      4      P                  4       '       g   Q hR# )r)   T	relationsc              3   6   "   T F  w  rW,          x  K  	  R # 5ira   r   .0cr   s   &  r   	<genexpr>$test_intersection.<locals>.<genexpr>~       >(=(=   c              3   6   "   T F  w  rW,          x  K  	  R # 5ira   r   )r   dr   s   &  r   r   r     r   r   N)r   r   r   r   r   rF   	intersect	enumerategenssumzipr5   )	rV   r0   r7   rd   I1rel1rel2ir%   s	            r   test_intersectionr   u  sn   
A**1-A	
aVaV	$B	
aQZ!Q!Q	0B	QFQTAXq1u-!aQ/?@A\\"\5NBdb!&Q&&&&&"''"C>DGRWW(=>> ?>DGRWW(=>>? 	? ? 	? ? # ;;1v((aV)<=EEGGGGr   c            	      T   \         P                  ! \        \        \        4      p V P                  ^4      pVP                  \        \        ,          \        \        ,          .\        \        ,          \        \        ,          .4      P                  VP                  \        \        .\        \        .4      4      \         P                  ! \        \        \        4      P                  \        ^,          \        ^,          ,          \        \        ,          \        ^,          ,          ,
          4      8X  g   Q hVP                  \        \        .4      P                  VP                  4       4      P                  4       '       g   Q hVP                  \        ^,          \        ^,          .\        ^,          \        ^,          .4      pVP                  \        \        ,           \        \        ,           .4      pVP                  VRR7      w  rEW@P                  \        ^,          \        \        ,
          4      8X  g   Q h\        VP                  4       FO  w  rgWsP                  ^ ,          ,          \        R \        WV,          VP                  4       4       4      8X  d   KO  Q h	  R# )r)   Tr   c              3   6   "   T F  w  rW,          x  K  	  R # 5ira   r   r   s   &  r   r    test_quotient.<locals>.<genexpr>  s     !F2E$!!##2Er   N)r   r   r   r   r   r   rF   module_quotientr   is_whole_ringr   r   r   r   )r&   rV   r#   r   qrelr   r%   s           r   test_quotientr     s   
Aq!A	aA;;!QqSzAaC1:.>>	QFQF#%(*(8(8Aq(A(G(G1QPQT	TUVWTWXY[\X\T\H\(]^ ^ ^;;1v..q{{}=KKMMMM	QT1a4L1a4A,/A	QUAEN#AqD1FA1a!e$$$$!&&!{c!F#cfaff2E!FFFFF "r   c            	         \         P                  ! \        \        \        4      P                  ^4      P                  \        ^,           \        ^.\        \        ,          \        \        ^,          .4      p V P                  RR7      w  r\        V4       F8  w  r4V\        R \        W#,          V P                  4       4       4      8X  d   K8  Q h	  R# )r   T)extendedc              3   6   "   T F  w  rW,          x  K  	  R # 5ira   r   )r   r   gens   &  r   r   *test_groebner_extendend.<locals>.<genexpr>  s     >,=&!,=r   N)r   r   r   r   r   r   rF   _groebner_vecr   r   r   r   )r#   r   r&   r   r%   s        r   test_groebner_extendendr     s    
Aq!--a0::AE1a=1Q3PQSTVWSW.YA??D?)DA!C>Caff,=>>>>> r   N)$__doc__sympy.polys.agca.modulesr   r   r   sympy.polysr   r   r   r   r	   r
   	sympy.abcr   r   r   sympy.testing.pytestr   sympy.core.numbersr   r'   r9   r?   rZ   r^   ri   rm   rt   r{   r   r   r   r   r   r   r   r   r   r   <module>r      sw     P P @ @   ' '?,42n	)%JP7>;>7"$&6$ 9F:(!VHG ?r   