@@ -625,16 +625,13 @@ end
625
625
# ##############################################################################
626
626
627
627
function C22_extensions (bound:: Int )
628
-
629
-
630
628
Qx, x= polynomial_ring (ZZ, " x" )
631
629
K, _= number_field (x- 1 , cached = false )
632
630
Kx,x= polynomial_ring (K," x" , cached= false )
633
631
b1= ceil (Int,Base. sqrt (bound))
634
632
n= 2 * b1+ 1
635
633
pairs = _find_pairs (bound)
636
634
return (_ext (Kx,x,i,j) for (i, j) in pairs)
637
-
638
635
end
639
636
640
637
function _ext (Ox,x,i,j)
@@ -868,7 +865,66 @@ function _find_pairs(bound::Int, only_real::Bool = false; unramified_outside::Ve
868
865
return vcat (res, real_exts)
869
866
end
870
867
868
+ # Compute C2xC2 extensions of Q with given discriminant
869
+ # The criterion for the discriminant is from
870
+ # "On the density of discriminants of quartic fields", Baily
871
+ function C22_extensions_with_given_disc (d:: Int ; only_real = false )
872
+ res = AbsSimpleNumField[]
873
+ if d < 2
874
+ return res
875
+ end
876
+
877
+ e, n = remove (d, 2 )
878
+
879
+ if ! (e in [0 , 4 , 6 , 8 ])
880
+ return res
881
+ end
882
+
883
+ fl, m = is_square_with_sqrt (n)
884
+
885
+ if ! is_squarefree (m)
886
+ return res
887
+ end
888
+
889
+ if ! fl
890
+ return res
891
+ end
892
+
893
+ wm = length (prime_divisors (m))
871
894
895
+ if e == 0
896
+ nu = divexact (3 ^ (wm - 1 ) - 1 , 2 )
897
+ elseif e == 4
898
+ nu = divexact (3 ^ wm - 1 , 2 )
899
+ elseif e == 6
900
+ nu = 3 ^ wm - 1
901
+ else
902
+ @assert e == 8
903
+ nu = 3 ^ wm
904
+ end
905
+
906
+ # d is the discriminant, and a multiple of the conductor
907
+ K, = rationals_as_number_field ()
908
+ O = maximal_order (K)
909
+
910
+ r, mr = ray_class_groupQQ (O, Int (d), ! only_real, 2 )
911
+ if ! has_quotient (r, [2 , 2 ])
912
+ return res
913
+ end
914
+ fun = (x, y) -> quo (x, y, false )[2 ]
915
+ ls = subgroups (r, quotype = [2 , 2 ], fun = fun)
916
+ for s in ls
917
+ C = ray_class_field (mr, s)
918
+ _d = discriminantQQ (O, C, d)
919
+ if _d == d
920
+ push! (res, absolute_simple_field (number_field (C); simplify = true , cached = false )[1 ])
921
+ end
922
+ if ! only_real && length (res) == nu
923
+ return res
924
+ end
925
+ end
926
+ return res
927
+ end
872
928
873
929
function _from_relative_to_abs (L:: RelNonSimpleNumField{T} , auts:: Vector{<: NumFieldHom{RelNonSimpleNumField{T}, RelNonSimpleNumField{T}}} ) where T
874
930
0 commit comments