1Function: idealmul
2Section: number_fields
3C-Name: idealmul0
4Prototype: GGGD0,L,
5Help: idealmul(nf,x,y,{flag=0}): product of the two ideals x and y in the
6 number field nf. If (optional) flag is nonzero, reduce the result.
7Description:
8 (gen, gen, gen, ?0):gen        idealmul($1, $2, $3)
9 (gen, gen, gen, 1):gen         idealmulred($1, $2, $3)
10 (gen, gen, gen, #small):gen    $"invalid flag in idealmul"
11 (gen, gen, gen, small):gen     idealmul0($1, $2, $3, $4)
12Doc: ideal multiplication of the ideals $x$ and $y$ in the number field
13 \var{nf}; the result is the ideal product in HNF. If either $x$ or $y$
14 are extended ideals\sidx{ideal (extended)}, their principal part is suitably
15 updated: i.e. multiplying $[I,t]$, $[J,u]$ yields $[IJ, tu]$; multiplying
16 $I$ and $[J, u]$ yields $[IJ, u]$.
17 \bprog
18 ? nf = nfinit(x^2 + 1);
19 ? idealmul(nf, 2, x+1)
20 %2 =
21 [4 2]
22
23 [0 2]
24 ? idealmul(nf, [2, x], x+1)        \\ extended ideal * ideal
25 %3 = [[4, 2; 0, 2], x]
26 ? idealmul(nf, [2, x], [x+1, x])   \\ two extended ideals
27 %4 = [[4, 2; 0, 2], [-1, 0]~]
28 @eprog\noindent
29 If $\fl$ is nonzero, reduce the result using \kbd{idealred}.
30Variant:
31 \noindent See also
32 \fun{GEN}{idealmul}{GEN nf, GEN x, GEN y} ($\fl=0$) and
33 \fun{GEN}{idealmulred}{GEN nf, GEN x, GEN y} ($\fl\neq0$).
34