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

Theorem nnaass 8238
 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 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω) → ((𝐴 +o 𝐵) +o 𝐶) = (𝐴 +o (𝐵 +o 𝐶)))

Proof of Theorem nnaass
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 7148 . . . . . 6 (𝑥 = 𝐶 → ((𝐴 +o 𝐵) +o 𝑥) = ((𝐴 +o 𝐵) +o 𝐶))
2 oveq2 7148 . . . . . . 7 (𝑥 = 𝐶 → (𝐵 +o 𝑥) = (𝐵 +o 𝐶))
32oveq2d 7156 . . . . . 6 (𝑥 = 𝐶 → (𝐴 +o (𝐵 +o 𝑥)) = (𝐴 +o (𝐵 +o 𝐶)))
41, 3eqeq12d 2814 . . . . 5 (𝑥 = 𝐶 → (((𝐴 +o 𝐵) +o 𝑥) = (𝐴 +o (𝐵 +o 𝑥)) ↔ ((𝐴 +o 𝐵) +o 𝐶) = (𝐴 +o (𝐵 +o 𝐶))))
54imbi2d 344 . . . 4 (𝑥 = 𝐶 → (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +o 𝐵) +o 𝑥) = (𝐴 +o (𝐵 +o 𝑥))) ↔ ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +o 𝐵) +o 𝐶) = (𝐴 +o (𝐵 +o 𝐶)))))
6 oveq2 7148 . . . . . 6 (𝑥 = ∅ → ((𝐴 +o 𝐵) +o 𝑥) = ((𝐴 +o 𝐵) +o ∅))
7 oveq2 7148 . . . . . . 7 (𝑥 = ∅ → (𝐵 +o 𝑥) = (𝐵 +o ∅))
87oveq2d 7156 . . . . . 6 (𝑥 = ∅ → (𝐴 +o (𝐵 +o 𝑥)) = (𝐴 +o (𝐵 +o ∅)))
96, 8eqeq12d 2814 . . . . 5 (𝑥 = ∅ → (((𝐴 +o 𝐵) +o 𝑥) = (𝐴 +o (𝐵 +o 𝑥)) ↔ ((𝐴 +o 𝐵) +o ∅) = (𝐴 +o (𝐵 +o ∅))))
10 oveq2 7148 . . . . . 6 (𝑥 = 𝑦 → ((𝐴 +o 𝐵) +o 𝑥) = ((𝐴 +o 𝐵) +o 𝑦))
11 oveq2 7148 . . . . . . 7 (𝑥 = 𝑦 → (𝐵 +o 𝑥) = (𝐵 +o 𝑦))
1211oveq2d 7156 . . . . . 6 (𝑥 = 𝑦 → (𝐴 +o (𝐵 +o 𝑥)) = (𝐴 +o (𝐵 +o 𝑦)))
1310, 12eqeq12d 2814 . . . . 5 (𝑥 = 𝑦 → (((𝐴 +o 𝐵) +o 𝑥) = (𝐴 +o (𝐵 +o 𝑥)) ↔ ((𝐴 +o 𝐵) +o 𝑦) = (𝐴 +o (𝐵 +o 𝑦))))
14 oveq2 7148 . . . . . 6 (𝑥 = suc 𝑦 → ((𝐴 +o 𝐵) +o 𝑥) = ((𝐴 +o 𝐵) +o suc 𝑦))
15 oveq2 7148 . . . . . . 7 (𝑥 = suc 𝑦 → (𝐵 +o 𝑥) = (𝐵 +o suc 𝑦))
1615oveq2d 7156 . . . . . 6 (𝑥 = suc 𝑦 → (𝐴 +o (𝐵 +o 𝑥)) = (𝐴 +o (𝐵 +o suc 𝑦)))
1714, 16eqeq12d 2814 . . . . 5 (𝑥 = suc 𝑦 → (((𝐴 +o 𝐵) +o 𝑥) = (𝐴 +o (𝐵 +o 𝑥)) ↔ ((𝐴 +o 𝐵) +o suc 𝑦) = (𝐴 +o (𝐵 +o suc 𝑦))))
18 nnacl 8227 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +o 𝐵) ∈ ω)
19 nna0 8220 . . . . . . 7 ((𝐴 +o 𝐵) ∈ ω → ((𝐴 +o 𝐵) +o ∅) = (𝐴 +o 𝐵))
2018, 19syl 17 . . . . . 6 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +o 𝐵) +o ∅) = (𝐴 +o 𝐵))
21 nna0 8220 . . . . . . . 8 (𝐵 ∈ ω → (𝐵 +o ∅) = 𝐵)
2221oveq2d 7156 . . . . . . 7 (𝐵 ∈ ω → (𝐴 +o (𝐵 +o ∅)) = (𝐴 +o 𝐵))
2322adantl 485 . . . . . 6 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +o (𝐵 +o ∅)) = (𝐴 +o 𝐵))
2420, 23eqtr4d 2836 . . . . 5 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +o 𝐵) +o ∅) = (𝐴 +o (𝐵 +o ∅)))
25 suceq 6227 . . . . . . 7 (((𝐴 +o 𝐵) +o 𝑦) = (𝐴 +o (𝐵 +o 𝑦)) → suc ((𝐴 +o 𝐵) +o 𝑦) = suc (𝐴 +o (𝐵 +o 𝑦)))
26 nnasuc 8222 . . . . . . . . 9 (((𝐴 +o 𝐵) ∈ ω ∧ 𝑦 ∈ ω) → ((𝐴 +o 𝐵) +o suc 𝑦) = suc ((𝐴 +o 𝐵) +o 𝑦))
2718, 26sylan 583 . . . . . . . 8 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → ((𝐴 +o 𝐵) +o suc 𝑦) = suc ((𝐴 +o 𝐵) +o 𝑦))
28 nnasuc 8222 . . . . . . . . . . . 12 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐵 +o suc 𝑦) = suc (𝐵 +o 𝑦))
2928oveq2d 7156 . . . . . . . . . . 11 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐴 +o (𝐵 +o suc 𝑦)) = (𝐴 +o suc (𝐵 +o 𝑦)))
3029adantl 485 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ (𝐵 ∈ ω ∧ 𝑦 ∈ ω)) → (𝐴 +o (𝐵 +o suc 𝑦)) = (𝐴 +o suc (𝐵 +o 𝑦)))
31 nnacl 8227 . . . . . . . . . . 11 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐵 +o 𝑦) ∈ ω)
32 nnasuc 8222 . . . . . . . . . . 11 ((𝐴 ∈ ω ∧ (𝐵 +o 𝑦) ∈ ω) → (𝐴 +o suc (𝐵 +o 𝑦)) = suc (𝐴 +o (𝐵 +o 𝑦)))
3331, 32sylan2 595 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ (𝐵 ∈ ω ∧ 𝑦 ∈ ω)) → (𝐴 +o suc (𝐵 +o 𝑦)) = suc (𝐴 +o (𝐵 +o 𝑦)))
3430, 33eqtrd 2833 . . . . . . . . 9 ((𝐴 ∈ ω ∧ (𝐵 ∈ ω ∧ 𝑦 ∈ ω)) → (𝐴 +o (𝐵 +o suc 𝑦)) = suc (𝐴 +o (𝐵 +o 𝑦)))
3534anassrs 471 . . . . . . . 8 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → (𝐴 +o (𝐵 +o suc 𝑦)) = suc (𝐴 +o (𝐵 +o 𝑦)))
3627, 35eqeq12d 2814 . . . . . . 7 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → (((𝐴 +o 𝐵) +o suc 𝑦) = (𝐴 +o (𝐵 +o suc 𝑦)) ↔ suc ((𝐴 +o 𝐵) +o 𝑦) = suc (𝐴 +o (𝐵 +o 𝑦))))
3725, 36syl5ibr 249 . . . . . 6 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → (((𝐴 +o 𝐵) +o 𝑦) = (𝐴 +o (𝐵 +o 𝑦)) → ((𝐴 +o 𝐵) +o suc 𝑦) = (𝐴 +o (𝐵 +o suc 𝑦))))
3837expcom 417 . . . . 5 (𝑦 ∈ ω → ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (((𝐴 +o 𝐵) +o 𝑦) = (𝐴 +o (𝐵 +o 𝑦)) → ((𝐴 +o 𝐵) +o suc 𝑦) = (𝐴 +o (𝐵 +o suc 𝑦)))))
399, 13, 17, 24, 38finds2 7598 . . . 4 (𝑥 ∈ ω → ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +o 𝐵) +o 𝑥) = (𝐴 +o (𝐵 +o 𝑥))))
405, 39vtoclga 3522 . . 3 (𝐶 ∈ ω → ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +o 𝐵) +o 𝐶) = (𝐴 +o (𝐵 +o 𝐶))))
4140com12 32 . 2 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐶 ∈ ω → ((𝐴 +o 𝐵) +o 𝐶) = (𝐴 +o (𝐵 +o 𝐶))))
42413impia 1114 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω) → ((𝐴 +o 𝐵) +o 𝐶) = (𝐴 +o (𝐵 +o 𝐶)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 399   ∧ w3a 1084   = wceq 1538   ∈ wcel 2111  ∅c0 4243  suc csuc 6164  (class class class)co 7140  ωcom 7567   +o coa 8089 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5168  ax-nul 5175  ax-pr 5296  ax-un 7448 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-ral 3111  df-rex 3112  df-reu 3113  df-rab 3115  df-v 3443  df-sbc 3721  df-csb 3829  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-pss 3900  df-nul 4244  df-if 4426  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4802  df-iun 4884  df-br 5032  df-opab 5094  df-mpt 5112  df-tr 5138  df-id 5426  df-eprel 5431  df-po 5439  df-so 5440  df-fr 5479  df-we 5481  df-xp 5526  df-rel 5527  df-cnv 5528  df-co 5529  df-dm 5530  df-rn 5531  df-res 5532  df-ima 5533  df-pred 6119  df-ord 6165  df-on 6166  df-lim 6167  df-suc 6168  df-iota 6286  df-fun 6329  df-fn 6330  df-f 6331  df-f1 6332  df-fo 6333  df-f1o 6334  df-fv 6335  df-ov 7143  df-oprab 7144  df-mpo 7145  df-om 7568  df-wrecs 7937  df-recs 7998  df-rdg 8036  df-oadd 8096 This theorem is referenced by:  nndi  8239  nnmsucr  8241  omopthlem1  8272  omopthlem2  8273  addasspi  10313
 Copyright terms: Public domain W3C validator