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

Theorem pythag 20109
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 20106),  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 20108 to prove this, along with simple trig facts like coshalfpi 19831 and cosneg 12421. (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 20108 . . 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 3661 . . . . . . . . 9  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) ) )
9 fveq2 5485 . . . . . . . . . . 11  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  (
pi  /  2 ) ) )
10 coshalfpi 19831 . . . . . . . . . . 11  |-  ( cos `  ( pi  /  2
) )  =  0
119, 10syl6eq 2332 . . . . . . . . . 10  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
12 fveq2 5485 . . . . . . . . . . 11  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  -u (
pi  /  2 ) ) )
13 pire 19826 . . . . . . . . . . . . . . 15  |-  pi  e.  RR
1413recni 8844 . . . . . . . . . . . . . 14  |-  pi  e.  CC
15 2cn 9811 . . . . . . . . . . . . . 14  |-  2  e.  CC
16 2ne0 9824 . . . . . . . . . . . . . 14  |-  2  =/=  0
1714, 15, 16divcli 9497 . . . . . . . . . . . . 13  |-  ( pi 
/  2 )  e.  CC
18 cosneg 12421 . . . . . . . . . . . . 13  |-  ( ( pi  /  2 )  e.  CC  ->  ( cos `  -u ( pi  / 
2 ) )  =  ( cos `  (
pi  /  2 ) ) )
1917, 18ax-mp 10 . . . . . . . . . . . 12  |-  ( cos `  -u ( pi  / 
2 ) )  =  ( cos `  (
pi  /  2 ) )
2019, 10eqtri 2304 . . . . . . . . . . 11  |-  ( cos `  -u ( pi  / 
2 ) )  =  0
2112, 20syl6eq 2332 . . . . . . . . . 10  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
2211, 21jaoi 370 . . . . . . . . 9  |-  ( ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) )  ->  ( cos `  O )  =  0 )
238, 22syl 17 . . . . . . . 8  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( cos `  O )  =  0 )
24233ad2ant3 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 )
2524oveq2d 5835 . . . . . 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 ) )
26 subcl 9046 . . . . . . . . . . . . 13  |-  ( ( B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C
)  e.  CC )
27263adant1 975 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C )  e.  CC )
28273ad2ant1 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 )
2928abscld 11912 . . . . . . . . . 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 )
3029recnd 8856 . . . . . . . . 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 )
312, 30syl5eqel 2368 . . . . . . . 8  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  X  e.  CC )
32 subcl 9046 . . . . . . . . . . . . 13  |-  ( ( A  e.  CC  /\  C  e.  CC )  ->  ( A  -  C
)  e.  CC )
33323adant2 976 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( A  -  C )  e.  CC )
34333ad2ant1 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 )
3534abscld 11912 . . . . . . . . . 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 )
3635recnd 8856 . . . . . . . . 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 )
373, 36syl5eqel 2368 . . . . . . . 8  |-  ( ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  /\  ( A  =/=  C  /\  B  =/=  C
)  /\  O  e.  { ( pi  /  2
) ,  -u (
pi  /  2 ) } )  ->  Y  e.  CC )
3831, 37mulcld 8850 . . . . . . 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 )
3938mul01d 9006 . . . . . 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 )
4025, 39eqtrd 2316 . . . . 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 )
4140oveq2d 5835 . . . 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 ) )
4215mul01i 8997 . . . 4  |-  ( 2  x.  0 )  =  0
4341, 42syl6eq 2332 . . 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 )
4443oveq2d 5835 . 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 ) )
4531sqcld 11237 . . . 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 )
4637sqcld 11237 . . . 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 )
4745, 46addcld 8849 . . 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 )
4847subid1d 9141 . 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 ) ) )
497, 44, 483eqtrd 2320 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 6    \/ wo 359    /\ wa 360    /\ w3a 936    = wceq 1624    e. wcel 1685    =/= wne 2447    \ cdif 3150   {csn 3641   {cpr 3642   ` cfv 5221  (class class class)co 5819    e. cmpt2 5821   CCcc 8730   0cc0 8732    + caddc 8735    x. cmul 8737    - cmin 9032   -ucneg 9033    / cdiv 9418   2c2 9790   ^cexp 11098   Imcim 11577   abscabs 11713   cosccos 12340   picpi 12342   logclog 19906
This theorem is referenced by:  chordthmlem3  20125
This theorem was proved from axioms:  ax-1 7  ax-2 8  ax-3 9  ax-mp 10  ax-gen 1534  ax-5 1545  ax-17 1604  ax-9 1637  ax-8 1645  ax-13 1687  ax-14 1689  ax-6 1704  ax-7 1709  ax-11 1716  ax-12 1867  ax-ext 2265  ax-rep 4132  ax-sep 4142  ax-nul 4150  ax-pow 4187  ax-pr 4213  ax-un 4511  ax-inf2 7337  ax-cnex 8788  ax-resscn 8789  ax-1cn 8790  ax-icn 8791  ax-addcl 8792  ax-addrcl 8793  ax-mulcl 8794  ax-mulrcl 8795  ax-mulcom 8796  ax-addass 8797  ax-mulass 8798  ax-distr 8799  ax-i2m1 8800  ax-1ne0 8801  ax-1rid 8802  ax-rnegex 8803  ax-rrecex 8804  ax-cnre 8805  ax-pre-lttri 8806  ax-pre-lttrn 8807  ax-pre-ltadd 8808  ax-pre-mulgt0 8809  ax-pre-sup 8810  ax-addf 8811  ax-mulf 8812
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 937  df-3an 938  df-tru 1312  df-ex 1530  df-nf 1533  df-sb 1632  df-eu 2148  df-mo 2149  df-clab 2271  df-cleq 2277  df-clel 2280  df-nfc 2409  df-ne 2449  df-nel 2450  df-ral 2549  df-rex 2550  df-reu 2551  df-rmo 2552  df-rab 2553  df-v 2791  df-sbc 2993  df-csb 3083  df-dif 3156  df-un 3158  df-in 3160  df-ss 3167  df-pss 3169  df-nul 3457  df-if 3567  df-pw 3628  df-sn 3647  df-pr 3648  df-tp 3649  df-op 3650  df-uni 3829  df-int 3864  df-iun 3908  df-iin 3909  df-br 4025  df-opab 4079  df-mpt 4080  df-tr 4115  df-eprel 4304  df-id 4308  df-po 4313  df-so 4314  df-fr 4351  df-se 4352  df-we 4353  df-ord 4394  df-on 4395  df-lim 4396  df-suc 4397  df-om 4656  df-xp 4694  df-rel 4695  df-cnv 4696  df-co 4697  df-dm 4698  df-rn 4699  df-res 4700  df-ima 4701  df-fun 5223  df-fn 5224  df-f 5225  df-f1 5226  df-fo 5227  df-f1o 5228  df-fv 5229  df-isom 5230  df-ov 5822  df-oprab 5823  df-mpt2 5824  df-of 6039  df-1st 6083  df-2nd 6084  df-iota 6252  df-riota 6299  df-recs 6383  df-rdg 6418  df-1o 6474  df-2o 6475  df-oadd 6478  df-er 6655  df-map 6769  df-pm 6770  df-ixp 6813  df-en 6859  df-dom 6860  df-sdom 6861  df-fin 6862  df-fi 7160  df-sup 7189  df-oi 7220  df-card 7567  df-cda 7789  df-pnf 8864  df-mnf 8865  df-xr 8866  df-ltxr 8867  df-le 8868  df-sub 9034  df-neg 9035  df-div 9419  df-nn 9742  df-2 9799  df-3 9800  df-4 9801  df-5 9802  df-6 9803  df-7 9804  df-8 9805  df-9 9806  df-10 9807  df-n0 9961  df-z 10020  df-dec 10120  df-uz 10226  df-q 10312  df-rp 10350  df-xneg 10447  df-xadd 10448  df-xmul 10449  df-ioo 10654  df-ioc 10655  df-ico 10656  df-icc 10657  df-fz 10777  df-fzo 10865  df-fl 10919  df-mod 10968  df-seq 11041  df-exp 11099  df-fac 11283  df-bc 11310  df-hash 11332  df-shft 11556  df-cj 11578  df-re 11579  df-im 11580  df-sqr 11714  df-abs 11715  df-limsup 11939  df-clim 11956  df-rlim 11957  df-sum 12153  df-ef 12343  df-sin 12345  df-cos 12346  df-pi 12348  df-struct 13144  df-ndx 13145  df-slot 13146  df-base 13147  df-sets 13148  df-ress 13149  df-plusg 13215  df-mulr 13216  df-starv 13217  df-sca 13218  df-vsca 13219  df-tset 13221  df-ple 13222  df-ds 13224  df-hom 13226  df-cco 13227  df-rest 13321  df-topn 13322  df-topgen 13338  df-pt 13339  df-prds 13342  df-xrs 13397  df-0g 13398  df-gsum 13399  df-qtop 13404  df-imas 13405  df-xps 13407  df-mre 13482  df-mrc 13483  df-acs 13485  df-mnd 14361  df-submnd 14410  df-mulg 14486  df-cntz 14787  df-cmn 15085  df-xmet 16367  df-met 16368  df-bl 16369  df-mopn 16370  df-cnfld 16372  df-top 16630  df-bases 16632  df-topon 16633  df-topsp 16634  df-cld 16750  df-ntr 16751  df-cls 16752  df-nei 16829  df-lp 16862  df-perf 16863  df-cn 16951  df-cnp 16952  df-haus 17037  df-tx 17251  df-hmeo 17440  df-fbas 17514  df-fg 17515  df-fil 17535  df-fm 17627  df-flim 17628  df-flf 17629  df-xms 17879  df-ms 17880  df-tms 17881  df-cncf 18376  df-limc 19210  df-dv 19211  df-log 19908
  Copyright terms: Public domain W3C validator