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

Theorem nn0opth2 11165
Description: An ordered pair theorem for nonnegative integers. Theorem 17.3 of [Quine] p. 124. See nn0opthi 11163. (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 5717 . . . . . 6  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( A  +  B
)  =  ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) )
21oveq1d 5725 . . . . 5  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( A  +  B ) ^ 2 )  =  ( ( if ( A  e. 
NN0 ,  A , 
0 )  +  B
) ^ 2 ) )
32oveq1d 5725 . . . 4  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( ( ( A  +  B ) ^
2 )  +  B
)  =  ( ( ( if ( A  e.  NN0 ,  A ,  0 )  +  B ) ^ 2 )  +  B ) )
43eqeq1d 2261 . . 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 2259 . . . 4  |-  ( A  =  if ( A  e.  NN0 ,  A ,  0 )  -> 
( A  =  C  <-> 
if ( A  e. 
NN0 ,  A , 
0 )  =  C ) )
65anbi1d 688 . . 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 5718 . . . . . 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 5725 . . . . 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 5728 . . . 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 2261 . . 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 2259 . . . 4  |-  ( B  =  if ( B  e.  NN0 ,  B ,  0 )  -> 
( B  =  D  <-> 
if ( B  e. 
NN0 ,  B , 
0 )  =  D ) )
1413anbi2d 687 . . 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 5717 . . . . . 6  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( C  +  D
)  =  ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) )
1716oveq1d 5725 . . . . 5  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( C  +  D ) ^ 2 )  =  ( ( if ( C  e. 
NN0 ,  C , 
0 )  +  D
) ^ 2 ) )
1817oveq1d 5725 . . . 4  |-  ( C  =  if ( C  e.  NN0 ,  C ,  0 )  -> 
( ( ( C  +  D ) ^
2 )  +  D
)  =  ( ( ( if ( C  e.  NN0 ,  C ,  0 )  +  D ) ^ 2 )  +  D ) )
1918eqeq2d 2264 . . 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 2262 . . . 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 688 . . 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 5718 . . . . . 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 5725 . . . . 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 5728 . . . 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 2264 . . 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 2262 . . . 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 687 . . 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 9859 . . . 4  |-  0  e.  NN0
3231elimel 3522 . . 3  |-  if ( A  e.  NN0 ,  A ,  0 )  e.  NN0
3331elimel 3522 . . 3  |-  if ( B  e.  NN0 ,  B ,  0 )  e.  NN0
3431elimel 3522 . . 3  |-  if ( C  e.  NN0 ,  C ,  0 )  e.  NN0
3531elimel 3522 . . 3  |-  if ( D  e.  NN0 ,  D ,  0 )  e.  NN0
3632, 33, 34, 35nn0opth2i 11164 . 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 3514 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 1619    e. wcel 1621   ifcif 3470  (class class class)co 5710   0cc0 8617    + caddc 8620   2c2 9675   NN0cn0 9844   ^cexp 10982
This theorem is referenced by:  xpnnenOLD  12362
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 1926  ax-ext 2234  ax-sep 4038  ax-nul 4046  ax-pow 4082  ax-pr 4108  ax-un 4403  ax-cnex 8673  ax-resscn 8674  ax-1cn 8675  ax-icn 8676  ax-addcl 8677  ax-addrcl 8678  ax-mulcl 8679  ax-mulrcl 8680  ax-mulcom 8681  ax-addass 8682  ax-mulass 8683  ax-distr 8684  ax-i2m1 8685  ax-1ne0 8686  ax-1rid 8687  ax-rnegex 8688  ax-rrecex 8689  ax-cnre 8690  ax-pre-lttri 8691  ax-pre-lttrn 8692  ax-pre-ltadd 8693  ax-pre-mulgt0 8694
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 1883  df-eu 2118  df-mo 2119  df-clab 2240  df-cleq 2246  df-clel 2249  df-nfc 2374  df-ne 2414  df-nel 2415  df-ral 2513  df-rex 2514  df-reu 2515  df-rab 2516  df-v 2729  df-sbc 2922  df-csb 3010  df-dif 3081  df-un 3083  df-in 3085  df-ss 3089  df-pss 3091  df-nul 3363  df-if 3471  df-pw 3532  df-sn 3550  df-pr 3551  df-tp 3552  df-op 3553  df-uni 3728  df-iun 3805  df-br 3921  df-opab 3975  df-mpt 3976  df-tr 4011  df-eprel 4198  df-id 4202  df-po 4207  df-so 4208  df-fr 4245  df-we 4247  df-ord 4288  df-on 4289  df-lim 4290  df-suc 4291  df-om 4548  df-xp 4594  df-rel 4595  df-cnv 4596  df-co 4597  df-dm 4598  df-rn 4599  df-res 4600  df-ima 4601  df-fun 4602  df-fn 4603  df-f 4604  df-f1 4605  df-fo 4606  df-f1o 4607  df-fv 4608  df-ov 5713  df-oprab 5714  df-mpt2 5715  df-2nd 5975  df-iota 6143  df-riota 6190  df-recs 6274  df-rdg 6309  df-er 6546  df-en 6750  df-dom 6751  df-sdom 6752  df-pnf 8749  df-mnf 8750  df-xr 8751  df-ltxr 8752  df-le 8753  df-sub 8919  df-neg 8920  df-n 9627  df-2 9684  df-n0 9845  df-z 9904  df-uz 10110  df-seq 10925  df-exp 10983
  Copyright terms: Public domain W3C validator