Metamath Proof Explorer


Theorem lgseisen

Description: Eisenstein's lemma, an expression for ( P /L Q ) when P , Q are distinct odd primes. (Contributed by Mario Carneiro, 18-Jun-2015)

Ref Expression
Hypotheses lgseisen.1 φ P 2
lgseisen.2 φ Q 2
lgseisen.3 φ P Q
Assertion lgseisen φ Q / L P = 1 x = 1 P 1 2 Q P 2 x

Proof

Step Hyp Ref Expression
1 lgseisen.1 φ P 2
2 lgseisen.2 φ Q 2
3 lgseisen.3 φ P Q
4 2 eldifad φ Q
5 prmz Q Q
6 4 5 syl φ Q
7 lgsval3 Q P 2 Q / L P = Q P 1 2 + 1 mod P 1
8 6 1 7 syl2anc φ Q / L P = Q P 1 2 + 1 mod P 1
9 2 gausslemma2dlem0a φ Q
10 oddprm P 2 P 1 2
11 1 10 syl φ P 1 2
12 11 nnnn0d φ P 1 2 0
13 9 12 nnexpcld φ Q P 1 2
14 13 nnred φ Q P 1 2
15 neg1rr 1
16 15 a1i φ 1
17 neg1ne0 1 0
18 17 a1i φ 1 0
19 fzfid φ 1 P 1 2 Fin
20 9 nnred φ Q
21 1 gausslemma2dlem0a φ P
22 20 21 nndivred φ Q P
23 22 adantr φ x 1 P 1 2 Q P
24 2re 2
25 elfznn x 1 P 1 2 x
26 25 adantl φ x 1 P 1 2 x
27 26 nnred φ x 1 P 1 2 x
28 remulcl 2 x 2 x
29 24 27 28 sylancr φ x 1 P 1 2 2 x
30 23 29 remulcld φ x 1 P 1 2 Q P 2 x
31 30 flcld φ x 1 P 1 2 Q P 2 x
32 19 31 fsumzcl φ x = 1 P 1 2 Q P 2 x
33 16 18 32 reexpclzd φ 1 x = 1 P 1 2 Q P 2 x
34 1re 1
35 34 a1i φ 1
36 21 nnrpd φ P +
37 eqid Q 2 x mod P = Q 2 x mod P
38 eqid x 1 P 1 2 1 Q 2 x mod P Q 2 x mod P mod P 2 = x 1 P 1 2 1 Q 2 x mod P Q 2 x mod P mod P 2
39 eqid Q 2 y mod P = Q 2 y mod P
40 eqid /P = /P
41 eqid mulGrp /P = mulGrp /P
42 eqid ℤRHom /P = ℤRHom /P
43 1 2 3 37 38 39 40 41 42 lgseisenlem4 φ Q P 1 2 mod P = 1 x = 1 P 1 2 Q P 2 x mod P
44 modadd1 Q P 1 2 1 x = 1 P 1 2 Q P 2 x 1 P + Q P 1 2 mod P = 1 x = 1 P 1 2 Q P 2 x mod P Q P 1 2 + 1 mod P = 1 x = 1 P 1 2 Q P 2 x + 1 mod P
45 14 33 35 36 43 44 syl221anc φ Q P 1 2 + 1 mod P = 1 x = 1 P 1 2 Q P 2 x + 1 mod P
46 peano2re 1 x = 1 P 1 2 Q P 2 x 1 x = 1 P 1 2 Q P 2 x + 1
47 33 46 syl φ 1 x = 1 P 1 2 Q P 2 x + 1
48 df-neg 1 = 0 1
49 neg1cn 1
50 absexpz 1 1 0 x = 1 P 1 2 Q P 2 x 1 x = 1 P 1 2 Q P 2 x = 1 x = 1 P 1 2 Q P 2 x
51 49 17 32 50 mp3an12i φ 1 x = 1 P 1 2 Q P 2 x = 1 x = 1 P 1 2 Q P 2 x
52 ax-1cn 1
53 52 absnegi 1 = 1
54 abs1 1 = 1
55 53 54 eqtri 1 = 1
56 55 oveq1i 1 x = 1 P 1 2 Q P 2 x = 1 x = 1 P 1 2 Q P 2 x
57 1exp x = 1 P 1 2 Q P 2 x 1 x = 1 P 1 2 Q P 2 x = 1
58 32 57 syl φ 1 x = 1 P 1 2 Q P 2 x = 1
59 56 58 syl5eq φ 1 x = 1 P 1 2 Q P 2 x = 1
60 51 59 eqtrd φ 1 x = 1 P 1 2 Q P 2 x = 1
61 1le1 1 1
62 60 61 eqbrtrdi φ 1 x = 1 P 1 2 Q P 2 x 1
63 absle 1 x = 1 P 1 2 Q P 2 x 1 1 x = 1 P 1 2 Q P 2 x 1 1 1 x = 1 P 1 2 Q P 2 x 1 x = 1 P 1 2 Q P 2 x 1
64 33 34 63 sylancl φ 1 x = 1 P 1 2 Q P 2 x 1 1 1 x = 1 P 1 2 Q P 2 x 1 x = 1 P 1 2 Q P 2 x 1
65 62 64 mpbid φ 1 1 x = 1 P 1 2 Q P 2 x 1 x = 1 P 1 2 Q P 2 x 1
66 65 simpld φ 1 1 x = 1 P 1 2 Q P 2 x
67 48 66 eqbrtrrid φ 0 1 1 x = 1 P 1 2 Q P 2 x
68 0red φ 0
69 68 35 33 lesubaddd φ 0 1 1 x = 1 P 1 2 Q P 2 x 0 1 x = 1 P 1 2 Q P 2 x + 1
70 67 69 mpbid φ 0 1 x = 1 P 1 2 Q P 2 x + 1
71 21 nnred φ P
72 peano2rem P P 1
73 71 72 syl φ P 1
74 65 simprd φ 1 x = 1 P 1 2 Q P 2 x 1
75 df-2 2 = 1 + 1
76 24 a1i φ 2
77 1 eldifad φ P
78 prmuz2 P P 2
79 eluzle P 2 2 P
80 77 78 79 3syl φ 2 P
81 eldifsni P 2 P 2
82 1 81 syl φ P 2
83 76 71 80 82 leneltd φ 2 < P
84 75 83 eqbrtrrid φ 1 + 1 < P
85 35 35 71 ltaddsubd φ 1 + 1 < P 1 < P 1
86 84 85 mpbid φ 1 < P 1
87 33 35 73 74 86 lelttrd φ 1 x = 1 P 1 2 Q P 2 x < P 1
88 33 35 71 ltaddsubd φ 1 x = 1 P 1 2 Q P 2 x + 1 < P 1 x = 1 P 1 2 Q P 2 x < P 1
89 87 88 mpbird φ 1 x = 1 P 1 2 Q P 2 x + 1 < P
90 modid 1 x = 1 P 1 2 Q P 2 x + 1 P + 0 1 x = 1 P 1 2 Q P 2 x + 1 1 x = 1 P 1 2 Q P 2 x + 1 < P 1 x = 1 P 1 2 Q P 2 x + 1 mod P = 1 x = 1 P 1 2 Q P 2 x + 1
91 47 36 70 89 90 syl22anc φ 1 x = 1 P 1 2 Q P 2 x + 1 mod P = 1 x = 1 P 1 2 Q P 2 x + 1
92 45 91 eqtrd φ Q P 1 2 + 1 mod P = 1 x = 1 P 1 2 Q P 2 x + 1
93 92 oveq1d φ Q P 1 2 + 1 mod P 1 = 1 x = 1 P 1 2 Q P 2 x + 1 - 1
94 33 recnd φ 1 x = 1 P 1 2 Q P 2 x
95 pncan 1 x = 1 P 1 2 Q P 2 x 1 1 x = 1 P 1 2 Q P 2 x + 1 - 1 = 1 x = 1 P 1 2 Q P 2 x
96 94 52 95 sylancl φ 1 x = 1 P 1 2 Q P 2 x + 1 - 1 = 1 x = 1 P 1 2 Q P 2 x
97 93 96 eqtrd φ Q P 1 2 + 1 mod P 1 = 1 x = 1 P 1 2 Q P 2 x
98 8 97 eqtrd φ Q / L P = 1 x = 1 P 1 2 Q P 2 x