Function: ideallog
Section: number_fields
C-Name: ideallog
Prototype: DGGG
Help: ideallog({nf},x,bid): if bid is a big ideal, as given by
 idealstar(nf,D,...), gives the vector of exponents on the generators bid.gen
 (even if these generators have not been explicitly computed).
Doc: $\var{nf}$ is a number field,
 \var{bid} is as output by \kbd{idealstar(nf, D, \dots)} and $x$ an
 element of \var{nf} which must have valuation
 equal to 0 at all prime ideals in the support of $\kbd{D}$ and need not be
 integral. This function
 computes the discrete logarithm of $x$ on the generators given in
 \kbd{\var{bid}.gen}. In other words, if $g_{i}$ are these generators, of orders
 $d_{i}$ respectively, the result is a column vector of integers $(x_{i})$ such
 that $0\le x_{i}<d_{i}$ and
 $$x \equiv \prod_{i} g_{i}^{x_{i}} \pmod{\ ^{*}D}\enspace.$$
 Note that when the support of \kbd{D} contains places at infinity, this
 congruence implies also sign conditions on the attached real embeddings.
 See \tet{znlog} for the limitations of the underlying discrete log algorithms.

 When \var{nf} is omitted, take it to be the rational number field. In that
 case, $x$ must be a \typ{INT} and \var{bid} must have been initialized by
 \kbd{znstar(N,1)}.
Variant: Also available are
 \fun{GEN}{Zideallog}{GEN bid, GEN x} when \kbd{nf} is \kbd{NULL},
 and \fun{GEN}{ideallogmod}{GEN nf, GEN x, GEN bid, GEN mod}
 that returns the discrete logarithm of~$x$ modulo the~\typ{INT}
 \kbd{mod}; the value~$\kbd{mod = NULL}$ is treated as~$0$ (full discrete
 logarithm), but~$\kbd{nf=NULL}$ is not implemented with nonzero~\kbd{mod}.
