ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 13 Jan 2011 18:41:07 -0600Quotient decomposition by Groebner basishttp://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/I can accomplish the following task in awkward ways using syzygy modules, but I am wondering if there is a better way somehow. It would be nice to have a single command for it.
Suppose we have a polynomial $P$ and a set of polynomials $Q_1,...,Q_n$, and it is possible to calculate the Groebner basis $G$ of the ideal generated by all the $Q_i$. Let $R$ be the remainder of $P$ after reducing by $G$. In Sage, how can we find polynomials $S_1,...,S_n$ such that $P = R + \sum S_i Q_i$?Sat, 08 Jan 2011 14:54:12 -0600http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/Answer by Jacob for <p>I can accomplish the following task in awkward ways using syzygy modules, but I am wondering if there is a better way somehow. It would be nice to have a single command for it.</p>
<p>Suppose we have a polynomial $P$ and a set of polynomials $Q_1,...,Q_n$, and it is possible to calculate the Groebner basis $G$ of the ideal generated by all the $Q_i$. Let $R$ be the remainder of $P$ after reducing by $G$. In Sage, how can we find polynomials $S_1,...,S_n$ such that $P = R + \sum S_i Q_i$?</p>
http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/?answer=11970#post-id-11970This is more of a question than an answer, but Singular can do this with the command "[division](http://www.singular.uni-kl.de/Manual/3-0-4/sing_186.htm)." Couldn't you use that?Thu, 13 Jan 2011 07:41:59 -0600http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/?answer=11970#post-id-11970Answer by malb for <p>I can accomplish the following task in awkward ways using syzygy modules, but I am wondering if there is a better way somehow. It would be nice to have a single command for it.</p>
<p>Suppose we have a polynomial $P$ and a set of polynomials $Q_1,...,Q_n$, and it is possible to calculate the Groebner basis $G$ of the ideal generated by all the $Q_i$. Let $R$ be the remainder of $P$ after reducing by $G$. In Sage, how can we find polynomials $S_1,...,S_n$ such that $P = R + \sum S_i Q_i$?</p>
http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/?answer=11969#post-id-11969Do you mean this?
sage: R.<x,y,z> = GF(127)[]
sage: p = R.random_element(degree=3)
sage: Q = [R.random_element() for _ in range(R.ngens())]
sage: r = p.reduce(Ideal(Q))
sage: M = (p - r).lift(Q)
sage: p -r == sum([M[i]*Q[i] for i in range(len(M))])
True
Thu, 13 Jan 2011 04:27:31 -0600http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/?answer=11969#post-id-11969Comment by mhampton for <p>Do you mean this?</p>
<pre><code>sage: R.<x,y,z> = GF(127)[]
sage: p = R.random_element(degree=3)
sage: Q = [R.random_element() for _ in range(R.ngens())]
sage: r = p.reduce(Ideal(Q))
sage: M = (p - r).lift(Q)
sage: p -r == sum([M[i]*Q[i] for i in range(len(M))])
True
</code></pre>
http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/?comment=22283#post-id-22283Thanks, somehow I had missed the "lift" command. That is exactly what I needed.Thu, 13 Jan 2011 18:41:07 -0600http://ask.sagemath.org/question/7853/quotient-decomposition-by-groebner-basis/?comment=22283#post-id-22283