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

Theorem pythag 20042
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 20039),  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 20041 to prove this, along with simple trig facts like coshalfpi 19764 and cosneg 12354. (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 20041 . . 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 980 . 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 3601 . . . . . . . . 9  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) ) )
9 fveq2 5423 . . . . . . . . . . 11  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  (
pi  /  2 ) ) )
10 coshalfpi 19764 . . . . . . . . . . 11  |-  ( cos `  ( pi  /  2
) )  =  0
119, 10syl6eq 2304 . . . . . . . . . 10  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
12 fveq2 5423 . . . . . . . . . . 11  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  -u (
pi  /  2 ) ) )
13 pire 19759 . . . . . . . . . . . . . . 15  |-  pi  e.  RR
1413recni 8782 . . . . . . . . . . . . . 14  |-  pi  e.  CC
15 2cn 9749 . . . . . . . . . . . . . 14  |-  2  e.  CC
16 2ne0 9762 . . . . . . . . . . . . . 14  |-  2  =/=  0
1714, 15, 16divcli 9435 . . . . . . . . . . . . 13  |-  ( pi 
/  2 )  e.  CC
18 cosneg 12354 . . . . . . . . . . . . 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 2276 . . . . . . . . . . 11  |-  ( cos `  -u ( pi  / 
2 ) )  =  0
2112, 20syl6eq 2304 . . . . . . . . . 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 983 . . . . . . 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 5773 . . . . . 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 8984 . . . . . . . . . . . . 13  |-  ( ( B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C
)  e.  CC )
27263adant1 978 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( B  -  C )  e.  CC )
28273ad2ant1 981 . . . . . . . . . . 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 11848 . . . . . . . . . 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 8794 . . . . . . . . 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 2340 . . . . . . . 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 8984 . . . . . . . . . . . . 13  |-  ( ( A  e.  CC  /\  C  e.  CC )  ->  ( A  -  C
)  e.  CC )
33323adant2 979 . . . . . . . . . . . 12  |-  ( ( A  e.  CC  /\  B  e.  CC  /\  C  e.  CC )  ->  ( A  -  C )  e.  CC )
34333ad2ant1 981 . . . . . . . . . . 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 11848 . . . . . . . . . 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 8794 . . . . . . . . 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 2340 . . . . . . . 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 8788 . . . . . . 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 8944 . . . . . 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 2288 . . . . 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 5773 . . . 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 8935 . . . 4  |-  ( 2  x.  0 )  =  0
4341, 42syl6eq 2304 . . 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 5773 . 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 11174 . . . 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 11174 . . . 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 8787 . . 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 9079 . 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 2292 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 939    = wceq 1619    e. wcel 1621    =/= wne 2419    \ cdif 3091   {csn 3581   {cpr 3582   ` cfv 4638  (class class class)co 5757    e. cmpt2 5759   CCcc 8668   0cc0 8670    + caddc 8673    x. cmul 8675    - cmin 8970   -ucneg 8971    / cdiv 9356   2c2 9728   ^cexp 11035   Imcim 11513   abscabs 11649   cosccos 12273   picpi 12275   logclog 19839
This theorem is referenced by:  chordthmlem3  20058
This theorem was proved from axioms:  ax-1 7  ax-2 8  ax-3 9  ax-mp 10  ax-5 1533  ax-6 1534  ax-7 1535  ax-gen 1536  ax-8 1623  ax-11 1624  ax-13 1625  ax-14 1626  ax-17 1628  ax-12o 1664  ax-10 1678  ax-9 1684  ax-4 1692  ax-16 1927  ax-ext 2237  ax-rep 4071  ax-sep 4081  ax-nul 4089  ax-pow 4126  ax-pr 4152  ax-un 4449  ax-inf2 7275  ax-cnex 8726  ax-resscn 8727  ax-1cn 8728  ax-icn 8729  ax-addcl 8730  ax-addrcl 8731  ax-mulcl 8732  ax-mulrcl 8733  ax-mulcom 8734  ax-addass 8735  ax-mulass 8736  ax-distr 8737  ax-i2m1 8738  ax-1ne0 8739  ax-1rid 8740  ax-rnegex 8741  ax-rrecex 8742  ax-cnre 8743  ax-pre-lttri 8744  ax-pre-lttrn 8745  ax-pre-ltadd 8746  ax-pre-mulgt0 8747  ax-pre-sup 8748  ax-addf 8749  ax-mulf 8750
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 940  df-3an 941  df-tru 1315  df-ex 1538  df-nf 1540  df-sb 1884  df-eu 2121  df-mo 2122  df-clab 2243  df-cleq 2249  df-clel 2252  df-nfc 2381  df-ne 2421  df-nel 2422  df-ral 2520  df-rex 2521  df-reu 2522  df-rab 2523  df-v 2742  df-sbc 2936  df-csb 3024  df-dif 3097  df-un 3099  df-in 3101  df-ss 3108  df-pss 3110  df-nul 3398  df-if 3507  df-pw 3568  df-sn 3587  df-pr 3588  df-tp 3589  df-op 3590  df-uni 3769  df-int 3804  df-iun 3848  df-iin 3849  df-br 3964  df-opab 4018  df-mpt 4019  df-tr 4054  df-eprel 4242  df-id 4246  df-po 4251  df-so 4252  df-fr 4289  df-se 4290  df-we 4291  df-ord 4332  df-on 4333  df-lim 4334  df-suc 4335  df-om 4594  df-xp 4640  df-rel 4641  df-cnv 4642  df-co 4643  df-dm 4644  df-rn 4645  df-res 4646  df-ima 4647  df-fun 4648  df-fn 4649  df-f 4650  df-f1 4651  df-fo 4652  df-f1o 4653  df-fv 4654  df-isom 4655  df-ov 5760  df-oprab 5761  df-mpt2 5762  df-of 5977  df-1st 6021  df-2nd 6022  df-iota 6190  df-riota 6237  df-recs 6321  df-rdg 6356  df-1o 6412  df-2o 6413  df-oadd 6416  df-er 6593  df-map 6707  df-pm 6708  df-ixp 6751  df-en 6797  df-dom 6798  df-sdom 6799  df-fin 6800  df-fi 7098  df-sup 7127  df-oi 7158  df-card 7505  df-cda 7727  df-pnf 8802  df-mnf 8803  df-xr 8804  df-ltxr 8805  df-le 8806  df-sub 8972  df-neg 8973  df-div 9357  df-n 9680  df-2 9737  df-3 9738  df-4 9739  df-5 9740  df-6 9741  df-7 9742  df-8 9743  df-9 9744  df-10 9745  df-n0 9898  df-z 9957  df-dec 10057  df-uz 10163  df-q 10249  df-rp 10287  df-xneg 10384  df-xadd 10385  df-xmul 10386  df-ioo 10591  df-ioc 10592  df-ico 10593  df-icc 10594  df-fz 10714  df-fzo 10802  df-fl 10856  df-mod 10905  df-seq 10978  df-exp 11036  df-fac 11220  df-bc 11247  df-hash 11269  df-shft 11492  df-cj 11514  df-re 11515  df-im 11516  df-sqr 11650  df-abs 11651  df-limsup 11875  df-clim 11892  df-rlim 11893  df-sum 12089  df-ef 12276  df-sin 12278  df-cos 12279  df-pi 12281  df-struct 13077  df-ndx 13078  df-slot 13079  df-base 13080  df-sets 13081  df-ress 13082  df-plusg 13148  df-mulr 13149  df-starv 13150  df-sca 13151  df-vsca 13152  df-tset 13154  df-ple 13155  df-ds 13157  df-hom 13159  df-cco 13160  df-rest 13254  df-topn 13255  df-topgen 13271  df-pt 13272  df-prds 13275  df-xrs 13330  df-0g 13331  df-gsum 13332  df-qtop 13337  df-imas 13338  df-xps 13340  df-mre 13415  df-mrc 13416  df-acs 13418  df-mnd 14294  df-submnd 14343  df-mulg 14419  df-cntz 14720  df-cmn 15018  df-xmet 16300  df-met 16301  df-bl 16302  df-mopn 16303  df-cnfld 16305  df-top 16563  df-bases 16565  df-topon 16566  df-topsp 16567  df-cld 16683  df-ntr 16684  df-cls 16685  df-nei 16762  df-lp 16795  df-perf 16796  df-cn 16884  df-cnp 16885  df-haus 16970  df-tx 17184  df-hmeo 17373  df-fbas 17447  df-fg 17448  df-fil 17468  df-fm 17560  df-flim 17561  df-flf 17562  df-xms 17812  df-ms 17813  df-tms 17814  df-cncf 18309  df-limc 19143  df-dv 19144  df-log 19841
  Copyright terms: Public domain W3C validator