Function: idealfrobenius
Section: number_fields
C-Name: idealfrobenius
Prototype: GGG
Help: idealfrobenius(nf,gal,pr): Returns the Frobenius element (pr|nf/Q)
 associated with the unramified prime ideal pr in prid format, in the Galois
 group gal of the number field nf.
Doc: Let $K$ be the number field defined by $nf$ and assume $K/\Q$ be a
 Galois extension with Galois group given \kbd{gal=galoisinit(nf)},
 and that $pr$ is the prime ideal $\goth{P}$ in prid format, and that
 $\goth{P}$ is unramified.
 This function returns a permutation of \kbd{gal.group} which defines the
 automorphism $\sigma=\left(\goth{P}\over K/\Q \right)$, i.e the Frobenius
 element associated to $\goth{P}$. If $p$ is the unique prime number
 in $\goth{P}$, then $\sigma(x)\equiv x^p\mod\P$ for all $x\in\Z_K$.

 \bprog
 ? nf=nfinit(polcyclo(31));
 ? gal=galoisinit(nf);
 ? pr=idealprimedec(nf,101)[1];
 ? g=idealfrobenius(nf,gal,pr)
 %4 = Vecsmall([13, 14, 29, 27, 19, 30, 10, 21, 17, 12, 24, 8, 9, 20, 26, 25, 22, 5, 11, 4, 7, 1, 16, 18, 3, 6, 2, 15, 23, 28])
 ? galoispermtopol(gal,g)
 %5 = x^8
 @eprog\noindent This is correct since $101\equiv 8\mod{31}$.
