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

Theorem phival 13149
Description: Value of the Euler  phi function. (Contributed by Mario Carneiro, 23-Feb-2014.)
Assertion
Ref Expression
phival  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
Distinct variable group:    x, N

Proof of Theorem phival
Dummy variable  n is distinct from all other variables.
StepHypRef Expression
1 oveq2 6082 . . . 4  |-  ( n  =  N  ->  (
1 ... n )  =  ( 1 ... N
) )
2 oveq2 6082 . . . . 5  |-  ( n  =  N  ->  (
x  gcd  n )  =  ( x  gcd  N ) )
32eqeq1d 2444 . . . 4  |-  ( n  =  N  ->  (
( x  gcd  n
)  =  1  <->  (
x  gcd  N )  =  1 ) )
41, 3rabeqbidv 2944 . . 3  |-  ( n  =  N  ->  { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 }  =  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } )
54fveq2d 5725 . 2  |-  ( n  =  N  ->  ( # `
 { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 } )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
6 df-phi 13148 . 2  |-  phi  =  ( n  e.  NN  |->  ( # `  { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 } ) )
7 fvex 5735 . 2  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  _V
85, 6, 7fvmpt 5799 1  |-  ( N  e.  NN  ->  ( phi `  N )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    = wceq 1652    e. wcel 1725   {crab 2702   ` cfv 5447  (class class class)co 6074   1c1 8984   NNcn 9993   ...cfz 11036   #chash 11611    gcd cgcd 12999   phicphi 13146
This theorem is referenced by:  phicl2  13150  phibnd  13153  dfphi2  13156  phiprmpw  13158
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4323  ax-nul 4331  ax-pr 4396
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-ral 2703  df-rex 2704  df-rab 2707  df-v 2951  df-sbc 3155  df-dif 3316  df-un 3318  df-in 3320  df-ss 3327  df-nul 3622  df-if 3733  df-sn 3813  df-pr 3814  df-op 3816  df-uni 4009  df-br 4206  df-opab 4260  df-mpt 4261  df-id 4491  df-xp 4877  df-rel 4878  df-cnv 4879  df-co 4880  df-dm 4881  df-iota 5411  df-fun 5449  df-fv 5455  df-ov 6077  df-phi 13148
  Copyright terms: Public domain W3C validator