1 | initial version |
The set of solutions, when it's finite, can be computed with .variety()
method. In your problem, there are many cases when the ideal does not depend on one of the variables, say z
, which is essentially free. To take care of those cases, variety can be computed over the subring depending only on x
and y
. The corresponding code is given below.
For example, when it prints {x: 0, y: 0}
it means that solutions are given by x=0
, y=0
and any z
.
In cases when variety still fails, it reports an error like
ERROR: Dimension: 1 Basis: [x - 3796875/8*z - 1/5400, y]
ERROR: Dimension: 1 Basis: [x^2 - 21515625/143*x*z + 14416259765625/143*z^2 - 62/7425*x + 11250/143*z + 1/65154375, y]
In some cases, one variable can be expressed in terms of another (like x
in terms of z
in the first error above), while others (like the second error above) may lead to quadratic Pell-type, elliptic, or higher-degree equations. One may try to address them with an appropriate functionality in Sage if needed.
for fff in Combinations(Lf,3):
B = R.ideal(fff).groebner_basis()
V = set.union(*(set(f.variables()) for f in B))
R1 = PolynomialRing(QQ,len(V),', '.join(map(str,V)))
J = R1.ideal(B)
try:
S = J.variety()
except:
print('ERROR: Dimension:',J.dimension(),'Basis:',B)
continue
if S:
print(S)
2 | No.2 Revision |
The set of solutions, when it's finite, can be computed with .variety()
method. In your problem, there are many cases when the ideal does not depend on one of the variables, say z
, which is essentially making it free. To take care of those cases, variety can be computed over the subring depending only on the rest of the variables (say, x
and y
. ). The corresponding code is given below.
For example, when it prints {x: 0, y: 0}
it means that solutions are given by x=0
, y=0
and any z
.
In cases when variety still fails, it reports an error like
ERROR: Dimension: 1 Basis: [x - 3796875/8*z - 1/5400, y]
ERROR: Dimension: 1 Basis: [x^2 - 21515625/143*x*z + 14416259765625/143*z^2 - 62/7425*x + 11250/143*z + 1/65154375, y]
In some cases, one variable can be expressed in terms of another (like x
in terms of z
in the first error above), while others (like the second error above) may lead to quadratic Pell-type, elliptic, or higher-degree equations. One may try to address them with an appropriate functionality in Sage if needed.
for fff in Combinations(Lf,3):
B = R.ideal(fff).groebner_basis()
V = set.union(*(set(f.variables()) for f in B))
R1 = PolynomialRing(QQ,len(V),', '.join(map(str,V)))
J = R1.ideal(B)
try:
S = J.variety()
except:
print('ERROR: Dimension:',J.dimension(),'Basis:',B)
continue
if S:
print(S)
3 | No.3 Revision |
The set of solutions, when it's finite, can be computed with .variety()
method. In your problem, there are many cases when the ideal does not depend on one of the variables, say z
, essentially making it free. To take care of those cases, variety can be computed over the subring depending only on the rest of the variables (say, x
and y
). The corresponding code is given below.
For example, when it prints {x: 0, y: 0}
it means that solutions are given by x=0
, y=0
and any z
.
In cases when variety still fails, it reports an error like
ERROR: Dimension: 1 Basis: [x - 3796875/8*z - 1/5400, y]
ERROR: Dimension: 1 Basis: [x^2 - 21515625/143*x*z + 14416259765625/143*z^2 - 62/7425*x + 11250/143*z + 1/65154375, y]
In some cases, one variable can be expressed in terms of another (like x
in terms of z
in the first error above), while others (like the second error above) may lead to quadratic Pell-type, elliptic, or higher-degree equations. One may try to address them with an appropriate functionality in Sage if needed.
from sage.misc.verbose import set_verbose
set_verbose(-1)
for fff in Combinations(Lf,3):
B = R.ideal(fff).groebner_basis()
V = set.union(*(set(f.variables()) for f in B))
R1 = PolynomialRing(QQ,len(V),', '.join(map(str,V)))
J = R1.ideal(B)
try:
S = J.variety()
except:
print('ERROR: Dimension:',J.dimension(),'Basis:',B)
continue
if S:
print(S)
4 | No.4 Revision |
The set of solutions, when it's finite, can be computed with .variety()
method. In your problem, there are many cases when the ideal does not depend on one of the variables, say z
, essentially making it free. To take care of those cases, variety can be computed over the subring depending only on the rest of the variables (say, x
and y
). The corresponding code is given below.
For example, when it prints {x: 0, y: 0}
it means that solutions are given by x=0
, y=0
and any z
.
In cases when variety still fails, it reports an error like
ERROR: Dimension: 1 Basis: [x - 3796875/8*z - 1/5400, y]
ERROR: Dimension: 1 Basis: [x^2 - 21515625/143*x*z + 14416259765625/143*z^2 - 62/7425*x + 11250/143*z + 1/65154375, y]
In some cases, one variable can be expressed in terms of another (like x
in terms of z
in the first error above), while others (like the second error above) may lead to quadratic Pell-type, elliptic, or higher-degree equations. One may try to address them with an appropriate functionality in Sage if needed.
from sage.misc.verbose import set_verbose
set_verbose(-1)
for fff in Combinations(Lf,3):
B = R.ideal(fff).groebner_basis()
V = set.union(*(set(f.variables()) for f in B))
R1 = PolynomialRing(QQ,len(V),', '.join(map(str,V)))
J = R1.ideal(B)
try:
S = J.variety()
except:
print('ERROR: Dimension:',J.dimension(),'Basis:',B)
continue
if S:
print(S)
ADDED. Here is a reduced list of solutions (without repeats) resulted from cases not involving quadratic or higher-degree equations in each of the variables:
{y: 0}
{y: 0, x: 0}
{y: 0, x: -16/2475}
{y: 0, x: -1/525}
{y: 0, x: -23/225}
{y: 0, x: -19/4050}
{y: 0, x: 3796875/8*z + 1/5400}
{z: -21499/568107421875, y: 0, x: 0}
{z: -79/7688671875, y: 0, x: 0}
{z: -1/2562890625, y: 0, x: 0}
{z: 24964/1606932421875, y: 0, x: -16/2475}
{z: 6241/414333984375, y: 0, x: 2401/327375}
{z: (-6733125*x^2 + 472050*x + 32)/(20182763671875*x - 82012500000), y: 0}
{z: 118579/2145139453125, y: 0, x: -23/225}
{z: 68651/2493692578125, y: 0, x: 967/72975}
{z: -79/5638359375, y: 0, x: -16/2475}
{z: 755161/57249850781250, y: 0, x: -19/4050}
{z: -79/7688671875, y: 0, x: -19/4050}
{z: -553/2562890625, y: 0, x: -23/225}
{z: 6241/843191015625, y: 0, x: -1/525}
{z: -79/17940234375, y: 0, x: -1/525}
{z: -1/2562890625, y: -19/3600, x: 0}
{z: 493/48694921875, y: 19/3600, x: 0}
{z: -2209/1355769140625, y: -23/2700, x: 0}
{z: -79/7688671875, y: -4/1425, x: 0}
{z: 1381/2050312500, y: 2/675, x: 3/25}
{z: -12637/5207793750000, y: -4/675, x: 3/3175}