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

Theorem divalglem4 15494
Description: Lemma for divalg 15501. (Contributed by Paul Chapman, 21-Mar-2011.)
Hypotheses
Ref Expression
divalglem0.1 𝑁 ∈ ℤ
divalglem0.2 𝐷 ∈ ℤ
divalglem1.3 𝐷 ≠ 0
divalglem2.4 𝑆 = {𝑟 ∈ ℕ0𝐷 ∥ (𝑁𝑟)}
Assertion
Ref Expression
divalglem4 𝑆 = {𝑟 ∈ ℕ0 ∣ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑟)}
Distinct variable groups:   𝐷,𝑟   𝑁,𝑟   𝐷,𝑞,𝑟   𝑁,𝑞
Allowed substitution hints:   𝑆(𝑟,𝑞)

Proof of Theorem divalglem4
Dummy variable 𝑧 is distinct from all other variables.
StepHypRef Expression
1 divalglem0.2 . . . . . 6 𝐷 ∈ ℤ
2 divalglem0.1 . . . . . . 7 𝑁 ∈ ℤ
3 nn0z 11729 . . . . . . 7 (𝑧 ∈ ℕ0𝑧 ∈ ℤ)
4 zsubcl 11748 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑁𝑧) ∈ ℤ)
52, 3, 4sylancr 583 . . . . . 6 (𝑧 ∈ ℕ0 → (𝑁𝑧) ∈ ℤ)
6 divides 15360 . . . . . 6 ((𝐷 ∈ ℤ ∧ (𝑁𝑧) ∈ ℤ) → (𝐷 ∥ (𝑁𝑧) ↔ ∃𝑞 ∈ ℤ (𝑞 · 𝐷) = (𝑁𝑧)))
71, 5, 6sylancr 583 . . . . 5 (𝑧 ∈ ℕ0 → (𝐷 ∥ (𝑁𝑧) ↔ ∃𝑞 ∈ ℤ (𝑞 · 𝐷) = (𝑁𝑧)))
8 nn0cn 11630 . . . . . . . 8 (𝑧 ∈ ℕ0𝑧 ∈ ℂ)
9 zmulcl 11755 . . . . . . . . . 10 ((𝑞 ∈ ℤ ∧ 𝐷 ∈ ℤ) → (𝑞 · 𝐷) ∈ ℤ)
101, 9mpan2 684 . . . . . . . . 9 (𝑞 ∈ ℤ → (𝑞 · 𝐷) ∈ ℤ)
1110zcnd 11812 . . . . . . . 8 (𝑞 ∈ ℤ → (𝑞 · 𝐷) ∈ ℂ)
12 zcn 11710 . . . . . . . . . . 11 (𝑁 ∈ ℤ → 𝑁 ∈ ℂ)
132, 12ax-mp 5 . . . . . . . . . 10 𝑁 ∈ ℂ
14 subadd 10605 . . . . . . . . . 10 ((𝑁 ∈ ℂ ∧ 𝑧 ∈ ℂ ∧ (𝑞 · 𝐷) ∈ ℂ) → ((𝑁𝑧) = (𝑞 · 𝐷) ↔ (𝑧 + (𝑞 · 𝐷)) = 𝑁))
1513, 14mp3an1 1578 . . . . . . . . 9 ((𝑧 ∈ ℂ ∧ (𝑞 · 𝐷) ∈ ℂ) → ((𝑁𝑧) = (𝑞 · 𝐷) ↔ (𝑧 + (𝑞 · 𝐷)) = 𝑁))
16 addcom 10542 . . . . . . . . . 10 ((𝑧 ∈ ℂ ∧ (𝑞 · 𝐷) ∈ ℂ) → (𝑧 + (𝑞 · 𝐷)) = ((𝑞 · 𝐷) + 𝑧))
1716eqeq1d 2828 . . . . . . . . 9 ((𝑧 ∈ ℂ ∧ (𝑞 · 𝐷) ∈ ℂ) → ((𝑧 + (𝑞 · 𝐷)) = 𝑁 ↔ ((𝑞 · 𝐷) + 𝑧) = 𝑁))
1815, 17bitrd 271 . . . . . . . 8 ((𝑧 ∈ ℂ ∧ (𝑞 · 𝐷) ∈ ℂ) → ((𝑁𝑧) = (𝑞 · 𝐷) ↔ ((𝑞 · 𝐷) + 𝑧) = 𝑁))
198, 11, 18syl2an 591 . . . . . . 7 ((𝑧 ∈ ℕ0𝑞 ∈ ℤ) → ((𝑁𝑧) = (𝑞 · 𝐷) ↔ ((𝑞 · 𝐷) + 𝑧) = 𝑁))
20 eqcom 2833 . . . . . . 7 ((𝑁𝑧) = (𝑞 · 𝐷) ↔ (𝑞 · 𝐷) = (𝑁𝑧))
21 eqcom 2833 . . . . . . 7 (((𝑞 · 𝐷) + 𝑧) = 𝑁𝑁 = ((𝑞 · 𝐷) + 𝑧))
2219, 20, 213bitr3g 305 . . . . . 6 ((𝑧 ∈ ℕ0𝑞 ∈ ℤ) → ((𝑞 · 𝐷) = (𝑁𝑧) ↔ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
2322rexbidva 3260 . . . . 5 (𝑧 ∈ ℕ0 → (∃𝑞 ∈ ℤ (𝑞 · 𝐷) = (𝑁𝑧) ↔ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
247, 23bitrd 271 . . . 4 (𝑧 ∈ ℕ0 → (𝐷 ∥ (𝑁𝑧) ↔ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
2524pm5.32i 572 . . 3 ((𝑧 ∈ ℕ0𝐷 ∥ (𝑁𝑧)) ↔ (𝑧 ∈ ℕ0 ∧ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
26 oveq2 6914 . . . . 5 (𝑟 = 𝑧 → (𝑁𝑟) = (𝑁𝑧))
2726breq2d 4886 . . . 4 (𝑟 = 𝑧 → (𝐷 ∥ (𝑁𝑟) ↔ 𝐷 ∥ (𝑁𝑧)))
28 divalglem2.4 . . . 4 𝑆 = {𝑟 ∈ ℕ0𝐷 ∥ (𝑁𝑟)}
2927, 28elrab2 3590 . . 3 (𝑧𝑆 ↔ (𝑧 ∈ ℕ0𝐷 ∥ (𝑁𝑧)))
30 oveq2 6914 . . . . . 6 (𝑟 = 𝑧 → ((𝑞 · 𝐷) + 𝑟) = ((𝑞 · 𝐷) + 𝑧))
3130eqeq2d 2836 . . . . 5 (𝑟 = 𝑧 → (𝑁 = ((𝑞 · 𝐷) + 𝑟) ↔ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
3231rexbidv 3263 . . . 4 (𝑟 = 𝑧 → (∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑟) ↔ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
3332elrab 3586 . . 3 (𝑧 ∈ {𝑟 ∈ ℕ0 ∣ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑟)} ↔ (𝑧 ∈ ℕ0 ∧ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑧)))
3425, 29, 333bitr4i 295 . 2 (𝑧𝑆𝑧 ∈ {𝑟 ∈ ℕ0 ∣ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑟)})
3534eqriv 2823 1 𝑆 = {𝑟 ∈ ℕ0 ∣ ∃𝑞 ∈ ℤ 𝑁 = ((𝑞 · 𝐷) + 𝑟)}
Colors of variables: wff setvar class
Syntax hints:  wb 198  wa 386   = wceq 1658  wcel 2166  wne 3000  wrex 3119  {crab 3122   class class class wbr 4874  (class class class)co 6906  cc 10251  0cc0 10253   + caddc 10256   · cmul 10258  cmin 10586  0cn0 11619  cz 11705  cdvds 15358
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1896  ax-4 1910  ax-5 2011  ax-6 2077  ax-7 2114  ax-8 2168  ax-9 2175  ax-10 2194  ax-11 2209  ax-12 2222  ax-13 2391  ax-ext 2804  ax-sep 5006  ax-nul 5014  ax-pow 5066  ax-pr 5128  ax-un 7210  ax-resscn 10310  ax-1cn 10311  ax-icn 10312  ax-addcl 10313  ax-addrcl 10314  ax-mulcl 10315  ax-mulrcl 10316  ax-mulcom 10317  ax-addass 10318  ax-mulass 10319  ax-distr 10320  ax-i2m1 10321  ax-1ne0 10322  ax-1rid 10323  ax-rnegex 10324  ax-rrecex 10325  ax-cnre 10326  ax-pre-lttri 10327  ax-pre-lttrn 10328  ax-pre-ltadd 10329  ax-pre-mulgt0 10330
This theorem depends on definitions:  df-bi 199  df-an 387  df-or 881  df-3or 1114  df-3an 1115  df-tru 1662  df-ex 1881  df-nf 1885  df-sb 2070  df-mo 2606  df-eu 2641  df-clab 2813  df-cleq 2819  df-clel 2822  df-nfc 2959  df-ne 3001  df-nel 3104  df-ral 3123  df-rex 3124  df-reu 3125  df-rab 3127  df-v 3417  df-sbc 3664  df-csb 3759  df-dif 3802  df-un 3804  df-in 3806  df-ss 3813  df-pss 3815  df-nul 4146  df-if 4308  df-pw 4381  df-sn 4399  df-pr 4401  df-tp 4403  df-op 4405  df-uni 4660  df-iun 4743  df-br 4875  df-opab 4937  df-mpt 4954  df-tr 4977  df-id 5251  df-eprel 5256  df-po 5264  df-so 5265  df-fr 5302  df-we 5304  df-xp 5349  df-rel 5350  df-cnv 5351  df-co 5352  df-dm 5353  df-rn 5354  df-res 5355  df-ima 5356  df-pred 5921  df-ord 5967  df-on 5968  df-lim 5969  df-suc 5970  df-iota 6087  df-fun 6126  df-fn 6127  df-f 6128  df-f1 6129  df-fo 6130  df-f1o 6131  df-fv 6132  df-riota 6867  df-ov 6909  df-oprab 6910  df-mpt2 6911  df-om 7328  df-wrecs 7673  df-recs 7735  df-rdg 7773  df-er 8010  df-en 8224  df-dom 8225  df-sdom 8226  df-pnf 10394  df-mnf 10395  df-xr 10396  df-ltxr 10397  df-le 10398  df-sub 10588  df-neg 10589  df-nn 11352  df-n0 11620  df-z 11706  df-dvds 15359
This theorem is referenced by:  divalglem10  15500
  Copyright terms: Public domain W3C validator