First time here? Check out the FAQ!

Ask Your Question
1

Badly formatted Cayley Table

asked 14 years ago

johndeas gravatar image

updated 2 years ago

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 !

Preview: (hide)

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 ( 14 years ago )

2 Answers

Sort by » oldest newest most voted
2

answered 14 years ago

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

Preview: (hide)
link
1

answered 14 years ago

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.

Preview: (hide)
link

Comments

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

John Palmieri gravatar imageJohn Palmieri ( 14 years ago )

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: 14 years ago

Seen: 1,221 times

Last updated: Feb 15 '11