MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  pythagtriplem3 Unicode version

Theorem pythagtriplem3 12918
Description: Lemma for pythagtrip 12934. Show that  C and 
B are relatively prime under some conditions. (Contributed by Scott Fenton, 8-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
pythagtriplem3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( B  gcd  C )  =  1 )

Proof of Theorem pythagtriplem3
StepHypRef Expression
1 oveq2 5908 . . . . . . 7  |-  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^
2 )  ->  (
( B ^ 2 )  gcd  ( ( A ^ 2 )  +  ( B ^
2 ) ) )  =  ( ( B ^ 2 )  gcd  ( C ^ 2 ) ) )
21adantl 452 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  ( ( B ^ 2 )  gcd  ( ( A ^
2 )  +  ( B ^ 2 ) ) )  =  ( ( B ^ 2 )  gcd  ( C ^ 2 ) ) )
3 nnz 10092 . . . . . . . . . . 11  |-  ( B  e.  NN  ->  B  e.  ZZ )
4 zsqcl 11221 . . . . . . . . . . 11  |-  ( B  e.  ZZ  ->  ( B ^ 2 )  e.  ZZ )
53, 4syl 15 . . . . . . . . . 10  |-  ( B  e.  NN  ->  ( B ^ 2 )  e.  ZZ )
653ad2ant2 977 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( B ^ 2 )  e.  ZZ )
7 nnz 10092 . . . . . . . . . . 11  |-  ( A  e.  NN  ->  A  e.  ZZ )
8 zsqcl 11221 . . . . . . . . . . 11  |-  ( A  e.  ZZ  ->  ( A ^ 2 )  e.  ZZ )
97, 8syl 15 . . . . . . . . . 10  |-  ( A  e.  NN  ->  ( A ^ 2 )  e.  ZZ )
1093ad2ant1 976 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( A ^ 2 )  e.  ZZ )
11 gcdadd 12756 . . . . . . . . 9  |-  ( ( ( B ^ 2 )  e.  ZZ  /\  ( A ^ 2 )  e.  ZZ )  -> 
( ( B ^
2 )  gcd  ( A ^ 2 ) )  =  ( ( B ^ 2 )  gcd  ( ( A ^
2 )  +  ( B ^ 2 ) ) ) )
126, 10, 11syl2anc 642 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( B ^ 2 )  gcd  ( A ^ 2 ) )  =  ( ( B ^ 2 )  gcd  ( ( A ^
2 )  +  ( B ^ 2 ) ) ) )
13 gcdcom 12746 . . . . . . . . 9  |-  ( ( ( B ^ 2 )  e.  ZZ  /\  ( A ^ 2 )  e.  ZZ )  -> 
( ( B ^
2 )  gcd  ( A ^ 2 ) )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
146, 10, 13syl2anc 642 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( B ^ 2 )  gcd  ( A ^ 2 ) )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
1512, 14eqtr3d 2350 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( B ^ 2 )  gcd  ( ( A ^ 2 )  +  ( B ^
2 ) ) )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
1615adantr 451 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  ( ( B ^ 2 )  gcd  ( ( A ^
2 )  +  ( B ^ 2 ) ) )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
172, 16eqtr3d 2350 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  ( ( B ^ 2 )  gcd  ( C ^ 2 ) )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
18 simpl2 959 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  B  e.  NN )
19 simpl3 960 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  C  e.  NN )
20 sqgcd 12784 . . . . . 6  |-  ( ( B  e.  NN  /\  C  e.  NN )  ->  ( ( B  gcd  C ) ^ 2 )  =  ( ( B ^ 2 )  gcd  ( C ^ 2 ) ) )
2118, 19, 20syl2anc 642 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  ( ( B  gcd  C ) ^
2 )  =  ( ( B ^ 2 )  gcd  ( C ^ 2 ) ) )
22 simpl1 958 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  A  e.  NN )
23 sqgcd 12784 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( A  gcd  B ) ^ 2 )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
2422, 18, 23syl2anc 642 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  ( ( A  gcd  B ) ^
2 )  =  ( ( A ^ 2 )  gcd  ( B ^ 2 ) ) )
2517, 21, 243eqtr4d 2358 . . . 4  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  ( ( B  gcd  C ) ^
2 )  =  ( ( A  gcd  B
) ^ 2 ) )
26253adant3 975 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( B  gcd  C
) ^ 2 )  =  ( ( A  gcd  B ) ^
2 ) )
27 simp3l 983 . . . 4  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( A  gcd  B )  =  1 )
2827oveq1d 5915 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( A  gcd  B
) ^ 2 )  =  ( 1 ^ 2 ) )
2926, 28eqtrd 2348 . 2  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( B  gcd  C
) ^ 2 )  =  ( 1 ^ 2 ) )
3033ad2ant2 977 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  ZZ )
31 nnz 10092 . . . . . . 7  |-  ( C  e.  NN  ->  C  e.  ZZ )
32313ad2ant3 978 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  ZZ )
3330, 32gcdcld 12744 . . . . 5  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( B  gcd  C )  e. 
NN0 )
3433nn0red 10066 . . . 4  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( B  gcd  C )  e.  RR )
35343ad2ant1 976 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( B  gcd  C )  e.  RR )
3633nn0ge0d 10068 . . . 4  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  0  <_  ( B  gcd  C
) )
37363ad2ant1 976 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  0  <_  ( B  gcd  C
) )
38 1re 8882 . . . 4  |-  1  e.  RR
39 0le1 9342 . . . 4  |-  0  <_  1
40 sq11 11223 . . . 4  |-  ( ( ( ( B  gcd  C )  e.  RR  /\  0  <_  ( B  gcd  C ) )  /\  (
1  e.  RR  /\  0  <_  1 ) )  ->  ( ( ( B  gcd  C ) ^ 2 )  =  ( 1 ^ 2 )  <->  ( B  gcd  C )  =  1 ) )
4138, 39, 40mpanr12 666 . . 3  |-  ( ( ( B  gcd  C
)  e.  RR  /\  0  <_  ( B  gcd  C ) )  ->  (
( ( B  gcd  C ) ^ 2 )  =  ( 1 ^ 2 )  <->  ( B  gcd  C )  =  1 ) )
4235, 37, 41syl2anc 642 . 2  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( ( B  gcd  C ) ^ 2 )  =  ( 1 ^ 2 )  <->  ( B  gcd  C )  =  1 ) )
4329, 42mpbid 201 1  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( B  gcd  C )  =  1 )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    /\ wa 358    /\ w3a 934    = wceq 1633    e. wcel 1701   class class class wbr 4060  (class class class)co 5900   RRcr 8781   0cc0 8782   1c1 8783    + caddc 8785    <_ cle 8913   NNcn 9791   2c2 9840   ZZcz 10071   ^cexp 11151    || cdivides 12578    gcd cgcd 12732
This theorem is referenced by:  pythagtriplem4  12919
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1537  ax-5 1548  ax-17 1607  ax-9 1645  ax-8 1666  ax-13 1703  ax-14 1705  ax-6 1720  ax-7 1725  ax-11 1732  ax-12 1897  ax-ext 2297  ax-sep 4178  ax-nul 4186  ax-pow 4225  ax-pr 4251  ax-un 4549  ax-cnex 8838  ax-resscn 8839  ax-1cn 8840  ax-icn 8841  ax-addcl 8842  ax-addrcl 8843  ax-mulcl 8844  ax-mulrcl 8845  ax-mulcom 8846  ax-addass 8847  ax-mulass 8848  ax-distr 8849  ax-i2m1 8850  ax-1ne0 8851  ax-1rid 8852  ax-rnegex 8853  ax-rrecex 8854  ax-cnre 8855  ax-pre-lttri 8856  ax-pre-lttrn 8857  ax-pre-ltadd 8858  ax-pre-mulgt0 8859  ax-pre-sup 8860
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1533  df-nf 1536  df-sb 1640  df-eu 2180  df-mo 2181  df-clab 2303  df-cleq 2309  df-clel 2312  df-nfc 2441  df-ne 2481  df-nel 2482  df-ral 2582  df-rex 2583  df-reu 2584  df-rmo 2585  df-rab 2586  df-v 2824  df-sbc 3026  df-csb 3116  df-dif 3189  df-un 3191  df-in 3193  df-ss 3200  df-pss 3202  df-nul 3490  df-if 3600  df-pw 3661  df-sn 3680  df-pr 3681  df-tp 3682  df-op 3683  df-uni 3865  df-iun 3944  df-br 4061  df-opab 4115  df-mpt 4116  df-tr 4151  df-eprel 4342  df-id 4346  df-po 4351  df-so 4352  df-fr 4389  df-we 4391  df-ord 4432  df-on 4433  df-lim 4434  df-suc 4435  df-om 4694  df-xp 4732  df-rel 4733  df-cnv 4734  df-co 4735  df-dm 4736  df-rn 4737  df-res 4738  df-ima 4739  df-iota 5256  df-fun 5294  df-fn 5295  df-f 5296  df-f1 5297  df-fo 5298  df-f1o 5299  df-fv 5300  df-ov 5903  df-oprab 5904  df-mpt2 5905  df-2nd 6165  df-riota 6346  df-recs 6430  df-rdg 6465  df-er 6702  df-en 6907  df-dom 6908  df-sdom 6909  df-sup 7239  df-pnf 8914  df-mnf 8915  df-xr 8916  df-ltxr 8917  df-le 8918  df-sub 9084  df-neg 9085  df-div 9469  df-nn 9792  df-2 9849  df-3 9850  df-n0 10013  df-z 10072  df-uz 10278  df-rp 10402  df-fl 10972  df-mod 11021  df-seq 11094  df-exp 11152  df-cj 11631  df-re 11632  df-im 11633  df-sqr 11767  df-abs 11768  df-dvds 12579  df-gcd 12733
  Copyright terms: Public domain W3C validator