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

Theorem 2sqlem8a 26009
Description: Lemma for 2sqlem8 26010. (Contributed by Mario Carneiro, 4-Jun-2016.)
Hypotheses
Ref Expression
2sq.1 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))
2sqlem7.2 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))}
2sqlem9.5 (𝜑 → ∀𝑏 ∈ (1...(𝑀 − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
2sqlem9.7 (𝜑𝑀𝑁)
2sqlem8.n (𝜑𝑁 ∈ ℕ)
2sqlem8.m (𝜑𝑀 ∈ (ℤ‘2))
2sqlem8.1 (𝜑𝐴 ∈ ℤ)
2sqlem8.2 (𝜑𝐵 ∈ ℤ)
2sqlem8.3 (𝜑 → (𝐴 gcd 𝐵) = 1)
2sqlem8.4 (𝜑𝑁 = ((𝐴↑2) + (𝐵↑2)))
2sqlem8.c 𝐶 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))
2sqlem8.d 𝐷 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))
Assertion
Ref Expression
2sqlem8a (𝜑 → (𝐶 gcd 𝐷) ∈ ℕ)
Distinct variable groups:   𝑎,𝑏,𝑤,𝑥,𝑦,𝑧   𝐴,𝑎,𝑥,𝑦,𝑧   𝑥,𝐶   𝜑,𝑥,𝑦   𝐵,𝑎,𝑏,𝑥,𝑦   𝑀,𝑎,𝑏,𝑥,𝑦,𝑧   𝑆,𝑎,𝑏,𝑥,𝑦,𝑧   𝑥,𝐷   𝑥,𝑁,𝑦,𝑧   𝑌,𝑎,𝑏,𝑥,𝑦
Allowed substitution hints:   𝜑(𝑧,𝑤,𝑎,𝑏)   𝐴(𝑤,𝑏)   𝐵(𝑧,𝑤)   𝐶(𝑦,𝑧,𝑤,𝑎,𝑏)   𝐷(𝑦,𝑧,𝑤,𝑎,𝑏)   𝑆(𝑤)   𝑀(𝑤)   𝑁(𝑤,𝑎,𝑏)   𝑌(𝑧,𝑤)

