+
    h                         ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
HtHtHtHt ^ RIHtHt ^ RIHt ^ RItR	 tR
 tR tR tR# )    )warns_deprecated_sympy)Symbol)Poly)Matrix
randMatrix)invariant_factorssmith_normal_formsmith_normal_decomphermite_normal_formis_smith_normal_form)ZZQQ)IntegerNc                  v   \        . RO. RO. RO. RO.4      p \        . R	O. R
O. RO. RO.4      p\        V 4      V8X  g   Q h\        V 4      w  r#pW#V ,          V,          8X  g   Q h\        R4      p\	        4       ;_uu_ 4        \        \        V^,
          4      \        ^V4      \        RV4      .^ \        V4      \        RV4      .\        ^ V4      \        RV4      \        V4      ..4      p RRR4       ^V^,
          V^,          ^,
          3p\        V \        V,          R7      V8X  g   Q h\        ^^..4      p \        ^^ ..4      p\        V 4      V8X  g   Q h\        P                  ! ^ 4      p\        ^4       EF"  p\        ^4       EF  p	\        W,          '       d   ^
M^4       F  p
\        W^^2VR7      p \        V 4      w  r#pW#V ,          V,          8X  g   Q h\        V4      '       g   Q hVP                  4       P                  \        4       VP                  4       P                  \        4       \        V \        4      w  r#pW#V ,          V,          8X  g   Q h\        V4      '       g   Q hVP                  4        VP                  4        K  	  EK  	  EK%  	  R#   + '       g   i     EL; i)   xNdomain)maxpercentprng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   randomRandomranger   r   invto_DMr   )msmfastr   invsr   ij_s              G/usr/lib/python3/dist-packages/sympy/matrices/tests/test_normalforms.pytest_smith_normalr=      s)   
:l=ABA
,}lK
LCQ3&&&!!$GA!A	>>sA		!	!T!A#YQ
41:6Qb,!AYtBqz$q'24 5 
" a!eQTAXDQr!u-555AxA
1a&
CQ3&&&==D1XqA2!,qBTB-a0aEAI~%~+A....b!b!-a4aEAI~%~+A.... -   
"	!	!s   A,J''J8	c                     ^ RI Hp  \        4       ;_uu_ 4        V ! . RO. RO. R	O. R
O.4      pRRR4       \        XR\        4       \        4       ;_uu_ 4        V ! . RO. RO. RO. RO.4      pRRR4       \        V4      X8X  g   Q h\        R4      p\        4       ;_uu_ 4        V ! \        V^,
          4      \        ^V4      \        RV4      .^ \        V4      \        RV4      .\        ^ V4      \        RV4      \        V4      ..4      pRRR4       \        VR\        V,          4       \        ^VRR7      \        V^,
          RR7      \        V^,          ^,
          RR7      3p\        V4      V8X  g   Q h\        4       ;_uu_ 4        V ! ^^..4      pRRR4       \        VR\        4       \        4       ;_uu_ 4        V ! ^^ ..4      pRRR4       \        V4      V8X  g   Q hR#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     Ls; i)r   )	RawMatrixNringr   r   r   r   r   r   r$   r'   r)   r*   r,   r-   )
sympy.polys.solversr?   r   setattrr   r	   r   r   r   r   )r   r3   r4   r   r8   s        r<   test_smith_normal_deprecatedrC   9   s   7		!	!LLGH 
"Avr		!	!lM=,OP 
"Q3&&&sA		!	!T!A#YQ
41:6Qb,!AYtBqz$q'24 5 
" Avr!uAd#T!a%%=tAqD1HUY?Z[DQ4'''		!	!QF8 
"Avr		!	!q!fX 
"Q3&&&+ 
"	!	! 
"	!	!
 
"	!	! 
"	! 
"	!s<   G-H%A)HH)H<-G>	H	H&	)H9	<I	c                     \        . RO. RO. RO.4      p \        . RO. RO. RO.4      p\        V 4      V8X  g   Q h\        . R	O. R
O. RO. RO. RO.4      p\        V P                  4       4      V8X  g   Q h\        . RO. RO. RO.4      p \        . RO. RO. RO.4      p\        V 4      V8X  g   Q h\        V ^R7      V8X  g   Q h\        V \        ^4      R7      V8X  g   Q h\        V \	        ^4      R7      V8X  g   Q h\        . RO. RO. RO.4      p \        ^^.^ ^	.^ ^..4      p\        V 4      V8X  g   Q h\        ^^.^ ^ .^ ^ ..4      p \        ^.^ .^ ..4      p\        V 4      V8X  g   Q hR# )r    )DN)r             )   )r            +   )         %   /   )r(   r   r   )r   r    r(   )r   r   r(   )rQ   r   rK   )   iq   )0   r      )r   r#   D   t      )r   r   r   )r&   r   r   r+   r    )-   $         r   )rN   r   r   r    r(   )r   r   	transposer   r   )r3   hnftr_hnfs      r<   test_hermite_normalra   T   sp   "$79LMNA
)Y	2
3Cq!S((([.+y)TUFq{{}-777%':<OPQA
)Y	2
3Cq!S(((qA&#---qBqE*c111qGAJ/3666!#6HIA
2q'Aq6Aq6*
+Cq!S(((AAA'(A
1#sQC
!Cq!S(((    c                  z    \        ^^.^ ^.^ ^..4      p \        ^^ .^ ^.^ ^..4      p\        V 4      V8X  g   Q hR# )r(   N)r   r   )AHs     r<   test_issue_23410rf   l   sO    B!Q!Q()AAAA'(Aq!Q&&&rb   )sympy.testing.pytestr   sympy.core.symbolr   sympy.polys.polytoolsr   sympy.matricesr   r   sympy.matrices.normalformsr   r	   r
   r   r   sympy.polys.domainsr   r   sympy.core.numbersr   r.   r=   rC   ra   rf    rb   r<   <module>ro      s;    7 $ & -  ' & #L'6)0'rb   