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

Theorem phival 16096
Description: Value of the Euler ϕ function. (Contributed by Mario Carneiro, 23-Feb-2014.)
Assertion
Ref Expression
phival (𝑁 ∈ ℕ → (ϕ‘𝑁) = (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}))
Distinct variable group:   𝑥,𝑁

Proof of Theorem phival
Dummy variable 𝑛 is distinct from all other variables.
StepHypRef Expression
1 oveq2 7156 . . . 4 (𝑛 = 𝑁 → (1...𝑛) = (1...𝑁))
2 oveq2 7156 . . . . 5 (𝑛 = 𝑁 → (𝑥 gcd 𝑛) = (𝑥 gcd 𝑁))
32eqeq1d 2821 . . . 4 (𝑛 = 𝑁 → ((𝑥 gcd 𝑛) = 1 ↔ (𝑥 gcd 𝑁) = 1))
41, 3rabeqbidv 3484 . . 3 (𝑛 = 𝑁 → {𝑥 ∈ (1...𝑛) ∣ (𝑥 gcd 𝑛) = 1} = {𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1})
54fveq2d 6667 . 2 (𝑛 = 𝑁 → (♯‘{𝑥 ∈ (1...𝑛) ∣ (𝑥 gcd 𝑛) = 1}) = (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}))
6 df-phi 16095 . 2 ϕ = (𝑛 ∈ ℕ ↦ (♯‘{𝑥 ∈ (1...𝑛) ∣ (𝑥 gcd 𝑛) = 1}))
7 fvex 6676 . 2 (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}) ∈ V
85, 6, 7fvmpt 6761 1 (𝑁 ∈ ℕ → (ϕ‘𝑁) = (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}))
Colors of variables: wff setvar class
Syntax hints:  wi 4   = wceq 1531  wcel 2108  {crab 3140  cfv 6348  (class class class)co 7148  1c1 10530  cn 11630  ...cfz 12884  chash 13682   gcd cgcd 15835  ϕcphi 16093
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1790  ax-4 1804  ax-5 1905  ax-6 1964  ax-7 2009  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2154  ax-12 2170  ax-ext 2791  ax-sep 5194  ax-nul 5201  ax-pr 5320
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1084  df-tru 1534  df-ex 1775  df-nf 1779  df-sb 2064  df-mo 2616  df-eu 2648  df-clab 2798  df-cleq 2812  df-clel 2891  df-nfc 2961  df-ral 3141  df-rex 3142  df-rab 3145  df-v 3495  df-sbc 3771  df-dif 3937  df-un 3939  df-in 3941  df-ss 3950  df-nul 4290  df-if 4466  df-sn 4560  df-pr 4562  df-op 4566  df-uni 4831  df-br 5058  df-opab 5120  df-mpt 5138  df-id 5453  df-xp 5554  df-rel 5555  df-cnv 5556  df-co 5557  df-dm 5558  df-iota 6307  df-fun 6350  df-fv 6356  df-ov 7151  df-phi 16095
This theorem is referenced by:  phicl2  16097  phibnd  16100  dfphi2  16103  phiprmpw  16105
  Copyright terms: Public domain W3C validator