Dear all, I'm playing around with #11335 which was included in Sage 4.7.1.alpha3. In this patch, I added a symbolic vector class, with the aim of providing simplification methods that act elementwise on symbolic vectors. The symbolic vector class derives from sage.modules.free_module_element.FreeModuleElement_generic_dense and so far only provides methods for simplification, so it's pretty simple.
However, it looks like this simple design is not sufficient to ensure that the result of simple arithmetic operators stays in the same vector space: sage: v = vector(SR, [1]) sage: w = vector(SR, [x]) sage: type(v) <class 'sage.modules.vector_symbolic_dense.Vector_symbolic_dense'> sage: type(w) <class 'sage.modules.vector_symbolic_dense.Vector_symbolic_dense'> sage: type(v + w) <type 'sage.modules.free_module_element.FreeModuleElement_generic_dense'> I have no idea what the matter is, though. The coercion model reports that arithmetic should be performed directly: sage: cm = sage.structure.element.get_coercion_model() sage: cm.explain(v, w, operator.add) Identical parents, arithmetic performed immediately. Result lives in Vector space of dimension 1 over Symbolic Ring Vector space of dimension 1 over Symbolic Ring Any idea where things went wrong? Thanks! Joris -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org