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

Theorem phival 13076
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 6021 . . . 4  |-  ( n  =  N  ->  (
1 ... n )  =  ( 1 ... N
) )
2 oveq2 6021 . . . . 5  |-  ( n  =  N  ->  (
x  gcd  n )  =  ( x  gcd  N ) )
32eqeq1d 2388 . . . 4  |-  ( n  =  N  ->  (
( x  gcd  n
)  =  1  <->  (
x  gcd  N )  =  1 ) )
41, 3rabeqbidv 2887 . . 3  |-  ( n  =  N  ->  { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 }  =  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } )
54fveq2d 5665 . 2  |-  ( n  =  N  ->  ( # `
 { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 } )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
6 df-phi 13075 . 2  |-  phi  =  ( n  e.  NN  |->  ( # `  { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 } ) )
7 fvex 5675 . 2  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  _V
85, 6, 7fvmpt 5738 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 1649    e. wcel 1717   {crab 2646   ` cfv 5387  (class class class)co 6013   1c1 8917   NNcn 9925   ...cfz 10968   #chash 11538    gcd cgcd 12926   phicphi 13073
This theorem is referenced by:  phicl2  13077  phibnd  13080  dfphi2  13083  phiprmpw  13085
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2361  ax-sep 4264  ax-nul 4272  ax-pr 4337
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2235  df-mo 2236  df-clab 2367  df-cleq 2373  df-clel 2376  df-nfc 2505  df-ne 2545  df-ral 2647  df-rex 2648  df-rab 2651  df-v 2894  df-sbc 3098  df-dif 3259  df-un 3261  df-in 3263  df-ss 3270  df-nul 3565  df-if 3676  df-sn 3756  df-pr 3757  df-op 3759  df-uni 3951  df-br 4147  df-opab 4201  df-mpt 4202  df-id 4432  df-xp 4817  df-rel 4818  df-cnv 4819  df-co 4820  df-dm 4821  df-iota 5351  df-fun 5389  df-fv 5395  df-ov 6016  df-phi 13075
  Copyright terms: Public domain W3C validator