Users' Mathboxes Mathbox for Jim Kingdon < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >   Mathboxes  >  qdiff GIF version

Theorem qdiff 16679
Description: The rationals are exactly those reals for which there exist two distinct rationals that are the same distance from the original number. Similar to apdiff 16678 but by stating the result positively we can completely sidestep the issue of not equal versus apart in the statement of the result. From an online post by Ingo Blechschmidt. (Contributed by Jim Kingdon, 24-Apr-2026.)
Assertion
Ref Expression
qdiff (𝐴 ∈ ℝ → (𝐴 ∈ ℚ ↔ ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))))
Distinct variable group:   𝐴,𝑞,𝑟

Proof of Theorem qdiff
StepHypRef Expression
1 1z 9505 . . . . 5 1 ∈ ℤ
2 zq 9860 . . . . 5 (1 ∈ ℤ → 1 ∈ ℚ)
31, 2ax-mp 5 . . . 4 1 ∈ ℚ
4 qsubcl 9872 . . . 4 ((𝐴 ∈ ℚ ∧ 1 ∈ ℚ) → (𝐴 − 1) ∈ ℚ)
53, 4mpan2 425 . . 3 (𝐴 ∈ ℚ → (𝐴 − 1) ∈ ℚ)
6 qaddcl 9869 . . . . 5 ((𝐴 ∈ ℚ ∧ 1 ∈ ℚ) → (𝐴 + 1) ∈ ℚ)
73, 6mpan2 425 . . . 4 (𝐴 ∈ ℚ → (𝐴 + 1) ∈ ℚ)
8 qre 9859 . . . . . . . . . 10 (𝐴 ∈ ℚ → 𝐴 ∈ ℝ)
9 1rp 9892 . . . . . . . . . . . . 13 1 ∈ ℝ+
109, 9pm3.2i 272 . . . . . . . . . . . 12 (1 ∈ ℝ+ ∧ 1 ∈ ℝ+)
11 rpaddcl 9912 . . . . . . . . . . . 12 ((1 ∈ ℝ+ ∧ 1 ∈ ℝ+) → (1 + 1) ∈ ℝ+)
1210, 11mp1i 10 . . . . . . . . . . 11 (𝐴 ∈ ℚ → (1 + 1) ∈ ℝ+)
138, 12ltaddrpd 9965 . . . . . . . . . 10 (𝐴 ∈ ℚ → 𝐴 < (𝐴 + (1 + 1)))
148, 13ltned 8293 . . . . . . . . 9 (𝐴 ∈ ℚ → 𝐴 ≠ (𝐴 + (1 + 1)))
1514neneqd 2423 . . . . . . . 8 (𝐴 ∈ ℚ → ¬ 𝐴 = (𝐴 + (1 + 1)))
1615neqcomd 2236 . . . . . . 7 (𝐴 ∈ ℚ → ¬ (𝐴 + (1 + 1)) = 𝐴)
17 qcn 9868 . . . . . . . . 9 (𝐴 ∈ ℚ → 𝐴 ∈ ℂ)
18 1cnd 8195 . . . . . . . . 9 (𝐴 ∈ ℚ → 1 ∈ ℂ)
1917, 18, 18addassd 8202 . . . . . . . 8 (𝐴 ∈ ℚ → ((𝐴 + 1) + 1) = (𝐴 + (1 + 1)))
2019eqeq1d 2240 . . . . . . 7 (𝐴 ∈ ℚ → (((𝐴 + 1) + 1) = 𝐴 ↔ (𝐴 + (1 + 1)) = 𝐴))
2116, 20mtbird 679 . . . . . 6 (𝐴 ∈ ℚ → ¬ ((𝐴 + 1) + 1) = 𝐴)
2217, 18addcld 8199 . . . . . . 7 (𝐴 ∈ ℚ → (𝐴 + 1) ∈ ℂ)
2317, 18, 22subadd2d 8509 . . . . . 6 (𝐴 ∈ ℚ → ((𝐴 − 1) = (𝐴 + 1) ↔ ((𝐴 + 1) + 1) = 𝐴))
2421, 23mtbird 679 . . . . 5 (𝐴 ∈ ℚ → ¬ (𝐴 − 1) = (𝐴 + 1))
2524neqned 2409 . . . 4 (𝐴 ∈ ℚ → (𝐴 − 1) ≠ (𝐴 + 1))
2618absnegd 11754 . . . . 5 (𝐴 ∈ ℚ → (abs‘-1) = (abs‘1))
2717, 17, 18subsub4d 8521 . . . . . . 7 (𝐴 ∈ ℚ → ((𝐴𝐴) − 1) = (𝐴 − (𝐴 + 1)))
2817subidd 8478 . . . . . . . . 9 (𝐴 ∈ ℚ → (𝐴𝐴) = 0)
2928oveq1d 6033 . . . . . . . 8 (𝐴 ∈ ℚ → ((𝐴𝐴) − 1) = (0 − 1))
30 df-neg 8353 . . . . . . . 8 -1 = (0 − 1)
3129, 30eqtr4di 2282 . . . . . . 7 (𝐴 ∈ ℚ → ((𝐴𝐴) − 1) = -1)
3227, 31eqtr3d 2266 . . . . . 6 (𝐴 ∈ ℚ → (𝐴 − (𝐴 + 1)) = -1)
3332fveq2d 5643 . . . . 5 (𝐴 ∈ ℚ → (abs‘(𝐴 − (𝐴 + 1))) = (abs‘-1))
3417, 18nncand 8495 . . . . . 6 (𝐴 ∈ ℚ → (𝐴 − (𝐴 − 1)) = 1)
3534fveq2d 5643 . . . . 5 (𝐴 ∈ ℚ → (abs‘(𝐴 − (𝐴 − 1))) = (abs‘1))
3626, 33, 353eqtr4rd 2275 . . . 4 (𝐴 ∈ ℚ → (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1))))
37 neeq2 2416 . . . . . 6 (𝑟 = (𝐴 + 1) → ((𝐴 − 1) ≠ 𝑟 ↔ (𝐴 − 1) ≠ (𝐴 + 1)))
38 oveq2 6026 . . . . . . . 8 (𝑟 = (𝐴 + 1) → (𝐴𝑟) = (𝐴 − (𝐴 + 1)))
3938fveq2d 5643 . . . . . . 7 (𝑟 = (𝐴 + 1) → (abs‘(𝐴𝑟)) = (abs‘(𝐴 − (𝐴 + 1))))
4039eqeq2d 2243 . . . . . 6 (𝑟 = (𝐴 + 1) → ((abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)) ↔ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1)))))
4137, 40anbi12d 473 . . . . 5 (𝑟 = (𝐴 + 1) → (((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))) ↔ ((𝐴 − 1) ≠ (𝐴 + 1) ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1))))))
4241rspcev 2910 . . . 4 (((𝐴 + 1) ∈ ℚ ∧ ((𝐴 − 1) ≠ (𝐴 + 1) ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1))))) → ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))))
437, 25, 36, 42syl12anc 1271 . . 3 (𝐴 ∈ ℚ → ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))))
44 neeq1 2415 . . . . . 6 (𝑞 = (𝐴 − 1) → (𝑞𝑟 ↔ (𝐴 − 1) ≠ 𝑟))
45 oveq2 6026 . . . . . . 7 (𝑞 = (𝐴 − 1) → (𝐴𝑞) = (𝐴 − (𝐴 − 1)))
4645fveqeq2d 5647 . . . . . 6 (𝑞 = (𝐴 − 1) → ((abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)) ↔ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))))
4744, 46anbi12d 473 . . . . 5 (𝑞 = (𝐴 − 1) → ((𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) ↔ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)))))
4847rexbidv 2533 . . . 4 (𝑞 = (𝐴 − 1) → (∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) ↔ ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)))))
4948rspcev 2910 . . 3 (((𝐴 − 1) ∈ ℚ ∧ ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)))) → ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
505, 43, 49syl2anc 411 . 2 (𝐴 ∈ ℚ → ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
51 2cnd 9216 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 ∈ ℂ)
52 simpll 527 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝐴 ∈ ℝ)
5352recnd 8208 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝐴 ∈ ℂ)
54 simplrl 537 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞 ∈ ℚ)
55 qre 9859 . . . . . . . . . . . . 13 (𝑞 ∈ ℚ → 𝑞 ∈ ℝ)
5654, 55syl 14 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞 ∈ ℝ)
5756recnd 8208 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞 ∈ ℂ)
5853, 57mulcld 8200 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴 · 𝑞) ∈ ℂ)
59 simplrr 538 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑟 ∈ ℚ)
60 qre 9859 . . . . . . . . . . . . 13 (𝑟 ∈ ℚ → 𝑟 ∈ ℝ)
6159, 60syl 14 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑟 ∈ ℝ)
6261recnd 8208 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑟 ∈ ℂ)
6353, 62mulcld 8200 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴 · 𝑟) ∈ ℂ)
6451, 58, 63subdid 8593 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · ((𝐴 · 𝑞) − (𝐴 · 𝑟))) = ((2 · (𝐴 · 𝑞)) − (2 · (𝐴 · 𝑟))))
6553sqcld 10934 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴↑2) ∈ ℂ)
6651, 63mulcld 8200 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · (𝐴 · 𝑟)) ∈ ℂ)
6751, 58mulcld 8200 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · (𝐴 · 𝑞)) ∈ ℂ)
6865, 66, 67nnncan1d 8524 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴↑2) − (2 · (𝐴 · 𝑟))) − ((𝐴↑2) − (2 · (𝐴 · 𝑞)))) = ((2 · (𝐴 · 𝑞)) − (2 · (𝐴 · 𝑟))))
69 simprr 533 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))
7052, 56resubcld 8560 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴𝑞) ∈ ℝ)
7152, 61resubcld 8560 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴𝑟) ∈ ℝ)
72 sqabs 11647 . . . . . . . . . . . . 13 (((𝐴𝑞) ∈ ℝ ∧ (𝐴𝑟) ∈ ℝ) → (((𝐴𝑞)↑2) = ((𝐴𝑟)↑2) ↔ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
7370, 71, 72syl2anc 411 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴𝑞)↑2) = ((𝐴𝑟)↑2) ↔ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
7469, 73mpbird 167 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴𝑞)↑2) = ((𝐴𝑟)↑2))
75 binom2sub 10916 . . . . . . . . . . . 12 ((𝐴 ∈ ℂ ∧ 𝑞 ∈ ℂ) → ((𝐴𝑞)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)))
7653, 57, 75syl2anc 411 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴𝑞)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)))
77 binom2sub 10916 . . . . . . . . . . . 12 ((𝐴 ∈ ℂ ∧ 𝑟 ∈ ℂ) → ((𝐴𝑟)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)))
7853, 62, 77syl2anc 411 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴𝑟)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)))
7974, 76, 783eqtr3d 2272 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)))
8065, 67subcld 8490 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴↑2) − (2 · (𝐴 · 𝑞))) ∈ ℂ)
8157sqcld 10934 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞↑2) ∈ ℂ)
8265, 66subcld 8490 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴↑2) − (2 · (𝐴 · 𝑟))) ∈ ℂ)
8362sqcld 10934 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑟↑2) ∈ ℂ)
8480, 81, 82, 83addsubeq4d 8541 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)) ↔ (((𝐴↑2) − (2 · (𝐴 · 𝑟))) − ((𝐴↑2) − (2 · (𝐴 · 𝑞)))) = ((𝑞↑2) − (𝑟↑2))))
8579, 84mpbid 147 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴↑2) − (2 · (𝐴 · 𝑟))) − ((𝐴↑2) − (2 · (𝐴 · 𝑞)))) = ((𝑞↑2) − (𝑟↑2)))
8664, 68, 853eqtr2d 2270 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · ((𝐴 · 𝑞) − (𝐴 · 𝑟))) = ((𝑞↑2) − (𝑟↑2)))
8781, 83subcld 8490 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝑞↑2) − (𝑟↑2)) ∈ ℂ)
8858, 63subcld 8490 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴 · 𝑞) − (𝐴 · 𝑟)) ∈ ℂ)
89 2ap0 9236 . . . . . . . . . 10 2 # 0
9089a1i 9 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 # 0)
9187, 51, 88, 90divmulapd 8992 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝑞↑2) − (𝑟↑2)) / 2) = ((𝐴 · 𝑞) − (𝐴 · 𝑟)) ↔ (2 · ((𝐴 · 𝑞) − (𝐴 · 𝑟))) = ((𝑞↑2) − (𝑟↑2))))
9286, 91mpbird 167 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) = ((𝐴 · 𝑞) − (𝐴 · 𝑟)))
9353, 57, 62subdid 8593 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴 · (𝑞𝑟)) = ((𝐴 · 𝑞) − (𝐴 · 𝑟)))
9492, 93eqtr4d 2267 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) = (𝐴 · (𝑞𝑟)))
9587halfcld 9389 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℂ)
9657, 62subcld 8490 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) ∈ ℂ)
97 simprl 531 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞𝑟)
9857, 62, 97subne0d 8499 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) ≠ 0)
99 qsubcl 9872 . . . . . . . . . 10 ((𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ) → (𝑞𝑟) ∈ ℚ)
10054, 59, 99syl2anc 411 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) ∈ ℚ)
101 0z 9490 . . . . . . . . . 10 0 ∈ ℤ
102 zq 9860 . . . . . . . . . 10 (0 ∈ ℤ → 0 ∈ ℚ)
103101, 102mp1i 10 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 0 ∈ ℚ)
104 qapne 9873 . . . . . . . . 9 (((𝑞𝑟) ∈ ℚ ∧ 0 ∈ ℚ) → ((𝑞𝑟) # 0 ↔ (𝑞𝑟) ≠ 0))
105100, 103, 104syl2anc 411 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝑞𝑟) # 0 ↔ (𝑞𝑟) ≠ 0))
10698, 105mpbird 167 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) # 0)
10795, 53, 96, 106divmulap3d 9005 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) = 𝐴 ↔ (((𝑞↑2) − (𝑟↑2)) / 2) = (𝐴 · (𝑞𝑟))))
10894, 107mpbird 167 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) = 𝐴)
109 qsqcl 10874 . . . . . . . . 9 (𝑞 ∈ ℚ → (𝑞↑2) ∈ ℚ)
11054, 109syl 14 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞↑2) ∈ ℚ)
111 qsqcl 10874 . . . . . . . . 9 (𝑟 ∈ ℚ → (𝑟↑2) ∈ ℚ)
11259, 111syl 14 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑟↑2) ∈ ℚ)
113 qsubcl 9872 . . . . . . . 8 (((𝑞↑2) ∈ ℚ ∧ (𝑟↑2) ∈ ℚ) → ((𝑞↑2) − (𝑟↑2)) ∈ ℚ)
114110, 112, 113syl2anc 411 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝑞↑2) − (𝑟↑2)) ∈ ℚ)
115 2z 9507 . . . . . . . 8 2 ∈ ℤ
116 zq 9860 . . . . . . . 8 (2 ∈ ℤ → 2 ∈ ℚ)
117115, 116mp1i 10 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 ∈ ℚ)
118 2ne0 9235 . . . . . . . 8 2 ≠ 0
119118a1i 9 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 ≠ 0)
120 qdivcl 9877 . . . . . . 7 ((((𝑞↑2) − (𝑟↑2)) ∈ ℚ ∧ 2 ∈ ℚ ∧ 2 ≠ 0) → (((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℚ)
121114, 117, 119, 120syl3anc 1273 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℚ)
122 qdivcl 9877 . . . . . 6 (((((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℚ ∧ (𝑞𝑟) ∈ ℚ ∧ (𝑞𝑟) ≠ 0) → ((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) ∈ ℚ)
123121, 100, 98, 122syl3anc 1273 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) ∈ ℚ)
124108, 123eqeltrrd 2309 . . . 4 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝐴 ∈ ℚ)
125124ex 115 . . 3 ((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) → ((𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) → 𝐴 ∈ ℚ))
126125rexlimdvva 2658 . 2 (𝐴 ∈ ℝ → (∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) → 𝐴 ∈ ℚ))
12750, 126impbid2 143 1 (𝐴 ∈ ℝ → (𝐴 ∈ ℚ ↔ ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  wb 105   = wceq 1397  wcel 2202  wne 2402  wrex 2511   class class class wbr 4088  cfv 5326  (class class class)co 6018  cc 8030  cr 8031  0cc0 8032  1c1 8033   + caddc 8035   · cmul 8037  cmin 8350  -cneg 8351   # cap 8761   / cdiv 8852  2c2 9194  cz 9479  cq 9853  +crp 9888  cexp 10801  abscabs 11562
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 619  ax-in2 620  ax-io 716  ax-5 1495  ax-7 1496  ax-gen 1497  ax-ie1 1541  ax-ie2 1542  ax-8 1552  ax-10 1553  ax-11 1554  ax-i12 1555  ax-bndl 1557  ax-4 1558  ax-17 1574  ax-i9 1578  ax-ial 1582  ax-i5r 1583  ax-13 2204  ax-14 2205  ax-ext 2213  ax-coll 4204  ax-sep 4207  ax-nul 4215  ax-pow 4264  ax-pr 4299  ax-un 4530  ax-setind 4635  ax-iinf 4686  ax-cnex 8123  ax-resscn 8124  ax-1cn 8125  ax-1re 8126  ax-icn 8127  ax-addcl 8128  ax-addrcl 8129  ax-mulcl 8130  ax-mulrcl 8131  ax-addcom 8132  ax-mulcom 8133  ax-addass 8134  ax-mulass 8135  ax-distr 8136  ax-i2m1 8137  ax-0lt1 8138  ax-1rid 8139  ax-0id 8140  ax-rnegex 8141  ax-precex 8142  ax-cnre 8143  ax-pre-ltirr 8144  ax-pre-ltwlin 8145  ax-pre-lttrn 8146  ax-pre-apti 8147  ax-pre-ltadd 8148  ax-pre-mulgt0 8149  ax-pre-mulext 8150  ax-arch 8151  ax-caucvg 8152
This theorem depends on definitions:  df-bi 117  df-dc 842  df-3or 1005  df-3an 1006  df-tru 1400  df-fal 1403  df-nf 1509  df-sb 1811  df-eu 2082  df-mo 2083  df-clab 2218  df-cleq 2224  df-clel 2227  df-nfc 2363  df-ne 2403  df-nel 2498  df-ral 2515  df-rex 2516  df-reu 2517  df-rmo 2518  df-rab 2519  df-v 2804  df-sbc 3032  df-csb 3128  df-dif 3202  df-un 3204  df-in 3206  df-ss 3213  df-nul 3495  df-if 3606  df-pw 3654  df-sn 3675  df-pr 3676  df-op 3678  df-uni 3894  df-int 3929  df-iun 3972  df-br 4089  df-opab 4151  df-mpt 4152  df-tr 4188  df-id 4390  df-po 4393  df-iso 4394  df-iord 4463  df-on 4465  df-ilim 4466  df-suc 4468  df-iom 4689  df-xp 4731  df-rel 4732  df-cnv 4733  df-co 4734  df-dm 4735  df-rn 4736  df-res 4737  df-ima 4738  df-iota 5286  df-fun 5328  df-fn 5329  df-f 5330  df-f1 5331  df-fo 5332  df-f1o 5333  df-fv 5334  df-riota 5971  df-ov 6021  df-oprab 6022  df-mpo 6023  df-1st 6303  df-2nd 6304  df-recs 6471  df-frec 6557  df-pnf 8216  df-mnf 8217  df-xr 8218  df-ltxr 8219  df-le 8220  df-sub 8352  df-neg 8353  df-reap 8755  df-ap 8762  df-div 8853  df-inn 9144  df-2 9202  df-3 9203  df-4 9204  df-n0 9403  df-z 9480  df-uz 9756  df-q 9854  df-rp 9889  df-seqfrec 10711  df-exp 10802  df-cj 11407  df-re 11408  df-im 11409  df-rsqrt 11563  df-abs 11564
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator