Function: poltomonic
Section: polynomials
C-Name: poltomonic
Prototype: GD&
Help: poltomonic(T,{&L}): T in Q[x]; returns U monic in Z[x] such that
 U(x) = C T(x/L) for some rational C and L. If &L is given, set it to L.
Doc: let $T \in \Q[x]$ be a nonzero polynomial; returns $U$ monic in $\Z[x]$
 such that $U(x) = C T(x/L)$ for some $C,L\in \Q$. If the pointer argument
 \kbd{\&L} is present, set \kbd{L} to $L$.
 \bprog
 ? poltomonic(9*x^2 - 1/2)
 %1 = x^2 - 2
 ? U = poltomonic(9*x^2 - 1/2, &L)
 %2 = x^2 - 2
 ? L
 %3 = 6
 ? U / subst(9*x^2 - 1/2, x, x/L)
 %4 = 4
 @eprog

 This function does not compute discriminants or maximal orders and runs
 with complexity almost linear in the input size. If $T$ is already monic with
 integer coefficient, \kbd{poltomonic} may still transform it if $\Z[x]/(T)$
 is contained in a trivial subring of the maximal order, generated by $L x$:
 \bprog
 ? poltomonic(x^2 + 4, &L)
 %5 = x^2 + 1
 ? L
 %6 = 1/2
 @eprog\noindent If $T$ is irreducible, the functions \kbd{polredabs}
 (exponential time) and \kbd{polredbest} (polynomial time) also find a monic
 integral generating polynomial for the number field $\Q[x]/(T)$, with
 explicit guarantees on its size, but are orders of magnitude slower.
