Intuitionistic Logic Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  ILE Home  >  Th. List  >  qaddcl GIF version

 Description: Closure of addition of rationals. (Contributed by NM, 1-Aug-2004.)
Assertion
Ref Expression
qaddcl ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) → (𝐴 + 𝐵) ∈ ℚ)

Dummy variables 𝑥 𝑦 𝑧 𝑤 𝑣 𝑢 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elq 9421 . 2 (𝐴 ∈ ℚ ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℕ 𝐴 = (𝑥 / 𝑦))
2 elq 9421 . 2 (𝐵 ∈ ℚ ↔ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℕ 𝐵 = (𝑧 / 𝑤))
3 nnz 9080 . . . . . . . . . . . 12 (𝑤 ∈ ℕ → 𝑤 ∈ ℤ)
4 zmulcl 9114 . . . . . . . . . . . 12 ((𝑥 ∈ ℤ ∧ 𝑤 ∈ ℤ) → (𝑥 · 𝑤) ∈ ℤ)
53, 4sylan2 284 . . . . . . . . . . 11 ((𝑥 ∈ ℤ ∧ 𝑤 ∈ ℕ) → (𝑥 · 𝑤) ∈ ℤ)
65ad2ant2rl 502 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) → (𝑥 · 𝑤) ∈ ℤ)
7 simpl 108 . . . . . . . . . . 11 ((𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ) → 𝑧 ∈ ℤ)
8 nnz 9080 . . . . . . . . . . . 12 (𝑦 ∈ ℕ → 𝑦 ∈ ℤ)
98adantl 275 . . . . . . . . . . 11 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) → 𝑦 ∈ ℤ)
10 zmulcl 9114 . . . . . . . . . . 11 ((𝑧 ∈ ℤ ∧ 𝑦 ∈ ℤ) → (𝑧 · 𝑦) ∈ ℤ)
117, 9, 10syl2anr 288 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) → (𝑧 · 𝑦) ∈ ℤ)
126, 11zaddcld 9184 . . . . . . . . 9 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) → ((𝑥 · 𝑤) + (𝑧 · 𝑦)) ∈ ℤ)
1312adantr 274 . . . . . . . 8 ((((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) ∧ (𝐴 = (𝑥 / 𝑦) ∧ 𝐵 = (𝑧 / 𝑤))) → ((𝑥 · 𝑤) + (𝑧 · 𝑦)) ∈ ℤ)
14 nnmulcl 8748 . . . . . . . . . 10 ((𝑦 ∈ ℕ ∧ 𝑤 ∈ ℕ) → (𝑦 · 𝑤) ∈ ℕ)
1514ad2ant2l 499 . . . . . . . . 9 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) → (𝑦 · 𝑤) ∈ ℕ)
1615adantr 274 . . . . . . . 8 ((((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) ∧ (𝐴 = (𝑥 / 𝑦) ∧ 𝐵 = (𝑧 / 𝑤))) → (𝑦 · 𝑤) ∈ ℕ)
17 oveq12 5783 . . . . . . . . 9 ((𝐴 = (𝑥 / 𝑦) ∧ 𝐵 = (𝑧 / 𝑤)) → (𝐴 + 𝐵) = ((𝑥 / 𝑦) + (𝑧 / 𝑤)))
18 zcn 9066 . . . . . . . . . . . 12 (𝑥 ∈ ℤ → 𝑥 ∈ ℂ)
19 zcn 9066 . . . . . . . . . . . 12 (𝑧 ∈ ℤ → 𝑧 ∈ ℂ)
2018, 19anim12i 336 . . . . . . . . . . 11 ((𝑥 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑥 ∈ ℂ ∧ 𝑧 ∈ ℂ))
21 nncn 8735 . . . . . . . . . . . . 13 (𝑦 ∈ ℕ → 𝑦 ∈ ℂ)
22 nnap0 8756 . . . . . . . . . . . . 13 (𝑦 ∈ ℕ → 𝑦 # 0)
2321, 22jca 304 . . . . . . . . . . . 12 (𝑦 ∈ ℕ → (𝑦 ∈ ℂ ∧ 𝑦 # 0))
24 nncn 8735 . . . . . . . . . . . . 13 (𝑤 ∈ ℕ → 𝑤 ∈ ℂ)
25 nnap0 8756 . . . . . . . . . . . . 13 (𝑤 ∈ ℕ → 𝑤 # 0)
2624, 25jca 304 . . . . . . . . . . . 12 (𝑤 ∈ ℕ → (𝑤 ∈ ℂ ∧ 𝑤 # 0))
2723, 26anim12i 336 . . . . . . . . . . 11 ((𝑦 ∈ ℕ ∧ 𝑤 ∈ ℕ) → ((𝑦 ∈ ℂ ∧ 𝑦 # 0) ∧ (𝑤 ∈ ℂ ∧ 𝑤 # 0)))
28 divadddivap 8494 . . . . . . . . . . 11 (((𝑥 ∈ ℂ ∧ 𝑧 ∈ ℂ) ∧ ((𝑦 ∈ ℂ ∧ 𝑦 # 0) ∧ (𝑤 ∈ ℂ ∧ 𝑤 # 0))) → ((𝑥 / 𝑦) + (𝑧 / 𝑤)) = (((𝑥 · 𝑤) + (𝑧 · 𝑦)) / (𝑦 · 𝑤)))
2920, 27, 28syl2an 287 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑧 ∈ ℤ) ∧ (𝑦 ∈ ℕ ∧ 𝑤 ∈ ℕ)) → ((𝑥 / 𝑦) + (𝑧 / 𝑤)) = (((𝑥 · 𝑤) + (𝑧 · 𝑦)) / (𝑦 · 𝑤)))
3029an4s 577 . . . . . . . . 9 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) → ((𝑥 / 𝑦) + (𝑧 / 𝑤)) = (((𝑥 · 𝑤) + (𝑧 · 𝑦)) / (𝑦 · 𝑤)))
3117, 30sylan9eqr 2194 . . . . . . . 8 ((((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) ∧ (𝐴 = (𝑥 / 𝑦) ∧ 𝐵 = (𝑧 / 𝑤))) → (𝐴 + 𝐵) = (((𝑥 · 𝑤) + (𝑧 · 𝑦)) / (𝑦 · 𝑤)))
32 rspceov 5813 . . . . . . . . 9 ((((𝑥 · 𝑤) + (𝑧 · 𝑦)) ∈ ℤ ∧ (𝑦 · 𝑤) ∈ ℕ ∧ (𝐴 + 𝐵) = (((𝑥 · 𝑤) + (𝑧 · 𝑦)) / (𝑦 · 𝑤))) → ∃𝑣 ∈ ℤ ∃𝑢 ∈ ℕ (𝐴 + 𝐵) = (𝑣 / 𝑢))
33 elq 9421 . . . . . . . . 9 ((𝐴 + 𝐵) ∈ ℚ ↔ ∃𝑣 ∈ ℤ ∃𝑢 ∈ ℕ (𝐴 + 𝐵) = (𝑣 / 𝑢))
3432, 33sylibr 133 . . . . . . . 8 ((((𝑥 · 𝑤) + (𝑧 · 𝑦)) ∈ ℤ ∧ (𝑦 · 𝑤) ∈ ℕ ∧ (𝐴 + 𝐵) = (((𝑥 · 𝑤) + (𝑧 · 𝑦)) / (𝑦 · 𝑤))) → (𝐴 + 𝐵) ∈ ℚ)
3513, 16, 31, 34syl3anc 1216 . . . . . . 7 ((((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ (𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ)) ∧ (𝐴 = (𝑥 / 𝑦) ∧ 𝐵 = (𝑧 / 𝑤))) → (𝐴 + 𝐵) ∈ ℚ)
3635an4s 577 . . . . . 6 ((((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) ∧ 𝐴 = (𝑥 / 𝑦)) ∧ ((𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ) ∧ 𝐵 = (𝑧 / 𝑤))) → (𝐴 + 𝐵) ∈ ℚ)
3736exp43 369 . . . . 5 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℕ) → (𝐴 = (𝑥 / 𝑦) → ((𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ) → (𝐵 = (𝑧 / 𝑤) → (𝐴 + 𝐵) ∈ ℚ))))
3837rexlimivv 2555 . . . 4 (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℕ 𝐴 = (𝑥 / 𝑦) → ((𝑧 ∈ ℤ ∧ 𝑤 ∈ ℕ) → (𝐵 = (𝑧 / 𝑤) → (𝐴 + 𝐵) ∈ ℚ)))
3938rexlimdvv 2556 . . 3 (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℕ 𝐴 = (𝑥 / 𝑦) → (∃𝑧 ∈ ℤ ∃𝑤 ∈ ℕ 𝐵 = (𝑧 / 𝑤) → (𝐴 + 𝐵) ∈ ℚ))
4039imp 123 . 2 ((∃𝑥 ∈ ℤ ∃𝑦 ∈ ℕ 𝐴 = (𝑥 / 𝑦) ∧ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℕ 𝐵 = (𝑧 / 𝑤)) → (𝐴 + 𝐵) ∈ ℚ)
411, 2, 40syl2anb 289 1 ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) → (𝐴 + 𝐵) ∈ ℚ)