1Function: bnrclassfield 2Section: number_fields 3C-Name: bnrclassfield 4Prototype: GDGD0,L,p 5Help: bnrclassfield(bnr,{subgp},{flag=0}): bnr being as output by bnrinit, 6 find a relative equation for the class field corresponding to the congruence 7 subgroup described by (bnr,subgp). If flag=0, return a vector of polynomials 8 such that the compositum of the corresponding fields is the class field; if 9 flag=1 return a single relative polynomial; if flag=2 return a single 10 absolute polynomial. 11Doc: \var{bnr} being as output by \kbd{bnrinit}, returns a relative equation 12 for the class field corresponding to the congruence group defined by 13 $(\var{bnr},\var{subgp})$ (the full ray class field if \var{subgp} is 14 omitted). The subgroup can also be a \typ{INT}~$n$, 15 meaning~$n \cdot \text{Cl}_f$. The function also handles a vector of 16 subgroup, e.g, from \tet{subgrouplist} and returns the vector of individual 17 results in this case. 18 19 If $\fl=0$, returns a vector of polynomials such that the compositum of the 20 corresponding fields is the class field; if $\fl=1$ returns a single 21 polynomial; if $\fl=2$ returns a single absolute polynomial. 22 23 \bprog 24 ? bnf = bnfinit(y^3+14*y-1); bnf.cyc 25 %1 = [4, 2] 26 ? pol = bnrclassfield(bnf,,1) \\ Hilbert class field 27 %2 = x^8 - 2*x^7 + ... + Mod(11*y^2 - 82*y + 116, y^3 + 14*y - 1) 28 ? rnfdisc(bnf,pol)[1] 29 %3 = 1 30 ? bnr = bnrinit(bnf,3*5*7); bnr.cyc 31 %4 = [24, 12, 12, 2] 32 ? bnrclassfield(bnr,2) \\ maximal 2-elementary subextension 33 %5 = [x^2 + (-21*y - 105), x^2 + (-5*y - 25), x^2 + (-y - 5), x^2 + (-y - 1)] 34 \\ quadratic extensions of maximal conductor 35 ? bnrclassfield(bnr, subgrouplist(bnr,[2])) 36 %6 = [[x^2 - 105], [x^2 + (-105*y^2 - 1260)], [x^2 + (-105*y - 525)], 37 [x^2 + (-105*y - 105)]] 38 ? #bnrclassfield(bnr,subgrouplist(bnr,[2],1)) \\ all quadratic extensions 39 %7 = 15 40 @eprog\noindent When the subgroup contains $n \text{Cl}_f$, where $n$ is fixed, 41 it is advised to directly compute the \kbd{bnr} modulo $n$ to avoid expensive 42 discrete logarithms: 43 \bprog 44 ? bnf = bnfinit(y^2-5); p = 1594287814679644276013; 45 ? bnr = bnrinit(bnf,p); \\ very slow 46 time = 24,146 ms. 47 ? bnrclassfield(bnr, 2) \\ ... even though the result is trivial 48 %3 = [x^2 - 1594287814679644276013] 49 ? bnr2 = bnrinit(bnf,p,,2); \\ now fast 50 time = 1 ms. 51 ? bnrclassfield(bnr2, 2) 52 %5 = [x^2 - 1594287814679644276013] 53 @eprog\noindent This will save a lot of time when the modulus contains a 54 maximal ideal whose residue field is large. 55