# polynomial decomposition

Assume i have some multivariate polynomials `P1,...,Pn`

and a polynomial `P`

. Sage is able to tell whether `P`

is in the ideal generated by `P1,...,Pn`

by writing `P in R.ideal([P1,...,Pn])`

, where `R`

is the polynomial ring containing the `Pi`

. When the answer is `True`

, i would like to obtain a certificate, that is a list of polynomials `Q1,...,Qn`

such that `P = P1*Q1 + ... + Pn*Qn`

. Is there an easy way to get this ? If possible i would like the `Qi`

to have small coefficients.