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.Wed, 02 Sep 2020 23:41:22 +0200Rewriting linear combination of Groebner basis in terms of original termshttps://ask.sagemath.org/question/53267/rewriting-linear-combination-of-groebner-basis-in-terms-of-original-terms/ Let assume I have an ideal given by
x,y,z = QQ['x,y,z'].gens()
I = ideal(f1,f2,f3)
B = I.groebner_basis()
where f1,f2,f3 are just polynomials in variables x,y,z. Let's say B=(g1,g2).
Let's assume I happen to take a polynomial,h, that is in my ideal I. Then doing polynomial division, I can write
h=h1*g1+h2*g2
Basically I can write h as a linear combination of the elements in my Groebner basis. Is there a function that converts a linear combination in terms of Groebner to linear combination of terms in my ideal I? i.e.I can write
h=q1*f1+q2*f2+q3*f3
whatupmattWed, 02 Sep 2020 23:41:22 +0200https://ask.sagemath.org/question/53267/Find solution to Polynomial Sequences without going through varietyhttps://ask.sagemath.org/question/47357/find-solution-to-polynomial-sequences-without-going-through-variety/Hi everyone,
I'm computing the Groebner basis of an ideal defined over the QQ ring. Once I have this Groebner basis, I would like to obtain a set of values that satisfy the equations in the Groebner basis. I know that the full set is going to be the variety of the ideal, but since this object is huge, I might not be interested in finding those values.
In Maple, after computing the Groebner basis, I'm able to call the solve() method on it and even set a maximum number of solutions I want to obtain. As a small example:
P.<x,y,z,t>=PolynomialRing(QQ,4)
I = P.ideal(x*(x-1), y*(y-1), z*(z-1), t - x*y*z)
gb = I.groebner_basis()
Here I could have called `I.variety()` or `gb.variety()` and obtained the same set of solutions:
sage: gbI.variety()
[{y: 0, z: 0, t: 0, x: 0},
{y: 0, z: 0, t: 0, x: 1},
{y: 1, z: 0, t: 0, x: 0},
{y: 1, z: 0, t: 0, x: 1},
{y: 0, z: 1, t: 0, x: 0},
{y: 0, z: 1, t: 0, x: 1},
{y: 1, z: 1, t: 0, x: 0},
{y: 1, z: 1, t: 1, x: 1}]
But I would like to know if it is possible to call a method like (I can do this in Maple):
solve(gb,[max_sol=2])
Such that I can obtain a subset of the variety instead of the whole set. My motivation is that the size of the initial system of polynomials that I have is considerably larger than this example, and finding the feasible solutions on the reduced Groebner basis is more manageable. I might also not be interested in all the elements in the variety. Finally, if I transform the Groebner basis in an ideal itself and try to compute the variety on that object
gbI = ideal(gb)
gbI.variety()
I find the following error
RuntimeError: error in Singular function call 'groebner':
int overflow in hilb 3
error occurred in or before standard.lib::stdhilb line 299: ` intvec hi = hilb( Id(1),1,W );`
expected intvec-expression. type 'help intvec;'
leaving standard.lib::stdhilb
leaving standard.lib::groebner
bernaldeSat, 03 Aug 2019 03:27:39 +0200https://ask.sagemath.org/question/47357/