# SageMath code for working with number field 42.42.496897759422042196258605771077406782550407598249513303021389442457964675897236469.1 # Some of these functions may take a long time to execute (this depends on the field). # Define the number field: x = polygen(QQ); K. = NumberField(x^42 - x^41 - 67*x^40 + 62*x^39 + 1993*x^38 - 1704*x^37 - 34847*x^36 + 27519*x^35 + 399768*x^34 - 291838*x^33 - 3181854*x^32 + 2151119*x^31 + 18125561*x^30 - 11376768*x^29 - 75199314*x^28 + 43948028*x^27 + 229267037*x^26 - 125109956*x^25 - 515411960*x^24 + 263200585*x^23 + 854114535*x^22 - 408541162*x^21 - 1040280967*x^20 + 465602383*x^19 + 926307827*x^18 - 386475878*x^17 - 597992464*x^16 + 230741151*x^15 + 276295754*x^14 - 97190872*x^13 - 89602671*x^12 + 28039534*x^11 + 19807180*x^10 - 5297092*x^9 - 2853616*x^8 + 611802*x^7 + 248962*x^6 - 38836*x^5 - 11508*x^4 + 1155*x^3 + 217*x^2 - 14*x - 1) # Defining polynomial: K.defining_polynomial() # Degree over Q: K.degree() # Signature: K.signature() # Discriminant: K.disc() # Ramified primes: K.disc().support() # Autmorphisms: K.automorphisms() # Integral basis: K.integral_basis() # Class group: K.class_group().invariants() # Unit group: UK = K.unit_group() # Unit rank: UK.rank() # Generator for roots of unity: UK.torsion_generator() # Fundamental units: UK.fundamental_units() # Regulator: K.regulator() # Analytic class number formula: # self-contained SageMath code snippet to compute the analytic class number formula x = polygen(QQ); K. = NumberField(x^42 - x^41 - 67*x^40 + 62*x^39 + 1993*x^38 - 1704*x^37 - 34847*x^36 + 27519*x^35 + 399768*x^34 - 291838*x^33 - 3181854*x^32 + 2151119*x^31 + 18125561*x^30 - 11376768*x^29 - 75199314*x^28 + 43948028*x^27 + 229267037*x^26 - 125109956*x^25 - 515411960*x^24 + 263200585*x^23 + 854114535*x^22 - 408541162*x^21 - 1040280967*x^20 + 465602383*x^19 + 926307827*x^18 - 386475878*x^17 - 597992464*x^16 + 230741151*x^15 + 276295754*x^14 - 97190872*x^13 - 89602671*x^12 + 28039534*x^11 + 19807180*x^10 - 5297092*x^9 - 2853616*x^8 + 611802*x^7 + 248962*x^6 - 38836*x^5 - 11508*x^4 + 1155*x^3 + 217*x^2 - 14*x - 1) DK = K.disc(); r1,r2 = K.signature(); RK = K.regulator(); RR = RK.parent() hK = K.class_number(); wK = K.unit_group().torsion_generator().order(); 2^r1 * (2*RR(pi))^r2 * RK * hK / (wK * RR(sqrt(abs(DK)))) # Intermediate fields: K.subfields()[1:-1] # Galois group: K.galois_group(type='pari') # Frobenius cycle types: # to obtain a list of $[e_i,f_i]$ for the factorization of the ideal $p\mathcal{O}_K$ for $p=7$ in Sage: p = 7; [(e, pr.norm().valuation(p)) for pr,e in K.factor(p)]