This question is perhaps a bit silly, but I haven't figured out from the GAP manual how to do this. I want to create a function delta which takes as input a (finite) group $G$ and returns the full preimage of $Z(G/\Phi(G))$, where $\Phi(G)$ is the Frattini subgroup of $G$.
Any help would be appreciated.
You need to form a natural homomorphism to go between $G$ and a factor group. Then the function is simply: