Ask Your Question
0

Badly formatted Cayley Table

asked 2011-02-15 08:23:02 -0500

johndeas gravatar image

updated 2013-06-03 04:10:48 -0500

tmonteil gravatar image

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 flag offensive close merge delete

Comments

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.

John Palmieri gravatar imageJohn Palmieri ( 2011-02-15 09:31:45 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2011-02-15 09:37:26 -0500

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.)

edit flag offensive delete link more
0

answered 2011-02-15 09:26:41 -0500

kcrisman gravatar image

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.

edit flag offensive delete link more

Comments

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

John Palmieri gravatar imageJohn Palmieri ( 2011-02-15 09:39:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-02-15 08:23:02 -0500

Seen: 225 times

Last updated: Feb 15 '11