Ask Your Question

What construct for cyclic group?

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

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

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()
sage: genG = G.gen()
sage: genG 

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


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

Seen: 104 times

Last updated: Jul 30 '20