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

Theorem pythagtriplem2 13184
Description: Lemma for pythagtrip 13201. 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 6099 . . . . . . . 8  |-  ( k  x.  ( ( m ^ 2 )  -  ( n ^ 2 ) ) )  e. 
_V
2 ovex 6099 . . . . . . . 8  |-  ( k  x.  ( 2  x.  ( m  x.  n
) ) )  e. 
_V
3 preq12bg 3970 . . . . . . . 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 667 . . . . . . 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 686 . . . . . 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 839 . . . . . . 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 938 . . . . . . . 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 938 . . . . . . . 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 508 . . . . . . 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 244 . . . . . 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 253 . . . . 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 2719 . . . 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 2741 . . 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 2856 . . . . 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 2725 . . . 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 2856 . . . . 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 2723 . . . 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 2856 . . . 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 263 . . 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 253 . 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 13183 . . . 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 11 . . 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 943 . . . . . . 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 2723 . . . . . 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 2725 . . . . 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 13183 . . . . 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 188 . . . 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 10001 . . . . . . 7  |-  ( A  e.  NN  ->  A  e.  CC )
2928sqcld 11514 . . . . . 6  |-  ( A  e.  NN  ->  ( A ^ 2 )  e.  CC )
30 nncn 10001 . . . . . . 7  |-  ( B  e.  NN  ->  B  e.  CC )
3130sqcld 11514 . . . . . 6  |-  ( B  e.  NN  ->  ( B ^ 2 )  e.  CC )
32 addcom 9245 . . . . . 6  |-  ( ( ( A ^ 2 )  e.  CC  /\  ( B ^ 2 )  e.  CC )  -> 
( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( ( B ^ 2 )  +  ( A ^
2 ) ) )
3329, 31, 32syl2an 464 . . . . 5  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( A ^
2 )  +  ( B ^ 2 ) )  =  ( ( B ^ 2 )  +  ( A ^
2 ) ) )
3433eqeq1d 2444 . . . 4  |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( ( A ^ 2 )  +  ( B ^ 2 ) )  =  ( C ^ 2 )  <-> 
( ( B ^
2 )  +  ( A ^ 2 ) )  =  ( C ^ 2 ) ) )
3527, 34syl5ibr 213 . . 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 370 . 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 207 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 177    \/ wo 358    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725   E.wrex 2699   _Vcvv 2949   {cpr 3808  (class class class)co 6074   CCcc 8981    + caddc 8986    x. cmul 8988    - cmin 9284   NNcn 9993   2c2 10042   ^cexp 11375
This theorem is referenced by:  pythagtrip  13201
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4323  ax-nul 4331  ax-pow 4370  ax-pr 4396  ax-un 4694  ax-cnex 9039  ax-resscn 9040  ax-1cn 9041  ax-icn 9042  ax-addcl 9043  ax-addrcl 9044  ax-mulcl 9045  ax-mulrcl 9046  ax-mulcom 9047  ax-addass 9048  ax-mulass 9049  ax-distr 9050  ax-i2m1 9051  ax-1ne0 9052  ax-1rid 9053  ax-rnegex 9054  ax-rrecex 9055  ax-cnre 9056  ax-pre-lttri 9057  ax-pre-lttrn 9058  ax-pre-ltadd 9059  ax-pre-mulgt0 9060
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2703  df-rex 2704  df-reu 2705  df-rab 2707  df-v 2951  df-sbc 3155  df-csb 3245  df-dif 3316  df-un 3318  df-in 3320  df-ss 3327  df-pss 3329  df-nul 3622  df-if 3733  df-pw 3794  df-sn 3813  df-pr 3814  df-tp 3815  df-op 3816  df-uni 4009  df-iun 4088  df-br 4206  df-opab 4260  df-mpt 4261  df-tr 4296  df-eprel 4487  df-id 4491  df-po 4496  df-so 4497  df-fr 4534  df-we 4536  df-ord 4577  df-on 4578  df-lim 4579  df-suc 4580  df-om 4839  df-xp 4877  df-rel 4878  df-cnv 4879  df-co 4880  df-dm 4881  df-rn 4882  df-res 4883  df-ima 4884  df-iota 5411  df-fun 5449  df-fn 5450  df-f 5451  df-f1 5452  df-fo 5453  df-f1o 5454  df-fv 5455  df-ov 6077  df-oprab 6078  df-mpt2 6079  df-2nd 6343  df-riota 6542  df-recs 6626  df-rdg 6661  df-er 6898  df-en 7103  df-dom 7104  df-sdom 7105  df-pnf 9115  df-mnf 9116  df-xr 9117  df-ltxr 9118  df-le 9119  df-sub 9286  df-neg 9287  df-nn 9994  df-2 10051  df-3 10052  df-4 10053  df-n0 10215  df-z 10276  df-uz 10482  df-seq 11317  df-exp 11376
  Copyright terms: Public domain W3C validator