Ask Your Question
0

What construct for cyclic group?

asked 2020-07-29 21:16:41 +0200

Rafal Mi gravatar image

What is the proper Sage construct for working with cyclic group $\mathbb{Z} / n \mathbb{Z}$ ? I cannot see any in group theory manual page. Yes, we have Integers(n), but it cannot be asked like a group about, say, subgroup().

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-07-30 08:39:34 +0200

philipp7 gravatar image

You can use the method CyclicPermutationGroup(n). This will create a cyclic group of given order. Then you can apply all the usual group-theory methods, e.g.

sage: G = CyclicPermutationGroup(8)
sage: G.is_cyclic()
True
sage: genG = G.gen()
sage: genG 
(1,2,3,4,5,6,7,8)

One problem is, that the elements are now represented as permutations and not in the "usual way" as integers $0,...,n-1$. However, if you want the element in $G$ which corresponds to $i \in \mathbb{Z}_n$ you can use genG^i.

edit flag offensive delete link more

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: 2020-07-29 21:16:41 +0200

Seen: 563 times

Last updated: Jul 30 '20