ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 18 Oct 2022 23:58:03 +0200Simplify multivariate polynomial modulo ideal generatorshttps://ask.sagemath.org/question/64510/simplify-multivariate-polynomial-modulo-ideal-generators/Suppose we have some multivariate polynomials $f, g_1, g_2, g_3 \in F[x,y,z, ... ]$ where $F$ is some field, e.g $\mathbb{Q}$ or some finite field. I'm asking for an algorithm that "simplifies" $f$ assuming $g_1 = g_2 = g_3 = 0$. That is, I want to find a simple/short representative of $f$ in the quotient ring $F[x,y,z,...]/\langle g_1, g_2, g_3 \rangle$. I suspect it has something to do with Grobner bases but I haven't found anything concrete yet.
Thank you.Tue, 18 Oct 2022 22:14:20 +0200https://ask.sagemath.org/question/64510/simplify-multivariate-polynomial-modulo-ideal-generators/Answer by Max Alekseyev for <p>Suppose we have some multivariate polynomials $f, g_1, g_2, g_3 \in F[x,y,z, ... ]$ where $F$ is some field, e.g $\mathbb{Q}$ or some finite field. I'm asking for an algorithm that "simplifies" $f$ assuming $g_1 = g_2 = g_3 = 0$. That is, I want to find a simple/short representative of $f$ in the quotient ring $F[x,y,z,...]/\langle g_1, g_2, g_3 \rangle$. I suspect it has something to do with Grobner bases but I haven't found anything concrete yet.</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/64510/simplify-multivariate-polynomial-modulo-ideal-generators/?answer=64511#post-id-64511You need to define the ideal generated by $g_i$ and then use its `.reduce()` method on $f$. See [the docs](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/multi_polynomial_ideal.html#sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal.reduce).Tue, 18 Oct 2022 23:58:03 +0200https://ask.sagemath.org/question/64510/simplify-multivariate-polynomial-modulo-ideal-generators/?answer=64511#post-id-64511