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

Theorem nnaass 6622
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 5868 . . . . . 6  |-  ( x  =  C  ->  (
( A  +o  B
)  +o  x )  =  ( ( A  +o  B )  +o  C ) )
2 oveq2 5868 . . . . . . 7  |-  ( x  =  C  ->  ( B  +o  x )  =  ( B  +o  C
) )
32oveq2d 5876 . . . . . 6  |-  ( x  =  C  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  C ) ) )
41, 3eqeq12d 2299 . . . . 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 5868 . . . . . 6  |-  ( x  =  (/)  ->  ( ( A  +o  B )  +o  x )  =  ( ( A  +o  B )  +o  (/) ) )
7 oveq2 5868 . . . . . . 7  |-  ( x  =  (/)  ->  ( B  +o  x )  =  ( B  +o  (/) ) )
87oveq2d 5876 . . . . . 6  |-  ( x  =  (/)  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  (/) ) ) )
96, 8eqeq12d 2299 . . . . 5  |-  ( x  =  (/)  ->  ( ( ( A  +o  B
)  +o  x )  =  ( A  +o  ( B  +o  x
) )  <->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  ( B  +o  (/) ) ) ) )
10 oveq2 5868 . . . . . 6  |-  ( x  =  y  ->  (
( A  +o  B
)  +o  x )  =  ( ( A  +o  B )  +o  y ) )
11 oveq2 5868 . . . . . . 7  |-  ( x  =  y  ->  ( B  +o  x )  =  ( B  +o  y
) )
1211oveq2d 5876 . . . . . 6  |-  ( x  =  y  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  y ) ) )
1310, 12eqeq12d 2299 . . . . 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 5868 . . . . . 6  |-  ( x  =  suc  y  -> 
( ( A  +o  B )  +o  x
)  =  ( ( A  +o  B )  +o  suc  y ) )
15 oveq2 5868 . . . . . . 7  |-  ( x  =  suc  y  -> 
( B  +o  x
)  =  ( B  +o  suc  y ) )
1615oveq2d 5876 . . . . . 6  |-  ( x  =  suc  y  -> 
( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  suc  y
) ) )
1714, 16eqeq12d 2299 . . . . 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 6611 . . . . . . 7  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( A  +o  B
)  e.  om )
19 nna0 6604 . . . . . . 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 6604 . . . . . . . 8  |-  ( B  e.  om  ->  ( B  +o  (/) )  =  B )
2221oveq2d 5876 . . . . . . 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 2320 . . . . 5  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  ( B  +o  (/) ) ) )
25 suceq 4459 . . . . . . 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 6606 . . . . . . . . 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 6606 . . . . . . . . . . . 12  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( B  +o  suc  y )  =  suc  ( B  +o  y
) )
2928oveq2d 5876 . . . . . . . . . . 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 6611 . . . . . . . . . . 11  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( B  +o  y
)  e.  om )
32 nnasuc 6606 . . . . . . . . . . 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 2317 . . . . . . . . 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 2299 . . . . . . 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 4686 . . . 4  |-  ( x  e.  om  ->  (
( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  x
)  =  ( A  +o  ( B  +o  x ) ) ) )
405, 39vtoclga 2851 . . 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 1625    e. wcel 1686   (/)c0 3457   suc csuc 4396   omcom 4658  (class class class)co 5860    +o coa 6478
This theorem is referenced by:  nndi  6623  nnmsucr  6625  omopthlem1  6655  omopthlem2  6656  addasspi  8521
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1535  ax-5 1546  ax-17 1605  ax-9 1637  ax-8 1645  ax-13 1688  ax-14 1690  ax-6 1705  ax-7 1710  ax-11 1717  ax-12 1868  ax-ext 2266  ax-sep 4143  ax-nul 4151  ax-pow 4190  ax-pr 4216  ax-un 4514
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 1531  df-nf 1534  df-sb 1632  df-eu 2149  df-mo 2150  df-clab 2272  df-cleq 2278  df-clel 2281  df-nfc 2410  df-ne 2450  df-ral 2550  df-rex 2551  df-reu 2552  df-rab 2554  df-v 2792  df-sbc 2994  df-csb 3084  df-dif 3157  df-un 3159  df-in 3161  df-ss 3168  df-pss 3170  df-nul 3458  df-if 3568  df-pw 3629  df-sn 3648  df-pr 3649  df-tp 3650  df-op 3651  df-uni 3830  df-iun 3909  df-br 4026  df-opab 4080  df-mpt 4081  df-tr 4116  df-eprel 4307  df-id 4311  df-po 4316  df-so 4317  df-fr 4354  df-we 4356  df-ord 4397  df-on 4398  df-lim 4399  df-suc 4400  df-om 4659  df-xp 4697  df-rel 4698  df-cnv 4699  df-co 4700  df-dm 4701  df-rn 4702  df-res 4703  df-ima 4704  df-iota 5221  df-fun 5259  df-fn 5260  df-f 5261  df-f1 5262  df-fo 5263  df-f1o 5264  df-fv 5265  df-ov 5863  df-oprab 5864  df-mpt2 5865  df-recs 6390  df-rdg 6425  df-oadd 6485
  Copyright terms: Public domain W3C validator