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