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

Theorem nnaass 6620
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 5866 . . . . . 6  |-  ( x  =  C  ->  (
( A  +o  B
)  +o  x )  =  ( ( A  +o  B )  +o  C ) )
2 oveq2 5866 . . . . . . 7  |-  ( x  =  C  ->  ( B  +o  x )  =  ( B  +o  C
) )
32oveq2d 5874 . . . . . 6  |-  ( x  =  C  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  C ) ) )
41, 3eqeq12d 2297 . . . . 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 5866 . . . . . 6  |-  ( x  =  (/)  ->  ( ( A  +o  B )  +o  x )  =  ( ( A  +o  B )  +o  (/) ) )
7 oveq2 5866 . . . . . . 7  |-  ( x  =  (/)  ->  ( B  +o  x )  =  ( B  +o  (/) ) )
87oveq2d 5874 . . . . . 6  |-  ( x  =  (/)  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  (/) ) ) )
96, 8eqeq12d 2297 . . . . 5  |-  ( x  =  (/)  ->  ( ( ( A  +o  B
)  +o  x )  =  ( A  +o  ( B  +o  x
) )  <->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  ( B  +o  (/) ) ) ) )
10 oveq2 5866 . . . . . 6  |-  ( x  =  y  ->  (
( A  +o  B
)  +o  x )  =  ( ( A  +o  B )  +o  y ) )
11 oveq2 5866 . . . . . . 7  |-  ( x  =  y  ->  ( B  +o  x )  =  ( B  +o  y
) )
1211oveq2d 5874 . . . . . 6  |-  ( x  =  y  ->  ( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  y ) ) )
1310, 12eqeq12d 2297 . . . . 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 5866 . . . . . 6  |-  ( x  =  suc  y  -> 
( ( A  +o  B )  +o  x
)  =  ( ( A  +o  B )  +o  suc  y ) )
15 oveq2 5866 . . . . . . 7  |-  ( x  =  suc  y  -> 
( B  +o  x
)  =  ( B  +o  suc  y ) )
1615oveq2d 5874 . . . . . 6  |-  ( x  =  suc  y  -> 
( A  +o  ( B  +o  x ) )  =  ( A  +o  ( B  +o  suc  y
) ) )
1714, 16eqeq12d 2297 . . . . 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 6609 . . . . . . 7  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( A  +o  B
)  e.  om )
19 nna0 6602 . . . . . . 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 6602 . . . . . . . 8  |-  ( B  e.  om  ->  ( B  +o  (/) )  =  B )
2221oveq2d 5874 . . . . . . 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 2318 . . . . 5  |-  ( ( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  (/) )  =  ( A  +o  ( B  +o  (/) ) ) )
25 suceq 4457 . . . . . . 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 6604 . . . . . . . . 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 6604 . . . . . . . . . . . 12  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( B  +o  suc  y )  =  suc  ( B  +o  y
) )
2928oveq2d 5874 . . . . . . . . . . 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 6609 . . . . . . . . . . 11  |-  ( ( B  e.  om  /\  y  e.  om )  ->  ( B  +o  y
)  e.  om )
32 nnasuc 6604 . . . . . . . . . . 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 2315 . . . . . . . . 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 2297 . . . . . . 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 4684 . . . 4  |-  ( x  e.  om  ->  (
( A  e.  om  /\  B  e.  om )  ->  ( ( A  +o  B )  +o  x
)  =  ( A  +o  ( B  +o  x ) ) ) )
405, 39vtoclga 2849 . . 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 1684   (/)c0 3455   suc csuc 4394   omcom 4656  (class class class)co 5858    +o coa 6476
This theorem is referenced by:  nndi  6621  nnmsucr  6623  omopthlem1  6653  omopthlem2  6654  addasspi  8519
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 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
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 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-ral 2548  df-rex 2549  df-reu 2550  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-recs 6388  df-rdg 6423  df-oadd 6483
  Copyright terms: Public domain W3C validator