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

Theorem qdiff 37641
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 irrdiff 37640 but here proved with a proof which would also work in constructive mathematics. From an online post by Ingo Blechschmidt. For a proof using irrdiff 37640, see qdiffALT 37642. (Contributed by Jim Kingdon, 24-Apr-2026.)
Assertion
Ref Expression
qdiff (𝐴 ∈ ℝ → (𝐴 ∈ ℚ ↔ ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))))
Distinct variable group:   𝐴,𝑞,𝑟

Proof of Theorem qdiff
StepHypRef Expression
1 neeq1 2994 . . . . 5 (𝑞 = (𝐴 − 1) → (𝑞𝑟 ↔ (𝐴 − 1) ≠ 𝑟))
2 oveq2 7375 . . . . . 6 (𝑞 = (𝐴 − 1) → (𝐴𝑞) = (𝐴 − (𝐴 − 1)))
32fveqeq2d 6848 . . . . 5 (𝑞 = (𝐴 − 1) → ((abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)) ↔ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))))
41, 3anbi12d 633 . . . 4 (𝑞 = (𝐴 − 1) → ((𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) ↔ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)))))
54rexbidv 3161 . . 3 (𝑞 = (𝐴 − 1) → (∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) ↔ ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)))))
6 1z 12557 . . . . 5 1 ∈ ℤ
7 zq 12904 . . . . 5 (1 ∈ ℤ → 1 ∈ ℚ)
86, 7ax-mp 5 . . . 4 1 ∈ ℚ
9 qsubcl 12918 . . . 4 ((𝐴 ∈ ℚ ∧ 1 ∈ ℚ) → (𝐴 − 1) ∈ ℚ)
108, 9mpan2 692 . . 3 (𝐴 ∈ ℚ → (𝐴 − 1) ∈ ℚ)
11 qaddcl 12915 . . . . 5 ((𝐴 ∈ ℚ ∧ 1 ∈ ℚ) → (𝐴 + 1) ∈ ℚ)
128, 11mpan2 692 . . . 4 (𝐴 ∈ ℚ → (𝐴 + 1) ∈ ℚ)
13 qre 12903 . . . . . . . . . 10 (𝐴 ∈ ℚ → 𝐴 ∈ ℝ)
14 1rp 12946 . . . . . . . . . . . . 13 1 ∈ ℝ+
1514, 14pm3.2i 470 . . . . . . . . . . . 12 (1 ∈ ℝ+ ∧ 1 ∈ ℝ+)
16 rpaddcl 12966 . . . . . . . . . . . 12 ((1 ∈ ℝ+ ∧ 1 ∈ ℝ+) → (1 + 1) ∈ ℝ+)
1715, 16mp1i 13 . . . . . . . . . . 11 (𝐴 ∈ ℚ → (1 + 1) ∈ ℝ+)
1813, 17ltaddrpd 13019 . . . . . . . . . 10 (𝐴 ∈ ℚ → 𝐴 < (𝐴 + (1 + 1)))
1913, 18ltned 11282 . . . . . . . . 9 (𝐴 ∈ ℚ → 𝐴 ≠ (𝐴 + (1 + 1)))
2019neneqd 2937 . . . . . . . 8 (𝐴 ∈ ℚ → ¬ 𝐴 = (𝐴 + (1 + 1)))
2120neqcomd 2746 . . . . . . 7 (𝐴 ∈ ℚ → ¬ (𝐴 + (1 + 1)) = 𝐴)
22 qcn 12913 . . . . . . . . 9 (𝐴 ∈ ℚ → 𝐴 ∈ ℂ)
23 1cnd 11139 . . . . . . . . 9 (𝐴 ∈ ℚ → 1 ∈ ℂ)
2422, 23, 23addassd 11167 . . . . . . . 8 (𝐴 ∈ ℚ → ((𝐴 + 1) + 1) = (𝐴 + (1 + 1)))
2524eqeq1d 2738 . . . . . . 7 (𝐴 ∈ ℚ → (((𝐴 + 1) + 1) = 𝐴 ↔ (𝐴 + (1 + 1)) = 𝐴))
2621, 25mtbird 325 . . . . . 6 (𝐴 ∈ ℚ → ¬ ((𝐴 + 1) + 1) = 𝐴)
2722, 23addcld 11164 . . . . . . 7 (𝐴 ∈ ℚ → (𝐴 + 1) ∈ ℂ)
2822, 23, 27subadd2d 11524 . . . . . 6 (𝐴 ∈ ℚ → ((𝐴 − 1) = (𝐴 + 1) ↔ ((𝐴 + 1) + 1) = 𝐴))
2926, 28mtbird 325 . . . . 5 (𝐴 ∈ ℚ → ¬ (𝐴 − 1) = (𝐴 + 1))
3029neqned 2939 . . . 4 (𝐴 ∈ ℚ → (𝐴 − 1) ≠ (𝐴 + 1))
3123absnegd 15414 . . . . 5 (𝐴 ∈ ℚ → (abs‘-1) = (abs‘1))
3222, 22, 23subsub4d 11536 . . . . . . 7 (𝐴 ∈ ℚ → ((𝐴𝐴) − 1) = (𝐴 − (𝐴 + 1)))
3322subidd 11493 . . . . . . . . 9 (𝐴 ∈ ℚ → (𝐴𝐴) = 0)
3433oveq1d 7382 . . . . . . . 8 (𝐴 ∈ ℚ → ((𝐴𝐴) − 1) = (0 − 1))
35 df-neg 11380 . . . . . . . 8 -1 = (0 − 1)
3634, 35eqtr4di 2789 . . . . . . 7 (𝐴 ∈ ℚ → ((𝐴𝐴) − 1) = -1)
3732, 36eqtr3d 2773 . . . . . 6 (𝐴 ∈ ℚ → (𝐴 − (𝐴 + 1)) = -1)
3837fveq2d 6844 . . . . 5 (𝐴 ∈ ℚ → (abs‘(𝐴 − (𝐴 + 1))) = (abs‘-1))
3922, 23nncand 11510 . . . . . 6 (𝐴 ∈ ℚ → (𝐴 − (𝐴 − 1)) = 1)
4039fveq2d 6844 . . . . 5 (𝐴 ∈ ℚ → (abs‘(𝐴 − (𝐴 − 1))) = (abs‘1))
4131, 38, 403eqtr4rd 2782 . . . 4 (𝐴 ∈ ℚ → (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1))))
42 neeq2 2995 . . . . . 6 (𝑟 = (𝐴 + 1) → ((𝐴 − 1) ≠ 𝑟 ↔ (𝐴 − 1) ≠ (𝐴 + 1)))
43 oveq2 7375 . . . . . . . 8 (𝑟 = (𝐴 + 1) → (𝐴𝑟) = (𝐴 − (𝐴 + 1)))
4443fveq2d 6844 . . . . . . 7 (𝑟 = (𝐴 + 1) → (abs‘(𝐴𝑟)) = (abs‘(𝐴 − (𝐴 + 1))))
4544eqeq2d 2747 . . . . . 6 (𝑟 = (𝐴 + 1) → ((abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟)) ↔ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1)))))
4642, 45anbi12d 633 . . . . 5 (𝑟 = (𝐴 + 1) → (((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))) ↔ ((𝐴 − 1) ≠ (𝐴 + 1) ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1))))))
4746rspcev 3564 . . . 4 (((𝐴 + 1) ∈ ℚ ∧ ((𝐴 − 1) ≠ (𝐴 + 1) ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴 − (𝐴 + 1))))) → ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))))
4812, 30, 41, 47syl12anc 837 . . 3 (𝐴 ∈ ℚ → ∃𝑟 ∈ ℚ ((𝐴 − 1) ≠ 𝑟 ∧ (abs‘(𝐴 − (𝐴 − 1))) = (abs‘(𝐴𝑟))))
495, 10, 48rspcedvdw 3567 . 2 (𝐴 ∈ ℚ → ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
50 2cnd 12259 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 ∈ ℂ)
51 simpll 767 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝐴 ∈ ℝ)
5251recnd 11173 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝐴 ∈ ℂ)
53 simplrl 777 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞 ∈ ℚ)
5453qred 12905 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞 ∈ ℝ)
5554recnd 11173 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞 ∈ ℂ)
5652, 55mulcld 11165 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴 · 𝑞) ∈ ℂ)
57 simplrr 778 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑟 ∈ ℚ)
5857qred 12905 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑟 ∈ ℝ)
5958recnd 11173 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑟 ∈ ℂ)
6052, 59mulcld 11165 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴 · 𝑟) ∈ ℂ)
6150, 56, 60subdid 11606 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · ((𝐴 · 𝑞) − (𝐴 · 𝑟))) = ((2 · (𝐴 · 𝑞)) − (2 · (𝐴 · 𝑟))))
6252sqcld 14106 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴↑2) ∈ ℂ)
6350, 60mulcld 11165 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · (𝐴 · 𝑟)) ∈ ℂ)
6450, 56mulcld 11165 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · (𝐴 · 𝑞)) ∈ ℂ)
6562, 63, 64nnncan1d 11539 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴↑2) − (2 · (𝐴 · 𝑟))) − ((𝐴↑2) − (2 · (𝐴 · 𝑞)))) = ((2 · (𝐴 · 𝑞)) − (2 · (𝐴 · 𝑟))))
66 simprr 773 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))
6751, 54resubcld 11578 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴𝑞) ∈ ℝ)
6851, 58resubcld 11578 . . . . . . . . . . . . 13 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴𝑟) ∈ ℝ)
69 sqabs 15269 . . . . . . . . . . . . 13 (((𝐴𝑞) ∈ ℝ ∧ (𝐴𝑟) ∈ ℝ) → (((𝐴𝑞)↑2) = ((𝐴𝑟)↑2) ↔ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
7067, 68, 69syl2anc 585 . . . . . . . . . . . 12 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴𝑞)↑2) = ((𝐴𝑟)↑2) ↔ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))))
7166, 70mpbird 257 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴𝑞)↑2) = ((𝐴𝑟)↑2))
72 binom2sub 14182 . . . . . . . . . . . 12 ((𝐴 ∈ ℂ ∧ 𝑞 ∈ ℂ) → ((𝐴𝑞)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)))
7352, 55, 72syl2anc 585 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴𝑞)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)))
74 binom2sub 14182 . . . . . . . . . . . 12 ((𝐴 ∈ ℂ ∧ 𝑟 ∈ ℂ) → ((𝐴𝑟)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)))
7552, 59, 74syl2anc 585 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴𝑟)↑2) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)))
7671, 73, 753eqtr3d 2779 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)))
7762, 64subcld 11505 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴↑2) − (2 · (𝐴 · 𝑞))) ∈ ℂ)
7855sqcld 14106 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞↑2) ∈ ℂ)
7962, 63subcld 11505 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴↑2) − (2 · (𝐴 · 𝑟))) ∈ ℂ)
8059sqcld 14106 . . . . . . . . . . 11 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑟↑2) ∈ ℂ)
8177, 78, 79, 80addsubeq4d 11556 . . . . . . . . . 10 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝐴↑2) − (2 · (𝐴 · 𝑞))) + (𝑞↑2)) = (((𝐴↑2) − (2 · (𝐴 · 𝑟))) + (𝑟↑2)) ↔ (((𝐴↑2) − (2 · (𝐴 · 𝑟))) − ((𝐴↑2) − (2 · (𝐴 · 𝑞)))) = ((𝑞↑2) − (𝑟↑2))))
8276, 81mpbid 232 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝐴↑2) − (2 · (𝐴 · 𝑟))) − ((𝐴↑2) − (2 · (𝐴 · 𝑞)))) = ((𝑞↑2) − (𝑟↑2)))
8361, 65, 823eqtr2d 2777 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (2 · ((𝐴 · 𝑞) − (𝐴 · 𝑟))) = ((𝑞↑2) − (𝑟↑2)))
8478, 80subcld 11505 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝑞↑2) − (𝑟↑2)) ∈ ℂ)
8556, 60subcld 11505 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝐴 · 𝑞) − (𝐴 · 𝑟)) ∈ ℂ)
86 2ne0 12285 . . . . . . . . . 10 2 ≠ 0
8786a1i 11 . . . . . . . . 9 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 ≠ 0)
8884, 50, 85, 87divmuld 11953 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝑞↑2) − (𝑟↑2)) / 2) = ((𝐴 · 𝑞) − (𝐴 · 𝑟)) ↔ (2 · ((𝐴 · 𝑞) − (𝐴 · 𝑟))) = ((𝑞↑2) − (𝑟↑2))))
8983, 88mpbird 257 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) = ((𝐴 · 𝑞) − (𝐴 · 𝑟)))
9052, 55, 59subdid 11606 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝐴 · (𝑞𝑟)) = ((𝐴 · 𝑞) − (𝐴 · 𝑟)))
9189, 90eqtr4d 2774 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) = (𝐴 · (𝑞𝑟)))
9284halfcld 12422 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℂ)
9355, 59subcld 11505 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) ∈ ℂ)
94 simprl 771 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝑞𝑟)
9555, 59, 94subne0d 11514 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) ≠ 0)
9692, 52, 93, 95divmul3d 11965 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) = 𝐴 ↔ (((𝑞↑2) − (𝑟↑2)) / 2) = (𝐴 · (𝑞𝑟))))
9791, 96mpbird 257 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) = 𝐴)
98 qsqcl 14092 . . . . . . . . 9 (𝑞 ∈ ℚ → (𝑞↑2) ∈ ℚ)
9953, 98syl 17 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞↑2) ∈ ℚ)
100 qsqcl 14092 . . . . . . . . 9 (𝑟 ∈ ℚ → (𝑟↑2) ∈ ℚ)
10157, 100syl 17 . . . . . . . 8 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑟↑2) ∈ ℚ)
102 qsubcl 12918 . . . . . . . 8 (((𝑞↑2) ∈ ℚ ∧ (𝑟↑2) ∈ ℚ) → ((𝑞↑2) − (𝑟↑2)) ∈ ℚ)
10399, 101, 102syl2anc 585 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((𝑞↑2) − (𝑟↑2)) ∈ ℚ)
104 2z 12559 . . . . . . . 8 2 ∈ ℤ
105 zq 12904 . . . . . . . 8 (2 ∈ ℤ → 2 ∈ ℚ)
106104, 105mp1i 13 . . . . . . 7 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 2 ∈ ℚ)
107 qdivcl 12920 . . . . . . 7 ((((𝑞↑2) − (𝑟↑2)) ∈ ℚ ∧ 2 ∈ ℚ ∧ 2 ≠ 0) → (((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℚ)
108103, 106, 87, 107syl3anc 1374 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℚ)
109 qsubcl 12918 . . . . . . 7 ((𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ) → (𝑞𝑟) ∈ ℚ)
11053, 57, 109syl2anc 585 . . . . . 6 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → (𝑞𝑟) ∈ ℚ)
111 qdivcl 12920 . . . . . 6 (((((𝑞↑2) − (𝑟↑2)) / 2) ∈ ℚ ∧ (𝑞𝑟) ∈ ℚ ∧ (𝑞𝑟) ≠ 0) → ((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) ∈ ℚ)
112108, 110, 95, 111syl3anc 1374 . . . . 5 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → ((((𝑞↑2) − (𝑟↑2)) / 2) / (𝑞𝑟)) ∈ ℚ)
11397, 112eqeltrrd 2837 . . . 4 (((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) ∧ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))) → 𝐴 ∈ ℚ)
114113ex 412 . . 3 ((𝐴 ∈ ℝ ∧ (𝑞 ∈ ℚ ∧ 𝑟 ∈ ℚ)) → ((𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) → 𝐴 ∈ ℚ))
115114rexlimdvva 3194 . 2 (𝐴 ∈ ℝ → (∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟))) → 𝐴 ∈ ℚ))
11649, 115impbid2 226 1 (𝐴 ∈ ℝ → (𝐴 ∈ ℚ ↔ ∃𝑞 ∈ ℚ ∃𝑟 ∈ ℚ (𝑞𝑟 ∧ (abs‘(𝐴𝑞)) = (abs‘(𝐴𝑟)))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 206  wa 395   = wceq 1542  wcel 2114  wne 2932  wrex 3061  cfv 6498  (class class class)co 7367  cc 11036  cr 11037  0cc0 11038  1c1 11039   + caddc 11041   · cmul 11043  cmin 11377  -cneg 11378   / cdiv 11807  2c2 12236  cz 12524  cq 12898  +crp 12942  cexp 14023  abscabs 15196
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1912  ax-6 1969  ax-7 2010  ax-8 2116  ax-9 2124  ax-10 2147  ax-11 2163  ax-12 2185  ax-ext 2708  ax-sep 5231  ax-nul 5241  ax-pow 5307  ax-pr 5375  ax-un 7689  ax-cnex 11094  ax-resscn 11095  ax-1cn 11096  ax-icn 11097  ax-addcl 11098  ax-addrcl 11099  ax-mulcl 11100  ax-mulrcl 11101  ax-mulcom 11102  ax-addass 11103  ax-mulass 11104  ax-distr 11105  ax-i2m1 11106  ax-1ne0 11107  ax-1rid 11108  ax-rnegex 11109  ax-rrecex 11110  ax-cnre 11111  ax-pre-lttri 11112  ax-pre-lttrn 11113  ax-pre-ltadd 11114  ax-pre-mulgt0 11115  ax-pre-sup 11116
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 849  df-3or 1088  df-3an 1089  df-tru 1545  df-fal 1555  df-ex 1782  df-nf 1786  df-sb 2069  df-mo 2539  df-eu 2569  df-clab 2715  df-cleq 2728  df-clel 2811  df-nfc 2885  df-ne 2933  df-nel 3037  df-ral 3052  df-rex 3062  df-rmo 3342  df-reu 3343  df-rab 3390  df-v 3431  df-sbc 3729  df-csb 3838  df-dif 3892  df-un 3894  df-in 3896  df-ss 3906  df-pss 3909  df-nul 4274  df-if 4467  df-pw 4543  df-sn 4568  df-pr 4570  df-op 4574  df-uni 4851  df-iun 4935  df-br 5086  df-opab 5148  df-mpt 5167  df-tr 5193  df-id 5526  df-eprel 5531  df-po 5539  df-so 5540  df-fr 5584  df-we 5586  df-xp 5637  df-rel 5638  df-cnv 5639  df-co 5640  df-dm 5641  df-rn 5642  df-res 5643  df-ima 5644  df-pred 6265  df-ord 6326  df-on 6327  df-lim 6328  df-suc 6329  df-iota 6454  df-fun 6500  df-fn 6501  df-f 6502  df-f1 6503  df-fo 6504  df-f1o 6505  df-fv 6506  df-riota 7324  df-ov 7370  df-oprab 7371  df-mpo 7372  df-om 7818  df-1st 7942  df-2nd 7943  df-frecs 8231  df-wrecs 8262  df-recs 8311  df-rdg 8349  df-er 8643  df-en 8894  df-dom 8895  df-sdom 8896  df-sup 9355  df-pnf 11181  df-mnf 11182  df-xr 11183  df-ltxr 11184  df-le 11185  df-sub 11379  df-neg 11380  df-div 11808  df-nn 12175  df-2 12244  df-3 12245  df-n0 12438  df-z 12525  df-uz 12789  df-q 12899  df-rp 12943  df-seq 13964  df-exp 14024  df-cj 15061  df-re 15062  df-im 15063  df-sqrt 15197  df-abs 15198
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator