Function: rnfidealreltoabs
Section: number_fields
C-Name: rnfidealreltoabs0
Prototype: GGD0,L,
Help: rnfidealreltoabs(rnf,x,{flag=0}): transforms the ideal x from relative to
absolute representation. As a vector of t_POLMODs if flag = 0 and as an ideal
in HNF in the absolute field if flag = 1.
Doc: Let $\var{rnf}$ be a relative
number field extension $L/K$ as output by \kbd{rnfinit} and let $x$ be a
relative ideal, given as a $\Z_K$-module by a pseudo matrix $[A,I]$.
This function returns the ideal $x$ as an absolute ideal of $L/\Q$.
If $\fl = 0$, the result is given by a vector of \typ{POLMOD}s modulo
\kbd{rnf.pol} forming a $\Z$-basis; if $\fl = 1$, it is given in HNF in terms
of the fixed $\Z$-basis for $\Z_L$, see \secref{se:rnfinit}.
\bprog
? K = nfinit(y^2+1); rnf = rnfinit(K, x^2-y);
? P = idealprimedec(K,2)[1];
? P = rnfidealup(rnf, P)
%3 = [2, x^2 + 1, 2*x, x^3 + x]
? Prel = rnfidealhnf(rnf, P)
%4 = [[1, 0; 0, 1], [[2, 1; 0, 1], [2, 1; 0, 1]]]
? rnfidealreltoabs(rnf,Prel)
%5 = [2, x^2 + 1, 2*x, x^3 + x]
? rnfidealreltoabs(rnf,Prel,1)
%6 =
[2 1 0 0]
[0 1 0 0]
[0 0 2 1]
[0 0 0 1]
@eprog
The reason why we do not return by default ($\fl = 0$) the customary HNF in
terms of a fixed $\Z$-basis for $\Z_L$ is precisely because
a \var{rnf} does not contain such a basis by default. Completing the
structure so that it contains a \var{nf} structure for $L$ is polynomial
time but costly when the absolute degree is large, thus it is not done by
default. Note that setting $\fl = 1$ will complete the \var{rnf}.
Variant: Also available is
\fun{GEN}{rnfidealreltoabs}{GEN rnf, GEN x} ($\fl = 0$).