Ask Your Question
2

Group element multiplication in symmetric group

asked 2 years ago

vidyarthi gravatar image

updated 0 years ago

FrédéricC gravatar image

I think this is elementary, but how do we just multiply two elements in the symmetric group. For example, I have a list of elements as

G=SymmetricGroup(5)
A=[(1,2), (1,3,2), (1,4), (1,4)(2,3),(2,4),(2,4,3),(3,4),(2,3,4)]
b=[G(1,5)*G(a) for a in A]
b

When I implement in the above code on the compiler, I get the error 'tuple' object is not callable. Anyway to overcome this error and multiply two elements in the group, or, in any other group? Thanks beforehand.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
4

answered 2 years ago

tmonteil gravatar image

When you define A, the (1,4)(2,3) looks using the tuple (1,4) as a function to be called at (2,3), which explains your error.

If you want A be a list of elements of G you must make it explicit:

sage: A=[G((1,2)), G((1,3,2)), G((1,4)), G([(1,4),(2,3)]),G((2,4)),G((2,4,3)),G((3,4)),G((2,3,4))]

sage: A
[(1,2), (1,3,2), (1,4), (1,4)(2,3), (2,4), (2,4,3), (3,4), (2,3,4)]

Then, you can do:

sage: b=[G((1,5))*a for a in A]
sage: b
[(1,5,2),
 (1,5,3,2),
 (1,5,4),
 (1,5,4)(2,3),
 (1,5)(2,4),
 (1,5)(2,4,3),
 (1,5)(3,4),
 (1,5)(2,3,4)]
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 268 times

Last updated: Sep 21 '22