ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  nnaass GIF version

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

Proof of Theorem nnaass
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 5547 . . . . . 6 (𝑥 = 𝐶 → ((𝐴 +𝑜 𝐵) +𝑜 𝑥) = ((𝐴 +𝑜 𝐵) +𝑜 𝐶))
2 oveq2 5547 . . . . . . 7 (𝑥 = 𝐶 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 𝐶))
32oveq2d 5555 . . . . . 6 (𝑥 = 𝐶 → (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) = (𝐴 +𝑜 (𝐵 +𝑜 𝐶)))
41, 3eqeq12d 2070 . . . . 5 (𝑥 = 𝐶 → (((𝐴 +𝑜 𝐵) +𝑜 𝑥) = (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) ↔ ((𝐴 +𝑜 𝐵) +𝑜 𝐶) = (𝐴 +𝑜 (𝐵 +𝑜 𝐶))))
54imbi2d 223 . . . 4 (𝑥 = 𝐶 → (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 𝑥) = (𝐴 +𝑜 (𝐵 +𝑜 𝑥))) ↔ ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 𝐶) = (𝐴 +𝑜 (𝐵 +𝑜 𝐶)))))
6 oveq2 5547 . . . . . 6 (𝑥 = ∅ → ((𝐴 +𝑜 𝐵) +𝑜 𝑥) = ((𝐴 +𝑜 𝐵) +𝑜 ∅))
7 oveq2 5547 . . . . . . 7 (𝑥 = ∅ → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 ∅))
87oveq2d 5555 . . . . . 6 (𝑥 = ∅ → (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) = (𝐴 +𝑜 (𝐵 +𝑜 ∅)))
96, 8eqeq12d 2070 . . . . 5 (𝑥 = ∅ → (((𝐴 +𝑜 𝐵) +𝑜 𝑥) = (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) ↔ ((𝐴 +𝑜 𝐵) +𝑜 ∅) = (𝐴 +𝑜 (𝐵 +𝑜 ∅))))
10 oveq2 5547 . . . . . 6 (𝑥 = 𝑦 → ((𝐴 +𝑜 𝐵) +𝑜 𝑥) = ((𝐴 +𝑜 𝐵) +𝑜 𝑦))
11 oveq2 5547 . . . . . . 7 (𝑥 = 𝑦 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 𝑦))
1211oveq2d 5555 . . . . . 6 (𝑥 = 𝑦 → (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) = (𝐴 +𝑜 (𝐵 +𝑜 𝑦)))
1310, 12eqeq12d 2070 . . . . 5 (𝑥 = 𝑦 → (((𝐴 +𝑜 𝐵) +𝑜 𝑥) = (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) ↔ ((𝐴 +𝑜 𝐵) +𝑜 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 𝑦))))
14 oveq2 5547 . . . . . 6 (𝑥 = suc 𝑦 → ((𝐴 +𝑜 𝐵) +𝑜 𝑥) = ((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦))
15 oveq2 5547 . . . . . . 7 (𝑥 = suc 𝑦 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 suc 𝑦))
1615oveq2d 5555 . . . . . 6 (𝑥 = suc 𝑦 → (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) = (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)))
1714, 16eqeq12d 2070 . . . . 5 (𝑥 = suc 𝑦 → (((𝐴 +𝑜 𝐵) +𝑜 𝑥) = (𝐴 +𝑜 (𝐵 +𝑜 𝑥)) ↔ ((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦))))
18 nnacl 6089 . . . . . . 7 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +𝑜 𝐵) ∈ ω)
19 nna0 6083 . . . . . . 7 ((𝐴 +𝑜 𝐵) ∈ ω → ((𝐴 +𝑜 𝐵) +𝑜 ∅) = (𝐴 +𝑜 𝐵))
2018, 19syl 14 . . . . . 6 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 ∅) = (𝐴 +𝑜 𝐵))
21 nna0 6083 . . . . . . . 8 (𝐵 ∈ ω → (𝐵 +𝑜 ∅) = 𝐵)
2221oveq2d 5555 . . . . . . 7 (𝐵 ∈ ω → (𝐴 +𝑜 (𝐵 +𝑜 ∅)) = (𝐴 +𝑜 𝐵))
2322adantl 266 . . . . . 6 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +𝑜 (𝐵 +𝑜 ∅)) = (𝐴 +𝑜 𝐵))
2420, 23eqtr4d 2091 . . . . 5 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 ∅) = (𝐴 +𝑜 (𝐵 +𝑜 ∅)))
25 suceq 4166 . . . . . . 7 (((𝐴 +𝑜 𝐵) +𝑜 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 𝑦)) → suc ((𝐴 +𝑜 𝐵) +𝑜 𝑦) = suc (𝐴 +𝑜 (𝐵 +𝑜 𝑦)))
26 nnasuc 6085 . . . . . . . . 9 (((𝐴 +𝑜 𝐵) ∈ ω ∧ 𝑦 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦) = suc ((𝐴 +𝑜 𝐵) +𝑜 𝑦))
2718, 26sylan 271 . . . . . . . 8 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦) = suc ((𝐴 +𝑜 𝐵) +𝑜 𝑦))
28 nnasuc 6085 . . . . . . . . . . . 12 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐵 +𝑜 suc 𝑦) = suc (𝐵 +𝑜 𝑦))
2928oveq2d 5555 . . . . . . . . . . 11 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)) = (𝐴 +𝑜 suc (𝐵 +𝑜 𝑦)))
3029adantl 266 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ (𝐵 ∈ ω ∧ 𝑦 ∈ ω)) → (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)) = (𝐴 +𝑜 suc (𝐵 +𝑜 𝑦)))
31 nnacl 6089 . . . . . . . . . . 11 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐵 +𝑜 𝑦) ∈ ω)
32 nnasuc 6085 . . . . . . . . . . 11 ((𝐴 ∈ ω ∧ (𝐵 +𝑜 𝑦) ∈ ω) → (𝐴 +𝑜 suc (𝐵 +𝑜 𝑦)) = suc (𝐴 +𝑜 (𝐵 +𝑜 𝑦)))
3331, 32sylan2 274 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ (𝐵 ∈ ω ∧ 𝑦 ∈ ω)) → (𝐴 +𝑜 suc (𝐵 +𝑜 𝑦)) = suc (𝐴 +𝑜 (𝐵 +𝑜 𝑦)))
3430, 33eqtrd 2088 . . . . . . . . 9 ((𝐴 ∈ ω ∧ (𝐵 ∈ ω ∧ 𝑦 ∈ ω)) → (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)) = suc (𝐴 +𝑜 (𝐵 +𝑜 𝑦)))
3534anassrs 386 . . . . . . . 8 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)) = suc (𝐴 +𝑜 (𝐵 +𝑜 𝑦)))
3627, 35eqeq12d 2070 . . . . . . 7 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → (((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)) ↔ suc ((𝐴 +𝑜 𝐵) +𝑜 𝑦) = suc (𝐴 +𝑜 (𝐵 +𝑜 𝑦))))
3725, 36syl5ibr 149 . . . . . 6 (((𝐴 ∈ ω ∧ 𝐵 ∈ ω) ∧ 𝑦 ∈ ω) → (((𝐴 +𝑜 𝐵) +𝑜 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 𝑦)) → ((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦))))
3837expcom 113 . . . . 5 (𝑦 ∈ ω → ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (((𝐴 +𝑜 𝐵) +𝑜 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 𝑦)) → ((𝐴 +𝑜 𝐵) +𝑜 suc 𝑦) = (𝐴 +𝑜 (𝐵 +𝑜 suc 𝑦)))))
399, 13, 17, 24, 38finds2 4351 . . . 4 (𝑥 ∈ ω → ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 𝑥) = (𝐴 +𝑜 (𝐵 +𝑜 𝑥))))
405, 39vtoclga 2636 . . 3 (𝐶 ∈ ω → ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 𝐶) = (𝐴 +𝑜 (𝐵 +𝑜 𝐶))))
4140com12 30 . 2 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐶 ∈ ω → ((𝐴 +𝑜 𝐵) +𝑜 𝐶) = (𝐴 +𝑜 (𝐵 +𝑜 𝐶))))
42413impia 1112 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω) → ((𝐴 +𝑜 𝐵) +𝑜 𝐶) = (𝐴 +𝑜 (𝐵 +𝑜 𝐶)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 101  w3a 896   = wceq 1259  wcel 1409  c0 3251  suc csuc 4129  ωcom 4340  (class class class)co 5539   +𝑜 coa 6028
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 103  ax-ia2 104  ax-ia3 105  ax-in1 554  ax-in2 555  ax-io 640  ax-5 1352  ax-7 1353  ax-gen 1354  ax-ie1 1398  ax-ie2 1399  ax-8 1411  ax-10 1412  ax-11 1413  ax-i12 1414  ax-bndl 1415  ax-4 1416  ax-13 1420  ax-14 1421  ax-17 1435  ax-i9 1439  ax-ial 1443  ax-i5r 1444  ax-ext 2038  ax-coll 3899  ax-sep 3902  ax-nul 3910  ax-pow 3954  ax-pr 3971  ax-un 4197  ax-setind 4289  ax-iinf 4338
This theorem depends on definitions:  df-bi 114  df-3an 898  df-tru 1262  df-fal 1265  df-nf 1366  df-sb 1662  df-eu 1919  df-mo 1920  df-clab 2043  df-cleq 2049  df-clel 2052  df-nfc 2183  df-ne 2221  df-ral 2328  df-rex 2329  df-reu 2330  df-rab 2332  df-v 2576  df-sbc 2787  df-csb 2880  df-dif 2947  df-un 2949  df-in 2951  df-ss 2958  df-nul 3252  df-pw 3388  df-sn 3408  df-pr 3409  df-op 3411  df-uni 3608  df-int 3643  df-iun 3686  df-br 3792  df-opab 3846  df-mpt 3847  df-tr 3882  df-id 4057  df-iord 4130  df-on 4132  df-suc 4135  df-iom 4341  df-xp 4378  df-rel 4379  df-cnv 4380  df-co 4381  df-dm 4382  df-rn 4383  df-res 4384  df-ima 4385  df-iota 4894  df-fun 4931  df-fn 4932  df-f 4933  df-f1 4934  df-fo 4935  df-f1o 4936  df-fv 4937  df-ov 5542  df-oprab 5543  df-mpt2 5544  df-1st 5794  df-2nd 5795  df-recs 5950  df-irdg 5987  df-oadd 6035
This theorem is referenced by:  nndi  6095  nnmsucr  6097  addasspig  6485  addassnq0  6617  prarloclemlo  6649
  Copyright terms: Public domain W3C validator