1 | initial version |
You have missing multiplications symbols (*
). In particular, a1(...)
makes Sage think that you are calling function a1
.
Corrected code #1 is
R.<x, y, a1, a2, a3, a4>= RationalField()[];R
a1*(3*x^2+2*a2*x+a4-a1*y)*(2*y+a1*x+a3)-(a2+2*x)*(2*y+a1*x+a3)^2+(3*x^2+2*a2*x+a4-a1*y)^2
In code #2, you need additionally declare the polynomial variables, which can be done by calling .inject_variables()
:
R = PolynomialRing(RationalField(),6,'a')
R.inject_variables()
a1*(3*a0^2+2*a2*a5+a4-a1*a5)*(2*a5+a1*a0+a3)-(a2+2*a0)*(2*a5+a1*a0+a3)^2+(3*a0^2+2*a2*a0+a4-a1*a5)^2
2 | No.2 Revision |
You have missing multiplications symbols (*
). In particular, a1(...)
makes Sage think that you are calling function a1
.
Corrected code #1 is
R.<x, y, a1, a2, a3, a4>= RationalField()[];R
a1*(3*x^2+2*a2*x+a4-a1*y)*(2*y+a1*x+a3)-(a2+2*x)*(2*y+a1*x+a3)^2+(3*x^2+2*a2*x+a4-a1*y)^2
In code #2, you need additionally to declare the polynomial variables, which can be done by calling .inject_variables()
:
R = PolynomialRing(RationalField(),6,'a')
R.inject_variables()
a1*(3*a0^2+2*a2*a5+a4-a1*a5)*(2*a5+a1*a0+a3)-(a2+2*a0)*(2*a5+a1*a0+a3)^2+(3*a0^2+2*a2*a0+a4-a1*a5)^2
3 | No.3 Revision |
You have missing multiplications symbols (*
). In particular, a1(...)
makes Sage think that you are calling function evaluating polynomial a1
. on some arguments.
Corrected code #1 is
R.<x, y, a1, a2, a3, a4>= RationalField()[];R
a1*(3*x^2+2*a2*x+a4-a1*y)*(2*y+a1*x+a3)-(a2+2*x)*(2*y+a1*x+a3)^2+(3*x^2+2*a2*x+a4-a1*y)^2
In code #2, you need additionally to declare the polynomial variables, which can be done by calling .inject_variables()
:
R = PolynomialRing(RationalField(),6,'a')
R.inject_variables()
a1*(3*a0^2+2*a2*a5+a4-a1*a5)*(2*a5+a1*a0+a3)-(a2+2*a0)*(2*a5+a1*a0+a3)^2+(3*a0^2+2*a2*a0+a4-a1*a5)^2