from sage.rings.quotient_ring import is_QuotientRing F=ZZ.quo(3*ZZ);F A.<x,y,z>=PolynomialRing(F);A I=ideal(X^2-1,Y^2-1,Z^2-1);I R.<x,y,z> = A.quotient_ring(I);R
1 | initial version |
from sage.rings.quotient_ring import is_QuotientRing F=ZZ.quo(3*ZZ);F A.<x,y,z>=PolynomialRing(F);A I=ideal(X^2-1,Y^2-1,Z^2-1);I R.<x,y,z> = A.quotient_ring(I);R
from sage.rings.quotient_ring import is_QuotientRing F=ZZ.quo(3*ZZ);F A.<x,y,z>=PolynomialRing(F);A I=ideal(X^2-1,Y^2-1,Z^2-1);I R.<x,y,z> = A.quotient_ring(I);R
from sage.rings.quotient_ring import is_QuotientRing
F=ZZ.quo(3*ZZ);F
A.<x,y,z>=PolynomialRing(F);A
I=ideal(X^2-1,Y^2-1,Z^2-1);I
R.<x,y,z> = A.quotient_ring(I);Rdef vbl(l,ex):
....: #li=liste de variables
....: #ex=liste d'entiers naturels de même longueur que li
....: n=len(l)
....: V=1
....: for i in range(n):
....: V=V[l[i]*ex[i]]
....: return V
def vbl(l,ex):
....: vbl(c,ex):
#li=liste de variables
....: l=len(c)
#ex=liste d'entiers naturels de même longueur que li
....: n=len(l)
....: V=1
....: V=1
for i in range(n):
....: V=V[l[i][c[i]*ex[i]]
....: return V
def vbl(c,ex): l=len(c) V=1 for i in range(n): V=V[c[i]*ex[i]] return V
def vbl(c,ex): l=len(c) V=1 for i in range(n): V=V[c[i]*ex[i]] return V
def vbl(c,ex): l=len(c) V=1 for i in range(n): V=V[c[i]*ex[i]] return V
def vbl(c,ex): l=len(c) V=1 for i in range(n): V=V[c[i]*ex[i]] return V
def vbl(c,ex): l=len(c) V=1 for i in range(n): V=V[c[i]*ex[i]] return V
Consider:
def vbl(c,ex): l=len(c) V=1 for i in range(n): V=V[c[i]*ex[i]] return V
.
Consider:.
def vbl(c,ex):
l=len(c)
V=1
for i in range(n):
.
.I define the following function:
def vbl(c,ex):
vbl(c, ex):
l = len(c)
l=len(c)
V=1 V = 1 for i in range(n):
V=V*[c[i]**ex[i]]
V = V * [c[i]**ex[i]]
return V
.I then compute
sage: vbl(['x, y, z'], [2, 3, 4])
expecting to get
x^2**y^3**z^4
Instead, I get an error:
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
Yet I can compute x^2
, y^3
and z^4
after declaring x
, y
and z
as variables:
sage: var('x, y, z')
What happens?