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

Theorem lgseisen 20608
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 3311 . . . . 5  |-  ( Q  e.  ( Prime  \  {
2 } )  ->  Q  e.  Prime )
31, 2syl 15 . . . 4  |-  ( ph  ->  Q  e.  Prime )
4 prmz 12778 . . . 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 20569 . . 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 12777 . . . . . . . . 9  |-  ( Q  e.  Prime  ->  Q  e.  NN )
103, 9syl 15 . . . . . . . 8  |-  ( ph  ->  Q  e.  NN )
11 oddprm 12884 . . . . . . . . . 10  |-  ( P  e.  ( Prime  \  {
2 } )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
126, 11syl 15 . . . . . . . . 9  |-  ( ph  ->  ( ( P  - 
1 )  /  2
)  e.  NN )
1312nnnn0d 10034 . . . . . . . 8  |-  ( ph  ->  ( ( P  - 
1 )  /  2
)  e.  NN0 )
1410, 13nnexpcld 11282 . . . . . . 7  |-  ( ph  ->  ( Q ^ (
( P  -  1 )  /  2 ) )  e.  NN )
1514nnred 9777 . . . . . 6  |-  ( ph  ->  ( Q ^ (
( P  -  1 )  /  2 ) )  e.  RR )
16 1re 8853 . . . . . . . . 9  |-  1  e.  RR
1716renegcli 9124 . . . . . . . 8  |-  -u 1  e.  RR
1817a1i 10 . . . . . . 7  |-  ( ph  -> 
-u 1  e.  RR )
19 ax-1cn 8811 . . . . . . . . 9  |-  1  e.  CC
20 ax-1ne0 8822 . . . . . . . . 9  |-  1  =/=  0
2119, 20negne0i 9137 . . . . . . . 8  |-  -u 1  =/=  0
2221a1i 10 . . . . . . 7  |-  ( ph  -> 
-u 1  =/=  0
)
23 fzfid 11051 . . . . . . . 8  |-  ( ph  ->  ( 1 ... (
( P  -  1 )  /  2 ) )  e.  Fin )
2410nnred 9777 . . . . . . . . . . . 12  |-  ( ph  ->  Q  e.  RR )
25 eldifi 3311 . . . . . . . . . . . . . 14  |-  ( P  e.  ( Prime  \  {
2 } )  ->  P  e.  Prime )
266, 25syl 15 . . . . . . . . . . . . 13  |-  ( ph  ->  P  e.  Prime )
27 prmnn 12777 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  P  e.  NN )
2826, 27syl 15 . . . . . . . . . . . 12  |-  ( ph  ->  P  e.  NN )
2924, 28nndivred 9810 . . . . . . . . . . 11  |-  ( ph  ->  ( Q  /  P
)  e.  RR )
3029adantr 451 . . . . . . . . . 10  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  ( Q  /  P )  e.  RR )
31 2re 9831 . . . . . . . . . . 11  |-  2  e.  RR
32 elfznn 10835 . . . . . . . . . . . . 13  |-  ( x  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  x  e.  NN )
3332adantl 452 . . . . . . . . . . . 12  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  x  e.  NN )
3433nnred 9777 . . . . . . . . . . 11  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  x  e.  RR )
35 remulcl 8838 . . . . . . . . . . 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 8879 . . . . . . . . 9  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
( Q  /  P
)  x.  ( 2  x.  x ) )  e.  RR )
3837flcld 10946 . . . . . . . 8  |-  ( (
ph  /\  x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x
) ) )  e.  ZZ )
3923, 38fsumzcl 12224 . . . . . . 7  |-  ( ph  -> 
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) )  e.  ZZ )
4018, 22, 39reexpclzd 11286 . . . . . 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 10405 . . . . . 6  |-  ( ph  ->  P  e.  RR+ )
43 lgseisen.3 . . . . . . 7  |-  ( ph  ->  P  =/=  Q )
44 eqid 2296 . . . . . . 7  |-  ( ( Q  x.  ( 2  x.  x ) )  mod  P )  =  ( ( Q  x.  ( 2  x.  x
) )  mod  P
)
45 eqid 2296 . . . . . . 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 2296 . . . . . . 7  |-  ( ( Q  x.  ( 2  x.  y ) )  mod  P )  =  ( ( Q  x.  ( 2  x.  y
) )  mod  P
)
47 eqid 2296 . . . . . . 7  |-  (ℤ/n `  P
)  =  (ℤ/n `  P
)
48 eqid 2296 . . . . . . 7  |-  (mulGrp `  (ℤ/n `  P ) )  =  (mulGrp `  (ℤ/n `  P ) )
49 eqid 2296 . . . . . . 7  |-  ( ZRHom `  (ℤ/n `  P ) )  =  ( ZRHom `  (ℤ/n `  P
) )
506, 1, 43, 44, 45, 46, 47, 48, 49lgseisenlem4 20607 . . . . . 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 11017 . . . . . 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 9001 . . . . . . 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 9056 . . . . . . . 8  |-  -u 1  =  ( 0  -  1 )
56 neg1cn 9829 . . . . . . . . . . . . . 14  |-  -u 1  e.  CC
5756a1i 10 . . . . . . . . . . . . 13  |-  ( ph  -> 
-u 1  e.  CC )
58 absexpz 11806 . . . . . . . . . . . . 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 11899 . . . . . . . . . . . . . . 15  |-  ( abs `  -u 1 )  =  ( abs `  1
)
61 abs1 11798 . . . . . . . . . . . . . . 15  |-  ( abs `  1 )  =  1
6260, 61eqtri 2316 . . . . . . . . . . . . . 14  |-  ( abs `  -u 1 )  =  1
6362oveq1i 5884 . . . . . . . . . . . . 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 11147 . . . . . . . . . . . . . 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 2340 . . . . . . . . . . . 12  |-  ( ph  ->  ( ( abs `  -u 1
) ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) )  =  1 )
6759, 66eqtrd 2328 . . . . . . . . . . 11  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  =  1 )
68 1le1 9412 . . . . . . . . . . 11  |-  1  <_  1
6967, 68syl6eqbr 4076 . . . . . . . . . 10  |-  ( ph  ->  ( abs `  ( -u 1 ^ sum_ x  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( |_ `  ( ( Q  /  P )  x.  (
2  x.  x ) ) ) ) )  <_  1 )
70 absle 11815 . . . . . . . . . . 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 4073 . . . . . . 7  |-  ( ph  ->  ( 0  -  1 )  <_  ( -u 1 ^ sum_ x  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( |_ `  (
( Q  /  P
)  x.  ( 2  x.  x ) ) ) ) )
75 0re 8854 . . . . . . . . 9  |-  0  e.  RR
7675a1i 10 . . . . . . . 8  |-  ( ph  ->  0  e.  RR )
7776, 41, 40lesubaddd 9385 . . . . . . 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 9777 . . . . . . . . 9  |-  ( ph  ->  P  e.  RR )
80 peano2rem 9129 . . . . . . . . 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 9820 . . . . . . . . . 10  |-  2  =  ( 1  +  1 )
84 eldifsni 3763 . . . . . . . . . . . 12  |-  ( P  e.  ( Prime  \  {
2 } )  ->  P  =/=  2 )
856, 84syl 15 . . . . . . . . . . 11  |-  ( ph  ->  P  =/=  2 )
8631a1i 10 . . . . . . . . . . . 12  |-  ( ph  ->  2  e.  RR )
87 prmuz2 12792 . . . . . . . . . . . . 13  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
88 eluzle 10256 . . . . . . . . . . . . 13  |-  ( P  e.  ( ZZ>= `  2
)  ->  2  <_  P )
8926, 87, 883syl 18 . . . . . . . . . . . 12  |-  ( ph  ->  2  <_  P )
9086, 79, 89leltned 8986 . . . . . . . . . . 11  |-  ( ph  ->  ( 2  <  P  <->  P  =/=  2 ) )
9185, 90mpbird 223 . . . . . . . . . 10  |-  ( ph  ->  2  <  P )
9283, 91syl5eqbrr 4073 . . . . . . . . 9  |-  ( ph  ->  ( 1  +  1 )  <  P )
9341, 41, 79ltaddsubd 9388 . . . . . . . . 9  |-  ( ph  ->  ( ( 1  +  1 )  <  P  <->  1  <  ( P  - 
1 ) ) )
9492, 93mpbid 201 . . . . . . . 8  |-  ( ph  ->  1  <  ( P  -  1 ) )
9540, 41, 81, 82, 94lelttrd 8990 . . . . . . 7  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  <  ( P  -  1 ) )
9640, 41, 79ltaddsubd 9388 . . . . . . 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 11009 . . . . . 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 2328 . . . 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 5889 . . 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 8877 . . . 4  |-  ( ph  ->  ( -u 1 ^
sum_ x  e.  (
1 ... ( ( P  -  1 )  / 
2 ) ) ( |_ `  ( ( Q  /  P )  x.  ( 2  x.  x ) ) ) )  e.  CC )
103 pncan 9073 . . . 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 2328 . 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 2328 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 1632    e. wcel 1696    =/= wne 2459    \ cdif 3162   {csn 3653   class class class wbr 4039    e. cmpt 4093   ` cfv 5271  (class class class)co 5874   CCcc 8751   RRcr 8752   0cc0 8753   1c1 8754    + caddc 8756    x. cmul 8758    < clt 8883    <_ cle 8884    - cmin 9053   -ucneg 9054    / cdiv 9439   NNcn 9762   2c2 9811   ZZcz 10040   ZZ>=cuz 10246   RR+crp 10370   ...cfz 10798   |_cfl 10940    mod cmo 10989   ^cexp 11120   abscabs 11735   sum_csu 12174   Primecprime 12774  mulGrpcmgp 15341   ZRHomczrh 16467  ℤ/nczn 16470    / Lclgs 20549
This theorem is referenced by:  lgsquadlem2  20610
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-rep 4147  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-inf2 7358  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831  ax-addf 8832  ax-mulf 8833
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 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-int 3879  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-se 4369  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-isom 5280  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-of 6094  df-1st 6138  df-2nd 6139  df-tpos 6250  df-riota 6320  df-recs 6404  df-rdg 6439  df-1o 6495  df-2o 6496  df-oadd 6499  df-er 6676  df-ec 6678  df-qs 6682  df-map 6790  df-en 6880  df-dom 6881  df-sdom 6882  df-fin 6883  df-sup 7210  df-oi 7241  df-card 7588  df-cda 7810  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-2 9820  df-3 9821  df-4 9822  df-5 9823  df-6 9824  df-7 9825  df-8 9826  df-9 9827  df-10 9828  df-n0 9982  df-z 10041  df-dec 10141  df-uz 10247  df-q 10333  df-rp 10371  df-fz 10799  df-fzo 10887  df-fl 10941  df-mod 10990  df-seq 11063  df-exp 11121  df-hash 11354  df-cj 11600  df-re 11601  df-im 11602  df-sqr 11736  df-abs 11737  df-clim 11978  df-sum 12175  df-dvds 12548  df-gcd 12702  df-prm 12775  df-phi 12850  df-pc 12906  df-struct 13166  df-ndx 13167  df-slot 13168  df-base 13169  df-sets 13170  df-ress 13171  df-plusg 13237  df-mulr 13238  df-starv 13239  df-sca 13240  df-vsca 13241  df-tset 13243  df-ple 13244  df-ds 13246  df-0g 13420  df-gsum 13421  df-imas 13427  df-divs 13428  df-mnd 14383  df-mhm 14431  df-submnd 14432  df-grp 14505  df-minusg 14506  df-sbg 14507  df-mulg 14508  df-subg 14634  df-nsg 14635  df-eqg 14636  df-ghm 14697  df-cntz 14809  df-cmn 15107  df-abl 15108  df-mgp 15342  df-rng 15356  df-cring 15357  df-ur 15358  df-oppr 15421  df-dvdsr 15439  df-unit 15440  df-invr 15470  df-dvr 15481  df-rnghom 15512  df-drng 15530  df-field 15531  df-subrg 15559  df-lmod 15645  df-lss 15706  df-lsp 15745  df-sra 15941  df-rgmod 15942  df-lidl 15943  df-rsp 15944  df-2idl 16000  df-nzr 16026  df-rlreg 16040  df-domn 16041  df-idom 16042  df-cnfld 16394  df-zrh 16471  df-zn 16474  df-lgs 20550
  Copyright terms: Public domain W3C validator