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

Theorem pythag 20063
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 20060),  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 20062 to prove this, along with simple trig facts like coshalfpi 19785 and cosneg 12375. (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 20062 . . 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 3620 . . . . . . . . 9  |-  ( O  e.  { ( pi 
/  2 ) , 
-u ( pi  / 
2 ) }  ->  ( O  =  ( pi 
/  2 )  \/  O  =  -u (
pi  /  2 ) ) )
9 fveq2 5444 . . . . . . . . . . 11  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  (
pi  /  2 ) ) )
10 coshalfpi 19785 . . . . . . . . . . 11  |-  ( cos `  ( pi  /  2
) )  =  0
119, 10syl6eq 2304 . . . . . . . . . 10  |-  ( O  =  ( pi  / 
2 )  ->  ( cos `  O )  =  0 )
12 fveq2 5444 . . . . . . . . . . 11  |-  ( O  =  -u ( pi  / 
2 )  ->  ( cos `  O )  =  ( cos `  -u (
pi  /  2 ) ) )
13 pire 19780 . . . . . . . . . . . . . . 15  |-  pi  e.  RR
1413recni 8803 . . . . . . . . . . . . . 14  |-  pi  e.  CC
15 2cn 9770 . . . . . . . . . . . . . 14  |-  2  e.  CC
16 2ne0 9783 . . . . . . . . . . . . . 14  |-  2  =/=  0
1714, 15, 16divcli 9456 . . . . . . . . . . . . 13  |-  ( pi 
/  2 )  e.  CC
18 cosneg 12375 . . . . . . . . . . . . 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 5794 . . . . . 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 9005 . . . . . . . . . . . . 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 11869 . . . . . . . . . 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 8815 . . . . . . . . 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 9005 . . . . . . . . . . . . 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 11869 . . . . . . . . . 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 8815 . . . . . . . . 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 8809 . . . . . . 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 8965 . . . . . 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 5794 . . . 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 8956 . . . 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 5794 . 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 11195 . . . 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 11195 . . . 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 8808 . . 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 9100 . 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 3110   {csn 3600   {cpr 3601   ` cfv 4659  (class class class)co 5778    e. cmpt2 5780   CCcc 8689   0cc0 8691    + caddc 8694    x. cmul 8696    - cmin 8991   -ucneg 8992    / cdiv 9377   2c2 9749   ^cexp 11056   Imcim 11534   abscabs 11670   cosccos 12294   picpi 12296   logclog 19860
This theorem is referenced by:  chordthmlem3  20079
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 4091  ax-sep 4101  ax-nul 4109  ax-pow 4146  ax-pr 4172  ax-un 4470  ax-inf2 7296  ax-cnex 8747  ax-resscn 8748  ax-1cn 8749  ax-icn 8750  ax-addcl 8751  ax-addrcl 8752  ax-mulcl 8753  ax-mulrcl 8754  ax-mulcom 8755  ax-addass 8756  ax-mulass 8757  ax-distr 8758  ax-i2m1 8759  ax-1ne0 8760  ax-1rid 8761  ax-rnegex 8762  ax-rrecex 8763  ax-cnre 8764  ax-pre-lttri 8765  ax-pre-lttrn 8766  ax-pre-ltadd 8767  ax-pre-mulgt0 8768  ax-pre-sup 8769  ax-addf 8770  ax-mulf 8771
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 2521  df-rex 2522  df-reu 2523  df-rmo 2524  df-rab 2525  df-v 2759  df-sbc 2953  df-csb 3043  df-dif 3116  df-un 3118  df-in 3120  df-ss 3127  df-pss 3129  df-nul 3417  df-if 3526  df-pw 3587  df-sn 3606  df-pr 3607  df-tp 3608  df-op 3609  df-uni 3788  df-int 3823  df-iun 3867  df-iin 3868  df-br 3984  df-opab 4038  df-mpt 4039  df-tr 4074  df-eprel 4263  df-id 4267  df-po 4272  df-so 4273  df-fr 4310  df-se 4311  df-we 4312  df-ord 4353  df-on 4354  df-lim 4355  df-suc 4356  df-om 4615  df-xp 4661  df-rel 4662  df-cnv 4663  df-co 4664  df-dm 4665  df-rn 4666  df-res 4667  df-ima 4668  df-fun 4669  df-fn 4670  df-f 4671  df-f1 4672  df-fo 4673  df-f1o 4674  df-fv 4675  df-isom 4676  df-ov 5781  df-oprab 5782  df-mpt2 5783  df-of 5998  df-1st 6042  df-2nd 6043  df-iota 6211  df-riota 6258  df-recs 6342  df-rdg 6377  df-1o 6433  df-2o 6434  df-oadd 6437  df-er 6614  df-map 6728  df-pm 6729  df-ixp 6772  df-en 6818  df-dom 6819  df-sdom 6820  df-fin 6821  df-fi 7119  df-sup 7148  df-oi 7179  df-card 7526  df-cda 7748  df-pnf 8823  df-mnf 8824  df-xr 8825  df-ltxr 8826  df-le 8827  df-sub 8993  df-neg 8994  df-div 9378  df-n 9701  df-2 9758  df-3 9759  df-4 9760  df-5 9761  df-6 9762  df-7 9763  df-8 9764  df-9 9765  df-10 9766  df-n0 9919  df-z 9978  df-dec 10078  df-uz 10184  df-q 10270  df-rp 10308  df-xneg 10405  df-xadd 10406  df-xmul 10407  df-ioo 10612  df-ioc 10613  df-ico 10614  df-icc 10615  df-fz 10735  df-fzo 10823  df-fl 10877  df-mod 10926  df-seq 10999  df-exp 11057  df-fac 11241  df-bc 11268  df-hash 11290  df-shft 11513  df-cj 11535  df-re 11536  df-im 11537  df-sqr 11671  df-abs 11672  df-limsup 11896  df-clim 11913  df-rlim 11914  df-sum 12110  df-ef 12297  df-sin 12299  df-cos 12300  df-pi 12302  df-struct 13098  df-ndx 13099  df-slot 13100  df-base 13101  df-sets 13102  df-ress 13103  df-plusg 13169  df-mulr 13170  df-starv 13171  df-sca 13172  df-vsca 13173  df-tset 13175  df-ple 13176  df-ds 13178  df-hom 13180  df-cco 13181  df-rest 13275  df-topn 13276  df-topgen 13292  df-pt 13293  df-prds 13296  df-xrs 13351  df-0g 13352  df-gsum 13353  df-qtop 13358  df-imas 13359  df-xps 13361  df-mre 13436  df-mrc 13437  df-acs 13439  df-mnd 14315  df-submnd 14364  df-mulg 14440  df-cntz 14741  df-cmn 15039  df-xmet 16321  df-met 16322  df-bl 16323  df-mopn 16324  df-cnfld 16326  df-top 16584  df-bases 16586  df-topon 16587  df-topsp 16588  df-cld 16704  df-ntr 16705  df-cls 16706  df-nei 16783  df-lp 16816  df-perf 16817  df-cn 16905  df-cnp 16906  df-haus 16991  df-tx 17205  df-hmeo 17394  df-fbas 17468  df-fg 17469  df-fil 17489  df-fm 17581  df-flim 17582  df-flf 17583  df-xms 17833  df-ms 17834  df-tms 17835  df-cncf 18330  df-limc 19164  df-dv 19165  df-log 19862
  Copyright terms: Public domain W3C validator