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

Theorem phiprmpw 12176
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 12064 . . . 4  |-  ( P  e.  Prime  ->  P  e.  NN )
2 nnnn0 9142 . . . 4  |-  ( K  e.  NN  ->  K  e.  NN0 )
3 nnexpcl 10489 . . . 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 12167 . . 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 9176 . . . . . 6  |-  ( K  e.  NN  ->  ( K  -  1 )  e.  NN0 )
8 nnexpcl 10489 . . . . . 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 8892 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  CC )
111nncnd 8892 . . . . 5  |-  ( P  e.  Prime  ->  P  e.  CC )
1211adantr 274 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  CC )
13 ax-1cn 7867 . . . . 5  |-  1  e.  CC
14 subdi 8304 . . . . 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 1321 . . . 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 7937 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  1 )  =  ( P ^
( K  -  1 ) ) )
1817oveq2d 5869 . . 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 12166 . . . . . . 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 9239 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  1  e.  ZZ )
22 prmz 12065 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  ZZ )
23 zexpcl 10491 . . . . . . . . 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 10387 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
1 ... ( P ^ K ) )  e. 
Fin )
2622ad2antrr 485 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  P  e.  ZZ )
27 elfzelz 9981 . . . . . . . . . . 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 9224 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  0  e.  ZZ )
3028, 29zsubcld 9339 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  -  0 )  e.  ZZ )
31 zdvdsdc 11774 . . . . . . . . 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 2543 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )DECID  P 
||  ( x  - 
0 ) )
3425, 33ssfirab 6911 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) }  e.  Fin )
35 inrab 3399 . . . . . . 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 12107 . . . . . . . . . . . . . . . . 17  |-  ( ( P  e.  ZZ  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
3722, 36syl3an1 1266 . . . . . . . . . . . . . . . 16  |-  ( ( P  e.  Prime  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
38373expa 1198 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  x  e.  ZZ )  /\  K  e.  NN )  ->  ( ( ( P ^ K )  gcd  x )  =  1  <->  ( P  gcd  x )  =  1 ) )
3938an32s 563 . . . . . . . . . . . . . 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 11928 . . . . . . . . . . . . . . . 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 2179 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  ( ( P ^ K )  gcd  x )  =  1 ) )
45 coprm 12098 . . . . . . . . . . . . . . 15  |-  ( ( P  e.  Prime  /\  x  e.  ZZ )  ->  ( -.  P  ||  x  <->  ( P  gcd  x )  =  1 ) )
4645adantlr 474 . . . . . . . . . . . . . 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 9217 . . . . . . . . . . . . . . . . 17  |-  ( x  e.  ZZ  ->  x  e.  CC )
4948adantl 275 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  CC )
5049subid1d 8219 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  - 
0 )  =  x )
5150breq2d 4001 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( P  ||  ( x  -  0
)  <->  P  ||  x ) )
5251notbid 662 . . . . . . . . . . . . 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 685 . . . . . . . . . 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 2543 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )  -.  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) )
59 rabeq0 3444 . . . . . . . 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, 60eqtrid 2215 . . . . . 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 10740 . . . . . 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 1233 . . . . 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 3398 . . . . . . . 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 851 . . . . . . . . . . . 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 11923 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  NN0 )
7069nn0zd 9332 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( x  gcd  ( P ^ K
) )  e.  ZZ )
71 1zzd 9239 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  1  e.  ZZ )
72 zdceq 9287 . . . . . . . . . . . . 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 887 . . . . . . . . . . . 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 2543 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) ) ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) ) )
78 rabid2 2646 . . . . . . . . 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 2222 . . . . . . 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 5500 . . . . . 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 9188 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e. 
NN0 )
83 hashfz1 10717 . . . . . . 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 10504 . . . . . . 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 2207 . . . . 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 10715 . . . . . . . 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 9190 . . . . . 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 9521 . . . . . . . . . . 11  |-  NN0  =  ( ZZ>= `  0 )
93 1m1e0 8947 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
9493fveq2i 5499 . . . . . . . . . . 11  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
9592, 94eqtr4i 2194 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
9682, 95eleqtrdi 2263 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ( ZZ>= `  ( 1  -  1 ) ) )
97 0zd 9224 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  0  e.  ZZ )
9891, 21, 96, 97hashdvds 12175 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( ( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) ) )
994nncnd 8892 . . . . . . . . . . . . . 14  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  CC )
10099subid1d 8219 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ K
)  -  0 )  =  ( P ^ K ) )
101100oveq1d 5868 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( ( P ^ K )  /  P ) )
10291nnap0d 8924 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P #  0 )
103 nnz 9231 . . . . . . . . . . . . . 14  |-  ( K  e.  NN  ->  K  e.  ZZ )
104103adantl 275 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  K  e.  ZZ )
10512, 102, 104expm1apd 10619 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  =  ( ( P ^ K )  /  P
) )
106101, 105eqtr4d 2206 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( P ^
( K  -  1 ) ) )
107106fveq2d 5500 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( |_ `  ( P ^ ( K  - 
1 ) ) ) )
1089nnzd 9333 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  ZZ )
109 flid 10240 . . . . . . . . . . 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 2203 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( P ^ ( K  -  1 ) ) )
11293oveq1i 5863 . . . . . . . . . . . . . 14  |-  ( ( 1  -  1 )  -  0 )  =  ( 0  -  0 )
113 0m0e0 8990 . . . . . . . . . . . . . 14  |-  ( 0  -  0 )  =  0
114112, 113eqtri 2191 . . . . . . . . . . . . 13  |-  ( ( 1  -  1 )  -  0 )  =  0
115114oveq1i 5863 . . . . . . . . . . . 12  |-  ( ( ( 1  -  1 )  -  0 )  /  P )  =  ( 0  /  P
)
11612, 102div0apd 8704 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
0  /  P )  =  0 )
117115, 116eqtrid 2215 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( 1  -  1 )  -  0 )  /  P )  =  0 )
118117fveq2d 5500 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  ( |_ `  0
) )
119 0z 9223 . . . . . . . . . . 11  |-  0  e.  ZZ
120 flid 10240 . . . . . . . . . . 11  |-  ( 0  e.  ZZ  ->  ( |_ `  0 )  =  0 )
121119, 120ax-mp 5 . . . . . . . . . 10  |-  ( |_
`  0 )  =  0
122118, 121eqtrdi 2219 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  0 )
123111, 122oveq12d 5871 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) )  =  ( ( P ^ ( K  - 
1 ) )  - 
0 ) )
12410subid1d 8219 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  -  0 )  =  ( P ^
( K  -  1 ) ) )
12598, 123, 1243eqtrd 2207 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( `  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( P ^ ( K  -  1 ) ) )
126125oveq2d 5869 . . . . . 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 8076 . . . . 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 2212 . . . 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 7940 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  P )  e.  CC )
130129, 10, 90subaddd 8248 . . . 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 2208 . 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 2203 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 703  DECID wdc 829    = wceq 1348    e. wcel 2141   A.wral 2448   {crab 2452    u. cun 3119    i^i cin 3120   (/)c0 3414   class class class wbr 3989   ` cfv 5198  (class class class)co 5853   Fincfn 6718   CCcc 7772   0cc0 7774   1c1 7775    + caddc 7777    x. cmul 7779    - cmin 8090    / cdiv 8589   NNcn 8878   NN0cn0 9135   ZZcz 9212   ZZ>=cuz 9487   ...cfz 9965   |_cfl 10224   ^cexp 10475  ♯chash 10709    || cdvds 11749    gcd cgcd 11897   Primecprime 12061   phicphi 12163
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 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-coll 4104  ax-sep 4107  ax-nul 4115  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-iinf 4572  ax-cnex 7865  ax-resscn 7866  ax-1cn 7867  ax-1re 7868  ax-icn 7869  ax-addcl 7870  ax-addrcl 7871  ax-mulcl 7872  ax-mulrcl 7873  ax-addcom 7874  ax-mulcom 7875  ax-addass 7876  ax-mulass 7877  ax-distr 7878  ax-i2m1 7879  ax-0lt1 7880  ax-1rid 7881  ax-0id 7882  ax-rnegex 7883  ax-precex 7884  ax-cnre 7885  ax-pre-ltirr 7886  ax-pre-ltwlin 7887  ax-pre-lttrn 7888  ax-pre-apti 7889  ax-pre-ltadd 7890  ax-pre-mulgt0 7891  ax-pre-mulext 7892  ax-arch 7893  ax-caucvg 7894
This theorem depends on definitions:  df-bi 116  df-stab 826  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rmo 2456  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-tr 4088  df-id 4278  df-po 4281  df-iso 4282  df-iord 4351  df-on 4353  df-ilim 4354  df-suc 4356  df-iom 4575  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-f1 5203  df-fo 5204  df-f1o 5205  df-fv 5206  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-1st 6119  df-2nd 6120  df-recs 6284  df-irdg 6349  df-frec 6370  df-1o 6395  df-2o 6396  df-oadd 6399  df-er 6513  df-en 6719  df-dom 6720  df-fin 6721  df-sup 6961  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960  df-sub 8092  df-neg 8093  df-reap 8494  df-ap 8501  df-div 8590  df-inn 8879  df-2 8937  df-3 8938  df-4 8939  df-n0 9136  df-z 9213  df-uz 9488  df-q 9579  df-rp 9611  df-fz 9966  df-fzo 10099  df-fl 10226  df-mod 10279  df-seqfrec 10402  df-exp 10476  df-ihash 10710  df-cj 10806  df-re 10807  df-im 10808  df-rsqrt 10962  df-abs 10963  df-dvds 11750  df-gcd 11898  df-prm 12062  df-phi 12165
This theorem is referenced by:  phiprm  12177
  Copyright terms: Public domain W3C validator