Function: polsubcyclo
Section: polynomials
C-Name: polsubcyclo
Prototype: LLDn
Help: polsubcyclo(n,d,{v='x}): finds an equation (in variable v) for the d-th
 degree subfields of Q(zeta_n). Output is a polynomial, or a vector of
 polynomials if there are several such fields or none.
Doc: gives polynomials (in variable $v$) defining the (Abelian) subextensions
 of degree $d$ of the cyclotomic field $\Q(\zeta_n)$, where $d\mid \phi(n)$.

 If there is exactly one such extension the output is a polynomial, else it is
 a vector of polynomials, possibly empty. To get a vector in all cases,
 use \kbd{concat([], polsubcyclo(n,d))}.

 Each such polynomial is the minimal polynomial for a Gaussian period
 $\text{Tr}_{\Q(\zeta_f)/L} (\zeta_f)$, where $L$ is the degree $d$
 subextension of $\Q(\zeta_n)$ and $f | n$ is its conductor. In
 Galois-theoretic terms, $L = \Q(\zeta_n)^H$, where $H$ runs through all index
 $d$ subgroups of $(\Z/n\Z)^*$.

 The function \tet{galoissubcyclo} allows to specify exactly which
 sub-Abelian extension should be computed by giving $H$.

 \misctitle{Complexity} Ignoring logarithmic factors, \kbd{polsubcyclo} runs
 in time $O(n)$. The function \kbd{polsubcyclofast} returns different, less
 canonical, polynomials but runs in time $O(d^4)$, again ignoring logarithmic
 factors; thus it can handle much larger values of $n$.
