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

Theorem phival 12835
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 5866 . . . 4  |-  ( n  =  N  ->  (
1 ... n )  =  ( 1 ... N
) )
2 oveq2 5866 . . . . 5  |-  ( n  =  N  ->  (
x  gcd  n )  =  ( x  gcd  N ) )
32eqeq1d 2291 . . . 4  |-  ( n  =  N  ->  (
( x  gcd  n
)  =  1  <->  (
x  gcd  N )  =  1 ) )
41, 3rabeqbidv 2783 . . 3  |-  ( n  =  N  ->  { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 }  =  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } )
54fveq2d 5529 . 2  |-  ( n  =  N  ->  ( # `
 { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 } )  =  ( # `  {
x  e.  ( 1 ... N )  |  ( x  gcd  N
)  =  1 } ) )
6 df-phi 12834 . 2  |-  phi  =  ( n  e.  NN  |->  ( # `  { x  e.  ( 1 ... n
)  |  ( x  gcd  n )  =  1 } ) )
7 fvex 5539 . 2  |-  ( # `  { x  e.  ( 1 ... N )  |  ( x  gcd  N )  =  1 } )  e.  _V
85, 6, 7fvmpt 5602 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 1623    e. wcel 1684   {crab 2547   ` cfv 5255  (class class class)co 5858   1c1 8738   NNcn 9746   ...cfz 10782   #chash 11337    gcd cgcd 12685   phicphi 12832
This theorem is referenced by:  phicl2  12836  phibnd  12839  dfphi2  12842  phiprmpw  12844
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-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pr 4214
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  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-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-sn 3646  df-pr 3647  df-op 3649  df-uni 3828  df-br 4024  df-opab 4078  df-mpt 4079  df-id 4309  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-iota 5219  df-fun 5257  df-fv 5263  df-ov 5861  df-phi 12834
  Copyright terms: Public domain W3C validator