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

Theorem phiprmpw 12844
Description: Value of the Euler  phi function at a prime power. (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 12761 . . . 4  |-  ( P  e.  Prime  ->  P  e.  NN )
2 nnnn0 9972 . . . 4  |-  ( K  e.  NN  ->  K  e.  NN0 )
3 nnexpcl 11116 . . . 4  |-  ( ( P  e.  NN  /\  K  e.  NN0 )  -> 
( P ^ K
)  e.  NN )
41, 2, 3syl2an 463 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  NN )
5 phival 12835 . . 3  |-  ( ( P ^ K )  e.  NN  ->  ( phi `  ( P ^ K ) )  =  ( # `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )
64, 5syl 15 . 2  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( phi `  ( P ^ K ) )  =  ( # `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) )
7 nnm1nn0 10005 . . . . . 6  |-  ( K  e.  NN  ->  ( K  -  1 )  e.  NN0 )
8 nnexpcl 11116 . . . . . 6  |-  ( ( P  e.  NN  /\  ( K  -  1
)  e.  NN0 )  ->  ( P ^ ( K  -  1 ) )  e.  NN )
91, 7, 8syl2an 463 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  NN )
109nncnd 9762 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  CC )
111nncnd 9762 . . . . 5  |-  ( P  e.  Prime  ->  P  e.  CC )
1211adantr 451 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  CC )
13 ax-1cn 8795 . . . . 5  |-  1  e.  CC
14 subdi 9213 . . . . 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 1266 . . . 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 642 . . 3  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  ( P  -  1 ) )  =  ( ( ( P ^ ( K  -  1 ) )  x.  P )  -  ( ( P ^
( K  -  1 ) )  x.  1 ) ) )
1710mulid1d 8852 . . . 4  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  1 )  =  ( P ^
( K  -  1 ) ) )
1817oveq2d 5874 . . 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 inrab 3440 . . . . . . 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
) ) }
20 elfzelz 10798 . . . . . . . . . . . 12  |-  ( x  e.  ( 1 ... ( P ^ K
) )  ->  x  e.  ZZ )
21 prmz 12762 . . . . . . . . . . . . . . . . 17  |-  ( P  e.  Prime  ->  P  e.  ZZ )
22 rpexp 12799 . . . . . . . . . . . . . . . . 17  |-  ( ( P  e.  ZZ  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
2321, 22syl3an1 1215 . . . . . . . . . . . . . . . 16  |-  ( ( P  e.  Prime  /\  x  e.  ZZ  /\  K  e.  NN )  ->  (
( ( P ^ K )  gcd  x
)  =  1  <->  ( P  gcd  x )  =  1 ) )
24233expa 1151 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  x  e.  ZZ )  /\  K  e.  NN )  ->  ( ( ( P ^ K )  gcd  x )  =  1  <->  ( P  gcd  x )  =  1 ) )
2524an32s 779 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( ( P ^ K )  gcd  x )  =  1  <->  ( P  gcd  x )  =  1 ) )
26 simpr 447 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  ZZ )
27 zexpcl 11118 . . . . . . . . . . . . . . . . . 18  |-  ( ( P  e.  ZZ  /\  K  e.  NN0 )  -> 
( P ^ K
)  e.  ZZ )
2821, 2, 27syl2an 463 . . . . . . . . . . . . . . . . 17  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ZZ )
2928adantr 451 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( P ^ K )  e.  ZZ )
30 gcdcom 12699 . . . . . . . . . . . . . . . 16  |-  ( ( x  e.  ZZ  /\  ( P ^ K )  e.  ZZ )  -> 
( x  gcd  ( P ^ K ) )  =  ( ( P ^ K )  gcd  x ) )
3126, 29, 30syl2anc 642 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  gcd  ( P ^ K ) )  =  ( ( P ^ K )  gcd  x ) )
3231eqeq1d 2291 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  ( ( P ^ K )  gcd  x )  =  1 ) )
33 coprm 12779 . . . . . . . . . . . . . . 15  |-  ( ( P  e.  Prime  /\  x  e.  ZZ )  ->  ( -.  P  ||  x  <->  ( P  gcd  x )  =  1 ) )
3433adantlr 695 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( -.  P  ||  x  <->  ( P  gcd  x )  =  1 ) )
3525, 32, 343bitr4d 276 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  -.  P  ||  x
) )
36 zcn 10029 . . . . . . . . . . . . . . . . 17  |-  ( x  e.  ZZ  ->  x  e.  CC )
3736adantl 452 . . . . . . . . . . . . . . . 16  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  x  e.  CC )
3837subid1d 9146 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( x  - 
0 )  =  x )
3938breq2d 4035 . . . . . . . . . . . . . 14  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( P  ||  ( x  -  0
)  <->  P  ||  x ) )
4039notbid 285 . . . . . . . . . . . . 13  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( -.  P  ||  ( x  -  0 )  <->  -.  P  ||  x
) )
4135, 40bitr4d 247 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ZZ )  ->  ( ( x  gcd  ( P ^ K ) )  =  1  <->  -.  P  ||  (
x  -  0 ) ) )
4220, 41sylan2 460 . . . . . . . . . . 11  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  <->  -.  P  ||  (
x  -  0 ) ) )
4342biimpd 198 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  ->  -.  P  ||  ( x  -  0 ) ) )
44 imnan 411 . . . . . . . . . 10  |-  ( ( ( x  gcd  ( P ^ K ) )  =  1  ->  -.  P  ||  ( x  - 
0 ) )  <->  -.  (
( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0 ) ) )
4543, 44sylib 188 . . . . . . . . 9  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  -.  (
( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0 ) ) )
4645ralrimiva 2626 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) )  -.  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) )
47 rabeq0 3476 . . . . . . . 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
) ) )
4846, 47sylibr 203 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  /\  P  ||  ( x  -  0
) ) }  =  (/) )
4919, 48syl5eq 2327 . . . . . 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 ) } )  =  (/) )
50 fzfi 11034 . . . . . . . 8  |-  ( 1 ... ( P ^ K ) )  e. 
Fin
51 ssrab2 3258 . . . . . . . 8  |-  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } 
C_  ( 1 ... ( P ^ K
) )
52 ssfi 7083 . . . . . . . 8  |-  ( ( ( 1 ... ( P ^ K ) )  e.  Fin  /\  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  C_  ( 1 ... ( P ^ K ) ) )  ->  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin )
5350, 51, 52mp2an 653 . . . . . . 7  |-  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin
54 ssrab2 3258 . . . . . . . 8  |-  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) }  C_  ( 1 ... ( P ^ K ) )
55 ssfi 7083 . . . . . . . 8  |-  ( ( ( 1 ... ( P ^ K ) )  e.  Fin  /\  {
x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) } 
C_  ( 1 ... ( P ^ K
) ) )  ->  { x  e.  (
1 ... ( P ^ K ) )  |  P  ||  ( x  -  0 ) }  e.  Fin )
5650, 54, 55mp2an 653 . . . . . . 7  |-  { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) }  e.  Fin
57 hashun 11364 . . . . . . 7  |-  ( ( { 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 ) } ) ) )
5853, 56, 57mp3an12 1267 . . . . . 6  |-  ( ( { 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 ) } ) ) )
5949, 58syl 15 . . . . 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 ) } ) ) )
6042biimprd 214 . . . . . . . . . . . 12  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( -.  P  ||  ( x  - 
0 )  ->  (
x  gcd  ( P ^ K ) )  =  1 ) )
6160con1d 116 . . . . . . . . . . 11  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( -.  ( x  gcd  ( P ^ K ) )  =  1  ->  P  ||  ( x  -  0 ) ) )
6261orrd 367 . . . . . . . . . 10  |-  ( ( ( P  e.  Prime  /\  K  e.  NN )  /\  x  e.  ( 1 ... ( P ^ K ) ) )  ->  ( (
x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) )
6362ralrimiva 2626 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  A. x  e.  ( 1 ... ( P ^ K ) ) ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0 ) ) )
64 rabid2 2717 . . . . . . . . 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 ) ) )
6563, 64sylibr 203 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
1 ... ( P ^ K ) )  =  { x  e.  ( 1 ... ( P ^ K ) )  |  ( ( x  gcd  ( P ^ K ) )  =  1  \/  P  ||  ( x  -  0
) ) } )
66 unrab 3439 . . . . . . . 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
) ) }
6765, 66syl6reqr 2334 . . . . . . 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 ) ) )
6867fveq2d 5529 . . . . . 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 ) ) ) )
694nnnn0d 10018 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e. 
NN0 )
70 hashfz1 11345 . . . . . . 7  |-  ( ( P ^ K )  e.  NN0  ->  ( # `  ( 1 ... ( P ^ K ) ) )  =  ( P ^ K ) )
7169, 70syl 15 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( # `
 ( 1 ... ( P ^ K
) ) )  =  ( P ^ K
) )
72 expm1t 11130 . . . . . . 7  |-  ( ( P  e.  CC  /\  K  e.  NN )  ->  ( P ^ K
)  =  ( ( P ^ ( K  -  1 ) )  x.  P ) )
7311, 72sylan 457 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  =  ( ( P ^
( K  -  1 ) )  x.  P
) )
7468, 71, 733eqtrd 2319 . . . . 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
) )
751adantr 451 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  e.  NN )
76 1z 10053 . . . . . . . . . 10  |-  1  e.  ZZ
7776a1i 10 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  1  e.  ZZ )
78 nn0uz 10262 . . . . . . . . . . 11  |-  NN0  =  ( ZZ>= `  0 )
7913subidi 9117 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
8079fveq2i 5528 . . . . . . . . . . 11  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
8178, 80eqtr4i 2306 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
8269, 81syl6eleq 2373 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  ( ZZ>= `  ( 1  -  1 ) ) )
83 0z 10035 . . . . . . . . . 10  |-  0  e.  ZZ
8483a1i 10 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  0  e.  ZZ )
8575, 77, 82, 84hashdvds 12843 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( # `
 { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( ( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) ) )
864nncnd 9762 . . . . . . . . . . . . . 14  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ K )  e.  CC )
8786subid1d 9146 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ K
)  -  0 )  =  ( P ^ K ) )
8887oveq1d 5873 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( ( P ^ K )  /  P ) )
8975nnne0d 9790 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  P  =/=  0 )
90 nnz 10045 . . . . . . . . . . . . . 14  |-  ( K  e.  NN  ->  K  e.  ZZ )
9190adantl 452 . . . . . . . . . . . . 13  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  K  e.  ZZ )
9212, 89, 91expm1d 11255 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  =  ( ( P ^ K )  /  P
) )
9388, 92eqtr4d 2318 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( P ^ K )  -  0 )  /  P )  =  ( P ^
( K  -  1 ) ) )
9493fveq2d 5529 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( |_ `  ( P ^ ( K  - 
1 ) ) ) )
959nnzd 10116 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( P ^ ( K  - 
1 ) )  e.  ZZ )
96 flid 10939 . . . . . . . . . . 11  |-  ( ( P ^ ( K  -  1 ) )  e.  ZZ  ->  ( |_ `  ( P ^
( K  -  1 ) ) )  =  ( P ^ ( K  -  1 ) ) )
9795, 96syl 15 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( P ^
( K  -  1 ) ) )  =  ( P ^ ( K  -  1 ) ) )
9894, 97eqtrd 2315 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( P ^ K )  -  0 )  /  P ) )  =  ( P ^ ( K  -  1 ) ) )
9979oveq1i 5868 . . . . . . . . . . . . . 14  |-  ( ( 1  -  1 )  -  0 )  =  ( 0  -  0 )
100 0cn 8831 . . . . . . . . . . . . . . 15  |-  0  e.  CC
101100subidi 9117 . . . . . . . . . . . . . 14  |-  ( 0  -  0 )  =  0
10299, 101eqtri 2303 . . . . . . . . . . . . 13  |-  ( ( 1  -  1 )  -  0 )  =  0
103102oveq1i 5868 . . . . . . . . . . . 12  |-  ( ( ( 1  -  1 )  -  0 )  /  P )  =  ( 0  /  P
)
10412, 89div0d 9535 . . . . . . . . . . . 12  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
0  /  P )  =  0 )
105103, 104syl5eq 2327 . . . . . . . . . . 11  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( ( 1  -  1 )  -  0 )  /  P )  =  0 )
106105fveq2d 5529 . . . . . . . . . 10  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  ( |_ `  0
) )
107 flid 10939 . . . . . . . . . . 11  |-  ( 0  e.  ZZ  ->  ( |_ `  0 )  =  0 )
10883, 107ax-mp 8 . . . . . . . . . 10  |-  ( |_
`  0 )  =  0
109106, 108syl6eq 2331 . . . . . . . . 9  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( |_ `  ( ( ( 1  -  1 )  -  0 )  /  P ) )  =  0 )
11098, 109oveq12d 5876 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( |_ `  (
( ( P ^ K )  -  0 )  /  P ) )  -  ( |_
`  ( ( ( 1  -  1 )  -  0 )  /  P ) ) )  =  ( ( P ^ ( K  - 
1 ) )  - 
0 ) )
11110subid1d 9146 . . . . . . . 8  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  -  0 )  =  ( P ^
( K  -  1 ) ) )
11285, 110, 1113eqtrd 2319 . . . . . . 7  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( # `
 { x  e.  ( 1 ... ( P ^ K ) )  |  P  ||  (
x  -  0 ) } )  =  ( P ^ ( K  -  1 ) ) )
113112oveq2d 5874 . . . . . 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 ) ) ) )
114 hashcl 11350 . . . . . . . . 9  |-  ( { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 }  e.  Fin  ->  ( # `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  NN0 )
11553, 114ax-mp 8 . . . . . . . 8  |-  ( # `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  NN0
116115nn0cni 9977 . . . . . . 7  |-  ( # `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  CC
117 addcom 8998 . . . . . . 7  |-  ( ( ( # `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  CC  /\  ( P ^ ( K  - 
1 ) )  e.  CC )  ->  (
( # `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( P ^ ( K  - 
1 ) ) )  =  ( ( P ^ ( K  - 
1 ) )  +  ( # `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) ) )
118116, 10, 117sylancr 644 . . . . . 6  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( # `  { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  +  ( P ^ ( K  - 
1 ) ) )  =  ( ( P ^ ( K  - 
1 ) )  +  ( # `  {
x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } ) ) )
119113, 118eqtrd 2315 . . . . 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 } ) ) )
12059, 74, 1193eqtr3rd 2324 . . . 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 ) )
12110, 12mulcld 8855 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  (
( P ^ ( K  -  1 ) )  x.  P )  e.  CC )
122116a1i 10 . . . . 5  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( # `
 { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  e.  CC )
123121, 10, 122subaddd 9175 . . . 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 ) ) )
124120, 123mpbird 223 . . 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 } ) )
12516, 18, 1243eqtrrd 2320 . 2  |-  ( ( P  e.  Prime  /\  K  e.  NN )  ->  ( # `
 { x  e.  ( 1 ... ( P ^ K ) )  |  ( x  gcd  ( P ^ K ) )  =  1 } )  =  ( ( P ^ ( K  -  1 ) )  x.  ( P  - 
1 ) ) )
1266, 125eqtrd 2315 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    <-> wb 176    \/ wo 357    /\ wa 358    = wceq 1623    e. wcel 1684   A.wral 2543   {crab 2547    u. cun 3150    i^i cin 3151    C_ wss 3152   (/)c0 3455   class class class wbr 4023   ` cfv 5255  (class class class)co 5858   Fincfn 6863   CCcc 8735   0cc0 8737   1c1 8738    + caddc 8740    x. cmul 8742    - cmin 9037    / cdiv 9423   NNcn 9746   NN0cn0 9965   ZZcz 10024   ZZ>=cuz 10230   ...cfz 10782   |_cfl 10924   ^cexp 11104   #chash 11337    || cdivides 12531    gcd cgcd 12685   Primecprime 12758   phicphi 12832
This theorem is referenced by:  phiprm  12845
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-sup 7194  df-card 7572  df-cda 7794  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-n0 9966  df-z 10025  df-uz 10231  df-rp 10355  df-fz 10783  df-fl 10925  df-mod 10974  df-seq 11047  df-exp 11105  df-hash 11338  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-dvds 12532  df-gcd 12686  df-prm 12759  df-phi 12834
  Copyright terms: Public domain W3C validator