/
examples
123 lines (73 loc) · 3.19 KB
/
examples
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* Copyright (C) 2017 Koen de Boer
This file is part of the powerresiduesymbolcalculator. the powerresiduecalculator
is free software: you can redistribute it and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation,
either version 2.1 of the License, or (at your option) any later version.
The powerresiduesymbolcalculator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with powerresiduesymbolcalculator. If not, see <http://www.gnu.org/licenses/>. */
// Example power residue symbol
// ----------------------------
// Takes approximately 1 minute
// Initialization
m := 7^2;
L<z> := CyclotomicField(m);
R := Integers(L);
a := 4323* z^9 + 532*z^2 + 2;
b := 432*z^3 + 324*z^2 + z + 4;
s1 := powerResidueSymbol(a,b,m,z,R);
s2 := powerResidueSymbol(b,a,m,z,R);
s3 := umkehrFaktor(a,b,ideal<R|m>,z);
printf "The symbol %o should be %o + %o mod %o \n",s1,s2,s3,m;
a,b := getTwoCoPrimeElements(R,m,4); // from "getRandomElement"
a := L!a; b := L!b;
s1 := powerResidueSymbol(a,b,m,z,R);
s2 := powerResidueSymbol(b,a,m,z,R);
s3 := umkehrFaktor(a,b,ideal<R1|m1>,z1);
printf "The symbol %o should be %o + %o mod %o \n",s1,s2,s3,m;
// Example Hilbert symbol
// -----------------------
// GLOBAL -------------------
m := 5^2*3^2;
L<z> := CyclotomicField(m);
R := Integers(L);
a := 4323* z^9 + 532*z^2 + 2;
b := 432*z^3 + 324*z^2 + z+ 4;
pi := Decomposition(R,5)[1][1]; // Prime ideal above (5)
print hilbertSymbol(a,b,pi,m,z);
// LOCAL --------------------------
// Initialization
m := 3^2*7;
F3 := pAdicField(3,400);
F<z> := LocalField(F3,CyclotomicPolynomial(m));
F,map := RamifiedRepresentation(F);
z := map(z);
pi := UniformizingElement(F);
// For the hilbert symbol, it is needed that the local field
// is given in a ramified representation. I.e.: totally ramified
// over a unramified extension.
x := 1 + 2*z*pi + 3*z^2*pi^2 + (1-z^3)*pi^3;
y := 1 + 1*z*pi + 2*z^3*pi^2 + (1-z^2)*pi^3;
symbol,zeta := hilbertSymbol(x,y,m,z);
print symbol;
// Example IBETA
// ------------------------------
//
// example ibeta which does not come from an unsaturated eisenstein polynomial
K<z3> := CyclotomicField(3);
PK<y> := PolynomialRing(K);
f := y^(3^3) - 3*y^(3) - 3*(1-z3)^2*y^1 + (1-z3); // eisenstein polynomial
L := ext<K|f>;
I, beta := ibeta(L,3);
printf "I = %o, beta = %o\n",I,beta;
// example ibeta which does come from an unsaturated eisenstein polynomial
// Start with cyclotomic field
K<z3> := CyclotomicField(3);
PK<y> := PolynomialRing(K);
f := y^(3^4) - (1-z3)*y^(3^2) - (1-z3)^2*y^1 + (1-z3); // eisenstein polynomial
I, beta := ibeta_special(f,3);
L := ext<K|f>;
I2, beta2 := ibeta(L,3);
printf "(%o,%o) and (%o,%o) are the same.\n",I,beta,I2,beta2;