# SageMath code for working with p-adic field 3.1.9.22a3.6. # Define the p-adic field: Prec = 100 # Default precision of 100 Q3 = Qp(3, Prec); x = polygen(QQ) K. = Q3.extension(x^9 + 18*x^8 + 9*x^7 + 6*x^6 + 18*x^5 + 3) # Defining polynomial: K.defining_polynomial() # Base field Qp: K.base() # Degree over Qp: K.absolute_degree() # Ramification index: K.absolute_e() # Residue field degree (Inertia degree): K.absolute_f() # Maximal unramified subextension: K.maximal_unramified_subextension() # Roots of unity: len(K.roots_of_unity())