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

Theorem lgseisen 20592
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 } ) )
2 eldifi 3298 . . . . 5  |-  ( Q  e.  ( Prime  \  {
2 } )  ->  Q  e.  Prime )
31, 2syl 15 . . . 4  |-  ( ph  ->  Q  e.  Prime )
4 prmz 12762 . . . 4  |-  ( Q  e.  Prime  ->  Q  e.  ZZ )
53, 4syl 15 . . 3  |-  ( ph  ->  Q  e.  ZZ )
6 lgseisen.1 . . 3  |-  ( ph  ->  P  e.  ( Prime  \  { 2 } ) )
7 lgsval3 20553 . . 3  |-  ( ( Q  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( Q  / L P )  =  ( ( ( ( Q ^ ( ( P  -  1 )  /  2 ) )  +  1 )  mod 
P )  -  1 ) )
85, 6, 7syl2anc 642 . 2  |-  ( ph  ->  ( Q  / L P )  =  ( ( ( ( Q ^ ( ( P  -  1 )  / 
2 ) )  +  1 )  mod  P
)  -  1 ) )
9 prmnn 12761 . . . . . . . . 9  |-  ( Q  e.  Prime  ->  Q  e.  NN )
103, 9syl 15 . . . . . . . 8  |-  ( ph  ->  Q  e.  NN )
11 oddprm 12868 . . . . . . . . . 10  |-  ( P  e.  ( Prime  \  {
2 } )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
126, 11syl 15 . . . . . . . . 9  |-  ( ph  ->  ( ( P  - 
1 )  /  2
)  e.  NN )
1312nnnn0d 10018 . . . . . . . 8  |-  ( ph  ->  ( ( P  - 
1 )  /  2
)  e.  NN0 )
1410, 13nnexpcld 11266 . . . . . . 7  |-  ( ph  ->  ( Q ^ (
( P  -  1 )  /  2 ) )  e.  NN )
1514nnred 9761 . . . . . 6  |-  ( ph  ->  ( Q ^ (
( P  -  1 )  /  2 ) )  e.  RR )
16 1re 8837 . . . . . . . . 9  |-  1  e.  RR
1716renegcli 9108 . . . . . . . 8  |-  -u 1  e.  RR
1817a1i 10 . . . . . . 7  |-  ( ph  -> 
-u 1  e.  RR )
19 ax-1cn 8795 . . . . . . . . 9  |-  1  e.  CC
20 ax-1ne0 8806 . . . . . . . . 9  |-  1  =/=  0
2119, 20negne0i 9121 . . . . . . . 8  |-  -u 1  =/=  0
2221a1i 10 . . . . . . 7  |-  ( ph  -> 
-u 1  =/=  0
)
23 fzfid 11035 . . . . . . . 8  |-  ( ph  ->  ( 1 ... (
( P  -  1 )  /  2 ) )  e.  Fin )
2410nnred 9761 . . . . . . . . . . . 12  |-  ( ph  ->  Q  e.  RR )
25 eldifi 3298 . . . . . . . . . . . . . 14  |-  ( P  e.  ( Prime  \  {
2 } )  ->  P  e.  Prime )
266, 25syl 15 . . . . . . . . . . . . 13  |-  ( ph  ->  P  e.  Prime )
27 prmnn 12761 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  P  e.  NN )
2826, 27syl 15 . . . . . . . . . . . 12  |-  ( ph  ->  P  e.  NN )
2924, 28nndivred 9794 . . . . . . . . . . 11  |-  ( ph  ->  ( Q  /  P
)  e.  RR )
3029adantr 451 . . . . . . . . . 10  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  ( Q  /  P )  e.  RR )
31 2re 9815 . . . . . . . . . . 11  |-  2  e.  RR
32 elfznn 10819 . . . . . . . . . . . . 13  |-  ( x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  x  e.  NN )
3332adantl 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  x  e.  NN )
3433nnred 9761 . . . . . . . . . . 11  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  x  e.  RR )
35 remulcl 8822 . . . . . . . . . . 11  |-  ( ( 2  e.  RR  /\  x  e.  RR )  ->  ( 2  x.  x
)  e.  RR )
3631, 34, 35sylancr 644 . . . . . . . . . 10  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
2  x.  x )  e.  RR )
3730, 36remulcld 8863 . . . . . . . . 9  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
( Q  /  P
)  x.  ( 2  x.  x ) )  e.  RR )
3837flcld 10930 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x
) ) )  e.  ZZ )
3923, 38fsumzcl 12208 . . . . . . 7  |-  ( ph  -> 
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) )  e.  ZZ )
4018, 22, 39reexpclzd 11270 . . . . . 6  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  RR )
4116a1i 10 . . . . . 6  |-  ( ph  ->  1  e.  RR )
4228nnrpd 10389 . . . . . 6  |-  ( ph  ->  P  e.  RR+ )
43 lgseisen.3 . . . . . . 7  |-  ( ph  ->  P  =/=  Q )
44 eqid 2283 . . . . . . 7  |-  ( ( Q  x.  ( 2  x.  x ) )  mod  P )  =  ( ( Q  x.  ( 2  x.  x
) )  mod  P
)
45 eqid 2283 . . . . . . 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 ) )
46 eqid 2283 . . . . . . 7  |-  ( ( Q  x.  ( 2  x.  y ) )  mod  P )  =  ( ( Q  x.  ( 2  x.  y
) )  mod  P
)
47 eqid 2283 . . . . . . 7  |-  (ℤ/n `  P
)  =  (ℤ/n `  P
)
48 eqid 2283 . . . . . . 7  |-  (mulGrp `  (ℤ/n `  P ) )  =  (mulGrp `  (ℤ/n `  P ) )
49 eqid 2283 . . . . . . 7  |-  ( ZRHom `  (ℤ/n `  P ) )  =  ( ZRHom `  (ℤ/n `  P
) )
506, 1, 43, 44, 45, 46, 47, 48, 49lgseisenlem4 20591 . . . . . 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 ) )
51 modadd1 11001 . . . . . 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 ) )
5215, 40, 41, 42, 50, 51syl221anc 1193 . . . . 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 ) )
53 peano2re 8985 . . . . . . 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 )
5440, 53syl 15 . . . . . 6  |-  ( ph  ->  ( ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  +  1 )  e.  RR )
55 df-neg 9040 . . . . . . . 8  |-  -u 1  =  ( 0  -  1 )
56 neg1cn 9813 . . . . . . . . . . . . . 14  |-  -u 1  e.  CC
5756a1i 10 . . . . . . . . . . . . 13  |-  ( ph  -> 
-u 1  e.  CC )
58 absexpz 11790 . . . . . . . . . . . . 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 ) ) ) ) )
5957, 22, 39, 58syl3anc 1182 . . . . . . . . . . . 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 ) ) ) ) )
6019absnegi 11883 . . . . . . . . . . . . . . 15  |-  ( abs `  -u 1 )  =  ( abs `  1
)
61 abs1 11782 . . . . . . . . . . . . . . 15  |-  ( abs `  1 )  =  1
6260, 61eqtri 2303 . . . . . . . . . . . . . 14  |-  ( abs `  -u 1 )  =  1
6362oveq1i 5868 . . . . . . . . . . . . 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
) ) ) )
64 1exp 11131 . . . . . . . . . . . . . 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 )
6539, 64syl 15 . . . . . . . . . . . . 13  |-  ( ph  ->  ( 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) )  =  1 )
6663, 65syl5eq 2327 . . . . . . . . . . . 12  |-  ( ph  ->  ( ( abs `  -u 1
) ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  =  1 )
6759, 66eqtrd 2315 . . . . . . . . . . 11  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  =  1 )
68 1le1 9396 . . . . . . . . . . 11  |-  1  <_  1
6967, 68syl6eqbr 4060 . . . . . . . . . 10  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  <_  1 )
70 absle 11799 . . . . . . . . . . 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 ) ) )
7140, 16, 70sylancl 643 . . . . . . . . . 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 ) ) )
7269, 71mpbid 201 . . . . . . . . 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
) )
7372simpld 445 . . . . . . . 8  |-  ( ph  -> 
-u 1  <_  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )
7455, 73syl5eqbrr 4057 . . . . . . 7  |-  ( ph  ->  ( 0  -  1 )  <_  ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) ) )
75 0re 8838 . . . . . . . . 9  |-  0  e.  RR
7675a1i 10 . . . . . . . 8  |-  ( ph  ->  0  e.  RR )
7776, 41, 40lesubaddd 9369 . . . . . . 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 ) ) )
7874, 77mpbid 201 . . . . . 6  |-  ( ph  ->  0  <_  ( ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  +  1 ) )
7928nnred 9761 . . . . . . . . 9  |-  ( ph  ->  P  e.  RR )
80 peano2rem 9113 . . . . . . . . 9  |-  ( P  e.  RR  ->  ( P  -  1 )  e.  RR )
8179, 80syl 15 . . . . . . . 8  |-  ( ph  ->  ( P  -  1 )  e.  RR )
8272simprd 449 . . . . . . . 8  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  <_  1 )
83 df-2 9804 . . . . . . . . . 10  |-  2  =  ( 1  +  1 )
84 eldifsni 3750 . . . . . . . . . . . 12  |-  ( P  e.  ( Prime  \  {
2 } )  ->  P  =/=  2 )
856, 84syl 15 . . . . . . . . . . 11  |-  ( ph  ->  P  =/=  2 )
8631a1i 10 . . . . . . . . . . . 12  |-  ( ph  ->  2  e.  RR )
87 prmuz2 12776 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
88 eluzle 10240 . . . . . . . . . . . . 13  |-  ( P  e.  ( ZZ>= `  2
)  ->  2  <_  P )
8926, 87, 883syl 18 . . . . . . . . . . . 12  |-  ( ph  ->  2  <_  P )
9086, 79, 89leltned 8970 . . . . . . . . . . 11  |-  ( ph  ->  ( 2  <  P  <->  P  =/=  2 ) )
9185, 90mpbird 223 . . . . . . . . . 10  |-  ( ph  ->  2  <  P )
9283, 91syl5eqbrr 4057 . . . . . . . . 9  |-  ( ph  ->  ( 1  +  1 )  <  P )
9341, 41, 79ltaddsubd 9372 . . . . . . . . 9  |-  ( ph  ->  ( ( 1  +  1 )  <  P  <->  1  <  ( P  - 
1 ) ) )
9492, 93mpbid 201 . . . . . . . 8  |-  ( ph  ->  1  <  ( P  -  1 ) )
9540, 41, 81, 82, 94lelttrd 8974 . . . . . . 7  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  <  ( P  -  1 ) )
9640, 41, 79ltaddsubd 9372 . . . . . . 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 ) ) )
9795, 96mpbird 223 . . . . . 6  |-  ( ph  ->  ( ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) )  +  1 )  <  P )
98 modid 10993 . . . . . 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 ) )
9954, 42, 78, 97, 98syl22anc 1183 . . . . 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 ) )
10052, 99eqtrd 2315 . . . 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 ) )
101100oveq1d 5873 . . 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 ) )
10240recnd 8861 . . . 4  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  CC )
103 pncan 9057 . . . 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 ) ) ) ) )
104102, 19, 103sylancl 643 . . 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 ) ) ) ) )
105101, 104eqtrd 2315 . 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 ) ) ) ) )
1068, 105eqtrd 2315 1  |-  ( ph  ->  ( Q  / L P )  =  (
-u 1 ^ sum_ x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) ) ( |_
`  ( ( Q  /  P )  x.  ( 2  x.  x
) ) ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    /\ wa 358    = wceq 1623    e. wcel 1684    =/= wne 2446    \ cdif 3149   {csn 3640   class class class wbr 4023    e. cmpt 4077   ` cfv 5255  (class class class)co 5858   CCcc 8735   RRcr 8736   0cc0 8737   1c1 8738    + caddc 8740    x. cmul 8742    < clt 8867    <_ cle 8868    - cmin 9037   -ucneg 9038    / cdiv 9423   NNcn 9746   2c2 9795   ZZcz 10024   ZZ>=cuz 10230   RR+crp 10354   ...cfz 10782   |_cfl 10924    mod cmo 10973   ^cexp 11104   abscabs 11719   sum_csu 12158   Primecprime 12758  mulGrpcmgp 15325   ZRHomczrh 16451  ℤ/nczn 16454    / Lclgs 20533
This theorem is referenced by:  lgsquadlem2  20594
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-inf2 7342  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815  ax-addf 8816  ax-mulf 8817
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-se 4353  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-isom 5264  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-of 6078  df-1st 6122  df-2nd 6123  df-tpos 6234  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-ec 6662  df-qs 6666  df-map 6774  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-sup 7194  df-oi 7225  df-card 7572  df-cda 7794  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-4 9806  df-5 9807  df-6 9808  df-7 9809  df-8 9810  df-9 9811  df-10 9812  df-n0 9966  df-z 10025  df-dec 10125  df-uz 10231  df-q 10317  df-rp 10355  df-fz 10783  df-fzo 10871  df-fl 10925  df-mod 10974  df-seq 11047  df-exp 11105  df-hash 11338  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-clim 11962  df-sum 12159  df-dvds 12532  df-gcd 12686  df-prm 12759  df-phi 12834  df-pc 12890  df-struct 13150  df-ndx 13151  df-slot 13152  df-base 13153  df-sets 13154  df-ress 13155  df-plusg 13221  df-mulr 13222  df-starv 13223  df-sca 13224  df-vsca 13225  df-tset 13227  df-ple 13228  df-ds 13230  df-0g 13404  df-gsum 13405  df-imas 13411  df-divs 13412  df-mnd 14367  df-mhm 14415  df-submnd 14416  df-grp 14489  df-minusg 14490  df-sbg 14491  df-mulg 14492  df-subg 14618  df-nsg 14619  df-eqg 14620  df-ghm 14681  df-cntz 14793  df-cmn 15091  df-abl 15092  df-mgp 15326  df-rng 15340  df-cring 15341  df-ur 15342  df-oppr 15405  df-dvdsr 15423  df-unit 15424  df-invr 15454  df-dvr 15465  df-rnghom 15496  df-drng 15514  df-field 15515  df-subrg 15543  df-lmod 15629  df-lss 15690  df-lsp 15729  df-sra 15925  df-rgmod 15926  df-lidl 15927  df-rsp 15928  df-2idl 15984  df-nzr 16010  df-rlreg 16024  df-domn 16025  df-idom 16026  df-cnfld 16378  df-zrh 16455  df-zn 16458  df-lgs 20534
  Copyright terms: Public domain W3C validator