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

Theorem pythagtriplem6 12228
Description: Lemma for pythagtrip 12241. Calculate  ( sqr `  ( C  -  B ) ). (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
pythagtriplem6  |-  ( ( ( 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 pythagtriplem6
StepHypRef Expression
1 nnz 9235 . . . . . . . . . . 11  |-  ( C  e.  NN  ->  C  e.  ZZ )
213ad2ant3 1016 . . . . . . . . . 10  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  ZZ )
3 nnz 9235 . . . . . . . . . . 11  |-  ( B  e.  NN  ->  B  e.  ZZ )
433ad2ant2 1015 . . . . . . . . . 10  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  ZZ )
52, 4zsubcld 9343 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  -  B )  e.  ZZ )
653ad2ant1 1014 . . . . . . . 8  |-  ( ( ( 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 )
7 pythagtriplem10 12227 . . . . . . . . 9  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) )  ->  0  <  ( C  -  B )
)
873adant3 1013 . . . . . . . 8  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  0  <  ( C  -  B
) )
9 elnnz 9226 . . . . . . . 8  |-  ( ( C  -  B )  e.  NN  <->  ( ( C  -  B )  e.  ZZ  /\  0  < 
( C  -  B
) ) )
106, 8, 9sylanbrc 415 . . . . . . 7  |-  ( ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  /\  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  /\  ( ( A  gcd  B )  =  1  /\ 
-.  2  ||  A
) )  ->  ( C  -  B )  e.  NN )
1110nnnn0d 9192 . . . . . 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 )
12 simp3 995 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  NN )
13 simp2 994 . . . . . . . . 9  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  NN )
1412, 13nnaddcld 8930 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  NN )
1514nnzd 9337 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  ZZ )
16153ad2ant1 1014 . . . . . 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 )
17 nnnn0 9146 . . . . . . . 8  |-  ( A  e.  NN  ->  A  e.  NN0 )
18173ad2ant1 1014 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  A  e.  NN0 )
19183ad2ant1 1014 . . . . . 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 )
2011, 16, 193jca 1173 . . . . 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.  NN0  /\  ( C  +  B
)  e.  ZZ  /\  A  e.  NN0 ) )
21 pythagtriplem4 12226 . . . . . . 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 )
2221oveq1d 5872 . . . . . 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 ) )
23 nnz 9235 . . . . . . . . 9  |-  ( A  e.  NN  ->  A  e.  ZZ )
24233ad2ant1 1014 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  A  e.  ZZ )
25243ad2ant1 1014 . . . . . . 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 )
26 1gcd 11951 . . . . . . 7  |-  ( A  e.  ZZ  ->  (
1  gcd  A )  =  1 )
2725, 26syl 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 )
2822, 27eqtrd 2204 . . . . 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 )
2920, 28jca 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.  NN0  /\  ( C  +  B
)  e.  ZZ  /\  A  e.  NN0 )  /\  ( ( ( C  -  B )  gcd  ( C  +  B
) )  gcd  A
)  =  1 ) )
30 oveq1 5864 . . . . . 6  |-  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^
2 )  ->  (
( ( A ^
2 )  +  ( B ^ 2 ) )  -  ( B ^ 2 ) )  =  ( ( C ^ 2 )  -  ( B ^ 2 ) ) )
31303ad2ant2 1015 . . . . 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 ) ) )
3224zcnd 9339 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  A  e.  CC )
3332sqcld 10611 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( A ^ 2 )  e.  CC )
34 nncn 8890 . . . . . . . . 9  |-  ( B  e.  NN  ->  B  e.  CC )
35343ad2ant2 1015 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  B  e.  CC )
3635sqcld 10611 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( B ^ 2 )  e.  CC )
3733, 36pncand 8235 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( ( A ^
2 )  +  ( B ^ 2 ) )  -  ( B ^ 2 ) )  =  ( A ^
2 ) )
38373ad2ant1 1014 . . . . 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 ) )
39 nncn 8890 . . . . . . . . 9  |-  ( C  e.  NN  ->  C  e.  CC )
40393ad2ant3 1016 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  C  e.  CC )
41 subsq 10586 . . . . . . . 8  |-  ( ( C  e.  CC  /\  B  e.  CC )  ->  ( ( C ^
2 )  -  ( B ^ 2 ) )  =  ( ( C  +  B )  x.  ( C  -  B
) ) )
4240, 35, 41syl2anc 409 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( C ^ 2 )  -  ( B ^ 2 ) )  =  ( ( C  +  B )  x.  ( C  -  B
) ) )
4314nncnd 8896 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  +  B )  e.  CC )
445zcnd 9339 . . . . . . . 8  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  ( C  -  B )  e.  CC )
4543, 44mulcomd 7945 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( C  +  B
)  x.  ( C  -  B ) )  =  ( ( C  -  B )  x.  ( C  +  B
) ) )
4642, 45eqtrd 2204 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN  /\  C  e.  NN )  ->  (
( C ^ 2 )  -  ( B ^ 2 ) )  =  ( ( C  -  B )  x.  ( C  +  B
) ) )
47463ad2ant1 1014 . . . . 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
) ) )
4831, 38, 473eqtr3d 2212 . . . 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 )
) )
49 coprimeprodsq 12215 . . . 4  |-  ( ( ( ( C  -  B )  e.  NN0  /\  ( C  +  B
)  e.  ZZ  /\  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 ) ) )
5029, 48, 49sylc 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 ) )
5150fveq2d 5503 . 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 ) ) )
526, 25gcdcld 11927 . . . 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 )
5352nn0red 9193 . . 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 )
5452nn0ge0d 9195 . . 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
) )
5553, 54sqrtsqd 11133 . 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
) )
5651, 55eqtrd 2204 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 974    = wceq 1349    e. wcel 2142   class class class wbr 3990   ` cfv 5200  (class class class)co 5857   CCcc 7776   0cc0 7778   1c1 7779    + caddc 7781    x. cmul 7783    < clt 7958    - cmin 8094   NNcn 8882   2c2 8933   NN0cn0 9139   ZZcz 9216   ^cexp 10479   sqrcsqrt 10964    || cdvds 11753    gcd cgcd 11901
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 610  ax-in2 611  ax-io 705  ax-5 1441  ax-7 1442  ax-gen 1443  ax-ie1 1487  ax-ie2 1488  ax-8 1498  ax-10 1499  ax-11 1500  ax-i12 1501  ax-bndl 1503  ax-4 1504  ax-17 1520  ax-i9 1524  ax-ial 1528  ax-i5r 1529  ax-13 2144  ax-14 2145  ax-ext 2153  ax-coll 4105  ax-sep 4108  ax-nul 4116  ax-pow 4161  ax-pr 4195  ax-un 4419  ax-setind 4522  ax-iinf 4573  ax-cnex 7869  ax-resscn 7870  ax-1cn 7871  ax-1re 7872  ax-icn 7873  ax-addcl 7874  ax-addrcl 7875  ax-mulcl 7876  ax-mulrcl 7877  ax-addcom 7878  ax-mulcom 7879  ax-addass 7880  ax-mulass 7881  ax-distr 7882  ax-i2m1 7883  ax-0lt1 7884  ax-1rid 7885  ax-0id 7886  ax-rnegex 7887  ax-precex 7888  ax-cnre 7889  ax-pre-ltirr 7890  ax-pre-ltwlin 7891  ax-pre-lttrn 7892  ax-pre-apti 7893  ax-pre-ltadd 7894  ax-pre-mulgt0 7895  ax-pre-mulext 7896  ax-arch 7897  ax-caucvg 7898
This theorem depends on definitions:  df-bi 116  df-stab 827  df-dc 831  df-3or 975  df-3an 976  df-tru 1352  df-fal 1355  df-nf 1455  df-sb 1757  df-eu 2023  df-mo 2024  df-clab 2158  df-cleq 2164  df-clel 2167  df-nfc 2302  df-ne 2342  df-nel 2437  df-ral 2454  df-rex 2455  df-reu 2456  df-rmo 2457  df-rab 2458  df-v 2733  df-sbc 2957  df-csb 3051  df-dif 3124  df-un 3126  df-in 3128  df-ss 3135  df-nul 3416  df-if 3528  df-pw 3569  df-sn 3590  df-pr 3591  df-op 3593  df-uni 3798  df-int 3833  df-iun 3876  df-br 3991  df-opab 4052  df-mpt 4053  df-tr 4089  df-id 4279  df-po 4282  df-iso 4283  df-iord 4352  df-on 4354  df-ilim 4355  df-suc 4357  df-iom 4576  df-xp 4618  df-rel 4619  df-cnv 4620  df-co 4621  df-dm 4622  df-rn 4623  df-res 4624  df-ima 4625  df-iota 5162  df-fun 5202  df-fn 5203  df-f 5204  df-f1 5205  df-fo 5206  df-f1o 5207  df-fv 5208  df-riota 5813  df-ov 5860  df-oprab 5861  df-mpo 5862  df-1st 6123  df-2nd 6124  df-recs 6288  df-frec 6374  df-1o 6399  df-2o 6400  df-er 6517  df-en 6723  df-sup 6965  df-pnf 7960  df-mnf 7961  df-xr 7962  df-ltxr 7963  df-le 7964  df-sub 8096  df-neg 8097  df-reap 8498  df-ap 8505  df-div 8594  df-inn 8883  df-2 8941  df-3 8942  df-4 8943  df-n0 9140  df-z 9217  df-uz 9492  df-q 9583  df-rp 9615  df-fz 9970  df-fzo 10103  df-fl 10230  df-mod 10283  df-seqfrec 10406  df-exp 10480  df-cj 10810  df-re 10811  df-im 10812  df-rsqrt 10966  df-abs 10967  df-dvds 11754  df-gcd 11902  df-prm 12066
This theorem is referenced by:  pythagtriplem8  12230  pythagtriplem11  12232  pythagtriplem13  12234
  Copyright terms: Public domain W3C validator