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

Theorem pythagtriplem3 12158
Description: Lemma for pythagtrip 12174. Show that 𝐶 and 𝐵 are relatively prime under some conditions. (Contributed by Scott Fenton, 8-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
pythagtriplem3 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → (𝐵 gcd 𝐶) = 1)

Proof of Theorem pythagtriplem3
StepHypRef Expression
1 oveq2 5835 . . . . . . 7 (((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) → ((𝐵↑2) gcd ((𝐴↑2) + (𝐵↑2))) = ((𝐵↑2) gcd (𝐶↑2)))
21adantl 275 . . . . . 6 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → ((𝐵↑2) gcd ((𝐴↑2) + (𝐵↑2))) = ((𝐵↑2) gcd (𝐶↑2)))
3 nnz 9192 . . . . . . . . . . 11 (𝐵 ∈ ℕ → 𝐵 ∈ ℤ)
4 zsqcl 10499 . . . . . . . . . . 11 (𝐵 ∈ ℤ → (𝐵↑2) ∈ ℤ)
53, 4syl 14 . . . . . . . . . 10 (𝐵 ∈ ℕ → (𝐵↑2) ∈ ℤ)
653ad2ant2 1004 . . . . . . . . 9 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → (𝐵↑2) ∈ ℤ)
7 nnz 9192 . . . . . . . . . . 11 (𝐴 ∈ ℕ → 𝐴 ∈ ℤ)
8 zsqcl 10499 . . . . . . . . . . 11 (𝐴 ∈ ℤ → (𝐴↑2) ∈ ℤ)
97, 8syl 14 . . . . . . . . . 10 (𝐴 ∈ ℕ → (𝐴↑2) ∈ ℤ)
1093ad2ant1 1003 . . . . . . . . 9 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → (𝐴↑2) ∈ ℤ)
11 gcdadd 11885 . . . . . . . . 9 (((𝐵↑2) ∈ ℤ ∧ (𝐴↑2) ∈ ℤ) → ((𝐵↑2) gcd (𝐴↑2)) = ((𝐵↑2) gcd ((𝐴↑2) + (𝐵↑2))))
126, 10, 11syl2anc 409 . . . . . . . 8 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → ((𝐵↑2) gcd (𝐴↑2)) = ((𝐵↑2) gcd ((𝐴↑2) + (𝐵↑2))))
136, 10gcdcomd 11874 . . . . . . . 8 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → ((𝐵↑2) gcd (𝐴↑2)) = ((𝐴↑2) gcd (𝐵↑2)))
1412, 13eqtr3d 2192 . . . . . . 7 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → ((𝐵↑2) gcd ((𝐴↑2) + (𝐵↑2))) = ((𝐴↑2) gcd (𝐵↑2)))
1514adantr 274 . . . . . 6 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → ((𝐵↑2) gcd ((𝐴↑2) + (𝐵↑2))) = ((𝐴↑2) gcd (𝐵↑2)))
162, 15eqtr3d 2192 . . . . 5 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → ((𝐵↑2) gcd (𝐶↑2)) = ((𝐴↑2) gcd (𝐵↑2)))
17 simpl2 986 . . . . . 6 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → 𝐵 ∈ ℕ)
18 simpl3 987 . . . . . 6 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → 𝐶 ∈ ℕ)
19 sqgcd 11929 . . . . . 6 ((𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → ((𝐵 gcd 𝐶)↑2) = ((𝐵↑2) gcd (𝐶↑2)))
2017, 18, 19syl2anc 409 . . . . 5 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → ((𝐵 gcd 𝐶)↑2) = ((𝐵↑2) gcd (𝐶↑2)))
21 simpl1 985 . . . . . 6 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → 𝐴 ∈ ℕ)
22 sqgcd 11929 . . . . . 6 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2)))
2321, 17, 22syl2anc 409 . . . . 5 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → ((𝐴 gcd 𝐵)↑2) = ((𝐴↑2) gcd (𝐵↑2)))
2416, 20, 233eqtr4d 2200 . . . 4 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2)) → ((𝐵 gcd 𝐶)↑2) = ((𝐴 gcd 𝐵)↑2))
25243adant3 1002 . . 3 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → ((𝐵 gcd 𝐶)↑2) = ((𝐴 gcd 𝐵)↑2))
26 simp3l 1010 . . . 4 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → (𝐴 gcd 𝐵) = 1)
2726oveq1d 5842 . . 3 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → ((𝐴 gcd 𝐵)↑2) = (1↑2))
2825, 27eqtrd 2190 . 2 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → ((𝐵 gcd 𝐶)↑2) = (1↑2))
2933ad2ant2 1004 . . . . . 6 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → 𝐵 ∈ ℤ)
30 nnz 9192 . . . . . . 7 (𝐶 ∈ ℕ → 𝐶 ∈ ℤ)
31303ad2ant3 1005 . . . . . 6 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → 𝐶 ∈ ℤ)
3229, 31gcdcld 11868 . . . . 5 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → (𝐵 gcd 𝐶) ∈ ℕ0)
3332nn0red 9150 . . . 4 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → (𝐵 gcd 𝐶) ∈ ℝ)
34333ad2ant1 1003 . . 3 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → (𝐵 gcd 𝐶) ∈ ℝ)
3532nn0ge0d 9152 . . . 4 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) → 0 ≤ (𝐵 gcd 𝐶))
36353ad2ant1 1003 . . 3 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → 0 ≤ (𝐵 gcd 𝐶))
37 1re 7880 . . . 4 1 ∈ ℝ
38 0le1 8361 . . . 4 0 ≤ 1
39 sq11 10501 . . . 4 ((((𝐵 gcd 𝐶) ∈ ℝ ∧ 0 ≤ (𝐵 gcd 𝐶)) ∧ (1 ∈ ℝ ∧ 0 ≤ 1)) → (((𝐵 gcd 𝐶)↑2) = (1↑2) ↔ (𝐵 gcd 𝐶) = 1))
4037, 38, 39mpanr12 436 . . 3 (((𝐵 gcd 𝐶) ∈ ℝ ∧ 0 ≤ (𝐵 gcd 𝐶)) → (((𝐵 gcd 𝐶)↑2) = (1↑2) ↔ (𝐵 gcd 𝐶) = 1))
4134, 36, 40syl2anc 409 . 2 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → (((𝐵 gcd 𝐶)↑2) = (1↑2) ↔ (𝐵 gcd 𝐶) = 1))
4228, 41mpbid 146 1 (((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ ∧ 𝐶 ∈ ℕ) ∧ ((𝐴↑2) + (𝐵↑2)) = (𝐶↑2) ∧ ((𝐴 gcd 𝐵) = 1 ∧ ¬ 2 ∥ 𝐴)) → (𝐵 gcd 𝐶) = 1)
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104  w3a 963   = wceq 1335  wcel 2128   class class class wbr 3967  (class class class)co 5827  cr 7734  0cc0 7735  1c1 7736   + caddc 7738  cle 7916  cn 8839  2c2 8890  cz 9173  cexp 10428  cdvds 11695   gcd cgcd 11842
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4082  ax-sep 4085  ax-nul 4093  ax-pow 4138  ax-pr 4172  ax-un 4396  ax-setind 4499  ax-iinf 4550  ax-cnex 7826  ax-resscn 7827  ax-1cn 7828  ax-1re 7829  ax-icn 7830  ax-addcl 7831  ax-addrcl 7832  ax-mulcl 7833  ax-mulrcl 7834  ax-addcom 7835  ax-mulcom 7836  ax-addass 7837  ax-mulass 7838  ax-distr 7839  ax-i2m1 7840  ax-0lt1 7841  ax-1rid 7842  ax-0id 7843  ax-rnegex 7844  ax-precex 7845  ax-cnre 7846  ax-pre-ltirr 7847  ax-pre-ltwlin 7848  ax-pre-lttrn 7849  ax-pre-apti 7850  ax-pre-ltadd 7851  ax-pre-mulgt0 7852  ax-pre-mulext 7853  ax-arch 7854  ax-caucvg 7855
This theorem depends on definitions:  df-bi 116  df-stab 817  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-nul 3396  df-if 3507  df-pw 3546  df-sn 3567  df-pr 3568  df-op 3570  df-uni 3775  df-int 3810  df-iun 3853  df-br 3968  df-opab 4029  df-mpt 4030  df-tr 4066  df-id 4256  df-po 4259  df-iso 4260  df-iord 4329  df-on 4331  df-ilim 4332  df-suc 4334  df-iom 4553  df-xp 4595  df-rel 4596  df-cnv 4597  df-co 4598  df-dm 4599  df-rn 4600  df-res 4601  df-ima 4602  df-iota 5138  df-fun 5175  df-fn 5176  df-f 5177  df-f1 5178  df-fo 5179  df-f1o 5180  df-fv 5181  df-riota 5783  df-ov 5830  df-oprab 5831  df-mpo 5832  df-1st 6091  df-2nd 6092  df-recs 6255  df-frec 6341  df-sup 6931  df-pnf 7917  df-mnf 7918  df-xr 7919  df-ltxr 7920  df-le 7921  df-sub 8053  df-neg 8054  df-reap 8455  df-ap 8462  df-div 8551  df-inn 8840  df-2 8898  df-3 8899  df-4 8900  df-n0 9097  df-z 9174  df-uz 9446  df-q 9536  df-rp 9568  df-fz 9920  df-fzo 10052  df-fl 10179  df-mod 10232  df-seqfrec 10355  df-exp 10429  df-cj 10754  df-re 10755  df-im 10756  df-rsqrt 10910  df-abs 10911  df-dvds 11696  df-gcd 11843
This theorem is referenced by:  pythagtriplem4  12159
  Copyright terms: Public domain W3C validator