
    *-hY                     |    S SK 7  S r\S:X  a.  SSKr\R                  " 5       R
                  (       a	  \" S 5        ggg)   )*c           	          [        [        U R                  5       U R                  5       UR                  5       UR                  5       5      U R                  5      $ )aA  
Return the non-constant subresultants of 'p' and 'q' with respect to the "variable" 'x'.

'p', 'q' and 'x' are Z3 expressions where 'p' and 'q' are arithmetic terms.
Note that, any subterm that cannot be viewed as a polynomial is assumed to be a variable.
Example: f(a) is a considered to be a variable b in the polynomial

f(a)*f(a) + 2*f(a) + 1

>>> x, y = Reals('x y')
>>> subresultants(2*x + y, 3*x - 2*y + 2, x)
[-7*y + 4]
>>> r = subresultants(3*y*x**2 + y**3 + 1, 2*x**3 + y + 3, x)
>>> r[0]
4*y**9 + 12*y**6 + 27*y**5 + 162*y**4 + 255*y**3 + 4
>>> r[1]
-6*y**4 + -6*y
)	AstVectorZ3_polynomial_subresultantsctx_refas_astctx)pqxs      C/home/james-whalen/.local/lib/python3.13/site-packages/z3/z3poly.pysubresultantsr      s@    & 0ahhj!((*VWV^V^V`acdchchii    __main__    N)z3r   __name__doctesttestmodfailedexit r   r   <module>r      s>    j, zQ   r   