ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  phiprmpw Unicode version

Theorem phiprmpw 12148
Description: Value of the Euler  phi function at a prime power. Theorem 2.5(a) in [ApostolNT] p. 28. (Contributed by Mario Carneiro, 24-Feb-2014.)
Assertion
Ref Expression
phiprmpw  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( phi `  ( P ^ K ) )  =  ( ( P ^
( K  -  1 ) )  x.  ( P  -  1 ) ) )

Proof of Theorem phiprmpw
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 prmnn 12036 . . . 4  |-  ( P  e.  Prime  ->  P  e.  NN )
2 nnnn0 9115 . . . 4  |-  ( K  e.  NN  ->  K  e.  NN0 )
3 nnexpcl 10462 . . . 4  |-  ( ( P  e.  NN  /\  K  e.  NN0 )  -> 
( P ^ K
)  e.  NN )
41, 2, 3syl2an 287 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  NN )
5 phival 12139 . . 3  |-  ( ( P ^ K )  e.  NN  ->  ( phi `  ( P ^ K ) )  =  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )
64, 5syl 14 . 2  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( phi `  ( P ^ K ) )  =  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )
7 nnm1nn0 9149 . . . . . 6  |-  ( K  e.  NN  ->  ( K  -  1 )  e.  NN0 )
8 nnexpcl 10462 . . . . . 6  |-  ( ( P  e.  NN  /\  ( K  -  1
)  e.  NN0 )  ->  ( P ^ ( K  -  1 ) )  e.  NN )
91, 7, 8syl2an 287 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  NN )
109nncnd 8865 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  CC )
111nncnd 8865 . . . . 5  |-  ( P  e.  Prime  ->  P  e.  CC )
1211adantr 274 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  CC )
13 ax-1cn 7840 . . . . 5  |-  1  e.  CC
14 subdi 8277 . . . . 5  |-  ( ( ( P ^ ( K  -  1 ) )  e.  CC  /\  P  e.  CC  /\  1  e.  CC )  ->  (
( P ^ ( K  -  1 ) )  x.  ( P  -  1 ) )  =  ( ( ( P ^ ( K  -  1 ) )  x.  P )  -  ( ( P ^
( K  -  1 ) )  x.  1 ) ) )
1513, 14mp3an3 1315 . . . 4  |-  ( ( ( P ^ ( K  -  1 ) )  e.  CC  /\  P  e.  CC )  ->  ( ( P ^
( K  -  1 ) )  x.  ( P  -  1 ) )  =  ( ( ( P ^ ( K  -  1 ) )  x.  P )  -  ( ( P ^ ( K  - 
1 ) )  x.  1 ) ) )
1610, 12, 15syl2anc 409 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  ( P  -  1 ) )  =  ( ( ( P ^ ( K  -  1 ) )  x.  P )  -  ( ( P ^
( K  -  1 ) )  x.  1 ) ) )
1710mulid1d 7910 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  1 )  =  ( P ^
( K  -  1 ) ) )
1817oveq2d 5855 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^
( K  -  1 ) )  x.  P
)  -  ( ( P ^ ( K  -  1 ) )  x.  1 ) )  =  ( ( ( P ^ ( K  -  1 ) )  x.  P )  -  ( P ^ ( K  -  1 ) ) ) )
19 phivalfi 12138 . . . . . . 7  |-  ( ( P ^ K )  e.  NN  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin )
204, 19syl 14 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin )
21 1zzd 9212 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  1  e.  ZZ )
22 prmz 12037 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  ZZ )
23 zexpcl 10464 . . . . . . . . 9  |-  ( ( P  e.  ZZ  /\  K  e.  NN0 )  -> 
( P ^ K
)  e.  ZZ )
2422, 2, 23syl2an 287 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ZZ )
2521, 24fzfigd 10360 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
1 ... ( P ^ K ) )  e. 
Fin )
2622ad2antrr 480 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  P  e.  ZZ )
27 elfzelz 9954 . . . . . . . . . . 11  |-  ( x  e.  ( 1 ... ( P ^ K
) )  ->  x  e.  ZZ )
2827adantl 275 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  x  e.  ZZ )
29 0zd 9197 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  0  e.  ZZ )
3028, 29zsubcld 9312 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  -  0 )  e.  ZZ )
31 zdvdsdc 11746 . . . . . . . . 9  |-  ( ( P  e.  ZZ  /\  ( x  -  0
)  e.  ZZ )  -> DECID 
P  ||  ( x  -  0 ) )
3226, 30, 31syl2anc 409 . . . . . . . 8  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  -> DECID  P  ||  ( x  -  0 ) )
3332ralrimiva 2537 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )DECID  P 
||  ( x  - 
0 ) )
3425, 33ssfirab 6893 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) }  e.  Fin )
35 inrab 3392 . . . . . . 7  |-  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  i^i  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } )  =  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) }
36 rpexp 12079 . . . . . . . . . . . . . . . . 17  |-  ( ( P  e.  ZZ  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
3722, 36syl3an1 1260 . . . . . . . . . . . . . . . 16  |-  ( ( P  e.  Prime  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
38373expa 1192 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  x  e.  ZZ )  /\  K  e.  NN )  ->  ( ( ( P ^ K )  gcd  x )  =  1  <->  ( P  gcd  x )  =  1 ) )
3938an32s 558 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( ( P ^ K )  gcd  x )  =  1  <->  ( P  gcd  x )  =  1 ) )
40 simpr 109 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  ZZ )
4124adantr 274 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( P ^ K )  e.  ZZ )
42 gcdcom 11900 . . . . . . . . . . . . . . . 16  |-  ( ( x  e.  ZZ  /\  ( P ^ K )  e.  ZZ )  -> 
( x  gcd  ( P ^ K ) )  =  ( ( P ^ K )  gcd  x ) )
4340, 41, 42syl2anc 409 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  gcd  ( P ^ K ) )  =  ( ( P ^ K )  gcd  x ) )
4443eqeq1d 2173 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  ( ( P ^ K )  gcd  x )  =  1 ) )
45 coprm 12070 . . . . . . . . . . . . . . 15  |-  ( ( P  e.  Prime  /\  x  e.  ZZ )  ->  ( -.  P  ||  x  <->  ( P  gcd  x )  =  1 ) )
4645adantlr 469 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( -.  P  ||  x  <->  ( P  gcd  x )  =  1 ) )
4739, 44, 463bitr4d 219 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  -.  P  ||  x
) )
48 zcn 9190 . . . . . . . . . . . . . . . . 17  |-  ( x  e.  ZZ  ->  x  e.  CC )
4948adantl 275 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  CC )
5049subid1d 8192 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  - 
0 )  =  x )
5150breq2d 3991 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( P  ||  ( x  -  0
)  <->  P  ||  x ) )
5251notbid 657 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( -.  P  ||  ( x  -  0 )  <->  -.  P  ||  x
) )
5347, 52bitr4d 190 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  -.  P  ||  (
x  -  0 ) ) )
5427, 53sylan2 284 . . . . . . . . . . 11  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  <->  -.  P  ||  (
x  -  0 ) ) )
5554biimpd 143 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  ->  -.  P  ||  ( x  -  0 ) ) )
56 imnan 680 . . . . . . . . . 10  |-  ( ( ( x  gcd  ( P ^ K ) )  =  1  ->  -.  P  ||  ( x  - 
0 ) )  <->  -.  (
( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0 ) ) )
5755, 56sylib 121 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  -.  (
( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0 ) ) )
5857ralrimiva 2537 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )  -.  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) )
59 rabeq0 3436 . . . . . . . 8  |-  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0 ) ) }  =  (/)  <->  A. x  e.  ( 1 ... ( P ^ K ) )  -.  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) )
6058, 59sylibr 133 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) }  =  (/) )
6135, 60syl5eq 2209 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( { x  e.  (
1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  i^i  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } )  =  (/) )
62 hashun 10712 . . . . . 6  |-  ( ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin  /\  {
x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) }  e.  Fin  /\  ( { x  e.  (
1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  i^i  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } )  =  (/) )  -> 
( `  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  u.  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } ) )  =  ( ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } ) ) )
6320, 34, 61, 62syl3anc 1227 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  u.  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } ) )  =  ( ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } ) ) )
64 unrab 3391 . . . . . . . 8  |-  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  u.  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } )  =  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) }
6554biimprd 157 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( -.  P  ||  ( x  - 
0 )  ->  (
x  gcd  ( P ^ K ) )  =  1 ) )
66 con1dc 846 . . . . . . . . . . . 12  |-  (DECID  P  ||  ( x  -  0
)  ->  ( ( -.  P  ||  ( x  -  0 )  -> 
( x  gcd  ( P ^ K ) )  =  1 )  -> 
( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  (
x  -  0 ) ) ) )
6732, 65, 66sylc 62 . . . . . . . . . . 11  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  ( x  -  0 ) ) )
6824adantr 274 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( P ^ K )  e.  ZZ )
6928, 68gcdcld 11895 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  NN0 )
7069nn0zd 9305 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  ZZ )
71 1zzd 9212 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  1  e.  ZZ )
72 zdceq 9260 . . . . . . . . . . . . 13  |-  ( ( ( x  gcd  ( P ^ K ) )  e.  ZZ  /\  1  e.  ZZ )  -> DECID  ( x  gcd  ( P ^ K ) )  =  1 )
7370, 71, 72syl2anc 409 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  -> DECID  ( x  gcd  ( P ^ K ) )  =  1 )
74 dfordc 882 . . . . . . . . . . . 12  |-  (DECID  ( x  gcd  ( P ^ K ) )  =  1  ->  ( (
( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) )  <->  ( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  ( x  -  0 ) ) ) )
7573, 74syl 14 . . . . . . . . . . 11  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) )  <->  ( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  ( x  -  0 ) ) ) )
7667, 75mpbird 166 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) )
7776ralrimiva 2537 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) ) ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) ) )
78 rabid2 2640 . . . . . . . . 9  |-  ( ( 1 ... ( P ^ K ) )  =  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) }  <->  A. x  e.  ( 1 ... ( P ^ K ) ) ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) ) )
7977, 78sylibr 133 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
1 ... ( P ^ K ) )  =  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) } )
8064, 79eqtr4id 2216 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( { x  e.  (
1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  u.  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } )  =  ( 1 ... ( P ^ K ) ) )
8180fveq2d 5487 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  u.  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } ) )  =  ( `  ( 1 ... ( P ^ K
) ) ) )
824nnnn0d 9161 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e. 
NN0 )
83 hashfz1 10690 . . . . . . 7  |-  ( ( P ^ K )  e.  NN0  ->  ( `  (
1 ... ( P ^ K ) ) )  =  ( P ^ K ) )
8482, 83syl 14 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  ( 1 ... ( P ^ K ) ) )  =  ( P ^ K ) )
85 expm1t 10477 . . . . . . 7  |-  ( ( P  e.  CC  /\  K  e.  NN )  ->  ( P ^ K
)  =  ( ( P ^ ( K  -  1 ) )  x.  P ) )
8611, 85sylan 281 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  =  ( ( P ^
( K  -  1 ) )  x.  P
) )
8781, 84, 863eqtrd 2201 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  u.  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } ) )  =  ( ( P ^
( K  -  1 ) )  x.  P
) )
88 hashcl 10688 . . . . . . . 8  |-  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  NN0 )
8920, 88syl 14 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  NN0 )
9089nn0cnd 9163 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  CC )
911adantr 274 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  NN )
92 nn0uz 9494 . . . . . . . . . . 11  |-  NN0  =  ( ZZ>= `  0 )
93 1m1e0 8920 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
9493fveq2i 5486 . . . . . . . . . . 11  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
9592, 94eqtr4i 2188 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
9682, 95eleqtrdi 2257 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ( ZZ>= `  ( 1  -  1 ) ) )
97 0zd 9197 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  0  e.  ZZ )
9891, 21, 96, 97hashdvds 12147 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( ( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) ) )
994nncnd 8865 . . . . . . . . . . . . . 14  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  CC )
10099subid1d 8192 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ K
)  -  0 )  =  ( P ^ K ) )
101100oveq1d 5854 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( ( P ^ K )  /  P ) )
10291nnap0d 8897 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P #  0 )
103 nnz 9204 . . . . . . . . . . . . . 14  |-  ( K  e.  NN  ->  K  e.  ZZ )
104103adantl 275 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  K  e.  ZZ )
10512, 102, 104expm1apd 10592 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  =  ( ( P ^ K )  /  P
) )
106101, 105eqtr4d 2200 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( P ^
( K  -  1 ) ) )
107106fveq2d 5487 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( |_ `  ( P ^ ( K  - 
1 ) ) ) )
1089nnzd 9306 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  ZZ )
109 flid 10213 . . . . . . . . . . 11  |-  ( ( P ^ ( K  -  1 ) )  e.  ZZ  ->  ( |_ `  ( P ^
( K  -  1 ) ) )  =  ( P ^ ( K  -  1 ) ) )
110108, 109syl 14 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( P ^
( K  -  1 ) ) )  =  ( P ^ ( K  -  1 ) ) )
111107, 110eqtrd 2197 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( P ^ ( K  -  1 ) ) )
11293oveq1i 5849 . . . . . . . . . . . . . 14  |-  ( ( 1  -  1 )  -  0 )  =  ( 0  -  0 )
113 0m0e0 8963 . . . . . . . . . . . . . 14  |-  ( 0  -  0 )  =  0
114112, 113eqtri 2185 . . . . . . . . . . . . 13  |-  ( ( 1  -  1 )  -  0 )  =  0
115114oveq1i 5849 . . . . . . . . . . . 12  |-  ( ( ( 1  -  1 )  -  0 )  /  P )  =  ( 0  /  P
)
11612, 102div0apd 8677 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
0  /  P )  =  0 )
117115, 116syl5eq 2209 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( 1  -  1 )  -  0 )  /  P )  =  0 )
118117fveq2d 5487 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  ( |_ `  0
) )
119 0z 9196 . . . . . . . . . . 11  |-  0  e.  ZZ
120 flid 10213 . . . . . . . . . . 11  |-  ( 0  e.  ZZ  ->  ( |_ `  0 )  =  0 )
121119, 120ax-mp 5 . . . . . . . . . 10  |-  ( |_
`  0 )  =  0
122118, 121eqtrdi 2213 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  0 )
123111, 122oveq12d 5857 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) )  =  ( ( P ^ ( K  - 
1 ) )  - 
0 ) )
12410subid1d 8192 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  -  0 )  =  ( P ^
( K  -  1 ) ) )
12598, 123, 1243eqtrd 2201 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( P ^ ( K  -  1 ) ) )
126125oveq2d 5855 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } ) )  =  ( ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( P ^ ( K  - 
1 ) ) ) )
12790, 10, 126comraddd 8049 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } ) )  =  ( ( P ^ ( K  -  1 ) )  +  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) ) )
12863, 87, 1273eqtr3rd 2206 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  +  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )  =  ( ( P ^ ( K  -  1 ) )  x.  P ) )
12910, 12mulcld 7913 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  P )  e.  CC )
130129, 10, 90subaddd 8221 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( ( P ^ ( K  - 
1 ) )  x.  P )  -  ( P ^ ( K  - 
1 ) ) )  =  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  <-> 
( ( P ^
( K  -  1 ) )  +  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )  =  ( ( P ^ ( K  -  1 ) )  x.  P ) ) )
131128, 130mpbird 166 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^
( K  -  1 ) )  x.  P
)  -  ( P ^ ( K  - 
1 ) ) )  =  ( `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )
13216, 18, 1313eqtrrd 2202 . 2  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  =  ( ( P ^ ( K  -  1 ) )  x.  ( P  - 
1 ) ) )
1336, 132eqtrd 2197 1  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( phi `  ( P ^ K ) )  =  ( ( P ^
( K  -  1 ) )  x.  ( P  -  1 ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    <-> wb 104    \/ wo 698  DECID wdc 824    = wceq 1342    e. wcel 2135   A.wral 2442   {crab 2446    u. cun 3112    i^i cin 3113   (/)c0 3407   class class class wbr 3979   ` cfv 5185  (class class class)co 5839   Fincfn 6700   CCcc 7745   0cc0 7747   1c1 7748    + caddc 7750    x. cmul 7752    - cmin 8063    / cdiv 8562   NNcn 8851   NN0cn0 9108   ZZcz 9185   ZZ>=cuz 9460   ...cfz 9938   |_cfl 10197   ^cexp 10448  ♯chash 10682    || cdvds 11721    gcd cgcd 11869   Primecprime 12033   phicphi 12135
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1434  ax-7 1435  ax-gen 1436  ax-ie1 1480  ax-ie2 1481  ax-8 1491  ax-10 1492  ax-11 1493  ax-i12 1494  ax-bndl 1496  ax-4 1497  ax-17 1513  ax-i9 1517  ax-ial 1521  ax-i5r 1522  ax-13 2137  ax-14 2138  ax-ext 2146  ax-coll 4094  ax-sep 4097  ax-nul 4105  ax-pow 4150  ax-pr 4184  ax-un 4408  ax-setind 4511  ax-iinf 4562  ax-cnex 7838  ax-resscn 7839  ax-1cn 7840  ax-1re 7841  ax-icn 7842  ax-addcl 7843  ax-addrcl 7844  ax-mulcl 7845  ax-mulrcl 7846  ax-addcom 7847  ax-mulcom 7848  ax-addass 7849  ax-mulass 7850  ax-distr 7851  ax-i2m1 7852  ax-0lt1 7853  ax-1rid 7854  ax-0id 7855  ax-rnegex 7856  ax-precex 7857  ax-cnre 7858  ax-pre-ltirr 7859  ax-pre-ltwlin 7860  ax-pre-lttrn 7861  ax-pre-apti 7862  ax-pre-ltadd 7863  ax-pre-mulgt0 7864  ax-pre-mulext 7865  ax-arch 7866  ax-caucvg 7867
This theorem depends on definitions:  df-bi 116  df-stab 821  df-dc 825  df-3or 968  df-3an 969  df-tru 1345  df-fal 1348  df-nf 1448  df-sb 1750  df-eu 2016  df-mo 2017  df-clab 2151  df-cleq 2157  df-clel 2160  df-nfc 2295  df-ne 2335  df-nel 2430  df-ral 2447  df-rex 2448  df-reu 2449  df-rmo 2450  df-rab 2451  df-v 2726  df-sbc 2950  df-csb 3044  df-dif 3116  df-un 3118  df-in 3120  df-ss 3127  df-nul 3408  df-if 3519  df-pw 3558  df-sn 3579  df-pr 3580  df-op 3582  df-uni 3787  df-int 3822  df-iun 3865  df-br 3980  df-opab 4041  df-mpt 4042  df-tr 4078  df-id 4268  df-po 4271  df-iso 4272  df-iord 4341  df-on 4343  df-ilim 4344  df-suc 4346  df-iom 4565  df-xp 4607  df-rel 4608  df-cnv 4609  df-co 4610  df-dm 4611  df-rn 4612  df-res 4613  df-ima 4614  df-iota 5150  df-fun 5187  df-fn 5188  df-f 5189  df-f1 5190  df-fo 5191  df-f1o 5192  df-fv 5193  df-riota 5795  df-ov 5842  df-oprab 5843  df-mpo 5844  df-1st 6103  df-2nd 6104  df-recs 6267  df-irdg 6332  df-frec 6353  df-1o 6378  df-2o 6379  df-oadd 6382  df-er 6495  df-en 6701  df-dom 6702  df-fin 6703  df-sup 6943  df-pnf 7929  df-mnf 7930  df-xr 7931  df-ltxr 7932  df-le 7933  df-sub 8065  df-neg 8066  df-reap 8467  df-ap 8474  df-div 8563  df-inn 8852  df-2 8910  df-3 8911  df-4 8912  df-n0 9109  df-z 9186  df-uz 9461  df-q 9552  df-rp 9584  df-fz 9939  df-fzo 10072  df-fl 10199  df-mod 10252  df-seqfrec 10375  df-exp 10449  df-ihash 10683  df-cj 10778  df-re 10779  df-im 10780  df-rsqrt 10934  df-abs 10935  df-dvds 11722  df-gcd 11870  df-prm 12034  df-phi 12137
This theorem is referenced by:  phiprm  12149
  Copyright terms: Public domain W3C validator