The cartesian product of two polyhedra doesn't work if their dimensions are
different:
Consider the following (just run on sagenb.org):
sage: B1 = Polyhedron(vertice=[(0,),(1,)])
sage: B1
A 1-dimensional polyhedron in ZZ^1 defined as the convex hull of 2
vertices
sage: B2 = B1*B1
sage: B1
A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 4
vertices
sage: B3 = B2*B1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_6.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("QjMgPSBCMipCMQ=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpf3Clrp/___code___.py", line 2, in <module>
exec compile(u'B3 = B2*B1
File "", line 1, in <module>
File
"/sagenb/sage_install/sage-5.11-boxen-x86_64-Linux/local/lib/python2.7/site-packages/sage/categories/magmas.py",
line 313, in __mul__
return get_coercion_model().bin_op(self, right, operator.mul)
File "coerce.pyx", line 710, in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(sage/structure/coerce.c:8280)
File "coerce.pyx", line 797, in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(sage/structure/coerce.c:7263)
File "coerce.pyx", line 1272, in
sage.structure.coerce.CoercionModel_cache_maps.get_action
(sage/structure/coerce.c:12184)
File "coerce.pyx", line 1389, in
sage.structure.coerce.CoercionModel_cache_maps.discover_action
(sage/structure/coerce.c:13239)
File "parent.pyx", line 2417, in sage.structure.parent.Parent.get_action
(sage/structure/parent.c:16728)
File "parent.pyx", line 2493, in
sage.structure.parent.Parent.discover_action (sage/structure/parent.c:17728)
File "coerce_actions.pyx", line 217, in
sage.structure.coerce_actions.detect_element_action
(sage/structure/coerce_actions.c:5512)
File "element.pyx", line 716, in
sage.structure.element.Element._acted_upon_ (sage/structure/element.c:6579)
File
"/sagenb/sage_install/sage-5.11-boxen-x86_64-Linux/local/lib/python2.7/site-packages/sage/geometry/polyhedron/base.py",
line 2620, in _acted_upon_
return self.product(actor)
File "element.pyx", line 3231, in
sage.structure.element.NamedBinopMethod.__call__
(sage/structure/element.c:24955)
File "coerce.pyx", line 998, in
sage.structure.coerce.CoercionModel_cache_maps.canonical_coercion
(sage/structure/coerce.c:9730)
TypeError: no common canonical parent for objects with parents: 'Polyhedra
in ZZ^2' and 'Polyhedra in ZZ^1'
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.