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

Theorem phiprmpw 11905
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 11798 . . . 4  |-  ( P  e.  Prime  ->  P  e.  NN )
2 nnnn0 8991 . . . 4  |-  ( K  e.  NN  ->  K  e.  NN0 )
3 nnexpcl 10313 . . . 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 11896 . . 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 9025 . . . . . 6  |-  ( K  e.  NN  ->  ( K  -  1 )  e.  NN0 )
8 nnexpcl 10313 . . . . . 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 8741 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  CC )
111nncnd 8741 . . . . 5  |-  ( P  e.  Prime  ->  P  e.  CC )
1211adantr 274 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  CC )
13 ax-1cn 7720 . . . . 5  |-  1  e.  CC
14 subdi 8154 . . . . 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 1304 . . . 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 408 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  ( P  -  1 ) )  =  ( ( ( P ^ ( K  -  1 ) )  x.  P )  -  ( ( P ^
( K  -  1 ) )  x.  1 ) ) )
1710mulid1d 7790 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  1 )  =  ( P ^
( K  -  1 ) ) )
1817oveq2d 5790 . . 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 11895 . . . . . . 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 9088 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  1  e.  ZZ )
22 prmz 11799 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  ZZ )
23 zexpcl 10315 . . . . . . . . 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 10211 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
1 ... ( P ^ K ) )  e. 
Fin )
2622ad2antrr 479 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  P  e.  ZZ )
27 elfzelz 9813 . . . . . . . . . . 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 9073 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  0  e.  ZZ )
3028, 29zsubcld 9185 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  -  0 )  e.  ZZ )
31 zdvdsdc 11521 . . . . . . . . 9  |-  ( ( P  e.  ZZ  /\  ( x  -  0
)  e.  ZZ )  -> DECID 
P  ||  ( x  -  0 ) )
3226, 30, 31syl2anc 408 . . . . . . . 8  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  -> DECID  P  ||  ( x  -  0 ) )
3332ralrimiva 2505 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )DECID  P 
||  ( x  - 
0 ) )
3425, 33ssfirab 6822 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) }  e.  Fin )
35 inrab 3348 . . . . . . 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 11838 . . . . . . . . . . . . . . . . 17  |-  ( ( P  e.  ZZ  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
3722, 36syl3an1 1249 . . . . . . . . . . . . . . . 16  |-  ( ( P  e.  Prime  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
38373expa 1181 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  x  e.  ZZ )  /\  K  e.  NN )  ->  ( ( ( P ^ K )  gcd  x )  =  1  <->  ( P  gcd  x )  =  1 ) )
3938an32s 557 . . . . . . . . . . . . . 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 11669 . . . . . . . . . . . . . . . 16  |-  ( ( x  e.  ZZ  /\  ( P ^ K )  e.  ZZ )  -> 
( x  gcd  ( P ^ K ) )  =  ( ( P ^ K )  gcd  x ) )
4340, 41, 42syl2anc 408 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  gcd  ( P ^ K ) )  =  ( ( P ^ K )  gcd  x ) )
4443eqeq1d 2148 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  ( ( P ^ K )  gcd  x )  =  1 ) )
45 coprm 11829 . . . . . . . . . . . . . . 15  |-  ( ( P  e.  Prime  /\  x  e.  ZZ )  ->  ( -.  P  ||  x  <->  ( P  gcd  x )  =  1 ) )
4645adantlr 468 . . . . . . . . . . . . . 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 9066 . . . . . . . . . . . . . . . . 17  |-  ( x  e.  ZZ  ->  x  e.  CC )
4948adantl 275 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  CC )
5049subid1d 8069 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  - 
0 )  =  x )
5150breq2d 3941 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( P  ||  ( x  -  0
)  <->  P  ||  x ) )
5251notbid 656 . . . . . . . . . . . . 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 679 . . . . . . . . . 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 2505 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )  -.  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) )
59 rabeq0 3392 . . . . . . . 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 2184 . . . . . 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 10558 . . . . . 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 1216 . . . . 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 ) } ) ) )
6454biimprd 157 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( -.  P  ||  ( x  - 
0 )  ->  (
x  gcd  ( P ^ K ) )  =  1 ) )
65 con1dc 841 . . . . . . . . . . . 12  |-  (DECID  P  ||  ( x  -  0
)  ->  ( ( -.  P  ||  ( x  -  0 )  -> 
( x  gcd  ( P ^ K ) )  =  1 )  -> 
( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  (
x  -  0 ) ) ) )
6632, 64, 65sylc 62 . . . . . . . . . . 11  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  ( x  -  0 ) ) )
6724adantr 274 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( P ^ K )  e.  ZZ )
6828, 67gcdcld 11664 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  NN0 )
6968nn0zd 9178 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  ZZ )
70 1zzd 9088 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  1  e.  ZZ )
71 zdceq 9133 . . . . . . . . . . . . 13  |-  ( ( ( x  gcd  ( P ^ K ) )  e.  ZZ  /\  1  e.  ZZ )  -> DECID  ( x  gcd  ( P ^ K ) )  =  1 )
7269, 70, 71syl2anc 408 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  -> DECID  ( x  gcd  ( P ^ K ) )  =  1 )
73 dfordc 877 . . . . . . . . . . . 12  |-  (DECID  ( x  gcd  ( P ^ K ) )  =  1  ->  ( (
( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) )  <->  ( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  ( x  -  0 ) ) ) )
7472, 73syl 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 ) ) ) )
7566, 74mpbird 166 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) )
7675ralrimiva 2505 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) ) ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) ) )
77 rabid2 2607 . . . . . . . . 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 ) ) )
7876, 77sylibr 133 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
1 ... ( P ^ K ) )  =  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) } )
79 unrab 3347 . . . . . . . 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
) ) }
8078, 79syl6reqr 2191 . . . . . . 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 5425 . . . . . 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 9037 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e. 
NN0 )
83 hashfz1 10536 . . . . . . 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 10328 . . . . . . 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 2176 . . . . 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 10534 . . . . . . . 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 9039 . . . . . 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 9367 . . . . . . . . . . 11  |-  NN0  =  ( ZZ>= `  0 )
93 1m1e0 8796 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
9493fveq2i 5424 . . . . . . . . . . 11  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
9592, 94eqtr4i 2163 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
9682, 95eleqtrdi 2232 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ( ZZ>= `  ( 1  -  1 ) ) )
97 0zd 9073 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  0  e.  ZZ )
9891, 21, 96, 97hashdvds 11904 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( ( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) ) )
994nncnd 8741 . . . . . . . . . . . . . 14  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  CC )
10099subid1d 8069 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ K
)  -  0 )  =  ( P ^ K ) )
101100oveq1d 5789 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( ( P ^ K )  /  P ) )
10291nnap0d 8773 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P #  0 )
103 nnz 9080 . . . . . . . . . . . . . 14  |-  ( K  e.  NN  ->  K  e.  ZZ )
104103adantl 275 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  K  e.  ZZ )
10512, 102, 104expm1apd 10441 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  =  ( ( P ^ K )  /  P
) )
106101, 105eqtr4d 2175 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( P ^
( K  -  1 ) ) )
107106fveq2d 5425 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( |_ `  ( P ^ ( K  - 
1 ) ) ) )
1089nnzd 9179 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  ZZ )
109 flid 10064 . . . . . . . . . . 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 2172 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( P ^ ( K  -  1 ) ) )
11293oveq1i 5784 . . . . . . . . . . . . . 14  |-  ( ( 1  -  1 )  -  0 )  =  ( 0  -  0 )
113 0m0e0 8839 . . . . . . . . . . . . . 14  |-  ( 0  -  0 )  =  0
114112, 113eqtri 2160 . . . . . . . . . . . . 13  |-  ( ( 1  -  1 )  -  0 )  =  0
115114oveq1i 5784 . . . . . . . . . . . 12  |-  ( ( ( 1  -  1 )  -  0 )  /  P )  =  ( 0  /  P
)
11612, 102div0apd 8554 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
0  /  P )  =  0 )
117115, 116syl5eq 2184 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( 1  -  1 )  -  0 )  /  P )  =  0 )
118117fveq2d 5425 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  ( |_ `  0
) )
119 0z 9072 . . . . . . . . . . 11  |-  0  e.  ZZ
120 flid 10064 . . . . . . . . . . 11  |-  ( 0  e.  ZZ  ->  ( |_ `  0 )  =  0 )
121119, 120ax-mp 5 . . . . . . . . . 10  |-  ( |_
`  0 )  =  0
122118, 121syl6eq 2188 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  0 )
123111, 122oveq12d 5792 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) )  =  ( ( P ^ ( K  - 
1 ) )  - 
0 ) )
12410subid1d 8069 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  -  0 )  =  ( P ^
( K  -  1 ) ) )
12598, 123, 1243eqtrd 2176 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( P ^ ( K  -  1 ) ) )
126125oveq2d 5790 . . . . . 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 7926 . . . . 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 2181 . . . 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 7793 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  P )  e.  CC )
130129, 10, 90subaddd 8098 . . . 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 2177 . 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 2172 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 697  DECID wdc 819    = wceq 1331    e. wcel 1480   A.wral 2416   {crab 2420    u. cun 3069    i^i cin 3070   (/)c0 3363   class class class wbr 3929   ` cfv 5123  (class class class)co 5774   Fincfn 6634   CCcc 7625   0cc0 7627   1c1 7628    + caddc 7630    x. cmul 7632    - cmin 7940    / cdiv 8439   NNcn 8727   NN0cn0 8984   ZZcz 9061   ZZ>=cuz 9333   ...cfz 9797   |_cfl 10048   ^cexp 10299  ♯chash 10528    || cdvds 11500    gcd cgcd 11642   Primecprime 11795   phicphi 11893
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 603  ax-in2 604  ax-io 698  ax-5 1423  ax-7 1424  ax-gen 1425  ax-ie1 1469  ax-ie2 1470  ax-8 1482  ax-10 1483  ax-11 1484  ax-i12 1485  ax-bndl 1486  ax-4 1487  ax-13 1491  ax-14 1492  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-ext 2121  ax-coll 4043  ax-sep 4046  ax-nul 4054  ax-pow 4098  ax-pr 4131  ax-un 4355  ax-setind 4452  ax-iinf 4502  ax-cnex 7718  ax-resscn 7719  ax-1cn 7720  ax-1re 7721  ax-icn 7722  ax-addcl 7723  ax-addrcl 7724  ax-mulcl 7725  ax-mulrcl 7726  ax-addcom 7727  ax-mulcom 7728  ax-addass 7729  ax-mulass 7730  ax-distr 7731  ax-i2m1 7732  ax-0lt1 7733  ax-1rid 7734  ax-0id 7735  ax-rnegex 7736  ax-precex 7737  ax-cnre 7738  ax-pre-ltirr 7739  ax-pre-ltwlin 7740  ax-pre-lttrn 7741  ax-pre-apti 7742  ax-pre-ltadd 7743  ax-pre-mulgt0 7744  ax-pre-mulext 7745  ax-arch 7746  ax-caucvg 7747
This theorem depends on definitions:  df-bi 116  df-stab 816  df-dc 820  df-3or 963  df-3an 964  df-tru 1334  df-fal 1337  df-nf 1437  df-sb 1736  df-eu 2002  df-mo 2003  df-clab 2126  df-cleq 2132  df-clel 2135  df-nfc 2270  df-ne 2309  df-nel 2404  df-ral 2421  df-rex 2422  df-reu 2423  df-rmo 2424  df-rab 2425  df-v 2688  df-sbc 2910  df-csb 3004  df-dif 3073  df-un 3075  df-in 3077  df-ss 3084  df-nul 3364  df-if 3475  df-pw 3512  df-sn 3533  df-pr 3534  df-op 3536  df-uni 3737  df-int 3772  df-iun 3815  df-br 3930  df-opab 3990  df-mpt 3991  df-tr 4027  df-id 4215  df-po 4218  df-iso 4219  df-iord 4288  df-on 4290  df-ilim 4291  df-suc 4293  df-iom 4505  df-xp 4545  df-rel 4546  df-cnv 4547  df-co 4548  df-dm 4549  df-rn 4550  df-res 4551  df-ima 4552  df-iota 5088  df-fun 5125  df-fn 5126  df-f 5127  df-f1 5128  df-fo 5129  df-f1o 5130  df-fv 5131  df-riota 5730  df-ov 5777  df-oprab 5778  df-mpo 5779  df-1st 6038  df-2nd 6039  df-recs 6202  df-irdg 6267  df-frec 6288  df-1o 6313  df-2o 6314  df-oadd 6317  df-er 6429  df-en 6635  df-dom 6636  df-fin 6637  df-sup 6871  df-pnf 7809  df-mnf 7810  df-xr 7811  df-ltxr 7812  df-le 7813  df-sub 7942  df-neg 7943  df-reap 8344  df-ap 8351  df-div 8440  df-inn 8728  df-2 8786  df-3 8787  df-4 8788  df-n0 8985  df-z 9062  df-uz 9334  df-q 9419  df-rp 9449  df-fz 9798  df-fzo 9927  df-fl 10050  df-mod 10103  df-seqfrec 10226  df-exp 10300  df-ihash 10529  df-cj 10621  df-re 10622  df-im 10623  df-rsqrt 10777  df-abs 10778  df-dvds 11501  df-gcd 11643  df-prm 11796  df-phi 11894
This theorem is referenced by:  phiprm  11906
  Copyright terms: Public domain W3C validator