Hi,

There are problems doing arithmetic in SL_2(Z):
S,T = SL2Z().gens()
S*T;          # no problem
S^2*T^3;    # no problem
S^-2*T^-3;  # no problem
but when I multiply two elements with different exponent:
S^-2*T^3;
S^2*T^-3;
T^2*T^-3;
I get a
<type 'exceptions.TypeError'>: Cannot convert
sage.matrix.matrix_integer_2x2.Matrix_integer_2x2 to
sage.matrix.matrix_integer_dense.Matrix_integer_dense
However, T.parent() and (T^-1).parent() return the same thing (both
equal string values "Modular Group SL(2,Z)" and equal when directly
compared with == and even with 'is').
When I do
sage: S = SL2Z()([0,-1,1,0])
sage: T = SL2Z()([1,1,0,1])
sage: S*T
I even get a runtime error:
<type 'exceptions.RuntimeError'>: There is a bug in the coercion code
in SAGE.
In this case in fact the parents are not equal: they are when compared
with ==, but not with 'is'.
(That's fine, that is more something of the implementation)
Finally, if I do
sage: G = SL2Z()
sage: S = G([0,-1,1,0])
sage: T = G([1,1,0,1])
then I can work correctly with S and T.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to