
    sgU                         d dl mZ d dl mZ d dlmZ d dlmZ ddddZ e e        e        e       	      d
        Z	 e e        ed            d        Z
 e ed       edd            d        Zy)    )given)
strategies)x)PolyFZZ)nonzerodomainc                 @   t        j                         t        j                         d}t        j                  ||         }| r|j	                  t
              }t        j                  t        |t        j                  t              t        j                  |            S )N)r   QQr	   )
stintegers	fractionslistsfilteranybuildsr   justr   )r   r	   elemscoeff_sts       T/var/www/html/venv/lib/python3.12/site-packages/sympy/polys/tests/test_hypothesis.pypolysr      s`    ;;=7Exxf&H??3'99T8RWWQZHH    )fgrc                     | j                  |      }|j                  |       }||k(  sJ |j                  | ||z  z         }||k(  sJ y )N)gcd)r   r   r   gcd_1gcd_2gcd_3s         r   test_gcd_hypothesisr"      sL    EE!HEEE!HEE>> EE!a!e)EE>>r   T)r   )f_zg_zc                     | j                  |      }|j                         |j                         k\  s|j                         dk(  sJ y y Nr   remdegree)r#   r$   remainder_zs      r   test_poly_hypothesis_integersr+      B    ''#,K::<;--//;3E3E3G13LLL3L/r   r   r   )f_qg_qc                     | j                  |      }|j                         |j                         k\  s|j                         dk(  sJ y y r&   r'   )r-   r.   remainder_qs      r   test_poly_hypothesis_rationalsr1   !   r,   r   N)
hypothesisr   r   r   	sympy.abcr   sympy.polys.polytoolsr   r   r"   r+   r1    r   r   <module>r6      s     '  & 4 I EGuw' ( 57d+,M -M
 55d#CDM EMr   