// Example code from paper 2: // _Applications of the class field theory of global fields_, by Claus Fieker // print "Examples from: Applications of the class field theory of global fields"; Attach("Paper02.m"); ei := GetEchoInput(); SetEchoInput(true); // Section 2: Number Fields // Subsection 2.1: Basic properties Q := Rationals(); Qt := PolynomialRing(Q); f := t^3 - 25; K := NumberField(f); a^3; Z_K := RingOfIntegers(K); Basis(Z_K, K); Z_K ! [1,2,3]; $1/1; K ! $1; Z_K ! $1; E := NumberField(Polynomial(K, CyclotomicPolynomial(3))); E; E : Maximal; z^3; Norm(z+a); Norm(z+a, Q); Norm(z+a, E); E_Q := AbsoluteField(E); E_Q : Maximal; Z_E_Q := MaximalOrder(E_Q); Z_E := MaximalOrder(E); Z_E ! Z_E_Q.3; E_Q ! $1; // Subsection 2.2: Class groups K := NumberField(t^2 - 10); Z_K := RingOfIntegers(K); Cl, mCl := ClassGroup(Z_K); Cl; mCl; I := mCl(Cl.1); I; I * K.1; I @@ mCl; (I^2) @@ mCl; IsPrincipal(mCl(Cl.1)); IsPrincipal(mCl(Cl.1)^2); // Subsection 2.3: Ray class groups m_0 := 7*5*9*Z_K; m_inf := [ 2 ]; R, mR := RayClassGroup(m_0, m_inf); R; mR; // Subsection 2.4: Class field theory k := NumberField(t^2 - 10); Z_k := RingOfIntegers(k); R, mR := RayClassGroup(5*Z_k, [1,2]); A := AbelianExtension(mR); A; K := NumberField(A); K; G, _, mG := AutomorphismGroup(A); G; lp := Decomposition(Z_k, 13); p := lp[1][1]; Norm(p); Z_K := MaximalOrder(A); P := Z_K !! p; /* to define p Z_K */ [ : s in G ]; s1 := FrobeniusAutomorphism(A, p); s2 := (3*G.1) @ mG; s1 eq s2; p @@ mR; R, mR := RayClassGroup(8*3*5*7*Z_k); #R; A := AbelianExtension(mR); A; K := NumberField(A); K; U := sub; q, mq := quo; q; phi := Inverse(mq)*mR; phi; A1 := AbelianExtension(phi); A1; NumberField(A1); L := Subgroups(R : Quot := [4]); #L; AL := [ AbelianExtension(Inverse(mq)*mR) where _, mq := quo< R | i`subgroup > : i in L ]; Minimum([AbsoluteDiscriminant(i) : i in AL]); Maximum([AbsoluteDiscriminant(i) : i in AL]); N := [ x : x in AL | IsNormal(x : All) ]; nC := [ x : x in N | not IsCentral(x : All) ]; LG := [ AutomorphismGroup(x : All) : x in nC ]; LP := [ CosetImage(x, sub) : x in LG ]; [ TransitiveGroupIdentification(x) : x in LP ]; TransitiveGroupDescription(8, 4); TransitiveGroupDescription(8, 5); // Section 3: Global function fields // Subsection 3.1: Basic properties k := GF(4); kx := FunctionField(k); kxy := PolynomialRing(kx); K := FunctionField(y^4 - k.1*x^2*y^2 + y - x^3*k.1^3); MF := MaximalOrderFinite(K); MF; MI := MaximalOrderInfinite(K); MI; Basis(MF); Basis(MI); Kt := PolynomialRing(K); E := FunctionField(t^2 + t + K.1); E : Maximal; // Subsection 3.2: Places and divisors lp1 := Places(K, 1); lp1; lp2 := Places(K, 2); D := 10*lp2[2] - lp1[1]; Ideal(lp1[3]); Ideal(lp1[1]); Ideals(D); Ea := RationalExtensionRepresentation(E); Ea : Maximal; E ! Ea.1; Ea ! (E.1 + K.1); // Subsection 3.3: Ray divisor class groups C, mC := ClassGroup(K); C; M := 2*lp1[2] + 3*lp2[3]; R, mR := RayClassGroup(M); R; // Subsection 3.4: Class field theory U := sub< R | lp1[1] @@ mR >; degree := #quo; degree; Genus(M, U); DiscriminantDivisor(M, U); DegreeOfExactConstantField(M, U); NumberOfPlacesOfDegreeOne(M, U); U := sub< R | U, lp2[4] @@ mR, lp1[4] @@ mR, lp2[1] @@ mR, lp2[2] @@ mR >; degree := #quo; degree; time Genus(M, U); NumberOfPlacesOfDegreeOne(M, U); E := AbelianExtension(M, U); // This next call to Genus takes several thousand seconds; its only point // is to demonstrate timing differences. time Genus(E); // Section 4: Applications // Subsection 4.1: C_l-fields _ := PolynomialRing(Rationals()); k := NumberField(t^2 - 10); B := 5*10^7; l := 3; Z_k := MaximalOrder(k); Bs := Floor(B / AbsoluteDiscriminant(Z_k)^l); Bs; lp := [ x : x in [2..Bs] | IsPrime(x) and x mod l eq 1 ]; LP := &cat [ [ x[1] : x in Decomposition(Z_k, y) | Norm(x[1]) le Bs ] : y in lp ]; L := [ 1*Z_k ]; for i in LP do b := Floor(Bs / Norm(i)); L cat:= [ x*i : x in L | Norm(x) le b]; end for; #L; p31 := Decomposition(Z_k, 3)[1][1]; p32 := Decomposition(Z_k, 3)[2][1]; b3 := Floor(1 + 3*Valuation(Z_k!3, p31)); b3; L31 := [ p31^i : i in [1..4] ]; L32 := [ p32^i : i in [1..4] ]; L cat:= &cat [ [ x*i : x in L | Norm(x) le b ] where b := Floor(Bs / Norm(i)) : i in L31 ]; L cat:= &cat [ [ x*i : x in L | Norm(x) le b ] where b := Floor(Bs / Norm(i)) : i in L32 ]; #L; LA := [ ]; for i in L do "Now doing: ", i; R, mR := RayClassGroup(i); l := Subgroups(R : Quot := [3]); "with ", #l, " possible subgroups"; for j in l do _, mq := quo; A := AbelianExtension(Inverse(mq)*mR); if Conductor(A) ne i then continue; end if; Append(~LA, A); end for; end for; #LA; // Subsection 4.2: S_3-fields B := 10^5; S3 := [ ]; LC := CyclicExtensions(k, 2, B); for i in LC do L := NumberField(i); sigma := Automorphisms(L)[2]; La := AbsoluteField(L); MC := CyclicExtensions(La, 3, B); for j in MC do if Conductor(j) ne sigma(Conductor(j)) then continue; end if; c := j`DefiningGroup; a := c`m0; U := Kernel(c`GrpMap); S := InducedAutomorphism(c`RcgMap, sigma, Minimum(a)); if U ne S(U) then continue; end if; q, mq := quo< Domain(c`RcgMap) | U >; if q.1 ne S(q.1) then continue; end if; Append(~S3, j); end for; end for; // Subsection 4.3: Codes F := GF(4); Ft := FunctionField(F); Fty := PolynomialRing(Ft); k := FunctionField(y^2 + y + t^3); lp1 := Places(k, 1); lp3 := Places(k, 3) cat Places(k, 4); opt := 0; while opt lt 3 do l1 := SequenceToSet(lp1); D := 0*lp1[1]; for j in [1..Random(#lp1 div 2)] do l := Random(l1); D +:= l; Exclude(~l1, l); end for; D +:= &+[ Random(lp3) : j in [1..9 - #lp1 + #l1] ]; R, mR := RayClassGroup(D); U := sub; q := quo; if #q eq 1 then continue; end if; while #q gt 10 do U := sub< R | U, Random(R) >; q := quo< R | U >; end while; if #q eq 1 then continue; end if; g := Genus(D, U); n := NumberOfPlacesOfDegreeOne(D, U); g, n, n/g*1.0, #q; if n/g gt opt then opt := n/g; D_opt := D; U_opt := U; end if; end while; K := FunctionField(AbelianExtension(D_opt, U_opt)); Kr := RationalExtensionRepresentation(K); L := Places(Kr, 1); #L; Genus(Kr); L3 := Places(Kr, 2) cat Places(Kr, 3); D := &+L; d := [ 0 : i in [1..#L] ]; for i in [1..100] do G := &+[ Parent(D) | Random(-1,2)*Random(L3) : j in [1..Random(7)] ]; dd := Dimension(G) - Dimension(G - D); if dd eq 0 then continue; end if; C := AGCode(L, G); m := MinimumDistance(C); if d[17-dd] lt m then d[17-dd] := m; end if; end for; d; be := [ ]; for d in [0..15] do c, f := BestKnownLinearCode(F, 16, d); be[d+1] := MinimumDistance(c); end for; be; d; SetEchoInput(ei);