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

Theorem phiprmpw 12154
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 12042 . . . 4  |-  ( P  e.  Prime  ->  P  e.  NN )
2 nnnn0 9121 . . . 4  |-  ( K  e.  NN  ->  K  e.  NN0 )
3 nnexpcl 10468 . . . 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 12145 . . 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 9155 . . . . . 6  |-  ( K  e.  NN  ->  ( K  -  1 )  e.  NN0 )
8 nnexpcl 10468 . . . . . 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 8871 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  CC )
111nncnd 8871 . . . . 5  |-  ( P  e.  Prime  ->  P  e.  CC )
1211adantr 274 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  CC )
13 ax-1cn 7846 . . . . 5  |-  1  e.  CC
14 subdi 8283 . . . . 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 1316 . . . 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 7916 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  1 )  =  ( P ^
( K  -  1 ) ) )
1817oveq2d 5858 . . 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 12144 . . . . . . 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 9218 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  1  e.  ZZ )
22 prmz 12043 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  ZZ )
23 zexpcl 10470 . . . . . . . . 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 10366 . . . . . . 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 9960 . . . . . . . . . . 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 9203 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  0  e.  ZZ )
3028, 29zsubcld 9318 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  -  0 )  e.  ZZ )
31 zdvdsdc 11752 . . . . . . . . 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 2539 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )DECID  P 
||  ( x  - 
0 ) )
3425, 33ssfirab 6899 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) }  e.  Fin )
35 inrab 3394 . . . . . . 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 12085 . . . . . . . . . . . . . . . . 17  |-  ( ( P  e.  ZZ  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
3722, 36syl3an1 1261 . . . . . . . . . . . . . . . 16  |-  ( ( P  e.  Prime  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
38373expa 1193 . . . . . . . . . . . . . . 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 11906 . . . . . . . . . . . . . . . 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 2174 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  ( ( P ^ K )  gcd  x )  =  1 ) )
45 coprm 12076 . . . . . . . . . . . . . . 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 9196 . . . . . . . . . . . . . . . . 17  |-  ( x  e.  ZZ  ->  x  e.  CC )
4948adantl 275 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  CC )
5049subid1d 8198 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  - 
0 )  =  x )
5150breq2d 3994 . . . . . . . . . . . . . 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 2539 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )  -.  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) )
59 rabeq0 3438 . . . . . . . 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 2211 . . . . . 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 10718 . . . . . 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 1228 . . . . 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 3393 . . . . . . . 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 11901 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  NN0 )
7069nn0zd 9311 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  ZZ )
71 1zzd 9218 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  1  e.  ZZ )
72 zdceq 9266 . . . . . . . . . . . . 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 2539 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) ) ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) ) )
78 rabid2 2642 . . . . . . . . 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 2218 . . . . . . 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 5490 . . . . . 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 9167 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e. 
NN0 )
83 hashfz1 10696 . . . . . . 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 10483 . . . . . . 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 2202 . . . . 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 10694 . . . . . . . 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 9169 . . . . . 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 9500 . . . . . . . . . . 11  |-  NN0  =  ( ZZ>= `  0 )
93 1m1e0 8926 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
9493fveq2i 5489 . . . . . . . . . . 11  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
9592, 94eqtr4i 2189 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
9682, 95eleqtrdi 2259 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ( ZZ>= `  ( 1  -  1 ) ) )
97 0zd 9203 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  0  e.  ZZ )
9891, 21, 96, 97hashdvds 12153 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( ( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) ) )
994nncnd 8871 . . . . . . . . . . . . . 14  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  CC )
10099subid1d 8198 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ K
)  -  0 )  =  ( P ^ K ) )
101100oveq1d 5857 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( ( P ^ K )  /  P ) )
10291nnap0d 8903 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P #  0 )
103 nnz 9210 . . . . . . . . . . . . . 14  |-  ( K  e.  NN  ->  K  e.  ZZ )
104103adantl 275 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  K  e.  ZZ )
10512, 102, 104expm1apd 10598 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  =  ( ( P ^ K )  /  P
) )
106101, 105eqtr4d 2201 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( P ^
( K  -  1 ) ) )
107106fveq2d 5490 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( |_ `  ( P ^ ( K  - 
1 ) ) ) )
1089nnzd 9312 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  ZZ )
109 flid 10219 . . . . . . . . . . 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 2198 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( P ^ ( K  -  1 ) ) )
11293oveq1i 5852 . . . . . . . . . . . . . 14  |-  ( ( 1  -  1 )  -  0 )  =  ( 0  -  0 )
113 0m0e0 8969 . . . . . . . . . . . . . 14  |-  ( 0  -  0 )  =  0
114112, 113eqtri 2186 . . . . . . . . . . . . 13  |-  ( ( 1  -  1 )  -  0 )  =  0
115114oveq1i 5852 . . . . . . . . . . . 12  |-  ( ( ( 1  -  1 )  -  0 )  /  P )  =  ( 0  /  P
)
11612, 102div0apd 8683 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
0  /  P )  =  0 )
117115, 116syl5eq 2211 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( 1  -  1 )  -  0 )  /  P )  =  0 )
118117fveq2d 5490 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  ( |_ `  0
) )
119 0z 9202 . . . . . . . . . . 11  |-  0  e.  ZZ
120 flid 10219 . . . . . . . . . . 11  |-  ( 0  e.  ZZ  ->  ( |_ `  0 )  =  0 )
121119, 120ax-mp 5 . . . . . . . . . 10  |-  ( |_
`  0 )  =  0
122118, 121eqtrdi 2215 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  0 )
123111, 122oveq12d 5860 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) )  =  ( ( P ^ ( K  - 
1 ) )  - 
0 ) )
12410subid1d 8198 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  -  0 )  =  ( P ^
( K  -  1 ) ) )
12598, 123, 1243eqtrd 2202 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( P ^ ( K  -  1 ) ) )
126125oveq2d 5858 . . . . . 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 8055 . . . . 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 2207 . . . 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 7919 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  P )  e.  CC )
130129, 10, 90subaddd 8227 . . . 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 2203 . 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 2198 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 1343    e. wcel 2136   A.wral 2444   {crab 2448    u. cun 3114    i^i cin 3115   (/)c0 3409   class class class wbr 3982   ` cfv 5188  (class class class)co 5842   Fincfn 6706   CCcc 7751   0cc0 7753   1c1 7754    + caddc 7756    x. cmul 7758    - cmin 8069    / cdiv 8568   NNcn 8857   NN0cn0 9114   ZZcz 9191   ZZ>=cuz 9466   ...cfz 9944   |_cfl 10203   ^cexp 10454  ♯chash 10688    || cdvds 11727    gcd cgcd 11875   Primecprime 12039   phicphi 12141
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 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-coll 4097  ax-sep 4100  ax-nul 4108  ax-pow 4153  ax-pr 4187  ax-un 4411  ax-setind 4514  ax-iinf 4565  ax-cnex 7844  ax-resscn 7845  ax-1cn 7846  ax-1re 7847  ax-icn 7848  ax-addcl 7849  ax-addrcl 7850  ax-mulcl 7851  ax-mulrcl 7852  ax-addcom 7853  ax-mulcom 7854  ax-addass 7855  ax-mulass 7856  ax-distr 7857  ax-i2m1 7858  ax-0lt1 7859  ax-1rid 7860  ax-0id 7861  ax-rnegex 7862  ax-precex 7863  ax-cnre 7864  ax-pre-ltirr 7865  ax-pre-ltwlin 7866  ax-pre-lttrn 7867  ax-pre-apti 7868  ax-pre-ltadd 7869  ax-pre-mulgt0 7870  ax-pre-mulext 7871  ax-arch 7872  ax-caucvg 7873
This theorem depends on definitions:  df-bi 116  df-stab 821  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2297  df-ne 2337  df-nel 2432  df-ral 2449  df-rex 2450  df-reu 2451  df-rmo 2452  df-rab 2453  df-v 2728  df-sbc 2952  df-csb 3046  df-dif 3118  df-un 3120  df-in 3122  df-ss 3129  df-nul 3410  df-if 3521  df-pw 3561  df-sn 3582  df-pr 3583  df-op 3585  df-uni 3790  df-int 3825  df-iun 3868  df-br 3983  df-opab 4044  df-mpt 4045  df-tr 4081  df-id 4271  df-po 4274  df-iso 4275  df-iord 4344  df-on 4346  df-ilim 4347  df-suc 4349  df-iom 4568  df-xp 4610  df-rel 4611  df-cnv 4612  df-co 4613  df-dm 4614  df-rn 4615  df-res 4616  df-ima 4617  df-iota 5153  df-fun 5190  df-fn 5191  df-f 5192  df-f1 5193  df-fo 5194  df-f1o 5195  df-fv 5196  df-riota 5798  df-ov 5845  df-oprab 5846  df-mpo 5847  df-1st 6108  df-2nd 6109  df-recs 6273  df-irdg 6338  df-frec 6359  df-1o 6384  df-2o 6385  df-oadd 6388  df-er 6501  df-en 6707  df-dom 6708  df-fin 6709  df-sup 6949  df-pnf 7935  df-mnf 7936  df-xr 7937  df-ltxr 7938  df-le 7939  df-sub 8071  df-neg 8072  df-reap 8473  df-ap 8480  df-div 8569  df-inn 8858  df-2 8916  df-3 8917  df-4 8918  df-n0 9115  df-z 9192  df-uz 9467  df-q 9558  df-rp 9590  df-fz 9945  df-fzo 10078  df-fl 10205  df-mod 10258  df-seqfrec 10381  df-exp 10455  df-ihash 10689  df-cj 10784  df-re 10785  df-im 10786  df-rsqrt 10940  df-abs 10941  df-dvds 11728  df-gcd 11876  df-prm 12040  df-phi 12143
This theorem is referenced by:  phiprm  12155
  Copyright terms: Public domain W3C validator