Let $G$ be a finite group. $x \sim y$ iff there exists $g \in G$ such that $$ \langle x \rangle = g^{-1} \langle y \rangle g $$ where $\langle x \rangle$ is the subgroup generated by $x$. Then $G$ acts on itself. What is the orbits of this action? For example let $G = D_{14}$ then the action is:
gap> ac:=function(x,t) return Group((x))^t; end;;
but, how to define the command "Orbits" for it? I set the following commands but it is not correct.
gap> o:=Orbits(G,G,ac);
gap> o:=Orbits(G,Elements(G),ac);
The initial problem with the acting function is the type mismatch: in
the 1st argument is a group element, and the output is a subgroup. As GAP manual explains here, the acting function must take an element x of the action domain, and t from the acting group, and return an element of the action domain again.
Your second attempt works, indeed - just pasting the code from your comment to display it nicely:
because now
actconforms to the specification. The last line can be replaced bysince your action is just another case of
OnPoints, sinceg^tis defined whengis a group on whichtacts by conjugation.A minor improvement might be to use
AddSetin the loop instead ofSetafter the loop, to avoid forming a large listc. Moreover, if you're interested in conjugacy classes of cyclic subgroups, then (dependently on the group) it may be easier to useConjugacyClassesSubgroups, and then select classes that contain cyclic subgroups.