summaryrefslogtreecommitdiffstats
path: root/divers/sageries/resolvante-d5-dans-m20
blob: 99a97e0192b7d965e075543fb1ceadfdec963445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
### Trop compliqué, le calcul ne termine pas...  :-(
e = SymmetricFunctionAlgebra(QQ, basis='elementary')
R.<z1,z2,z3,z4,z5,p,d,a1,a2,a3,a4,a5> = PolynomialRing(QQ,12,order='lex(5),lex(1),lex(1),deglex(5)')
asym1 = -e([1]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym2 = +e([2]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym3 = -e([3]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym4 = +e([4]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym5 = -e([5]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
Isym = R.ideal([a1-asym1, a2-asym2, a3-asym3, a4-asym4, a5-asym5])
pexpr = z1^2*(z2*z5+z3*z4)+z2^2*(z1*z3+z4*z5)+z3^2*(z1*z5+z2*z4)+z4^2*(z1*z2+z3*z5)+z5^2*(z1*z4+z2*z3)
Ip = R.ideal([p-pexpr])
dexpr = (z1-z2)*(z1-z3)*(z1-z4)*(z2-z3)*(z2-z4)*(z3-z4)
Id = R.ideal([d-dexpr])
qexpr = z1*z2 + z2*z3 + z3*z4 + z4*z5 + z1*z5
B = (Isym+Ip+Id).groebner_basis()
qexpr.reduce(B)

### Autre tentative...  toujours trop compliquée.
e = SymmetricFunctionAlgebra(QQ, basis='elementary')
R.<z1,z2,z3,z4,z5,p,a1,a2,a3,a4,a5> = PolynomialRing(QQ,11,order='lex(5),lex(1),deglex(5)')
asym1 = -e([1]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym2 = +e([2]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym3 = -e([3]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym4 = +e([4]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym5 = -e([5]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
Isym = R.ideal([a1-asym1, a2-asym2, a3-asym3, a4-asym4, a5-asym5])
pexpr = z1^2*(z2*z5+z3*z4)+z2^2*(z1*z3+z4*z5)+z3^2*(z1*z5+z2*z4)+z4^2*(z1*z2+z3*z5)+z5^2*(z1*z4+z2*z3)
Ip = R.ideal([p-pexpr])
qexpr = z1*z2 + z2*z3 + z3*z4 + z4*z5 + z1*z5
qexprConj = qexpr.subs({z2:z5,z3:z4,z4:z3,z5:z2})
coef0 = qexpr*qexprConj
coef1 = -(qexpr+qexprConj)
B = (Isym+Ip).groebner_basis()
coef1.reduce(B)
coef0.reduce(B)

### Encore une tentative...  pas mieux...
e = SymmetricFunctionAlgebra(QQ, basis='elementary')
R.<z1,z2,z3,z4,z5,q,a1,a2,a3,a4,a5> = PolynomialRing(QQ,11,order='lex(5),lex(1),deglex(5)')
asym1 = -e([1]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym2 = +e([2]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym3 = -e([3]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym4 = +e([4]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym5 = -e([5]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
Isym = R.ideal([a1-asym1, a2-asym2, a3-asym3, a4-asym4, a5-asym5])
pexpr = z1^2*(z2*z5+z3*z4)+z2^2*(z1*z3+z4*z5)+z3^2*(z1*z5+z2*z4)+z4^2*(z1*z2+z3*z5)+z5^2*(z1*z4+z2*z3)
qexpr = z1*z2 + z2*z3 + z3*z4 + z4*z5 + z1*z5
Iq = R.ideal([q-qexpr])
B = (Isym+Iq).groebner_basis()
pexpr.reduce(B)

### Essayons avec de l'algèbre linéaire
e = SymmetricFunctionAlgebra(QQ, basis='elementary')
R.<z1,z2,z3,z4,z5,a1,a2,a3,a4,a5> = PolynomialRing(QQ,10,order='lex(5),deglex(5)')
asym1 = -e([1]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym2 = +e([2]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym3 = -e([3]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym4 = +e([4]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
asym5 = -e([5]).expand(5).subs(x0=z1,x1=z2,x2=z3,x3=z4,x4=z5)
Isym = R.ideal([a1-asym1, a2-asym2, a3-asym3, a4-asym4, a5-asym5])
B = Isym.groebner_basis()
fexpr = z1^2*z2 + z2^2*z3 + z3^2*z4 + z4^2*z5 + z1*z5^2
pexpr = z1^2*(z2*z5 + z3*z4) + z2^2*(z1*z3 + z4*z5) + z3^2*(z1*z5 + z2*z4) + z4^2*(z1*z2 + z3*z5) + z5^2*(z1*z4 + z2*z3)
qexpr = z1*z2 + z2*z3 + z3*z4 + z4*z5 + z1*z5
dexpr = (z1-z2)*(z1-z3)*(z1-z4)*(z1-z5)*(z2-z3)*(z2-z4)*(z2-z5)*(z3-z4)*(z3-z5)*(z4-z5)
def debase(poly):
    r = poly.reduce(B)
    return [r.coefficient({z1:0,z2:i2,z3:i3,z4:i4,z5:i5}) for i2 in range(2) for i3 in range(3) for i4 in range(4) for i5 in range(5)]

qtab = [debase(qexpr^i) for i in range(12)]
pdtab = [debase(pexpr^i*dexpr^j) for i in range(6) for j in range(2)]
qmat = matrix(R, 12, 120, qtab)
pdmat = matrix(R, 12, 120, pdtab)
cols = [0, 10, 105, 84, 109, 119, 57, 91, 111, 90, 110, 15]
qsubmat = qmat[range(12),cols]
pdsubmat = pdmat[range(12),cols]
qsubdet = qsubmat.determinant()
complements = [[i for i in range(12) if i!=j] for j in range(12)]
results = [[None for j in range(12)] for i in range(12)]
for i in range(12):
    for j in range(12):
        print (i,j)
        results[i][j] = (-1)^(i+j)*(qsubmat[complements[j],complements[i]].determinant())

qsubadj = matrix(R, 12, 12, results)
tmp = [sum([pdsubmat[1][k]*qsubadj[k][j] for k in range(12)]) for j in range(12)]
subfactor = -tmp[11]/1280
qsubdetfact = R(qsubdet/subfactor)
donq = [R(pol/subfactor)/qsubdetfact for pol in tmp]