1Function: ideallist
2Section: number_fields
3C-Name: ideallist0
4Prototype: GLD4,L,
5Help: ideallist(nf,bound,{flag=4}): vector of vectors L of all idealstar of
6 all ideals of norm<=bound. If (optional) flag is present, its binary digits
7 are toggles meaning 1: give generators; 2: add units; 4: give only the
8 ideals and not the bid.
9Doc: computes the list
10 of all ideals of norm less or equal to \var{bound} in the number field
11 \var{nf}. The result is a row vector with exactly \var{bound} components.
12 Each component is itself a row vector containing the information about
13 ideals of a given norm, in no specific order, depending on the value of
14 $\fl$:
15
16 The possible values of $\fl$ are:
17
18 \quad 0: give the \var{bid} attached to the ideals, without generators.
19
20 \quad 1: as 0, but include the generators in the \var{bid}.
21
22 \quad 2: in this case, \var{nf} must be a \var{bnf} with units. Each
23 component is of the form $[\var{bid},U]$, where \var{bid} is as case 0
24 and $U$ is a vector of discrete logarithms of the units. More precisely, it
25 gives the \kbd{ideallog}s with respect to \var{bid} of $(\zeta,u_1,\dots,u_r)$
26 where $\zeta$ is the torsion unit generator \kbd{bnf.tu[2]} and $(u_i)$
27 are the fundamental units in \kbd{bnf.fu}.
28 This structure is technical, and only meant to be used in conjunction with
29 \tet{bnrclassnolist} or \tet{bnrdisclist}.
30
31 \quad 3: as 2, but include the generators in the \var{bid}.
32
33 \quad 4: give only the HNF of the ideal.
34
35 \bprog
36 ? nf = nfinit(x^2+1);
37 ? L = ideallist(nf, 100);
38 ? L[1]
39 %3 = [[1, 0; 0, 1]]  \\@com A single ideal of norm 1
40 ? #L[65]
41 %4 = 4               \\@com There are 4 ideals of norm 4 in $\Z[i]$
42 @eprog
43 If one wants more information, one could do instead:
44 \bprog
45 ? nf = nfinit(x^2+1);
46 ? L = ideallist(nf, 100, 0);
47 ? l = L[25]; vector(#l, i, l[i].clgp)
48 %3 = [[20, [20]], [16, [4, 4]], [20, [20]]]
49 ? l[1].mod
50 %4 = [[25, 18; 0, 1], []]
51 ? l[2].mod
52 %5 = [[5, 0; 0, 5], []]
53 ? l[3].mod
54 %6 = [[25, 7; 0, 1], []]
55 @eprog\noindent where we ask for the structures of the $(\Z[i]/I)^*$ for all
56 three ideals of norm $25$. In fact, for all moduli with finite part of norm
57 $25$ and trivial Archimedean part, as the last 3 commands show. See
58 \tet{ideallistarch} to treat general moduli.
59