Ask Your Question
1

Badly formatted Cayley Table

asked 2011-02-15 15:23:02 +0200

johndeas gravatar image

updated 2023-01-09 23:59:31 +0200

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 16:31:45 +0200 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-02-15 16:37:26 +0200

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
1

answered 2011-02-15 16:26:41 +0200

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 16:39:32 +0200 )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 15:23:02 +0200

Seen: 756 times

Last updated: Feb 15 '11