I can represent some groups in Sage. But cannot represent $G(m,p,q)$. How would I represent the group $G(m,p,q)$ in sage so that I can operate on it?
Let $m$ and $n$ be positive integers, let $C_m$ be the cyclic group of order $m$ and $B = C_m\times\dots\times C_m$ be the direct product of $n$ copies of $C_m$. For each divisor $p$ of $m$ define the group $A(m, p, n)$ by $$ A(m, p, n) = \left\{\ (\theta_1, \theta_2, \dots , \theta_n) \in B \ \Big|\ (\theta_1\theta_2\dots\theta_n)^{m/p} = 1\ \right\} \ . $$ It follows that $A(m, p, n)$ is a subgroup of index $p$ in $B$ and the symmetric group $\operatorname{Sym}(n)$ acts naturally on $A(m, p, n)$ by permuting the coordinates. $G(m, p, n)$ is defined to be the semidirect product of $A(m, p, n)$ by $\operatorname{Sym}(n)$. It follows that $G(m, p, n)$ is a normal subgroup of index $p$ in the wreath product $C_m ≀ \operatorname{Sym}(n)$ and thus has order $m^n\;n!/p$.
It is well known that these groups can be realized as finite subgroups of $GL_n(\Bbb C)$, specifically as $n \times n$ matrices with exactly one non-zero entry, which is a complex $m$-th root of unity, in each row and column such that the product of the entries is a complex $(m/p)$th root of unity. Thus the groups $G(m, p, n)$ are sometimes referred to as monomial reflection groups.