summaryrefslogtreecommitdiffstats
path: root/divers/sageries/racine-19e-de-1
blob: b9aa12ceeb89dcd52f3473a424b31ebc01fd8b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
K.<a> = CyclotomicField(342)
omega = a^18
zeta = a^19
alpha = [sum([zeta^(i*j)*omega^(2^i) for i in range(18)]) for j in range(18)]
powtab = [NN(18/gcd(i,18)) for i in range(18)]
atab = [alpha[i]^powtab[i] for i in range(18)]
atab_on_zeta_basis = [(QQ^6)((zeta.coordinates_in_terms_of_powers())(x)) for x in atab]
sqrtm3 = 2*zeta^3-1
nice_basis = [1, sqrtm3, zeta, zeta^-1, -sqrtm3*zeta^5, sqrtm3*zeta^-5]
m = Matrix(QQ, 6, 6, [(QQ^6)((zeta.coordinates_in_terms_of_powers())(x)) for x in nice_basis])
atab_on_nice_basis = [v * m.inverse() for v in atab_on_zeta_basis]
zetab = [ZZ(floor(arg(CC(N(alpha[i])/N(atab[i]^(1/powtab[i]))))/arg(zeta)+0.5)) for i in range(18)]
btab = [zeta^zetab[i] for i in range(18)]
btab_on_zeta_basis = [(QQ^6)((zeta.coordinates_in_terms_of_powers())(x)) for x in btab]
btab_on_nice_basis = [v * m.inverse() for v in btab_on_zeta_basis] 
symbolic_basis = [1, sqrt(-3), ((1/2)*(1+sqrt(-3)))^(1/3), ((1/2)*(1-sqrt(-3)))^(1/3), ((1/2)*(9+3*sqrt(-3)))^(1/3), ((1/2)*(9-3*sqrt(-3)))^(1/3)]
symbolic_omega = sum([sum([btab_on_nice_basis[i][j]*symbolic_basis[j] for j in range(6)])*(sum([atab_on_nice_basis[i][j]*symbolic_basis[j] for j in range(6)]))^(1/powtab[i]) for i in range(18)])/18
symbolic_cos = sum([sum([btab_on_nice_basis[i][j]*symbolic_basis[j] for j in range(6)])*(sum([atab_on_nice_basis[i][j]*symbolic_basis[j] for j in range(6)]))^(1/powtab[i]) for i in range(0,18,2)])/18