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

Theorem pythag 20115
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 20112),  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 20114 to prove this, along with simple trig facts like coshalfpi 19837 and cosneg 12427. (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 20114 . . 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 975 . 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 3660 . . . . . . . . 9  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) ) )
9 fveq2 5525 . . . . . . . . . . 11  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  (
pi  /  2 ) ) )
10 coshalfpi 19837 . . . . . . . . . . 11  |-  ( cos `  ( pi  /  2
) )  =  0
119, 10syl6eq 2331 . . . . . . . . . 10  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
12 fveq2 5525 . . . . . . . . . . 11  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  -u (
pi  /  2 ) ) )
13 pire 19832 . . . . . . . . . . . . . . 15  |-  pi  e.  RR
1413recni 8849 . . . . . . . . . . . . . 14  |-  pi  e.  CC
15 2cn 9816 . . . . . . . . . . . . . 14  |-  2  e.  CC
16 2ne0 9829 . . . . . . . . . . . . . 14  |-  2  =/=  0
1714, 15, 16divcli 9502 . . . . . . . . . . . . 13  |-  ( pi 
/  2 )  e.  CC
18 cosneg 12427 . . . . . . . . . . . . 13  |-  ( ( pi  /  2 )  e.  CC  ->  ( cos `  -u ( pi  / 
2 ) )  =  ( cos `  (
pi  /  2 ) ) )
1917, 18ax-mp 8 . . . . . . . . . . . 12  |-  ( cos `  -u ( pi  / 
2 ) )  =  ( cos `  (
pi  /  2 ) )
2019, 10eqtri 2303 . . . . . . . . . . 11  |-  ( cos `  -u ( pi  / 
2 ) )  =  0
2112, 20syl6eq 2331 . . . . . . . . . 10  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
2211, 21jaoi 368 . . . . . . . . 9  |-  ( ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) )  ->  ( cos `  O )  =  0 )
238, 22syl 15 . . . . . . . 8  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( cos `  O )  =  0 )
24233ad2ant3 978 . . . . . . 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 5874 . . . . . 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 9051 . . . . . . . . . . . . 13  |-  ( ( B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C
)  e.  CC )
27263adant1 973 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C )  e.  CC )
28273ad2ant1 976 . . . . . . . . . . 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 11918 . . . . . . . . . 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 8861 . . . . . . . . 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 2367 . . . . . . . 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 9051 . . . . . . . . . . . . 13  |-  ( ( A  e.  CC  /\  C  e.  CC )  ->  ( A  -  C
)  e.  CC )
33323adant2 974 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( A  -  C )  e.  CC )
34333ad2ant1 976 . . . . . . . . . . 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 11918 . . . . . . . . . 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 8861 . . . . . . . . 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 2367 . . . . . . . 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 8855 . . . . . . 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 9011 . . . . . 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 2315 . . . . 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 5874 . . . 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 9002 . . . 4  |-  ( 2  x.  0 )  =  0
4341, 42syl6eq 2331 . . 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 5874 . 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 11243 . . . 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 11243 . . . 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 8854 . . 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 9146 . 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 2319 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 357    /\ wa 358    /\ w3a 934    = wceq 1623    e. wcel 1684    =/= wne 2446    \ cdif 3149   {csn 3640   {cpr 3641   ` cfv 5255  (class class class)co 5858    e. cmpt2 5860   CCcc 8735   0cc0 8737    + caddc 8740    x. cmul 8742    - cmin 9037   -ucneg 9038    / cdiv 9423   2c2 9795   ^cexp 11104   Imcim 11583   abscabs 11719   cosccos 12346   picpi 12348   logclog 19912
This theorem is referenced by:  chordthmlem3  20131
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-inf2 7342  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815  ax-addf 8816  ax-mulf 8817
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 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-iin 3908  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-se 4353  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-isom 5264  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-of 6078  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-map 6774  df-pm 6775  df-ixp 6818  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-fi 7165  df-sup 7194  df-oi 7225  df-card 7572  df-cda 7794  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-4 9806  df-5 9807  df-6 9808  df-7 9809  df-8 9810  df-9 9811  df-10 9812  df-n0 9966  df-z 10025  df-dec 10125  df-uz 10231  df-q 10317  df-rp 10355  df-xneg 10452  df-xadd 10453  df-xmul 10454  df-ioo 10660  df-ioc 10661  df-ico 10662  df-icc 10663  df-fz 10783  df-fzo 10871  df-fl 10925  df-mod 10974  df-seq 11047  df-exp 11105  df-fac 11289  df-bc 11316  df-hash 11338  df-shft 11562  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-limsup 11945  df-clim 11962  df-rlim 11963  df-sum 12159  df-ef 12349  df-sin 12351  df-cos 12352  df-pi 12354  df-struct 13150  df-ndx 13151  df-slot 13152  df-base 13153  df-sets 13154  df-ress 13155  df-plusg 13221  df-mulr 13222  df-starv 13223  df-sca 13224  df-vsca 13225  df-tset 13227  df-ple 13228  df-ds 13230  df-hom 13232  df-cco 13233  df-rest 13327  df-topn 13328  df-topgen 13344  df-pt 13345  df-prds 13348  df-xrs 13403  df-0g 13404  df-gsum 13405  df-qtop 13410  df-imas 13411  df-xps 13413  df-mre 13488  df-mrc 13489  df-acs 13491  df-mnd 14367  df-submnd 14416  df-mulg 14492  df-cntz 14793  df-cmn 15091  df-xmet 16373  df-met 16374  df-bl 16375  df-mopn 16376  df-cnfld 16378  df-top 16636  df-bases 16638  df-topon 16639  df-topsp 16640  df-cld 16756  df-ntr 16757  df-cls 16758  df-nei 16835  df-lp 16868  df-perf 16869  df-cn 16957  df-cnp 16958  df-haus 17043  df-tx 17257  df-hmeo 17446  df-fbas 17520  df-fg 17521  df-fil 17541  df-fm 17633  df-flim 17634  df-flf 17635  df-xms 17885  df-ms 17886  df-tms 17887  df-cncf 18382  df-limc 19216  df-dv 19217  df-log 19914
  Copyright terms: Public domain W3C validator