CoCalc Public Filessupport / 2016-06-12-gouvea.sagews
Author: William A. Stein
Description: Jupyter notebook support/2015-06-04-141749-bokeh.ipynb
L.<zeta3> = CyclotomicField(3)
KL.<a> = L.extension(x^3 - x^2 - 2*x - 8)
print KL

Number Field in a with defining polynomial x^3 - x^2 - 2*x - 8 over its base field
KL.maximal_order().basis()

[-9/2*zeta3*a^2 - 17/2*zeta3*a - 14*zeta3 - 1, (-7*zeta3 - 3/2)*a^2 + (-17*zeta3 - 3/2)*a - 30*zeta3 - 12, (-25/2*zeta3 - 3)*a^2 + (-67/2*zeta3 - 3)*a - 60*zeta3 - 28, (-19*zeta3 - 9/2)*a^2 + (-38*zeta3 - 1/2)*a - 75*zeta3 - 20, (-10*zeta3 - 3)*a^2 + (-8*zeta3 + 6)*a - 31*zeta3 + 8, (-25*zeta3 - 7)*a^2 + (-65*zeta3 - 6)*a - 119*zeta3 - 55]
KL.relative_discriminant()

Fractional ideal (503)
KL.absolute_discriminant()

-6831243
R = KL.maximal_order()
for z in R.basis():
print factor(sqrt(KL.order([zeta3, z]).absolute_discriminant() / KL.absolute_discriminant()))

2^2 * 181^2 2^2 * 73 * 300889 2^2 * 7^3 * 751 * 6037 10867 * 1190743 2^6 * 19 * 139 * 2011 2^2 * 109 * 769 * 1009291
alpha = R.basis()[3]; alpha

(-19*zeta3 - 9/2)*a^2 + (-38*zeta3 - 1/2)*a - 75*zeta3 - 20
alpha.absolute_minpoly()

x^6 - 192*x^5 + 87193*x^4 + 1805540*x^3 + 82404469*x^2 - 11115296*x + 476656