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

Theorem pythagtriplem2 12967
Description: Lemma for pythagtrip 12984. Prove the full version of one direction of the theorem. (Contributed by Scott Fenton, 28-Mar-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
pythagtriplem2  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  ->  ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) ) )
Distinct variable groups:    A, n, m, k    B, n, m, k    C, n, m, k

Proof of Theorem pythagtriplem2
StepHypRef Expression
1 ovex 5970 . . . . . . . 8  |-  ( k  x.  ( ( m ^ 2 )  -  ( n ^ 2 ) ) )  e. 
_V
2 ovex 5970 . . . . . . . 8  |-  ( k  x.  ( 2  x.  ( m  x.  n
) ) )  e. 
_V
3 preq12bg 3872 . . . . . . . 8  |-  ( ( ( A  e.  NN  /\  B  e.  NN )  /\  ( ( k  x.  ( ( m ^ 2 )  -  ( n ^ 2 ) ) )  e. 
_V  /\  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  e.  _V ) )  ->  ( { A ,  B }  =  { ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n ) ) ) }  <->  ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) ) ) ) ) )
41, 2, 3mpanr12 666 . . . . . . 7  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  <-> 
( ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) ) ) ) ) )
54anbi1d 685 . . . . . 6  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  ( ( ( A  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) )
6 andir 838 . . . . . . 7  |-  ( ( ( ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  ( ( ( A  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/  ( ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) )
7 df-3an 936 . . . . . . . 8  |-  ( ( A  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  <->  ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) )
8 df-3an 936 . . . . . . . 8  |-  ( ( A  =  ( k  x.  ( 2  x.  ( m  x.  n
) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  <->  ( ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) )
97, 8orbi12i 507 . . . . . . 7  |-  ( ( ( A  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) )  <-> 
( ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/  ( ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) )
106, 9bitr4i 243 . . . . . 6  |-  ( ( ( ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) ) ) )
115, 10syl6bb 252 . . . . 5  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) ) ) ) )
1211rexbidv 2640 . . . 4  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. k  e.  NN  ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  E. k  e.  NN  ( ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) ) )
13122rexbidv 2662 . . 3  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  (
( A  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) ) )
14 r19.43 2771 . . . . 5  |-  ( E. k  e.  NN  (
( A  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) )  <-> 
( E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. k  e.  NN  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) )
15142rexbii 2646 . . . 4  |-  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) ) )  <->  E. n  e.  NN  E. m  e.  NN  ( E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. k  e.  NN  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) ) )
16 r19.43 2771 . . . . 5  |-  ( E. m  e.  NN  ( E. k  e.  NN  ( A  =  (
k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  \/  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) )  <->  ( E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) ) )
1716rexbii 2644 . . . 4  |-  ( E. n  e.  NN  E. m  e.  NN  ( E. k  e.  NN  ( A  =  (
k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  \/  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) )  <->  E. n  e.  NN  ( E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) ) )
18 r19.43 2771 . . . 4  |-  ( E. n  e.  NN  ( E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/ 
E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) )  <-> 
( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) ) )
1915, 17, 183bitri 262 . . 3  |-  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( ( A  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  B  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  \/  ( A  =  ( k  x.  ( 2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^ 2 )  -  ( n ^
2 ) ) )  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) ) )  <->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) ) )
2013, 19syl6bb 252 . 2  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  <->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) ) ) )
21 pythagtriplem1 12966 . . . 4  |-  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  ->  (
( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^
2 ) )
2221a1i 10 . . 3  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  ->  (
( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^
2 ) ) )
23 3ancoma 941 . . . . . . 7  |-  ( ( A  =  ( k  x.  ( 2  x.  ( m  x.  n
) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  <->  ( B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) ) )
2423rexbii 2644 . . . . . 6  |-  ( E. k  e.  NN  ( A  =  ( k  x.  ( 2  x.  (
m  x.  n ) ) )  /\  B  =  ( k  x.  ( ( m ^
2 )  -  (
n ^ 2 ) ) )  /\  C  =  ( k  x.  ( ( m ^
2 )  +  ( n ^ 2 ) ) ) )  <->  E. k  e.  NN  ( B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) )
25242rexbii 2646 . . . . 5  |-  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  <->  E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) )
26 pythagtriplem1 12966 . . . . 5  |-  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  ->  (
( B ^ 2 )  +  ( A ^ 2 ) )  =  ( C ^
2 ) )
2725, 26sylbi 187 . . . 4  |-  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  ->  (
( B ^ 2 )  +  ( A ^ 2 ) )  =  ( C ^
2 ) )
28 nncn 9844 . . . . . . 7  |-  ( A  e.  NN  ->  A  e.  CC )
2928sqcld 11336 . . . . . 6  |-  ( A  e.  NN  ->  ( A ^ 2 )  e.  CC )
30 nncn 9844 . . . . . . 7  |-  ( B  e.  NN  ->  B  e.  CC )
3130sqcld 11336 . . . . . 6  |-  ( B  e.  NN  ->  ( B ^ 2 )  e.  CC )
32 addcom 9088 . . . . . 6  |-  ( ( ( A ^ 2 )  e.  CC  /\  ( B ^ 2 )  e.  CC )  -> 
( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( ( B ^ 2 )  +  ( A ^
2 ) ) )
3329, 31, 32syl2an 463 . . . . 5  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( ( B ^ 2 )  +  ( A ^
2 ) ) )
3433eqeq1d 2366 . . . 4  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  <-> 
( ( B ^
2 )  +  ( A ^ 2 ) )  =  ( C ^ 2 ) ) )
3527, 34syl5ibr 212 . . 3  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  ->  (
( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^
2 ) ) )
3622, 35jaod 369 . 2  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  B  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) )  \/  E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( A  =  ( k  x.  (
2  x.  ( m  x.  n ) ) )  /\  B  =  ( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) )  /\  C  =  ( k  x.  (
( m ^ 2 )  +  ( n ^ 2 ) ) ) ) )  -> 
( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) ) )
3720, 36sylbid 206 1  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( E. n  e.  NN  E. m  e.  NN  E. k  e.  NN  ( { A ,  B }  =  {
( k  x.  (
( m ^ 2 )  -  ( n ^ 2 ) ) ) ,  ( k  x.  ( 2  x.  ( m  x.  n
) ) ) }  /\  C  =  ( k  x.  ( ( m ^ 2 )  +  ( n ^
2 ) ) ) )  ->  ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    \/ wo 357    /\ wa 358    /\ w3a 934    = wceq 1642    e. wcel 1710   E.wrex 2620   _Vcvv 2864   {cpr 3717  (class class class)co 5945   CCcc 8825    + caddc 8830    x. cmul 8832    - cmin 9127   NNcn 9836   2c2 9885   ^cexp 11197
This theorem is referenced by:  pythagtrip  12984
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1546  ax-5 1557  ax-17 1616  ax-9 1654  ax-8 1675  ax-13 1712  ax-14 1714  ax-6 1729  ax-7 1734  ax-11 1746  ax-12 1930  ax-ext 2339  ax-sep 4222  ax-nul 4230  ax-pow 4269  ax-pr 4295  ax-un 4594  ax-cnex 8883  ax-resscn 8884  ax-1cn 8885  ax-icn 8886  ax-addcl 8887  ax-addrcl 8888  ax-mulcl 8889  ax-mulrcl 8890  ax-mulcom 8891  ax-addass 8892  ax-mulass 8893  ax-distr 8894  ax-i2m1 8895  ax-1ne0 8896  ax-1rid 8897  ax-rnegex 8898  ax-rrecex 8899  ax-cnre 8900  ax-pre-lttri 8901  ax-pre-lttrn 8902  ax-pre-ltadd 8903  ax-pre-mulgt0 8904
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1319  df-ex 1542  df-nf 1545  df-sb 1649  df-eu 2213  df-mo 2214  df-clab 2345  df-cleq 2351  df-clel 2354  df-nfc 2483  df-ne 2523  df-nel 2524  df-ral 2624  df-rex 2625  df-reu 2626  df-rab 2628  df-v 2866  df-sbc 3068  df-csb 3158  df-dif 3231  df-un 3233  df-in 3235  df-ss 3242  df-pss 3244  df-nul 3532  df-if 3642  df-pw 3703  df-sn 3722  df-pr 3723  df-tp 3724  df-op 3725  df-uni 3909  df-iun 3988  df-br 4105  df-opab 4159  df-mpt 4160  df-tr 4195  df-eprel 4387  df-id 4391  df-po 4396  df-so 4397  df-fr 4434  df-we 4436  df-ord 4477  df-on 4478  df-lim 4479  df-suc 4480  df-om 4739  df-xp 4777  df-rel 4778  df-cnv 4779  df-co 4780  df-dm 4781  df-rn 4782  df-res 4783  df-ima 4784  df-iota 5301  df-fun 5339  df-fn 5340  df-f 5341  df-f1 5342  df-fo 5343  df-f1o 5344  df-fv 5345  df-ov 5948  df-oprab 5949  df-mpt2 5950  df-2nd 6210  df-riota 6391  df-recs 6475  df-rdg 6510  df-er 6747  df-en 6952  df-dom 6953  df-sdom 6954  df-pnf 8959  df-mnf 8960  df-xr 8961  df-ltxr 8962  df-le 8963  df-sub 9129  df-neg 9130  df-nn 9837  df-2 9894  df-3 9895  df-4 9896  df-n0 10058  df-z 10117  df-uz 10323  df-seq 11139  df-exp 11198
  Copyright terms: Public domain W3C validator