Hi,

I am completely new to Sage. To test the visualization of a subgroup of SL(2)a, I entered the following code:

G=SL(2,ZZ)
identity = matrix(ZZ, [[1,0], [0,1]])
G.cayley_table(names='elements',elements=[identity, -identity])


which outputs

              *      [1 0]
[0 1] [-1  0]
[ 0 -1]
+--------------------------------
[1 0]
[0 1]|     [1 0]
[0 1] [-1  0]
[ 0 -1]
[-1  0]
[ 0 -1]| [-1  0]
[ 0 -1]     [1 0]
[0 1]


Am I missing something to get a correctly displayed result ?

Thanks !

edit retag close merge delete

I'm not sure that Cayley tables work well when the string representations of elements have multiple lines. I'm reporting it as a bug: see http://trac.sagemath.org/sage_trac/ticket/10787.

( 2011-02-15 09:31:45 -0500 )edit

Sort by ยป oldest newest most voted

I think you are right that Cayley tables aren't set up for members of matrix groups very well. I've made this Trac 10786 and cc:ed someone I know cares a lot about Cayley tables. I'm not sure whether the fix would be completely easy, though.

more

@kcrisman: Sorry, I didn't see your answer when I posted my comment above...

( 2011-02-15 09:39:32 -0500 )edit

As I note in my comment, I think this is a bug. To get around it, you could instead use G.cayley_table(elements=[identity, -identity]) and it should work fine. The output from G.cayley_table(names=['I', '-I'], elements=[identity, -identity]) looks even better to me. (When you set names equal to a list, the entries of the list are the strings to use to name the elements, so this uses 'I' for the identity matrix and '-I' for its negative.)

more