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

Theorem pythag 20647
Description: Pythagorean Theorem. Given three distinct points A, B, and C that form a right triangle (with the right angle at C), prove a relationship between their segment lengths. This theorem is expressed using the complex number plane as a plane, where  F is the signed angle construct (as used in ang180 20644),  X is the distance of line segment BC,  Y is the distance of line segment AC,  Z is the distance of line segment AB (the hypotenuse), and  O is the distinguished (signed) right angle m/_ BCA. We use the law of cosines lawcos 20646 to prove this, along with simple trig facts like coshalfpi 20365 and cosneg 12736. (Contributed by David A. Wheeler, 13-Jun-2015.)
Hypotheses
Ref Expression
lawcos.1  |-  F  =  ( x  e.  ( CC  \  { 0 } ) ,  y  e.  ( CC  \  { 0 } ) 
|->  ( Im `  ( log `  ( y  /  x ) ) ) )
lawcos.2  |-  X  =  ( abs `  ( B  -  C )
)
lawcos.3  |-  Y  =  ( abs `  ( A  -  C )
)
lawcos.4  |-  Z  =  ( abs `  ( A  -  B )
)
lawcos.5  |-  O  =  ( ( B  -  C ) F ( A  -  C ) )
Assertion
Ref Expression
pythag  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( Z ^ 2 )  =  ( ( X ^
2 )  +  ( Y ^ 2 ) ) )
Distinct variable groups:    x, y, A    x, B, y    x, C, y
Allowed substitution hints:    F( x, y)    O( x, y)    X( x, y)    Y( x, y)    Z( x, y)

Proof of Theorem pythag
StepHypRef Expression
1 lawcos.1 . . . 4  |-  F  =  ( x  e.  ( CC  \  { 0 } ) ,  y  e.  ( CC  \  { 0 } ) 
|->  ( Im `  ( log `  ( y  /  x ) ) ) )
2 lawcos.2 . . . 4  |-  X  =  ( abs `  ( B  -  C )
)
3 lawcos.3 . . . 4  |-  Y  =  ( abs `  ( A  -  C )
)
4 lawcos.4 . . . 4  |-  Z  =  ( abs `  ( A  -  B )
)
5 lawcos.5 . . . 4  |-  O  =  ( ( B  -  C ) F ( A  -  C ) )
61, 2, 3, 4, 5lawcos 20646 . . 3  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
) )  ->  ( Z ^ 2 )  =  ( ( ( X ^ 2 )  +  ( Y ^ 2 ) )  -  (
2  x.  ( ( X  x.  Y )  x.  ( cos `  O
) ) ) ) )
763adant3 977 . 2  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( Z ^ 2 )  =  ( ( ( X ^ 2 )  +  ( Y ^ 2 ) )  -  (
2  x.  ( ( X  x.  Y )  x.  ( cos `  O
) ) ) ) )
8 elpri 3826 . . . . . . . . 9  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) ) )
9 fveq2 5719 . . . . . . . . . . 11  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  (
pi  /  2 ) ) )
10 coshalfpi 20365 . . . . . . . . . . 11  |-  ( cos `  ( pi  /  2
) )  =  0
119, 10syl6eq 2483 . . . . . . . . . 10  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
12 fveq2 5719 . . . . . . . . . . 11  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  -u (
pi  /  2 ) ) )
13 cosneghalfpi 20366 . . . . . . . . . . 11  |-  ( cos `  -u ( pi  / 
2 ) )  =  0
1412, 13syl6eq 2483 . . . . . . . . . 10  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
1511, 14jaoi 369 . . . . . . . . 9  |-  ( ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) )  ->  ( cos `  O )  =  0 )
168, 15syl 16 . . . . . . . 8  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( cos `  O )  =  0 )
17163ad2ant3 980 . . . . . . 7  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( cos `  O )  =  0 )
1817oveq2d 6088 . . . . . 6  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
( X  x.  Y
)  x.  ( cos `  O ) )  =  ( ( X  x.  Y )  x.  0 ) )
19 subcl 9294 . . . . . . . . . . . . 13  |-  ( ( B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C
)  e.  CC )
20193adant1 975 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C )  e.  CC )
21203ad2ant1 978 . . . . . . . . . . 11  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( B  -  C )  e.  CC )
2221abscld 12226 . . . . . . . . . 10  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( abs `  ( B  -  C ) )  e.  RR )
2322recnd 9103 . . . . . . . . 9  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( abs `  ( B  -  C ) )  e.  CC )
242, 23syl5eqel 2519 . . . . . . . 8  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  X  e.  CC )
25 subcl 9294 . . . . . . . . . . . . 13  |-  ( ( A  e.  CC  /\  C  e.  CC )  ->  ( A  -  C
)  e.  CC )
26253adant2 976 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( A  -  C )  e.  CC )
27263ad2ant1 978 . . . . . . . . . . 11  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( A  -  C )  e.  CC )
2827abscld 12226 . . . . . . . . . 10  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( abs `  ( A  -  C ) )  e.  RR )
2928recnd 9103 . . . . . . . . 9  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( abs `  ( A  -  C ) )  e.  CC )
303, 29syl5eqel 2519 . . . . . . . 8  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  Y  e.  CC )
3124, 30mulcld 9097 . . . . . . 7  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( X  x.  Y )  e.  CC )
3231mul01d 9254 . . . . . 6  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
( X  x.  Y
)  x.  0 )  =  0 )
3318, 32eqtrd 2467 . . . . 5  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
( X  x.  Y
)  x.  ( cos `  O ) )  =  0 )
3433oveq2d 6088 . . . 4  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
2  x.  ( ( X  x.  Y )  x.  ( cos `  O
) ) )  =  ( 2  x.  0 ) )
35 2cn 10059 . . . . 5  |-  2  e.  CC
3635mul01i 9245 . . . 4  |-  ( 2  x.  0 )  =  0
3734, 36syl6eq 2483 . . 3  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
2  x.  ( ( X  x.  Y )  x.  ( cos `  O
) ) )  =  0 )
3837oveq2d 6088 . 2  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
( ( X ^
2 )  +  ( Y ^ 2 ) )  -  ( 2  x.  ( ( X  x.  Y )  x.  ( cos `  O
) ) ) )  =  ( ( ( X ^ 2 )  +  ( Y ^
2 ) )  - 
0 ) )
3924sqcld 11509 . . . 4  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( X ^ 2 )  e.  CC )
4030sqcld 11509 . . . 4  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( Y ^ 2 )  e.  CC )
4139, 40addcld 9096 . . 3  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
( X ^ 2 )  +  ( Y ^ 2 ) )  e.  CC )
4241subid1d 9389 . 2  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  (
( ( X ^
2 )  +  ( Y ^ 2 ) )  -  0 )  =  ( ( X ^ 2 )  +  ( Y ^ 2 ) ) )
437, 38, 423eqtrd 2471 1  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  ( Z ^ 2 )  =  ( ( X ^
2 )  +  ( Y ^ 2 ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    \/ wo 358    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725    =/= wne 2598    \ cdif 3309   {csn 3806   {cpr 3807   ` cfv 5445  (class class class)co 6072    e. cmpt2 6074   CCcc 8977   0cc0 8979    + caddc 8982    x. cmul 8984    - cmin 9280   -ucneg 9281    / cdiv 9666   2c2 10038   ^cexp 11370   Imcim 11891   abscabs 12027   cosccos 12655   picpi 12657   logclog 20440
This theorem is referenced by:  chordthmlem3  20663
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2416  ax-rep 4312  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4692  ax-inf2 7585  ax-cnex 9035  ax-resscn 9036  ax-1cn 9037  ax-icn 9038  ax-addcl 9039  ax-addrcl 9040  ax-mulcl 9041  ax-mulrcl 9042  ax-mulcom 9043  ax-addass 9044  ax-mulass 9045  ax-distr 9046  ax-i2m1 9047  ax-1ne0 9048  ax-1rid 9049  ax-rnegex 9050  ax-rrecex 9051  ax-cnre 9052  ax-pre-lttri 9053  ax-pre-lttrn 9054  ax-pre-ltadd 9055  ax-pre-mulgt0 9056  ax-pre-sup 9057  ax-addf 9058  ax-mulf 9059
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-nel 2601  df-ral 2702  df-rex 2703  df-reu 2704  df-rmo 2705  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-pss 3328  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-tp 3814  df-op 3815  df-uni 4008  df-int 4043  df-iun 4087  df-iin 4088  df-br 4205  df-opab 4259  df-mpt 4260  df-tr 4295  df-eprel 4486  df-id 4490  df-po 4495  df-so 4496  df-fr 4533  df-se 4534  df-we 4535  df-ord 4576  df-on 4577  df-lim 4578  df-suc 4579  df-om 4837  df-xp 4875  df-rel 4876  df-cnv 4877  df-co 4878  df-dm 4879  df-rn 4880  df-res 4881  df-ima 4882  df-iota 5409  df-fun 5447  df-fn 5448  df-f 5449  df-f1 5450  df-fo 5451  df-f1o 5452  df-fv 5453  df-isom 5454  df-ov 6075  df-oprab 6076  df-mpt2 6077  df-of 6296  df-1st 6340  df-2nd 6341  df-riota 6540  df-recs 6624  df-rdg 6659  df-1o 6715  df-2o 6716  df-oadd 6719  df-er 6896  df-map 7011  df-pm 7012  df-ixp 7055  df-en 7101  df-dom 7102  df-sdom 7103  df-fin 7104  df-fi 7407  df-sup 7437  df-oi 7468  df-card 7815  df-cda 8037  df-pnf 9111  df-mnf 9112  df-xr 9113  df-ltxr 9114  df-le 9115  df-sub 9282  df-neg 9283  df-div 9667  df-nn 9990  df-2 10047  df-3 10048  df-4 10049  df-5 10050  df-6 10051  df-7 10052  df-8 10053  df-9 10054  df-10 10055  df-n0 10211  df-z 10272  df-dec 10372  df-uz 10478  df-q 10564  df-rp 10602  df-xneg 10699  df-xadd 10700  df-xmul 10701  df-ioo 10909  df-ioc 10910  df-ico 10911  df-icc 10912  df-fz 11033  df-fzo 11124  df-fl 11190  df-mod 11239  df-seq 11312  df-exp 11371  df-fac 11555  df-bc 11582  df-hash 11607  df-shft 11870  df-cj 11892  df-re 11893  df-im 11894  df-sqr 12028  df-abs 12029  df-limsup 12253  df-clim 12270  df-rlim 12271  df-sum 12468  df-ef 12658  df-sin 12660  df-cos 12661  df-pi 12663  df-struct 13459  df-ndx 13460  df-slot 13461  df-base 13462  df-sets 13463  df-ress 13464  df-plusg 13530  df-mulr 13531  df-starv 13532  df-sca 13533  df-vsca 13534  df-tset 13536  df-ple 13537  df-ds 13539  df-unif 13540  df-hom 13541  df-cco 13542  df-rest 13638  df-topn 13639  df-topgen 13655  df-pt 13656  df-prds 13659  df-xrs 13714  df-0g 13715  df-gsum 13716  df-qtop 13721  df-imas 13722  df-xps 13724  df-mre 13799  df-mrc 13800  df-acs 13802  df-mnd 14678  df-submnd 14727  df-mulg 14803  df-cntz 15104  df-cmn 15402  df-psmet 16682  df-xmet 16683  df-met 16684  df-bl 16685  df-mopn 16686  df-fbas 16687  df-fg 16688  df-cnfld 16692  df-top 16951  df-bases 16953  df-topon 16954  df-topsp 16955  df-cld 17071  df-ntr 17072  df-cls 17073  df-nei 17150  df-lp 17188  df-perf 17189  df-cn 17279  df-cnp 17280  df-haus 17367  df-tx 17582  df-hmeo 17775  df-fil 17866  df-fm 17958  df-flim 17959  df-flf 17960  df-xms 18338  df-ms 18339  df-tms 18340  df-cncf 18896  df-limc 19741  df-dv 19742  df-log 20442
  Copyright terms: Public domain W3C validator