On Oct 27, 7:17 pm, Jason Grout <jason-s...@creativetrax.com> wrote: > What is the reason for insisting that the > thing must be a RingElement (as opposed to, say, an Element)?
One reason I could see is because elements of the SymbolicRing are supposed to be ring elements, and vectors generally are not. However, there are already plenty ring operations that lead to errors for combinations of symbolic ring elements. So defining products of any pair of vectors to lead to errors would not be a real problem. A bigger problem exists already and is that multiplication in a matrix ring is not commutative and multiplication in SR is. However, one does not even get to a point where one can show this: sage: R=MatrixSpace(Rationals(),2,2) sage: phi=SR.convert_map_from(R) sage: A=R([[1,2],[3,4]]) sage: A.set_immutable() sage: B=R([[5,6],[7,8]]) sage: B.set_immutable() sage: phi(A)*phi(B) Traceback (most recent call last): ... TypeError: mutable matrices are unhashable Incidentally, thing get even worse when one tries to map over an element from SR to maxima: Maxima knows about matrix multiplication, but denotes it by '.'. '*' is defined for matrices, but is just component-wise multiplication (which is commutative and makes the n x n matrices into a rather boring ring). I think one would need some careful thought on how to allow for linear algebra inside SR. Linear algebra over SR might be easier. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---