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

Theorem pythagtriplem7 12192
Description: Lemma for pythagtrip 12204. Calculate  ( sqr `  ( C  +  B ) ). (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
pythagtriplem7  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( sqr `  ( C  +  B ) )  =  ( ( C  +  B )  gcd  A
) )

Proof of Theorem pythagtriplem7
StepHypRef Expression
1 simp3 988 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  NN )
21nnzd 9304 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  ZZ )
3 simp2 987 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  NN )
43nnzd 9304 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  ZZ )
52, 4zsubcld 9310 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  -  B )  e.  ZZ )
653ad2ant1 1007 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( C  -  B )  e.  ZZ )
71, 3nnaddcld 8897 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  NN )
87nnnn0d 9159 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  NN0 )
983ad2ant1 1007 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( C  +  B )  e.  NN0 )
10 nnnn0 9113 . . . . . . . 8  |-  ( A  e.  NN  ->  A  e.  NN0 )
11103ad2ant1 1007 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  A  e.  NN0 )
12113ad2ant1 1007 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  A  e.  NN0 )
136, 9, 123jca 1166 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( C  -  B
)  e.  ZZ  /\  ( C  +  B
)  e.  NN0  /\  A  e.  NN0 ) )
14 pythagtriplem4 12189 . . . . . . 7  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( C  -  B
)  gcd  ( C  +  B ) )  =  1 )
1514oveq1d 5852 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( ( C  -  B )  gcd  ( C  +  B )
)  gcd  A )  =  ( 1  gcd 
A ) )
16 nnz 9202 . . . . . . . . 9  |-  ( A  e.  NN  ->  A  e.  ZZ )
17163ad2ant1 1007 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  A  e.  ZZ )
18173ad2ant1 1007 . . . . . . 7  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  A  e.  ZZ )
19 1gcd 11914 . . . . . . 7  |-  ( A  e.  ZZ  ->  (
1  gcd  A )  =  1 )
2018, 19syl 14 . . . . . 6  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
1  gcd  A )  =  1 )
2115, 20eqtrd 2197 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( ( C  -  B )  gcd  ( C  +  B )
)  gcd  A )  =  1 )
2213, 21jca 304 . . . 4  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( ( C  -  B )  e.  ZZ  /\  ( C  +  B
)  e.  NN0  /\  A  e.  NN0 )  /\  ( ( ( C  -  B )  gcd  ( C  +  B
) )  gcd  A
)  =  1 ) )
23 oveq1 5844 . . . . . 6  |-  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^
2 )  ->  (
( ( A ^
2 )  +  ( B ^ 2 ) )  -  ( B ^ 2 ) )  =  ( ( C ^ 2 )  -  ( B ^ 2 ) ) )
24233ad2ant2 1008 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( ( A ^
2 )  +  ( B ^ 2 ) )  -  ( B ^ 2 ) )  =  ( ( C ^ 2 )  -  ( B ^ 2 ) ) )
25 nncn 8857 . . . . . . . . 9  |-  ( A  e.  NN  ->  A  e.  CC )
26253ad2ant1 1007 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  A  e.  CC )
2726sqcld 10576 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( A ^ 2 )  e.  CC )
283nncnd 8863 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  CC )
2928sqcld 10576 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( B ^ 2 )  e.  CC )
3027, 29pncand 8202 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( ( A ^
2 )  +  ( B ^ 2 ) )  -  ( B ^ 2 ) )  =  ( A ^
2 ) )
31303ad2ant1 1007 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( ( A ^
2 )  +  ( B ^ 2 ) )  -  ( B ^ 2 ) )  =  ( A ^
2 ) )
321nncnd 8863 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  CC )
33 subsq 10552 . . . . . . . 8  |-  ( ( C  e.  CC  /\  B  e.  CC )  ->  ( ( C ^
2 )  -  ( B ^ 2 ) )  =  ( ( C  +  B )  x.  ( C  -  B
) ) )
3432, 28, 33syl2anc 409 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( C ^ 2 )  -  ( B ^ 2 ) )  =  ( ( C  +  B )  x.  ( C  -  B
) ) )
357nncnd 8863 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  CC )
365zcnd 9306 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  -  B )  e.  CC )
3735, 36mulcomd 7912 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( C  +  B
)  x.  ( C  -  B ) )  =  ( ( C  -  B )  x.  ( C  +  B
) ) )
3834, 37eqtrd 2197 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( C ^ 2 )  -  ( B ^ 2 ) )  =  ( ( C  -  B )  x.  ( C  +  B
) ) )
39383ad2ant1 1007 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( C ^ 2 )  -  ( B ^ 2 ) )  =  ( ( C  -  B )  x.  ( C  +  B
) ) )
4024, 31, 393eqtr3d 2205 . . . 4  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( A ^ 2 )  =  ( ( C  -  B )  x.  ( C  +  B )
) )
41 coprimeprodsq2 12179 . . . 4  |-  ( ( ( ( C  -  B )  e.  ZZ  /\  ( C  +  B
)  e.  NN0  /\  A  e.  NN0 )  /\  ( ( ( C  -  B )  gcd  ( C  +  B
) )  gcd  A
)  =  1 )  ->  ( ( A ^ 2 )  =  ( ( C  -  B )  x.  ( C  +  B )
)  ->  ( C  +  B )  =  ( ( ( C  +  B )  gcd  A
) ^ 2 ) ) )
4222, 40, 41sylc 62 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( C  +  B )  =  ( ( ( C  +  B )  gcd  A ) ^
2 ) )
4342fveq2d 5485 . 2  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( sqr `  ( C  +  B ) )  =  ( sqr `  (
( ( C  +  B )  gcd  A
) ^ 2 ) ) )
447nnzd 9304 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  ZZ )
45443ad2ant1 1007 . . . . 5  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( C  +  B )  e.  ZZ )
4645, 18gcdcld 11890 . . . 4  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( C  +  B
)  gcd  A )  e.  NN0 )
4746nn0red 9160 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  (
( C  +  B
)  gcd  A )  e.  RR )
4846nn0ge0d 9162 . . 3  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  0  <_  ( ( C  +  B )  gcd  A
) )
4947, 48sqrtsqd 11097 . 2  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( sqr `  ( ( ( C  +  B )  gcd  A ) ^
2 ) )  =  ( ( C  +  B )  gcd  A
) )
5043, 49eqtrd 2197 1  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( sqr `  ( C  +  B ) )  =  ( ( C  +  B )  gcd  A
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    /\ w3a 967    = wceq 1342    e. wcel 2135   class class class wbr 3977   ` cfv 5183  (class class class)co 5837   CCcc 7743   1c1 7746    + caddc 7748    x. cmul 7750    - cmin 8061   NNcn 8849   2c2 8900   NN0cn0 9106   ZZcz 9183   ^cexp 10445   sqrcsqrt 10928    || cdvds 11717    gcd cgcd 11864
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 1434  ax-7 1435  ax-gen 1436  ax-ie1 1480  ax-ie2 1481  ax-8 1491  ax-10 1492  ax-11 1493  ax-i12 1494  ax-bndl 1496  ax-4 1497  ax-17 1513  ax-i9 1517  ax-ial 1521  ax-i5r 1522  ax-13 2137  ax-14 2138  ax-ext 2146  ax-coll 4092  ax-sep 4095  ax-nul 4103  ax-pow 4148  ax-pr 4182  ax-un 4406  ax-setind 4509  ax-iinf 4560  ax-cnex 7836  ax-resscn 7837  ax-1cn 7838  ax-1re 7839  ax-icn 7840  ax-addcl 7841  ax-addrcl 7842  ax-mulcl 7843  ax-mulrcl 7844  ax-addcom 7845  ax-mulcom 7846  ax-addass 7847  ax-mulass 7848  ax-distr 7849  ax-i2m1 7850  ax-0lt1 7851  ax-1rid 7852  ax-0id 7853  ax-rnegex 7854  ax-precex 7855  ax-cnre 7856  ax-pre-ltirr 7857  ax-pre-ltwlin 7858  ax-pre-lttrn 7859  ax-pre-apti 7860  ax-pre-ltadd 7861  ax-pre-mulgt0 7862  ax-pre-mulext 7863  ax-arch 7864  ax-caucvg 7865
This theorem depends on definitions:  df-bi 116  df-stab 821  df-dc 825  df-3or 968  df-3an 969  df-tru 1345  df-fal 1348  df-nf 1448  df-sb 1750  df-eu 2016  df-mo 2017  df-clab 2151  df-cleq 2157  df-clel 2160  df-nfc 2295  df-ne 2335  df-nel 2430  df-ral 2447  df-rex 2448  df-reu 2449  df-rmo 2450  df-rab 2451  df-v 2724  df-sbc 2948  df-csb 3042  df-dif 3114  df-un 3116  df-in 3118  df-ss 3125  df-nul 3406  df-if 3517  df-pw 3556  df-sn 3577  df-pr 3578  df-op 3580  df-uni 3785  df-int 3820  df-iun 3863  df-br 3978  df-opab 4039  df-mpt 4040  df-tr 4076  df-id 4266  df-po 4269  df-iso 4270  df-iord 4339  df-on 4341  df-ilim 4342  df-suc 4344  df-iom 4563  df-xp 4605  df-rel 4606  df-cnv 4607  df-co 4608  df-dm 4609  df-rn 4610  df-res 4611  df-ima 4612  df-iota 5148  df-fun 5185  df-fn 5186  df-f 5187  df-f1 5188  df-fo 5189  df-f1o 5190  df-fv 5191  df-riota 5793  df-ov 5840  df-oprab 5841  df-mpo 5842  df-1st 6101  df-2nd 6102  df-recs 6265  df-frec 6351  df-1o 6376  df-2o 6377  df-er 6493  df-en 6699  df-sup 6941  df-pnf 7927  df-mnf 7928  df-xr 7929  df-ltxr 7930  df-le 7931  df-sub 8063  df-neg 8064  df-reap 8465  df-ap 8472  df-div 8561  df-inn 8850  df-2 8908  df-3 8909  df-4 8910  df-n0 9107  df-z 9184  df-uz 9459  df-q 9550  df-rp 9582  df-fz 9937  df-fzo 10069  df-fl 10196  df-mod 10249  df-seqfrec 10372  df-exp 10446  df-cj 10774  df-re 10775  df-im 10776  df-rsqrt 10930  df-abs 10931  df-dvds 11718  df-gcd 11865  df-prm 12029
This theorem is referenced by:  pythagtriplem9  12194  pythagtriplem11  12195  pythagtriplem13  12197
  Copyright terms: Public domain W3C validator