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

Theorem phival 16696
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 7409 . . . 4 (𝑛 = 𝑁 → (1...𝑛) = (1...𝑁))
2 oveq2 7409 . . . . 5 (𝑛 = 𝑁 → (𝑥 gcd 𝑛) = (𝑥 gcd 𝑁))
32eqeq1d 2726 . . . 4 (𝑛 = 𝑁 → ((𝑥 gcd 𝑛) = 1 ↔ (𝑥 gcd 𝑁) = 1))
41, 3rabeqbidv 3441 . . 3 (𝑛 = 𝑁 → {𝑥 ∈ (1...𝑛) ∣ (𝑥 gcd 𝑛) = 1} = {𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1})
54fveq2d 6885 . 2 (𝑛 = 𝑁 → (♯‘{𝑥 ∈ (1...𝑛) ∣ (𝑥 gcd 𝑛) = 1}) = (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}))
6 df-phi 16695 . 2 ϕ = (𝑛 ∈ ℕ ↦ (♯‘{𝑥 ∈ (1...𝑛) ∣ (𝑥 gcd 𝑛) = 1}))
7 fvex 6894 . 2 (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}) ∈ V
85, 6, 7fvmpt 6988 1 (𝑁 ∈ ℕ → (ϕ‘𝑁) = (♯‘{𝑥 ∈ (1...𝑁) ∣ (𝑥 gcd 𝑁) = 1}))
Colors of variables: wff setvar class
Syntax hints:  wi 4   = wceq 1533  wcel 2098  {crab 3424  cfv 6533  (class class class)co 7401  1c1 11106  cn 12208  ...cfz 13480  chash 14286   gcd cgcd 16431  ϕcphi 16693
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1905  ax-6 1963  ax-7 2003  ax-8 2100  ax-9 2108  ax-10 2129  ax-11 2146  ax-12 2163  ax-ext 2695  ax-sep 5289  ax-nul 5296  ax-pr 5417
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 845  df-3an 1086  df-tru 1536  df-fal 1546  df-ex 1774  df-nf 1778  df-sb 2060  df-mo 2526  df-eu 2555  df-clab 2702  df-cleq 2716  df-clel 2802  df-nfc 2877  df-ne 2933  df-ral 3054  df-rex 3063  df-rab 3425  df-v 3468  df-dif 3943  df-un 3945  df-in 3947  df-ss 3957  df-nul 4315  df-if 4521  df-sn 4621  df-pr 4623  df-op 4627  df-uni 4900  df-br 5139  df-opab 5201  df-mpt 5222  df-id 5564  df-xp 5672  df-rel 5673  df-cnv 5674  df-co 5675  df-dm 5676  df-iota 6485  df-fun 6535  df-fv 6541  df-ov 7404  df-phi 16695
This theorem is referenced by:  phicl2  16697  phibnd  16700  dfphi2  16703  phiprmpw  16705
  Copyright terms: Public domain W3C validator