Proof of Theorem 2sqlem8a
StepHypRef Expression
1 2sqlem8.1 . . . 4 (𝜑𝐴 ∈ ℤ)
2 2sqlem8.m . . . . . 6 (𝜑𝑀 ∈ (ℤ‘2))
3 eluz2b3 12310 . . . . . 6 (𝑀 ∈ (ℤ‘2) ↔ (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1))
42, 3sylib 221 . . . . 5 (𝜑 → (𝑀 ∈ ℕ ∧ 𝑀 ≠ 1))
54simpld 498 . . . 4 (𝜑𝑀 ∈ ℕ)
6 2sqlem8.c . . . 4 𝐶 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))
71, 5, 64sqlem5 16268 . . 3 (𝜑 → (𝐶 ∈ ℤ ∧ ((𝐴𝐶) / 𝑀) ∈ ℤ))
87simpld 498 . 2 (𝜑𝐶 ∈ ℤ)
9 2sqlem8.2 . . . 4 (𝜑𝐵 ∈ ℤ)
10 2sqlem8.d . . . 4 𝐷 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))
119, 5, 104sqlem5 16268 . . 3 (𝜑 → (𝐷 ∈ ℤ ∧ ((𝐵𝐷) / 𝑀) ∈ ℤ))
1211simpld 498 . 2 (𝜑𝐷 ∈ ℤ)
134simprd 499 . . . 4 (𝜑𝑀 ≠ 1)
14 simpr 488 . . . . . . . . . 10 ((𝜑 ∧ (𝐶↑2) = 0) → (𝐶↑2) = 0)
151, 5, 6, 144sqlem9 16272 . . . . . . . . 9 ((𝜑 ∧ (𝐶↑2) = 0) → (𝑀↑2) ∥ (𝐴↑2))
1615ex 416 . . . . . . . 8 (𝜑 → ((𝐶↑2) = 0 → (𝑀↑2) ∥ (𝐴↑2)))
17 eluzelz 12241 . . . . . . . . . 10 (𝑀 ∈ (ℤ‘2) → 𝑀 ∈ ℤ)
182, 17syl 17 . . . . . . . . 9 (𝜑𝑀 ∈ ℤ)
19 dvdssq 15901 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (𝑀𝐴 ↔ (𝑀↑2) ∥ (𝐴↑2)))
2018, 1, 19syl2anc 587 . . . . . . . 8 (𝜑 → (𝑀𝐴 ↔ (𝑀↑2) ∥ (𝐴↑2)))
2116, 20sylibrd 262 . . . . . . 7 (𝜑 → ((𝐶↑2) = 0 → 𝑀𝐴))
22 simpr 488 . . . . . . . . . 10 ((𝜑 ∧ (𝐷↑2) = 0) → (𝐷↑2) = 0)
239, 5, 10, 224sqlem9 16272 . . . . . . . . 9 ((𝜑 ∧ (𝐷↑2) = 0) → (𝑀↑2) ∥ (𝐵↑2))
2423ex 416 . . . . . . . 8 (𝜑 → ((𝐷↑2) = 0 → (𝑀↑2) ∥ (𝐵↑2)))
25 dvdssq 15901 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝑀𝐵 ↔ (𝑀↑2) ∥ (𝐵↑2)))
2618, 9, 25syl2anc 587 . . . . . . . 8 (𝜑 → (𝑀𝐵 ↔ (𝑀↑2) ∥ (𝐵↑2)))
2724, 26sylibrd 262 . . . . . . 7 (𝜑 → ((𝐷↑2) = 0 → 𝑀𝐵))
28 2sqlem8.3 . . . . . . . . . . 11 (𝜑 → (𝐴 gcd 𝐵) = 1)
29 ax-1ne0 10595 . . . . . . . . . . . 12 1 ≠ 0
3029a1i 11 . . . . . . . . . . 11 (𝜑 → 1 ≠ 0)
3128, 30eqnetrd 3054 . . . . . . . . . 10 (𝜑 → (𝐴 gcd 𝐵) ≠ 0)
3231neneqd 2992 . . . . . . . . 9 (𝜑 → ¬ (𝐴 gcd 𝐵) = 0)
33 gcdeq0 15855 . . . . . . . . . 10 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0)))
341, 9, 33syl2anc 587 . . . . . . . . 9 (𝜑 → ((𝐴 gcd 𝐵) = 0 ↔ (𝐴 = 0 ∧ 𝐵 = 0)))
3532, 34mtbid 327 . . . . . . . 8 (𝜑 → ¬ (𝐴 = 0 ∧ 𝐵 = 0))
36 dvdslegcd 15843 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ¬ (𝐴 = 0 ∧ 𝐵 = 0)) → ((𝑀𝐴𝑀𝐵) → 𝑀 ≤ (𝐴 gcd 𝐵)))
3718, 1, 9, 35, 36syl31anc 1370 . . . . . . 7 (𝜑 → ((𝑀𝐴𝑀𝐵) → 𝑀 ≤ (𝐴 gcd 𝐵)))
3821, 27, 37syl2and 610 . . . . . 6 (𝜑 → (((𝐶↑2) = 0 ∧ (𝐷↑2) = 0) → 𝑀 ≤ (𝐴 gcd 𝐵)))
3928breq2d 5042 . . . . . . 7 (𝜑 → (𝑀 ≤ (𝐴 gcd 𝐵) ↔ 𝑀 ≤ 1))
40 nnle1eq1 11655 . . . . . . . 8 (𝑀 ∈ ℕ → (𝑀 ≤ 1 ↔ 𝑀 = 1))
415, 40syl 17 . . . . . . 7 (𝜑 → (𝑀 ≤ 1 ↔ 𝑀 = 1))
4239, 41bitrd 282 . . . . . 6 (𝜑 → (𝑀 ≤ (𝐴 gcd 𝐵) ↔ 𝑀 = 1))
4338, 42sylibd 242 . . . . 5 (𝜑 → (((𝐶↑2) = 0 ∧ (𝐷↑2) = 0) → 𝑀 = 1))
4443necon3ad 3000 . . . 4 (𝜑 → (𝑀 ≠ 1 → ¬ ((𝐶↑2) = 0 ∧ (𝐷↑2) = 0)))
4513, 44mpd 15 . . 3 (𝜑 → ¬ ((𝐶↑2) = 0 ∧ (𝐷↑2) = 0))
468zcnd 12076 . . . . 5 (𝜑𝐶 ∈ ℂ)
47 sqeq0 13482 . . . . 5 (𝐶 ∈ ℂ → ((𝐶↑2) = 0 ↔ 𝐶 = 0))
4846, 47syl 17 . . . 4 (𝜑 → ((𝐶↑2) = 0 ↔ 𝐶 = 0))
4912zcnd 12076 . . . . 5 (𝜑𝐷 ∈ ℂ)
50 sqeq0 13482 . . . . 5 (𝐷 ∈ ℂ → ((𝐷↑2) = 0 ↔ 𝐷 = 0))
5149, 50syl 17 . . . 4 (𝜑 → ((𝐷↑2) = 0 ↔ 𝐷 = 0))
5248, 51anbi12d 633 . . 3 (𝜑 → (((𝐶↑2) = 0 ∧ (𝐷↑2) = 0) ↔ (𝐶 = 0 ∧ 𝐷 = 0)))
5345, 52mtbid 327 . 2 (𝜑 → ¬ (𝐶 = 0 ∧ 𝐷 = 0))
54 gcdn0cl 15841 . 2 (((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) ∧ ¬ (𝐶 = 0 ∧ 𝐷 = 0)) → (𝐶 gcd 𝐷) ∈ ℕ)
558, 12, 53, 54syl21anc 836 1 (𝜑 → (𝐶 gcd 𝐷) ∈ ℕ)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 209  wa 399   = wceq 1538  wcel 2111  {cab 2776  wne 2987  wral 3106  wrex 3107   class class class wbr 5030  cmpt 5110  ran crn 5520  cfv 6324  (class class class)co 7135  cc 10524  0cc0 10526  1c1 10527   + caddc 10529  cle 10665  cmin 10859   / cdiv 11286  cn 11625  2c2 11680  cz 11969  cuz 12231  ...cfz 12885   mod cmo 13232  cexp 13425  abscabs 14585  cdvds 15599   gcd cgcd 15833  ℤ[i]cgz 16255
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 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5167  ax-nul 5174  ax-pow 5231  ax-pr 5295  ax-un 7441  ax-cnex 10582  ax-resscn 10583  ax-1cn 10584  ax-icn 10585  ax-addcl 10586  ax-addrcl 10587  ax-mulcl 10588  ax-mulrcl 10589  ax-mulcom 10590  ax-addass 10591  ax-mulass 10592  ax-distr 10593  ax-i2m1 10594  ax-1ne0 10595  ax-1rid 10596  ax-rnegex 10597  ax-rrecex 10598  ax-cnre 10599  ax-pre-lttri 10600  ax-pre-lttrn 10601  ax-pre-ltadd 10602  ax-pre-mulgt0 10603  ax-pre-sup 10604
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-nel 3092  df-ral 3111  df-rex 3112  df-reu 3113  df-rmo 3114  df-rab 3115  df-v 3443  df-sbc 3721  df-csb 3829  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-pss 3900  df-nul 4244  df-if 4426  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4801  df-iun 4883  df-br 5031  df-opab 5093  df-mpt 5111  df-tr 5137  df-id 5425  df-eprel 5430  df-po 5438  df-so 5439  df-fr 5478  df-we 5480  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-res 5531  df-ima 5532  df-pred 6116  df-ord 6162  df-on 6163  df-lim 6164  df-suc 6165  df-iota 6283  df-fun 6326  df-fn 6327  df-f 6328  df-f1 6329  df-fo 6330  df-f1o 6331  df-fv 6332  df-riota 7093  df-ov 7138  df-oprab 7139  df-mpo 7140  df-om 7561  df-2nd 7672  df-wrecs 7930  df-recs 7991  df-rdg 8029  df-er 8272  df-en 8493  df-dom 8494  df-sdom 8495  df-sup 8890  df-inf 8891  df-pnf 10666  df-mnf 10667  df-xr 10668  df-ltxr 10669  df-le 10670  df-sub 10861  df-neg 10862  df-div 11287  df-nn 11626  df-2 11688  df-3 11689  df-n0 11886  df-z 11970  df-uz 12232  df-rp 12378  df-fl 13157  df-mod 13233  df-seq 13365  df-exp 13426  df-cj 14450  df-re 14451  df-im 14452  df-sqrt 14586  df-abs 14587  df-dvds 15600  df-gcd 15834
This theorem is referenced by:  2sqlem8  26010
  Copyright terms: Public domain W3C validator