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

Theorem nn0opth2 11281
Description: An ordered pair theorem for nonnegative integers. Theorem 17.3 of [Quine] p. 124. See nn0opthi 11279. (Contributed by NM, 22-Jul-2004.)
Assertion
Ref Expression
nn0opth2  |-  ( ( ( A  e.  NN0  /\  B  e.  NN0 )  /\  ( C  e.  NN0  /\  D  e.  NN0 )
)  ->  ( (
( ( A  +  B ) ^ 2 )  +  B )  =  ( ( ( C  +  D ) ^ 2 )  +  D )  <->  ( A  =  C  /\  B  =  D ) ) )

Proof of Theorem nn0opth2
StepHypRef Expression
1 oveq1 5826 . . . . . 6  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( A  +  B
)  =  ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) )
21oveq1d 5834 . . . . 5  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( A  +  B ) ^ 2 )  =  ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  B
) ^ 2 ) )
32oveq1d 5834 . . . 4  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( ( A  +  B ) ^
2 )  +  B
)  =  ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^ 2 )  +  B ) )
43eqeq1d 2292 . . 3  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( ( ( A  +  B ) ^ 2 )  +  B )  =  ( ( ( C  +  D ) ^ 2 )  +  D )  <-> 
( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^
2 )  +  B
)  =  ( ( ( C  +  D
) ^ 2 )  +  D ) ) )
5 eqeq1 2290 . . . 4  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( A  =  C  <-> 
if ( A  e. 
NN0 ,  A , 
0 )  =  C ) )
65anbi1d 687 . . 3  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( A  =  C  /\  B  =  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  B  =  D ) ) )
74, 6bibi12d 314 . 2  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( ( ( ( A  +  B
) ^ 2 )  +  B )  =  ( ( ( C  +  D ) ^
2 )  +  D
)  <->  ( A  =  C  /\  B  =  D ) )  <->  ( (
( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^
2 )  +  B
)  =  ( ( ( C  +  D
) ^ 2 )  +  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  B  =  D ) ) ) )
8 oveq2 5827 . . . . . 6  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( if ( A  e.  NN0 ,  A ,  0 )  +  B )  =  ( if ( A  e. 
NN0 ,  A , 
0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) )
98oveq1d 5834 . . . . 5  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^
2 )  =  ( ( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e. 
NN0 ,  B , 
0 ) ) ^
2 ) )
10 id 21 . . . . 5  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  ->  B  =  if ( B  e.  NN0 ,  B ,  0 ) )
119, 10oveq12d 5837 . . . 4  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^
2 )  +  B
)  =  ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e. 
NN0 ,  B , 
0 ) ) ^
2 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) )
1211eqeq1d 2292 . . 3  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( ( ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  B
) ^ 2 )  +  B )  =  ( ( ( C  +  D ) ^
2 )  +  D
)  <->  ( ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( C  +  D ) ^ 2 )  +  D ) ) )
13 eqeq1 2290 . . . 4  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( B  =  D  <-> 
if ( B  e. 
NN0 ,  B , 
0 )  =  D ) )
1413anbi2d 686 . . 3  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  B  =  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D ) ) )
1512, 14bibi12d 314 . 2  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( ( ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^ 2 )  +  B )  =  ( ( ( C  +  D ) ^ 2 )  +  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  B  =  D ) )  <->  ( (
( ( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e. 
NN0 ,  B , 
0 ) )  =  ( ( ( C  +  D ) ^
2 )  +  D
)  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D ) ) ) )
16 oveq1 5826 . . . . . 6  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( C  +  D
)  =  ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) )
1716oveq1d 5834 . . . . 5  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( C  +  D ) ^ 2 )  =  ( ( if ( C  e. 
NN0 ,  C , 
0 )  +  D
) ^ 2 ) )
1817oveq1d 5834 . . . 4  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( ( C  +  D ) ^
2 )  +  D
)  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) ^ 2 )  +  D ) )
1918eqeq2d 2295 . . 3  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( C  +  D ) ^ 2 )  +  D )  <->  ( (
( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e. 
NN0 ,  B , 
0 ) ) ^
2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) ^ 2 )  +  D ) ) )
20 eqeq2 2293 . . . 4  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( if ( A  e.  NN0 ,  A ,  0 )  =  C  <->  if ( A  e. 
NN0 ,  A , 
0 )  =  if ( C  e.  NN0 ,  C ,  0 ) ) )
2120anbi1d 687 . . 3  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e.  NN0 ,  C ,  0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D ) ) )
2219, 21bibi12d 314 . 2  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e. 
NN0 ,  B , 
0 ) ) ^
2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( C  +  D
) ^ 2 )  +  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  C  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D ) )  <-> 
( ( ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( if ( C  e. 
NN0 ,  C , 
0 )  +  D
) ^ 2 )  +  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e.  NN0 ,  C ,  0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D ) ) ) )
23 oveq2 5827 . . . . . 6  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( if ( C  e.  NN0 ,  C ,  0 )  +  D )  =  ( if ( C  e. 
NN0 ,  C , 
0 )  +  if ( D  e.  NN0 ,  D ,  0 ) ) )
2423oveq1d 5834 . . . . 5  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) ^
2 )  =  ( ( if ( C  e.  NN0 ,  C ,  0 )  +  if ( D  e. 
NN0 ,  D , 
0 ) ) ^
2 ) )
25 id 21 . . . . 5  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  ->  D  =  if ( D  e.  NN0 ,  D ,  0 ) )
2624, 25oveq12d 5837 . . . 4  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) ^
2 )  +  D
)  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  if ( D  e. 
NN0 ,  D , 
0 ) ) ^
2 )  +  if ( D  e.  NN0 ,  D ,  0 ) ) )
2726eqeq2d 2295 . . 3  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( ( ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( if ( C  e. 
NN0 ,  C , 
0 )  +  D
) ^ 2 )  +  D )  <->  ( (
( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e. 
NN0 ,  B , 
0 ) ) ^
2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  if ( D  e. 
NN0 ,  D , 
0 ) ) ^
2 )  +  if ( D  e.  NN0 ,  D ,  0 ) ) ) )
28 eqeq2 2293 . . . 4  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( if ( B  e.  NN0 ,  B ,  0 )  =  D  <->  if ( B  e. 
NN0 ,  B , 
0 )  =  if ( D  e.  NN0 ,  D ,  0 ) ) )
2928anbi2d 686 . . 3  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( ( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e.  NN0 ,  C ,  0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e.  NN0 ,  C ,  0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  if ( D  e.  NN0 ,  D ,  0 ) ) ) )
3027, 29bibi12d 314 . 2  |-  ( D  =  if ( D  e.  NN0 ,  D ,  0 )  -> 
( ( ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e. 
NN0 ,  B , 
0 ) ) ^
2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) ^ 2 )  +  D )  <-> 
( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e. 
NN0 ,  C , 
0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  D ) )  <-> 
( ( ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e.  NN0 ,  B ,  0 ) )  =  ( ( ( if ( C  e. 
NN0 ,  C , 
0 )  +  if ( D  e.  NN0 ,  D ,  0 ) ) ^ 2 )  +  if ( D  e.  NN0 ,  D ,  0 ) )  <-> 
( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e. 
NN0 ,  C , 
0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  if ( D  e.  NN0 ,  D ,  0 ) ) ) ) )
31 0nn0 9975 . . . 4  |-  0  e.  NN0
3231elimel 3618 . . 3  |-  if ( A  e.  NN0 ,  A ,  0 )  e.  NN0
3331elimel 3618 . . 3  |-  if ( B  e.  NN0 ,  B ,  0 )  e.  NN0
3431elimel 3618 . . 3  |-  if ( C  e.  NN0 ,  C ,  0 )  e.  NN0
3531elimel 3618 . . 3  |-  if ( D  e.  NN0 ,  D ,  0 )  e.  NN0
3632, 33, 34, 35nn0opth2i 11280 . 2  |-  ( ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  if ( B  e.  NN0 ,  B ,  0 ) ) ^ 2 )  +  if ( B  e. 
NN0 ,  B , 
0 ) )  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  if ( D  e.  NN0 ,  D ,  0 ) ) ^ 2 )  +  if ( D  e. 
NN0 ,  D , 
0 ) )  <->  ( if ( A  e.  NN0 ,  A ,  0 )  =  if ( C  e.  NN0 ,  C ,  0 )  /\  if ( B  e.  NN0 ,  B ,  0 )  =  if ( D  e.  NN0 ,  D ,  0 ) ) )
377, 15, 22, 30, 36dedth4h 3610 1  |-  ( ( ( A  e.  NN0  /\  B  e.  NN0 )  /\  ( C  e.  NN0  /\  D  e.  NN0 )
)  ->  ( (
( ( A  +  B ) ^ 2 )  +  B )  =  ( ( ( C  +  D ) ^ 2 )  +  D )  <->  ( A  =  C  /\  B  =  D ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 6    <-> wb 178    /\ wa 360    = wceq 1624    e. wcel 1685   ifcif 3566  (class class class)co 5819   0cc0 8732    + caddc 8735   2c2 9790   NN0cn0 9960   ^cexp 11098
This theorem is referenced by:  xpnnenOLD  12482
This theorem was proved from axioms:  ax-1 7  ax-2 8  ax-3 9  ax-mp 10  ax-gen 1534  ax-5 1545  ax-17 1604  ax-9 1637  ax-8 1645  ax-13 1687  ax-14 1689  ax-6 1704  ax-7 1709  ax-11 1716  ax-12 1867  ax-ext 2265  ax-sep 4142  ax-nul 4150  ax-pow 4187  ax-pr 4213  ax-un 4511  ax-cnex 8788  ax-resscn 8789  ax-1cn 8790  ax-icn 8791  ax-addcl 8792  ax-addrcl 8793  ax-mulcl 8794  ax-mulrcl 8795  ax-mulcom 8796  ax-addass 8797  ax-mulass 8798  ax-distr 8799  ax-i2m1 8800  ax-1ne0 8801  ax-1rid 8802  ax-rnegex 8803  ax-rrecex 8804  ax-cnre 8805  ax-pre-lttri 8806  ax-pre-lttrn 8807  ax-pre-ltadd 8808  ax-pre-mulgt0 8809
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 937  df-3an 938  df-tru 1312  df-ex 1530  df-nf 1533  df-sb 1632  df-eu 2148  df-mo 2149  df-clab 2271  df-cleq 2277  df-clel 2280  df-nfc 2409  df-ne 2449  df-nel 2450  df-ral 2549  df-rex 2550  df-reu 2551  df-rab 2553  df-v 2791  df-sbc 2993  df-csb 3083  df-dif 3156  df-un 3158  df-in 3160  df-ss 3167  df-pss 3169  df-nul 3457  df-if 3567  df-pw 3628  df-sn 3647  df-pr 3648  df-tp 3649  df-op 3650  df-uni 3829  df-iun 3908  df-br 4025  df-opab 4079  df-mpt 4080  df-tr 4115  df-eprel 4304  df-id 4308  df-po 4313  df-so 4314  df-fr 4351  df-we 4353  df-ord 4394  df-on 4395  df-lim 4396  df-suc 4397  df-om 4656  df-xp 4694  df-rel 4695  df-cnv 4696  df-co 4697  df-dm 4698  df-rn 4699  df-res 4700  df-ima 4701  df-fun 5223  df-fn 5224  df-f 5225  df-f1 5226  df-fo 5227  df-f1o 5228  df-fv 5229  df-ov 5822  df-oprab 5823  df-mpt2 5824  df-2nd 6084  df-iota 6252  df-riota 6299  df-recs 6383  df-rdg 6418  df-er 6655  df-en 6859  df-dom 6860  df-sdom 6861  df-pnf 8864  df-mnf 8865  df-xr 8866  df-ltxr 8867  df-le 8868  df-sub 9034  df-neg 9035  df-nn 9742  df-2 9799  df-n0 9961  df-z 10020  df-uz 10226  df-seq 11041  df-exp 11099
  Copyright terms: Public domain W3C validator