Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  elq2 Structured version   Visualization version   GIF version

Theorem elq2 32841
Description: Elementhood in the rational numbers, providing the canonical representation. (Contributed by Thierry Arnoux, 9-Nov-2025.)
Assertion
Ref Expression
elq2 (𝑄 ∈ ℚ → ∃𝑝 ∈ ℤ ∃𝑞 ∈ ℕ (𝑄 = (𝑝 / 𝑞) ∧ (𝑝 gcd 𝑞) = 1))
Distinct variable group:   𝑄,𝑝,𝑞

Proof of Theorem elq2
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq1 7363 . . . . 5 (𝑝 = (𝑥 / (𝑥 gcd 𝑦)) → (𝑝 / 𝑞) = ((𝑥 / (𝑥 gcd 𝑦)) / 𝑞))
21eqeq2d 2745 . . . 4 (𝑝 = (𝑥 / (𝑥 gcd 𝑦)) → (𝑄 = (𝑝 / 𝑞) ↔ 𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / 𝑞)))
3 oveq1 7363 . . . . 5 (𝑝 = (𝑥 / (𝑥 gcd 𝑦)) → (𝑝 gcd 𝑞) = ((𝑥 / (𝑥 gcd 𝑦)) gcd 𝑞))
43eqeq1d 2736 . . . 4 (𝑝 = (𝑥 / (𝑥 gcd 𝑦)) → ((𝑝 gcd 𝑞) = 1 ↔ ((𝑥 / (𝑥 gcd 𝑦)) gcd 𝑞) = 1))
52, 4anbi12d 632 . . 3 (𝑝 = (𝑥 / (𝑥 gcd 𝑦)) → ((𝑄 = (𝑝 / 𝑞) ∧ (𝑝 gcd 𝑞) = 1) ↔ (𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / 𝑞) ∧ ((𝑥 / (𝑥 gcd 𝑦)) gcd 𝑞) = 1)))
6 oveq2 7364 . . . . 5 (𝑞 = (𝑦 / (𝑥 gcd 𝑦)) → ((𝑥 / (𝑥 gcd 𝑦)) / 𝑞) = ((𝑥 / (𝑥 gcd 𝑦)) / (𝑦 / (𝑥 gcd 𝑦))))
76eqeq2d 2745 . . . 4 (𝑞 = (𝑦 / (𝑥 gcd 𝑦)) → (𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / 𝑞) ↔ 𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / (𝑦 / (𝑥 gcd 𝑦)))))
8 oveq2 7364 . . . . 5 (𝑞 = (𝑦 / (𝑥 gcd 𝑦)) → ((𝑥 / (𝑥 gcd 𝑦)) gcd 𝑞) = ((𝑥 / (𝑥 gcd 𝑦)) gcd (𝑦 / (𝑥 gcd 𝑦))))
98eqeq1d 2736 . . . 4 (𝑞 = (𝑦 / (𝑥 gcd 𝑦)) → (((𝑥 / (𝑥 gcd 𝑦)) gcd 𝑞) = 1 ↔ ((𝑥 / (𝑥 gcd 𝑦)) gcd (𝑦 / (𝑥 gcd 𝑦))) = 1))
107, 9anbi12d 632 . . 3 (𝑞 = (𝑦 / (𝑥 gcd 𝑦)) → ((𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / 𝑞) ∧ ((𝑥 / (𝑥 gcd 𝑦)) gcd 𝑞) = 1) ↔ (𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / (𝑦 / (𝑥 gcd 𝑦))) ∧ ((𝑥 / (𝑥 gcd 𝑦)) gcd (𝑦 / (𝑥 gcd 𝑦))) = 1)))
11 simpllr 775 . . . 4 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑥 ∈ ℤ)
12 simplr 768 . . . . 5 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑦 ∈ ℕ)
1312nnzd 12512 . . . 4 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑦 ∈ ℤ)
1412nnne0d 12193 . . . 4 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑦 ≠ 0)
15 divgcdz 16436 . . . 4 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ ∧ 𝑦 ≠ 0) → (𝑥 / (𝑥 gcd 𝑦)) ∈ ℤ)
1611, 13, 14, 15syl3anc 1373 . . 3 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → (𝑥 / (𝑥 gcd 𝑦)) ∈ ℤ)
17 divgcdnnr 16441 . . . 4 ((𝑦 ∈ ℕ ∧ 𝑥 ∈ ℤ) → (𝑦 / (𝑥 gcd 𝑦)) ∈ ℕ)
1812, 11, 17syl2anc 584 . . 3 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → (𝑦 / (𝑥 gcd 𝑦)) ∈ ℕ)
19 simpr 484 . . . . 5 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑄 = (𝑥 / 𝑦))
2011zcnd 12595 . . . . . 6 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑥 ∈ ℂ)
2112nncnd 12159 . . . . . 6 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑦 ∈ ℂ)
2211, 13gcdcld 16433 . . . . . . 7 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → (𝑥 gcd 𝑦) ∈ ℕ0)
2322nn0cnd 12462 . . . . . 6 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → (𝑥 gcd 𝑦) ∈ ℂ)
2414neneqd 2935 . . . . . . . 8 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → ¬ 𝑦 = 0)
2524intnand 488 . . . . . . 7 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → ¬ (𝑥 = 0 ∧ 𝑦 = 0))
26 gcdeq0 16442 . . . . . . . . 9 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) → ((𝑥 gcd 𝑦) = 0 ↔ (𝑥 = 0 ∧ 𝑦 = 0)))
2726necon3abid 2966 . . . . . . . 8 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) → ((𝑥 gcd 𝑦) ≠ 0 ↔ ¬ (𝑥 = 0 ∧ 𝑦 = 0)))
2827biimpar 477 . . . . . . 7 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ ¬ (𝑥 = 0 ∧ 𝑦 = 0)) → (𝑥 gcd 𝑦) ≠ 0)
2911, 13, 25, 28syl21anc 837 . . . . . 6 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → (𝑥 gcd 𝑦) ≠ 0)
3020, 21, 23, 14, 29divcan7d 11943 . . . . 5 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → ((𝑥 / (𝑥 gcd 𝑦)) / (𝑦 / (𝑥 gcd 𝑦))) = (𝑥 / 𝑦))
3119, 30eqtr4d 2772 . . . 4 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → 𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / (𝑦 / (𝑥 gcd 𝑦))))
32 divgcdcoprm0 16590 . . . . 5 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ ∧ 𝑦 ≠ 0) → ((𝑥 / (𝑥 gcd 𝑦)) gcd (𝑦 / (𝑥 gcd 𝑦))) = 1)
3311, 13, 14, 32syl3anc 1373 . . . 4 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → ((𝑥 / (𝑥 gcd 𝑦)) gcd (𝑦 / (𝑥 gcd 𝑦))) = 1)
3431, 33jca 511 . . 3 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → (𝑄 = ((𝑥 / (𝑥 gcd 𝑦)) / (𝑦 / (𝑥 gcd 𝑦))) ∧ ((𝑥 / (𝑥 gcd 𝑦)) gcd (𝑦 / (𝑥 gcd 𝑦))) = 1))
355, 10, 16, 18, 342rspcedvdw 3588 . 2 ((((𝑄 ∈ ℚ ∧ 𝑥 ∈ ℤ) ∧ 𝑦 ∈ ℕ) ∧ 𝑄 = (𝑥 / 𝑦)) → ∃𝑝 ∈ ℤ ∃𝑞 ∈ ℕ (𝑄 = (𝑝 / 𝑞) ∧ (𝑝 gcd 𝑞) = 1))
36 elq 12861 . . 3 (𝑄 ∈ ℚ ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℕ 𝑄 = (𝑥 / 𝑦))
3736biimpi 216 . 2 (𝑄 ∈ ℚ → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℕ 𝑄 = (𝑥 / 𝑦))
3835, 37r19.29vva 3194 1 (𝑄 ∈ ℚ → ∃𝑝 ∈ ℤ ∃𝑞 ∈ ℕ (𝑄 = (𝑝 / 𝑞) ∧ (𝑝 gcd 𝑞) = 1))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 395   = wceq 1541  wcel 2113  wne 2930  wrex 3058  (class class class)co 7356  0cc0 11024  1c1 11025   / cdiv 11792  cn 12143  cz 12486  cq 12859   gcd cgcd 16419
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1968  ax-7 2009  ax-8 2115  ax-9 2123  ax-10 2146  ax-11 2162  ax-12 2182  ax-ext 2706  ax-sep 5239  ax-nul 5249  ax-pow 5308  ax-pr 5375  ax-un 7678  ax-cnex 11080  ax-resscn 11081  ax-1cn 11082  ax-icn 11083  ax-addcl 11084  ax-addrcl 11085  ax-mulcl 11086  ax-mulrcl 11087  ax-mulcom 11088  ax-addass 11089  ax-mulass 11090  ax-distr 11091  ax-i2m1 11092  ax-1ne0 11093  ax-1rid 11094  ax-rnegex 11095  ax-rrecex 11096  ax-cnre 11097  ax-pre-lttri 11098  ax-pre-lttrn 11099  ax-pre-ltadd 11100  ax-pre-mulgt0 11101  ax-pre-sup 11102
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-3or 1087  df-3an 1088  df-tru 1544  df-fal 1554  df-ex 1781  df-nf 1785  df-sb 2068  df-mo 2537  df-eu 2567  df-clab 2713  df-cleq 2726  df-clel 2809  df-nfc 2883  df-ne 2931  df-nel 3035  df-ral 3050  df-rex 3059  df-rmo 3348  df-reu 3349  df-rab 3398  df-v 3440  df-sbc 3739  df-csb 3848  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-pss 3919  df-nul 4284  df-if 4478  df-pw 4554  df-sn 4579  df-pr 4581  df-op 4585  df-uni 4862  df-iun 4946  df-br 5097  df-opab 5159  df-mpt 5178  df-tr 5204  df-id 5517  df-eprel 5522  df-po 5530  df-so 5531  df-fr 5575  df-we 5577  df-xp 5628  df-rel 5629  df-cnv 5630  df-co 5631  df-dm 5632  df-rn 5633  df-res 5634  df-ima 5635  df-pred 6257  df-ord 6318  df-on 6319  df-lim 6320  df-suc 6321  df-iota 6446  df-fun 6492  df-fn 6493  df-f 6494  df-f1 6495  df-fo 6496  df-f1o 6497  df-fv 6498  df-riota 7313  df-ov 7359  df-oprab 7360  df-mpo 7361  df-om 7807  df-1st 7931  df-2nd 7932  df-frecs 8221  df-wrecs 8252  df-recs 8301  df-rdg 8339  df-er 8633  df-en 8882  df-dom 8883  df-sdom 8884  df-sup 9343  df-inf 9344  df-pnf 11166  df-mnf 11167  df-xr 11168  df-ltxr 11169  df-le 11170  df-sub 11364  df-neg 11365  df-div 11793  df-nn 12144  df-2 12206  df-3 12207  df-n0 12400  df-z 12487  df-uz 12750  df-q 12860  df-rp 12904  df-fl 13710  df-mod 13788  df-seq 13923  df-exp 13983  df-cj 15020  df-re 15021  df-im 15022  df-sqrt 15156  df-abs 15157  df-dvds 16178  df-gcd 16420
This theorem is referenced by:  cos9thpiminplylem2  33889
  Copyright terms: Public domain W3C validator