MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  lgseisen Structured version   Unicode version

Theorem lgseisen 22692
Description: Eisenstein's lemma, an expression for  ( P  /L Q ) when  P ,  Q are distinct odd primes. (Contributed by Mario Carneiro, 18-Jun-2015.)
Hypotheses
Ref Expression
lgseisen.1  |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )
lgseisen.2  |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )
lgseisen.3  |-  ( ph  ->  P  =/=  Q )
Assertion
Ref Expression
lgseisen  |-  ( ph  ->  ( Q  /L
P )  =  (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) ) )
Distinct variable groups:    x, P    ph, x    x, Q

Proof of Theorem lgseisen
Dummy variable  y is distinct from all other variables.
StepHypRef Expression
1 lgseisen.2 . . . . 5  |-  ( ph  ->  Q  e.  ( Prime  \  { 2 } ) )
21eldifad 3340 . . . 4  |-  ( ph  ->  Q  e.  Prime )
3 prmz 13767 . . . 4  |-  ( Q  e.  Prime  ->  Q  e.  ZZ )
42, 3syl 16 . . 3  |-  ( ph  ->  Q  e.  ZZ )
5 lgseisen.1 . . 3  |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )
6 lgsval3 22653 . . 3  |-  ( ( Q  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( Q  /L P )  =  ( ( ( ( Q ^ ( ( P  -  1 )  /  2 ) )  +  1 )  mod 
P )  -  1 ) )
74, 5, 6syl2anc 661 . 2  |-  ( ph  ->  ( Q  /L
P )  =  ( ( ( ( Q ^ ( ( P  -  1 )  / 
2 ) )  +  1 )  mod  P
)  -  1 ) )
8 prmnn 13766 . . . . . . . . 9  |-  ( Q  e.  Prime  ->  Q  e.  NN )
92, 8syl 16 . . . . . . . 8  |-  ( ph  ->  Q  e.  NN )
10 oddprm 13882 . . . . . . . . . 10  |-  ( P  e.  ( Prime  \  {
2 } )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
115, 10syl 16 . . . . . . . . 9  |-  ( ph  ->  ( ( P  - 
1 )  /  2
)  e.  NN )
1211nnnn0d 10636 . . . . . . . 8  |-  ( ph  ->  ( ( P  - 
1 )  /  2
)  e.  NN0 )
139, 12nnexpcld 12029 . . . . . . 7  |-  ( ph  ->  ( Q ^ (
( P  -  1 )  /  2 ) )  e.  NN )
1413nnred 10337 . . . . . 6  |-  ( ph  ->  ( Q ^ (
( P  -  1 )  /  2 ) )  e.  RR )
15 neg1rr 10426 . . . . . . . 8  |-  -u 1  e.  RR
1615a1i 11 . . . . . . 7  |-  ( ph  -> 
-u 1  e.  RR )
17 neg1ne0 10427 . . . . . . . 8  |-  -u 1  =/=  0
1817a1i 11 . . . . . . 7  |-  ( ph  -> 
-u 1  =/=  0
)
19 fzfid 11795 . . . . . . . 8  |-  ( ph  ->  ( 1 ... (
( P  -  1 )  /  2 ) )  e.  Fin )
209nnred 10337 . . . . . . . . . . . 12  |-  ( ph  ->  Q  e.  RR )
215eldifad 3340 . . . . . . . . . . . . 13  |-  ( ph  ->  P  e.  Prime )
22 prmnn 13766 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  P  e.  NN )
2321, 22syl 16 . . . . . . . . . . . 12  |-  ( ph  ->  P  e.  NN )
2420, 23nndivred 10370 . . . . . . . . . . 11  |-  ( ph  ->  ( Q  /  P
)  e.  RR )
2524adantr 465 . . . . . . . . . 10  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  ( Q  /  P )  e.  RR )
26 2re 10391 . . . . . . . . . . 11  |-  2  e.  RR
27 elfznn 11478 . . . . . . . . . . . . 13  |-  ( x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  x  e.  NN )
2827adantl 466 . . . . . . . . . . . 12  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  x  e.  NN )
2928nnred 10337 . . . . . . . . . . 11  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  x  e.  RR )
30 remulcl 9367 . . . . . . . . . . 11  |-  ( ( 2  e.  RR  /\  x  e.  RR )  ->  ( 2  x.  x
)  e.  RR )
3126, 29, 30sylancr 663 . . . . . . . . . 10  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
2  x.  x )  e.  RR )
3225, 31remulcld 9414 . . . . . . . . 9  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
( Q  /  P
)  x.  ( 2  x.  x ) )  e.  RR )
3332flcld 11648 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x
) ) )  e.  ZZ )
3419, 33fsumzcl 13212 . . . . . . 7  |-  ( ph  -> 
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) )  e.  ZZ )
3516, 18, 34reexpclzd 12033 . . . . . 6  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  RR )
36 1re 9385 . . . . . . 7  |-  1  e.  RR
3736a1i 11 . . . . . 6  |-  ( ph  ->  1  e.  RR )
3823nnrpd 11026 . . . . . 6  |-  ( ph  ->  P  e.  RR+ )
39 lgseisen.3 . . . . . . 7  |-  ( ph  ->  P  =/=  Q )
40 eqid 2443 . . . . . . 7  |-  ( ( Q  x.  ( 2  x.  x ) )  mod  P )  =  ( ( Q  x.  ( 2  x.  x
) )  mod  P
)
41 eqid 2443 . . . . . . 7  |-  ( x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  |->  ( ( ( ( -u 1 ^ ( ( Q  x.  ( 2  x.  x ) )  mod 
P ) )  x.  ( ( Q  x.  ( 2  x.  x
) )  mod  P
) )  mod  P
)  /  2 ) )  =  ( x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  |->  ( ( ( ( -u 1 ^ ( ( Q  x.  ( 2  x.  x ) )  mod 
P ) )  x.  ( ( Q  x.  ( 2  x.  x
) )  mod  P
) )  mod  P
)  /  2 ) )
42 eqid 2443 . . . . . . 7  |-  ( ( Q  x.  ( 2  x.  y ) )  mod  P )  =  ( ( Q  x.  ( 2  x.  y
) )  mod  P
)
43 eqid 2443 . . . . . . 7  |-  (ℤ/n `  P
)  =  (ℤ/n `  P
)
44 eqid 2443 . . . . . . 7  |-  (mulGrp `  (ℤ/n `  P ) )  =  (mulGrp `  (ℤ/n `  P ) )
45 eqid 2443 . . . . . . 7  |-  ( ZRHom `  (ℤ/n `  P ) )  =  ( ZRHom `  (ℤ/n `  P
) )
465, 1, 39, 40, 41, 42, 43, 44, 45lgseisenlem4 22691 . . . . . 6  |-  ( ph  ->  ( ( Q ^
( ( P  - 
1 )  /  2
) )  mod  P
)  =  ( (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  mod  P ) )
47 modadd1 11745 . . . . . 6  |-  ( ( ( ( Q ^
( ( P  - 
1 )  /  2
) )  e.  RR  /\  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  RR )  /\  ( 1  e.  RR  /\  P  e.  RR+ )  /\  (
( Q ^ (
( P  -  1 )  /  2 ) )  mod  P )  =  ( ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  mod 
P ) )  -> 
( ( ( Q ^ ( ( P  -  1 )  / 
2 ) )  +  1 )  mod  P
)  =  ( ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  +  1 )  mod  P ) )
4814, 35, 37, 38, 46, 47syl221anc 1229 . . . . 5  |-  ( ph  ->  ( ( ( Q ^ ( ( P  -  1 )  / 
2 ) )  +  1 )  mod  P
)  =  ( ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  +  1 )  mod  P ) )
49 peano2re 9542 . . . . . . 7  |-  ( (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  e.  RR  ->  (
( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  +  1 )  e.  RR )
5035, 49syl 16 . . . . . 6  |-  ( ph  ->  ( ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  +  1 )  e.  RR )
51 df-neg 9598 . . . . . . . 8  |-  -u 1  =  ( 0  -  1 )
52 neg1cn 10425 . . . . . . . . . . . . . 14  |-  -u 1  e.  CC
5352a1i 11 . . . . . . . . . . . . 13  |-  ( ph  -> 
-u 1  e.  CC )
54 absexpz 12794 . . . . . . . . . . . . 13  |-  ( (
-u 1  e.  CC  /\  -u 1  =/=  0  /\  sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) )  e.  ZZ )  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  =  ( ( abs `  -u 1 ) ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) ) )
5553, 18, 34, 54syl3anc 1218 . . . . . . . . . . . 12  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  =  ( ( abs `  -u 1 ) ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) ) )
56 ax-1cn 9340 . . . . . . . . . . . . . . . 16  |-  1  e.  CC
5756absnegi 12887 . . . . . . . . . . . . . . 15  |-  ( abs `  -u 1 )  =  ( abs `  1
)
58 abs1 12786 . . . . . . . . . . . . . . 15  |-  ( abs `  1 )  =  1
5957, 58eqtri 2463 . . . . . . . . . . . . . 14  |-  ( abs `  -u 1 )  =  1
6059oveq1i 6101 . . . . . . . . . . . . 13  |-  ( ( abs `  -u 1
) ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  =  ( 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )
61 1exp 11893 . . . . . . . . . . . . . 14  |-  ( sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) )  e.  ZZ  ->  ( 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  =  1 )
6234, 61syl 16 . . . . . . . . . . . . 13  |-  ( ph  ->  ( 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  =  1 )
6360, 62syl5eq 2487 . . . . . . . . . . . 12  |-  ( ph  ->  ( ( abs `  -u 1
) ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  =  1 )
6455, 63eqtrd 2475 . . . . . . . . . . 11  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  =  1 )
65 1le1 9964 . . . . . . . . . . 11  |-  1  <_  1
6664, 65syl6eqbr 4329 . . . . . . . . . 10  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  <_  1 )
67 absle 12803 . . . . . . . . . . 11  |-  ( ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  RR  /\  1  e.  RR )  ->  ( ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  <_  1  <->  ( -u 1  <_  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  /\  ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  <_ 
1 ) ) )
6835, 36, 67sylancl 662 . . . . . . . . . 10  |-  ( ph  ->  ( ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  <_  1  <->  ( -u 1  <_  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  /\  ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  <_ 
1 ) ) )
6966, 68mpbid 210 . . . . . . . . 9  |-  ( ph  ->  ( -u 1  <_ 
( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  /\  ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  <_  1
) )
7069simpld 459 . . . . . . . 8  |-  ( ph  -> 
-u 1  <_  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )
7151, 70syl5eqbrr 4326 . . . . . . 7  |-  ( ph  ->  ( 0  -  1 )  <_  ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) ) )
72 0red 9387 . . . . . . . 8  |-  ( ph  ->  0  e.  RR )
7372, 37, 35lesubaddd 9936 . . . . . . 7  |-  ( ph  ->  ( ( 0  -  1 )  <_  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  <->  0  <_  ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  +  1 ) ) )
7471, 73mpbid 210 . . . . . 6  |-  ( ph  ->  0  <_  ( ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 ) )
7523nnred 10337 . . . . . . . . 9  |-  ( ph  ->  P  e.  RR )
76 peano2rem 9675 . . . . . . . . 9  |-  ( P  e.  RR  ->  ( P  -  1 )  e.  RR )
7775, 76syl 16 . . . . . . . 8  |-  ( ph  ->  ( P  -  1 )  e.  RR )
7869simprd 463 . . . . . . . 8  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  <_  1 )
79 df-2 10380 . . . . . . . . . 10  |-  2  =  ( 1  +  1 )
80 eldifsni 4001 . . . . . . . . . . . 12  |-  ( P  e.  ( Prime  \  {
2 } )  ->  P  =/=  2 )
815, 80syl 16 . . . . . . . . . . 11  |-  ( ph  ->  P  =/=  2 )
8226a1i 11 . . . . . . . . . . . 12  |-  ( ph  ->  2  e.  RR )
83 prmuz2 13781 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
84 eluzle 10873 . . . . . . . . . . . . 13  |-  ( P  e.  ( ZZ>= `  2
)  ->  2  <_  P )
8521, 83, 843syl 20 . . . . . . . . . . . 12  |-  ( ph  ->  2  <_  P )
8682, 75, 85leltned 9525 . . . . . . . . . . 11  |-  ( ph  ->  ( 2  <  P  <->  P  =/=  2 ) )
8781, 86mpbird 232 . . . . . . . . . 10  |-  ( ph  ->  2  <  P )
8879, 87syl5eqbrr 4326 . . . . . . . . 9  |-  ( ph  ->  ( 1  +  1 )  <  P )
8937, 37, 75ltaddsubd 9939 . . . . . . . . 9  |-  ( ph  ->  ( ( 1  +  1 )  <  P  <->  1  <  ( P  - 
1 ) ) )
9088, 89mpbid 210 . . . . . . . 8  |-  ( ph  ->  1  <  ( P  -  1 ) )
9135, 37, 77, 78, 90lelttrd 9529 . . . . . . 7  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  <  ( P  -  1 ) )
9235, 37, 75ltaddsubd 9939 . . . . . . 7  |-  ( ph  ->  ( ( ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 )  <  P  <->  (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  <  ( P  - 
1 ) ) )
9391, 92mpbird 232 . . . . . 6  |-  ( ph  ->  ( ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  +  1 )  <  P )
94 modid 11732 . . . . . 6  |-  ( ( ( ( ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 )  e.  RR  /\  P  e.  RR+ )  /\  ( 0  <_  (
( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  +  1 )  /\  ( ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  +  1 )  <  P ) )  ->  ( (
( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  +  1 )  mod 
P )  =  ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  +  1 ) )
9550, 38, 74, 93, 94syl22anc 1219 . . . . 5  |-  ( ph  ->  ( ( ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 )  mod  P
)  =  ( (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  +  1 ) )
9648, 95eqtrd 2475 . . . 4  |-  ( ph  ->  ( ( ( Q ^ ( ( P  -  1 )  / 
2 ) )  +  1 )  mod  P
)  =  ( (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  +  1 ) )
9796oveq1d 6106 . . 3  |-  ( ph  ->  ( ( ( ( Q ^ ( ( P  -  1 )  /  2 ) )  +  1 )  mod 
P )  -  1 )  =  ( ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  +  1 )  -  1 ) )
9835recnd 9412 . . . 4  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  CC )
99 pncan 9616 . . . 4  |-  ( ( ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  CC  /\  1  e.  CC )  ->  ( ( ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 )  -  1 )  =  ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )
10098, 56, 99sylancl 662 . . 3  |-  ( ph  ->  ( ( ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 )  -  1 )  =  ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )
10197, 100eqtrd 2475 . 2  |-  ( ph  ->  ( ( ( ( Q ^ ( ( P  -  1 )  /  2 ) )  +  1 )  mod 
P )  -  1 )  =  ( -u
1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )
1027, 101eqtrd 2475 1  |-  ( ph  ->  ( Q  /L
P )  =  (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1369    e. wcel 1756    =/= wne 2606    \ cdif 3325   {csn 3877   class class class wbr 4292    e. cmpt 4350   ` cfv 5418  (class class class)co 6091   CCcc 9280   RRcr 9281   0cc0 9282   1c1 9283    + caddc 9285    x. cmul 9287    < clt 9418    <_ cle 9419    - cmin 9595   -ucneg 9596    / cdiv 9993   NNcn 10322   2c2 10371   ZZcz 10646   ZZ>=cuz 10861   RR+crp 10991   ...cfz 11437   |_cfl 11640    mod cmo 11708   ^cexp 11865   abscabs 12723   sum_csu 13163   Primecprime 13763  mulGrpcmgp 16591   ZRHomczrh 17931  ℤ/nczn 17934    /Lclgs 22633
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-rep 4403  ax-sep 4413  ax-nul 4421  ax-pow 4470  ax-pr 4531  ax-un 6372  ax-inf2 7847  ax-cnex 9338  ax-resscn 9339  ax-1cn 9340  ax-icn 9341  ax-addcl 9342  ax-addrcl 9343  ax-mulcl 9344  ax-mulrcl 9345  ax-mulcom 9346  ax-addass 9347  ax-mulass 9348  ax-distr 9349  ax-i2m1 9350  ax-1ne0 9351  ax-1rid 9352  ax-rnegex 9353  ax-rrecex 9354  ax-cnre 9355  ax-pre-lttri 9356  ax-pre-lttrn 9357  ax-pre-ltadd 9358  ax-pre-mulgt0 9359  ax-pre-sup 9360  ax-addf 9361  ax-mulf 9362
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-fal 1375  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2568  df-ne 2608  df-nel 2609  df-ral 2720  df-rex 2721  df-reu 2722  df-rmo 2723  df-rab 2724  df-v 2974  df-sbc 3187  df-csb 3289  df-dif 3331  df-un 3333  df-in 3335  df-ss 3342  df-pss 3344  df-nul 3638  df-if 3792  df-pw 3862  df-sn 3878  df-pr 3880  df-tp 3882  df-op 3884  df-uni 4092  df-int 4129  df-iun 4173  df-br 4293  df-opab 4351  df-mpt 4352  df-tr 4386  df-eprel 4632  df-id 4636  df-po 4641  df-so 4642  df-fr 4679  df-se 4680  df-we 4681  df-ord 4722  df-on 4723  df-lim 4724  df-suc 4725  df-xp 4846  df-rel 4847  df-cnv 4848  df-co 4849  df-dm 4850  df-rn 4851  df-res 4852  df-ima 4853  df-iota 5381  df-fun 5420  df-fn 5421  df-f 5422  df-f1 5423  df-fo 5424  df-f1o 5425  df-fv 5426  df-isom 5427  df-riota 6052  df-ov 6094  df-oprab 6095  df-mpt2 6096  df-of 6320  df-om 6477  df-1st 6577  df-2nd 6578  df-supp 6691  df-tpos 6745  df-recs 6832  df-rdg 6866  df-1o 6920  df-2o 6921  df-oadd 6924  df-er 7101  df-ec 7103  df-qs 7107  df-map 7216  df-en 7311  df-dom 7312  df-sdom 7313  df-fin 7314  df-fsupp 7621  df-sup 7691  df-oi 7724  df-card 8109  df-cda 8337  df-pnf 9420  df-mnf 9421  df-xr 9422  df-ltxr 9423  df-le 9424  df-sub 9597  df-neg 9598  df-div 9994  df-nn 10323  df-2 10380  df-3 10381  df-4 10382  df-5 10383  df-6 10384  df-7 10385  df-8 10386  df-9 10387  df-10 10388  df-n0 10580  df-z 10647  df-dec 10756  df-uz 10862  df-q 10954  df-rp 10992  df-fz 11438  df-fzo 11549  df-fl 11642  df-mod 11709  df-seq 11807  df-exp 11866  df-hash 12104  df-cj 12588  df-re 12589  df-im 12590  df-sqr 12724  df-abs 12725  df-clim 12966  df-sum 13164  df-dvds 13536  df-gcd 13691  df-prm 13764  df-phi 13841  df-pc 13904  df-struct 14176  df-ndx 14177  df-slot 14178  df-base 14179  df-sets 14180  df-ress 14181  df-plusg 14251  df-mulr 14252  df-starv 14253  df-sca 14254  df-vsca 14255  df-ip 14256  df-tset 14257  df-ple 14258  df-ds 14260  df-unif 14261  df-0g 14380  df-gsum 14381  df-imas 14446  df-divs 14447  df-mnd 15415  df-mhm 15464  df-submnd 15465  df-grp 15545  df-minusg 15546  df-sbg 15547  df-mulg 15548  df-subg 15678  df-nsg 15679  df-eqg 15680  df-ghm 15745  df-cntz 15835  df-cmn 16279  df-abl 16280  df-mgp 16592  df-ur 16604  df-rng 16647  df-cring 16648  df-oppr 16715  df-dvdsr 16733  df-unit 16734  df-invr 16764  df-dvr 16775  df-rnghom 16806  df-drng 16834  df-field 16835  df-subrg 16863  df-lmod 16950  df-lss 17014  df-lsp 17053  df-sra 17253  df-rgmod 17254  df-lidl 17255  df-rsp 17256  df-2idl 17314  df-nzr 17340  df-rlreg 17354  df-domn 17355  df-idom 17356  df-cnfld 17819  df-zring 17884  df-zrh 17935  df-zn 17938  df-lgs 22634
This theorem is referenced by:  lgsquadlem2  22694
  Copyright terms: Public domain W3C validator