Hi list
how can i create a subring of the polynomial ring?
I need to construct the rings like this:
CC[x^3,y^3,z^3] or CC[x^3, y^3, z^3, xy^2, xz^2, yz^2, x^2y, x^2z, y^2z]
how can I do this in sage?
I tried this:
C.<x^3,y^3,z^3> = CC['x^3,y^3,z^3']
------------------------------------------------------------
File "<ipython console>", line 1
SyntaxError: can't assign to operator (<ipython console>, line 1)
and this:
C.<x,y,z> = CC['x^3,y^3,z^3']
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/j_schn14/studium/diplarbeit/src/<ipython console> in <module>()
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/rings/ring.so in
sage.rings.ring.Ring.__getitem__ (sage/rings/ring.c:2629)()
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py
in PolynomialRing(base_ring, arg1, arg2, sparse, order, names, name,
implementation)
348 names = arg1.split(',')
349 n = len(names)
--> 350 R = _multi_variate(base_ring, names, n, sparse, order)
351 elif isinstance(arg1, (list, tuple)):
352 # PolynomialRing(base_ring, names (list or tuple),
order='degrevlex'):
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py
in _multi_variate(base_ring, names, n, sparse, order)
439
440 def _multi_variate(base_ring, names, n, sparse, order):
--> 441 names = normalize_names(n, names)
442
443 import sage.rings.polynomial.multi_polynomial_ring as m
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/structure/parent_gens.so
in sage.structure.parent_gens.normalize_names
(sage/structure/parent_gens.c:2121)()
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/structure/parent_gens.so
in sage.structure.parent_gens._certify_names
(sage/structure/parent_gens.c:1654)()
ValueError: variable names must be alphanumeric, but one is 'x^3' which
is not.
greatz Johannes.
p.s.: in the end, I'm interested in the group, which has the given ring
as invariant ring. maybe somebody has any idea how to get this group.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org