Are you asking whether q=p_1*p_2+...+p_5*p_6? If so, you can simply
construct q and the p_i, then test for equality:

sage: q == p_1*p_2 + ... + p_5*p_6
>> True (or False, depending)

(you would fill in the ellipsis with the form you want, which is not
obvious to me from what you've written).

If instead you want to know if q is *some* linear combination of
p_1*p_2, ..., p_5*p_6 then you could use either linear algebra (I
think) or some slightly more sophisticated commutative algebra (e.g.,
a Groebner basis, but that might be more than you need for this
specific case).

regards
john perry

On Sep 8, 1:57 am, Cary Cherng <[email protected]> wrote:
> I am not familiar with algebraic geometry or its terminology and new
> to sage.
>
> p_1,...p_n and q are elements of Z[x_1,...,x_n]. In my context I have
> some evidence that q can be written as something like q = p_1*p_2
> + ... + p_5*p_6. In other words q is a degree 2 polynomial in the
> p_i's. Can Sage find out if q can be written in terms of the p_i's?

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to