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