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

Theorem nnaass 6616
Description: Addition of natural numbers is associative. Theorem 4K(1) of [Enderton] p. 81. (Contributed by NM, 20-Sep-1995.) (Revised by Mario Carneiro, 15-Nov-2014.)
Assertion
Ref Expression
nnaass  |-  ( ( A  e.  om  /\  B  e.  om  /\  C  e.  om )  ->  (
( A  +o  B
)  +o  C )  =  ( A  +o  ( B  +o  C
) ) )

Proof of Theorem nnaass
Dummy variables  x  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 5828 . . . . . 6  |-  ( x  =  C  ->  (
( A  +o  B
)  +o  x )  =  ( ( A  +o  B )  +o  C ) )
2 oveq2 5828 . . . . . . 7  |-  ( x  =  C  ->  ( B  +o  x )  =  ( B  +o  C
) )
32oveq2d 5836 . . . . . 6  |-  ( x  =  C  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  C ) ) )
41, 3eqeq12d 2298 . . . . 5  |-  ( x  =  C  ->  (
( ( A  +o  B )  +o  x
)  =  ( A  +o  ( B  +o  x ) )  <->  ( ( A  +o  B )  +o  C )  =  ( A  +o  ( B  +o  C ) ) ) )
54imbi2d 307 . . . 4  |-  ( x  =  C  ->  (
( ( A  e. 
om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  x )  =  ( A  +o  ( B  +o  x ) ) )  <->  ( ( A  e.  om  /\  B  e.  om )  ->  (
( A  +o  B
)  +o  C )  =  ( A  +o  ( B  +o  C
) ) ) ) )
6 oveq2 5828 . . . . . 6  |-  ( x  =  (/)  ->  ( ( A  +o  B )  +o  x )  =  ( ( A  +o  B )  +o  (/) ) )
7 oveq2 5828 . . . . . . 7  |-  ( x  =  (/)  ->  ( B  +o  x )  =  ( B  +o  (/) ) )
87oveq2d 5836 . . . . . 6  |-  ( x  =  (/)  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  (/) ) ) )
96, 8eqeq12d 2298 . . . . 5  |-  ( x  =  (/)  ->  ( ( ( A  +o  B
)  +o  x )  =  ( A  +o  ( B  +o  x
) )  <->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  ( B  +o  (/) ) ) ) )
10 oveq2 5828 . . . . . 6  |-  ( x  =  y  ->  (
( A  +o  B
)  +o  x )  =  ( ( A  +o  B )  +o  y ) )
11 oveq2 5828 . . . . . . 7  |-  ( x  =  y  ->  ( B  +o  x )  =  ( B  +o  y
) )
1211oveq2d 5836 . . . . . 6  |-  ( x  =  y  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  y ) ) )
1310, 12eqeq12d 2298 . . . . 5  |-  ( x  =  y  ->  (
( ( A  +o  B )  +o  x
)  =  ( A  +o  ( B  +o  x ) )  <->  ( ( A  +o  B )  +o  y )  =  ( A  +o  ( B  +o  y ) ) ) )
14 oveq2 5828 . . . . . 6  |-  ( x  =  suc  y  -> 
( ( A  +o  B )  +o  x
)  =  ( ( A  +o  B )  +o  suc  y ) )
15 oveq2 5828 . . . . . . 7  |-  ( x  =  suc  y  -> 
( B  +o  x
)  =  ( B  +o  suc  y ) )
1615oveq2d 5836 . . . . . 6  |-  ( x  =  suc  y  -> 
( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  suc  y
) ) )
1714, 16eqeq12d 2298 . . . . 5  |-  ( x  =  suc  y  -> 
( ( ( A  +o  B )  +o  x )  =  ( A  +o  ( B  +o  x ) )  <-> 
( ( A  +o  B )  +o  suc  y )  =  ( A  +o  ( B  +o  suc  y ) ) ) )
18 nnacl 6605 . . . . . . 7  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( A  +o  B
)  e.  om )
19 nna0 6598 . . . . . . 7  |-  ( ( A  +o  B )  e.  om  ->  (
( A  +o  B
)  +o  (/) )  =  ( A  +o  B
) )
2018, 19syl 15 . . . . . 6  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  B
) )
21 nna0 6598 . . . . . . . 8  |-  ( B  e.  om  ->  ( B  +o  (/) )  =  B )
2221oveq2d 5836 . . . . . . 7  |-  ( B  e.  om  ->  ( A  +o  ( B  +o  (/) ) )  =  ( A  +o  B ) )
2322adantl 452 . . . . . 6  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( A  +o  ( B  +o  (/) ) )  =  ( A  +o  B
) )
2420, 23eqtr4d 2319 . . . . 5  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  ( B  +o  (/) ) ) )
25 suceq 4456 . . . . . . 7  |-  ( ( ( A  +o  B
)  +o  y )  =  ( A  +o  ( B  +o  y
) )  ->  suc  ( ( A  +o  B )  +o  y
)  =  suc  ( A  +o  ( B  +o  y ) ) )
26 nnasuc 6600 . . . . . . . . 9  |-  ( ( ( A  +o  B
)  e.  om  /\  y  e.  om )  ->  ( ( A  +o  B )  +o  suc  y )  =  suc  ( ( A  +o  B )  +o  y
) )
2718, 26sylan 457 . . . . . . . 8  |-  ( ( ( A  e.  om  /\  B  e.  om )  /\  y  e.  om )  ->  ( ( A  +o  B )  +o 
suc  y )  =  suc  ( ( A  +o  B )  +o  y ) )
28 nnasuc 6600 . . . . . . . . . . . 12  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( B  +o  suc  y )  =  suc  ( B  +o  y
) )
2928oveq2d 5836 . . . . . . . . . . 11  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( A  +o  ( B  +o  suc  y ) )  =  ( A  +o  suc  ( B  +o  y ) ) )
3029adantl 452 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  ( B  e.  om  /\  y  e.  om )
)  ->  ( A  +o  ( B  +o  suc  y ) )  =  ( A  +o  suc  ( B  +o  y
) ) )
31 nnacl 6605 . . . . . . . . . . 11  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( B  +o  y
)  e.  om )
32 nnasuc 6600 . . . . . . . . . . 11  |-  ( ( A  e.  om  /\  ( B  +o  y
)  e.  om )  ->  ( A  +o  suc  ( B  +o  y
) )  =  suc  ( A  +o  ( B  +o  y ) ) )
3331, 32sylan2 460 . . . . . . . . . 10  |-  ( ( A  e.  om  /\  ( B  e.  om  /\  y  e.  om )
)  ->  ( A  +o  suc  ( B  +o  y ) )  =  suc  ( A  +o  ( B  +o  y
) ) )
3430, 33eqtrd 2316 . . . . . . . . 9  |-  ( ( A  e.  om  /\  ( B  e.  om  /\  y  e.  om )
)  ->  ( A  +o  ( B  +o  suc  y ) )  =  suc  ( A  +o  ( B  +o  y
) ) )
3534anassrs 629 . . . . . . . 8  |-  ( ( ( A  e.  om  /\  B  e.  om )  /\  y  e.  om )  ->  ( A  +o  ( B  +o  suc  y
) )  =  suc  ( A  +o  ( B  +o  y ) ) )
3627, 35eqeq12d 2298 . . . . . . 7  |-  ( ( ( A  e.  om  /\  B  e.  om )  /\  y  e.  om )  ->  ( ( ( A  +o  B )  +o  suc  y )  =  ( A  +o  ( B  +o  suc  y
) )  <->  suc  ( ( A  +o  B )  +o  y )  =  suc  ( A  +o  ( B  +o  y
) ) ) )
3725, 36syl5ibr 212 . . . . . 6  |-  ( ( ( A  e.  om  /\  B  e.  om )  /\  y  e.  om )  ->  ( ( ( A  +o  B )  +o  y )  =  ( A  +o  ( B  +o  y ) )  ->  ( ( A  +o  B )  +o 
suc  y )  =  ( A  +o  ( B  +o  suc  y ) ) ) )
3837expcom 424 . . . . 5  |-  ( y  e.  om  ->  (
( A  e.  om  /\  B  e.  om )  ->  ( ( ( A  +o  B )  +o  y )  =  ( A  +o  ( B  +o  y ) )  ->  ( ( A  +o  B )  +o 
suc  y )  =  ( A  +o  ( B  +o  suc  y ) ) ) ) )
399, 13, 17, 24, 38finds2 4683 . . . 4  |-  ( x  e.  om  ->  (
( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  x
)  =  ( A  +o  ( B  +o  x ) ) ) )
405, 39vtoclga 2850 . . 3  |-  ( C  e.  om  ->  (
( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  C
)  =  ( A  +o  ( B  +o  C ) ) ) )
4140com12 27 . 2  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( C  e.  om  ->  ( ( A  +o  B )  +o  C
)  =  ( A  +o  ( B  +o  C ) ) ) )
42413impia 1148 1  |-  ( ( A  e.  om  /\  B  e.  om  /\  C  e.  om )  ->  (
( A  +o  B
)  +o  C )  =  ( A  +o  ( B  +o  C
) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 358    /\ w3a 934    = wceq 1623    e. wcel 1685   (/)c0 3456   suc csuc 4393   omcom 4655  (class class class)co 5820    +o coa 6472
This theorem is referenced by:  nndi  6617  nnmsucr  6619  omopthlem1  6649  omopthlem2  6650  addasspi  8515
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1636  ax-8 1644  ax-13 1687  ax-14 1689  ax-6 1704  ax-7 1709  ax-11 1716  ax-12 1868  ax-ext 2265  ax-sep 4142  ax-nul 4150  ax-pr 4213  ax-un 4511
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1631  df-eu 2148  df-mo 2149  df-clab 2271  df-cleq 2277  df-clel 2280  df-nfc 2409  df-ne 2449  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 5823  df-oprab 5824  df-mpt2 5825  df-recs 6384  df-rdg 6419  df-oadd 6479
  Copyright terms: Public domain W3C validator