Q:=RationalField(); Pol:=PolynomialRing(Q); K:=NumberField(X^2-2); // v = square root of 2. L:=NumberField(PolynomialRing(K)!X^3-2); // w = cubic root of 2. // By writing "PolynomialRing(K)!X^3-2" we ask magma to view X^3-2 as a polynomial over the field K. // This means that L is considered as an extension of K. "Basis K/Q =",Basis(K); // Basis of K/Q "[K:Q] =",Degree(K); "Basis L/M =",Basis(L); // Basis of L/K "[L:M] =",Degree(L); // // Now we ask magma to compute the basis of L/Q. The characterization "absolute" means "over Q". "Basis L/Q =",AbsoluteBasis(L); // // Let us take an element "mixing" v and w, for example: z1:=(v+w)/(1+v+w^2); "z1 =",z1; // Observe that z is expressed as a linear combination of the elements of the "AbsoluteBasis(L)" with coefficients in Q. z2:=((2+3*v)+(1/5-3/4*v)*w+(1/100-12*v)*w^2)/((1/2-2/3*v)+(1-31*v)*w+(2/5-7/8*v)*w^2); "z2 =",z2;