I want to solve for the coefficients α(n,m,) an equation that looks like this:
0=(1+x+y+z)∑n,m,l∈0,1,…,Nα(n,m,l)xnymzk
Is there a way to do this in sage?
I want to solve for the coefficients α(n,m,) an equation that looks like this:
0=(1+x+y+z)∑n,m,l∈0,1,…,Nα(n,m,l)xnymzk
I want to solve for the coefficients α(n,m,) α(n,m,k) an equation that looks like this:
0=(1+x+y+z)∑n,m,l∈0,1,…,Nα(n,m,l)xnymzk
Is there a way to do this in sage?Sage?
I want to solve for the coefficients α(n,m,k) an equation that looks like this: 0=(1+x+y+z)∑n,m,k∈{0,1,…,N}α(n,m,k)xnymzk
Is there a way to do this in Sage?
![]() | 4 | None |
I want to solve for the coefficients α(n,m,k) an equation that looks like this: 0=(1+x+y+z)∑n,m,k∈{0,1,…,N}α(n,m,k)xnymzk
Is there a way to do this in Sage?
I tried to follow this answer and wrote this code that failed-
R = PolynomialRing(GF(2),3,"xyz")
x,y,z = R.gens()
S.<a,b,c> = R.quotient((x^2 + 1,y^2+1,z^2+1))
K = PolynomialRing(GF(2),2,'a') # Coefficients
a= K.gens()
Pol = (a[1]*a+a[0])*(a*b)-5*b*a # Equation to solve
K.ideal(Pol.coefficients())
I = K.ideal(Pol.coefficients())
I.variety()
And I get the following error:
TypeError Traceback (most recent call last) <ipython-input-183-38877ec0fab3> in <module>
2 a= K.gens()
3
----> 4 Pol = (a[Integer(1)]*a+a[Integer(0)])*(a*b)-Integer(5)*b*a # Equation to solve
5
6 K.ideal(Pol.coefficients())
TypeError: can't multiply sequence by non-int of type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'
![]() | 5 | None |
I want to solve for the coefficients α(n,m,k) an equation that looks like this: 0=(1+x+y+z)∑n,m,k∈{0,1,…,N}α(n,m,k)xnymzk
Is there a way to do this in Sage?
I tried to follow this answer and wrote this code that failed-
R = PolynomialRing(GF(2),3,"xyz")
x,y,z = R.gens()
S.<a,b,c> = R.quotient((x^2 + 1,y^2+1,z^2+1))
K = PolynomialRing(GF(2),2,'a') PolynomialRing(GF(2),2,'q') # Coefficients
a= q = K.gens()
Pol = (a[1]*a+a[0])*(a*b)-5*b*a (q[1]*a+q[0])*(a*b)-5*b*a # Equation to solve
K.ideal(Pol.coefficients())
I = K.ideal(Pol.coefficients())
I.variety()
And I get the following error:
TypeError Traceback (most recent call last) <ipython-input-183-38877ec0fab3> last)
<ipython-input-90-e45cccb450b5> in <module>
2 a= 5 q = K.gens()
3 6
----> 4 7 Pol = (a[Integer(1)]*a+a[Integer(0)])*(a*b)-Integer(5)*b*a (q[Integer(1)]*a+q[Integer(0)])*(a*b)-Integer(5)*b*a # Equation to solve
5
6 8
9 K.ideal(Pol.coefficients())
/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__mul__ (build/cythonized/sage/structure/element.c:12199)()
1513 return (<Element>left)._mul_(right)
1514 if BOTH_ARE_ELEMENT(cl):
-> 1515 return coercion_model.bin_op(left, right, mul)
1516
1517 cdef long value
/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:11304)()
1246 # We should really include the underlying error.
1247 # This causes so much headache.
-> 1248 raise bin_op_exception(op, x, y)
1249
1250 cpdef canonical_coercion(self, x, y):
TypeError: can't multiply sequence unsupported operand parent(s) for *: 'Multivariate Polynomial Ring in q0, q1 over Finite Field of size 2' and 'Quotient of Multivariate Polynomial Ring in x, y, z over Finite Field of size 2 by non-int of type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'
the ideal (x^2 + 1, y^2 + 1, z^2 + 1)'
![]() | 6 | None |
I want to solve for the coefficients α(n,m,k) an equation that looks like this: 0=(1+x+y+z)∑n,m,k∈{0,1,…,N}α(n,m,k)xnymzk
Is there a way to do this in Sage?Sage? Notice there are three generators x,y, but the number of coefficents alpha is 23L.
I tried to follow this answer and wrote this code that failed-
R = PolynomialRing(GF(2),3,"xyz")
x,y,z = R.gens()
S.<a,b,c> = R.quotient((x^2 + 1,y^2+1,z^2+1))
K = PolynomialRing(GF(2),2,'q') # Coefficients
q = K.gens()
Pol = (q[1]*a+q[0])*(a*b)-5*b*a # Equation to solve
I = K.ideal(Pol.coefficients())
I.variety()
And I get the following error:
TypeError Traceback (most recent call last)
<ipython-input-90-e45cccb450b5> in <module>
5 q = K.gens()
6
----> 7 Pol = (q[Integer(1)]*a+q[Integer(0)])*(a*b)-Integer(5)*b*a # Equation to solve
8
9 K.ideal(Pol.coefficients())
/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__mul__ (build/cythonized/sage/structure/element.c:12199)()
1513 return (<Element>left)._mul_(right)
1514 if BOTH_ARE_ELEMENT(cl):
-> 1515 return coercion_model.bin_op(left, right, mul)
1516
1517 cdef long value
/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:11304)()
1246 # We should really include the underlying error.
1247 # This causes so much headache.
-> 1248 raise bin_op_exception(op, x, y)
1249
1250 cpdef canonical_coercion(self, x, y):
TypeError: unsupported operand parent(s) for *: 'Multivariate Polynomial Ring in q0, q1 over Finite Field of size 2' and 'Quotient of Multivariate Polynomial Ring in x, y, z over Finite Field of size 2 by the ideal (x^2 + 1, y^2 + 1, z^2 + 1)'
![]() | 7 | None |
I want to solve for the coefficients α(n,m,k) an equation that looks like this: 0=(1+x+y+z)∑n,m,k∈{0,1,…,N}α(n,m,k)xnymzk
Is there a way to do this in Sage? Notice there are three generators x,y, but the number of coefficents alpha α is 23L.
I tried to follow this answer and wrote this code that failed-
R = PolynomialRing(GF(2),3,"xyz")
x,y,z = R.gens()
S.<a,b,c> = R.quotient((x^2 + 1,y^2+1,z^2+1))
K = PolynomialRing(GF(2),2,'q') # Coefficients
q = K.gens()
Pol = (q[1]*a+q[0])*(a*b)-5*b*a # Equation to solve
I = K.ideal(Pol.coefficients())
I.variety()
And I get the following error:
TypeError Traceback (most recent call last)
<ipython-input-90-e45cccb450b5> in <module>
5 q = K.gens()
6
----> 7 Pol = (q[Integer(1)]*a+q[Integer(0)])*(a*b)-Integer(5)*b*a # Equation to solve
8
9 K.ideal(Pol.coefficients())
/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__mul__ (build/cythonized/sage/structure/element.c:12199)()
1513 return (<Element>left)._mul_(right)
1514 if BOTH_ARE_ELEMENT(cl):
-> 1515 return coercion_model.bin_op(left, right, mul)
1516
1517 cdef long value
/opt/sagemath-9.2/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:11304)()
1246 # We should really include the underlying error.
1247 # This causes so much headache.
-> 1248 raise bin_op_exception(op, x, y)
1249
1250 cpdef canonical_coercion(self, x, y):
TypeError: unsupported operand parent(s) for *: 'Multivariate Polynomial Ring in q0, q1 over Finite Field of size 2' and 'Quotient of Multivariate Polynomial Ring in x, y, z over Finite Field of size 2 by the ideal (x^2 + 1, y^2 + 1, z^2 + 1)'