# SageMath code for working with number field 45.45.1136296607981427246297191641801603901004077832833182160525696498824571613560438852133526835484889.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^45 - 12*x^44 - 38*x^43 + 936*x^42 - 488*x^41 - 32994*x^40 + 61155*x^39 + 695151*x^38 - 1826452*x^37 - 9745559*x^36 + 31398650*x^35 + 95576968*x^34 - 363031278*x^33 - 668271620*x^32 + 3006554151*x^31 + 3299628259*x^30 - 18405469866*x^29 - 10819187452*x^28 + 84606290574*x^27 + 17798672756*x^26 - 293624042239*x^25 + 25779977473*x^24 + 766879229695*x^23 - 259704306954*x^22 - 1488735953755*x^21 + 843265985246*x^20 + 2094958274346*x^19 - 1672596038928*x^18 - 2036992655261*x^17 + 2211683013511*x^16 + 1229593352332*x^15 - 1960884055901*x^14 - 305227614428*x^13 + 1128154934100*x^12 - 126915280282*x^11 - 391023252143*x^10 + 124192084723*x^9 + 69369604379*x^8 - 37452923715*x^7 - 3334757683*x^6 + 4610823573*x^5 - 413774775*x^4 - 188088413*x^3 + 35065204*x^2 - 872335*x + 619)
# 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^45 - 12*x^44 - 38*x^43 + 936*x^42 - 488*x^41 - 32994*x^40 + 61155*x^39 + 695151*x^38 - 1826452*x^37 - 9745559*x^36 + 31398650*x^35 + 95576968*x^34 - 363031278*x^33 - 668271620*x^32 + 3006554151*x^31 + 3299628259*x^30 - 18405469866*x^29 - 10819187452*x^28 + 84606290574*x^27 + 17798672756*x^26 - 293624042239*x^25 + 25779977473*x^24 + 766879229695*x^23 - 259704306954*x^22 - 1488735953755*x^21 + 843265985246*x^20 + 2094958274346*x^19 - 1672596038928*x^18 - 2036992655261*x^17 + 2211683013511*x^16 + 1229593352332*x^15 - 1960884055901*x^14 - 305227614428*x^13 + 1128154934100*x^12 - 126915280282*x^11 - 391023252143*x^10 + 124192084723*x^9 + 69369604379*x^8 - 37452923715*x^7 - 3334757683*x^6 + 4610823573*x^5 - 413774775*x^4 - 188088413*x^3 + 35065204*x^2 - 872335*x + 619)
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)]