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

Theorem nnacom 6227
Description: Addition of natural numbers is commutative. Theorem 4K(2) of [Enderton] p. 81. (Contributed by NM, 6-May-1995.) (Revised by Mario Carneiro, 15-Nov-2014.)
Assertion
Ref Expression
nnacom ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴))

Proof of Theorem nnacom
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq1 5641 . . . . 5 (𝑥 = 𝐴 → (𝑥 +𝑜 𝐵) = (𝐴 +𝑜 𝐵))
2 oveq2 5642 . . . . 5 (𝑥 = 𝐴 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 𝐴))
31, 2eqeq12d 2102 . . . 4 (𝑥 = 𝐴 → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴)))
43imbi2d 228 . . 3 (𝑥 = 𝐴 → ((𝐵 ∈ ω → (𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥)) ↔ (𝐵 ∈ ω → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴))))
5 oveq1 5641 . . . . 5 (𝑥 = ∅ → (𝑥 +𝑜 𝐵) = (∅ +𝑜 𝐵))
6 oveq2 5642 . . . . 5 (𝑥 = ∅ → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 ∅))
75, 6eqeq12d 2102 . . . 4 (𝑥 = ∅ → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (∅ +𝑜 𝐵) = (𝐵 +𝑜 ∅)))
8 oveq1 5641 . . . . 5 (𝑥 = 𝑦 → (𝑥 +𝑜 𝐵) = (𝑦 +𝑜 𝐵))
9 oveq2 5642 . . . . 5 (𝑥 = 𝑦 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 𝑦))
108, 9eqeq12d 2102 . . . 4 (𝑥 = 𝑦 → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦)))
11 oveq1 5641 . . . . 5 (𝑥 = suc 𝑦 → (𝑥 +𝑜 𝐵) = (suc 𝑦 +𝑜 𝐵))
12 oveq2 5642 . . . . 5 (𝑥 = suc 𝑦 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 suc 𝑦))
1311, 12eqeq12d 2102 . . . 4 (𝑥 = suc 𝑦 → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦)))
14 nna0r 6221 . . . . 5 (𝐵 ∈ ω → (∅ +𝑜 𝐵) = 𝐵)
15 nna0 6217 . . . . 5 (𝐵 ∈ ω → (𝐵 +𝑜 ∅) = 𝐵)
1614, 15eqtr4d 2123 . . . 4 (𝐵 ∈ ω → (∅ +𝑜 𝐵) = (𝐵 +𝑜 ∅))
17 suceq 4220 . . . . . 6 ((𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦) → suc (𝑦 +𝑜 𝐵) = suc (𝐵 +𝑜 𝑦))
18 oveq2 5642 . . . . . . . . . . 11 (𝑥 = 𝐵 → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 𝐵))
19 oveq2 5642 . . . . . . . . . . . 12 (𝑥 = 𝐵 → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝐵))
20 suceq 4220 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝐵) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝐵))
2119, 20syl 14 . . . . . . . . . . 11 (𝑥 = 𝐵 → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝐵))
2218, 21eqeq12d 2102 . . . . . . . . . 10 (𝑥 = 𝐵 → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵)))
2322imbi2d 228 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝑦 ∈ ω → (suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥)) ↔ (𝑦 ∈ ω → (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵))))
24 oveq2 5642 . . . . . . . . . . 11 (𝑥 = ∅ → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 ∅))
25 oveq2 5642 . . . . . . . . . . . 12 (𝑥 = ∅ → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 ∅))
26 suceq 4220 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 ∅) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 ∅))
2725, 26syl 14 . . . . . . . . . . 11 (𝑥 = ∅ → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 ∅))
2824, 27eqeq12d 2102 . . . . . . . . . 10 (𝑥 = ∅ → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 ∅) = suc (𝑦 +𝑜 ∅)))
29 oveq2 5642 . . . . . . . . . . 11 (𝑥 = 𝑧 → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 𝑧))
30 oveq2 5642 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝑧))
31 suceq 4220 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝑧) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑧))
3230, 31syl 14 . . . . . . . . . . 11 (𝑥 = 𝑧 → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑧))
3329, 32eqeq12d 2102 . . . . . . . . . 10 (𝑥 = 𝑧 → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧)))
34 oveq2 5642 . . . . . . . . . . 11 (𝑥 = suc 𝑧 → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 suc 𝑧))
35 oveq2 5642 . . . . . . . . . . . 12 (𝑥 = suc 𝑧 → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 suc 𝑧))
36 suceq 4220 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 suc 𝑧) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 suc 𝑧))
3735, 36syl 14 . . . . . . . . . . 11 (𝑥 = suc 𝑧 → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 suc 𝑧))
3834, 37eqeq12d 2102 . . . . . . . . . 10 (𝑥 = suc 𝑧 → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧)))
39 peano2 4400 . . . . . . . . . . . 12 (𝑦 ∈ ω → suc 𝑦 ∈ ω)
40 nna0 6217 . . . . . . . . . . . 12 (suc 𝑦 ∈ ω → (suc 𝑦 +𝑜 ∅) = suc 𝑦)
4139, 40syl 14 . . . . . . . . . . 11 (𝑦 ∈ ω → (suc 𝑦 +𝑜 ∅) = suc 𝑦)
42 nna0 6217 . . . . . . . . . . . 12 (𝑦 ∈ ω → (𝑦 +𝑜 ∅) = 𝑦)
43 suceq 4220 . . . . . . . . . . . 12 ((𝑦 +𝑜 ∅) = 𝑦 → suc (𝑦 +𝑜 ∅) = suc 𝑦)
4442, 43syl 14 . . . . . . . . . . 11 (𝑦 ∈ ω → suc (𝑦 +𝑜 ∅) = suc 𝑦)
4541, 44eqtr4d 2123 . . . . . . . . . 10 (𝑦 ∈ ω → (suc 𝑦 +𝑜 ∅) = suc (𝑦 +𝑜 ∅))
46 suceq 4220 . . . . . . . . . . . 12 ((suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧) → suc (suc 𝑦 +𝑜 𝑧) = suc suc (𝑦 +𝑜 𝑧))
47 nnasuc 6219 . . . . . . . . . . . . . 14 ((suc 𝑦 ∈ ω ∧ 𝑧 ∈ ω) → (suc 𝑦 +𝑜 suc 𝑧) = suc (suc 𝑦 +𝑜 𝑧))
4839, 47sylan 277 . . . . . . . . . . . . 13 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → (suc 𝑦 +𝑜 suc 𝑧) = suc (suc 𝑦 +𝑜 𝑧))
49 nnasuc 6219 . . . . . . . . . . . . . 14 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → (𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 𝑧))
50 suceq 4220 . . . . . . . . . . . . . 14 ((𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 𝑧) → suc (𝑦 +𝑜 suc 𝑧) = suc suc (𝑦 +𝑜 𝑧))
5149, 50syl 14 . . . . . . . . . . . . 13 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → suc (𝑦 +𝑜 suc 𝑧) = suc suc (𝑦 +𝑜 𝑧))
5248, 51eqeq12d 2102 . . . . . . . . . . . 12 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → ((suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧) ↔ suc (suc 𝑦 +𝑜 𝑧) = suc suc (𝑦 +𝑜 𝑧)))
5346, 52syl5ibr 154 . . . . . . . . . . 11 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → ((suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧) → (suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧)))
5453expcom 114 . . . . . . . . . 10 (𝑧 ∈ ω → (𝑦 ∈ ω → ((suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧) → (suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧))))
5528, 33, 38, 45, 54finds2 4406 . . . . . . . . 9 (𝑥 ∈ ω → (𝑦 ∈ ω → (suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥)))
5623, 55vtoclga 2685 . . . . . . . 8 (𝐵 ∈ ω → (𝑦 ∈ ω → (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵)))
5756imp 122 . . . . . . 7 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵))
58 nnasuc 6219 . . . . . . 7 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐵 +𝑜 suc 𝑦) = suc (𝐵 +𝑜 𝑦))
5957, 58eqeq12d 2102 . . . . . 6 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → ((suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦) ↔ suc (𝑦 +𝑜 𝐵) = suc (𝐵 +𝑜 𝑦)))
6017, 59syl5ibr 154 . . . . 5 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → ((𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦) → (suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦)))
6160expcom 114 . . . 4 (𝑦 ∈ ω → (𝐵 ∈ ω → ((𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦) → (suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦))))
627, 10, 13, 16, 61finds2 4406 . . 3 (𝑥 ∈ ω → (𝐵 ∈ ω → (𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥)))
634, 62vtoclga 2685 . 2 (𝐴 ∈ ω → (𝐵 ∈ ω → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴)))
6463imp 122 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 102   = wceq 1289  wcel 1438  c0 3284  suc csuc 4183  ωcom 4395  (class class class)co 5634   +𝑜 coa 6160
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-coll 3946  ax-sep 3949  ax-nul 3957  ax-pow 4001  ax-pr 4027  ax-un 4251  ax-setind 4343  ax-iinf 4393
This theorem depends on definitions:  df-bi 115  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-ral 2364  df-rex 2365  df-reu 2366  df-rab 2368  df-v 2621  df-sbc 2839  df-csb 2932  df-dif 2999  df-un 3001  df-in 3003  df-ss 3010  df-nul 3285  df-pw 3427  df-sn 3447  df-pr 3448  df-op 3450  df-uni 3649  df-int 3684  df-iun 3727  df-br 3838  df-opab 3892  df-mpt 3893  df-tr 3929  df-id 4111  df-iord 4184  df-on 4186  df-suc 4189  df-iom 4396  df-xp 4434  df-rel 4435  df-cnv 4436  df-co 4437  df-dm 4438  df-rn 4439  df-res 4440  df-ima 4441  df-iota 4967  df-fun 5004  df-fn 5005  df-f 5006  df-f1 5007  df-fo 5008  df-f1o 5009  df-fv 5010  df-ov 5637  df-oprab 5638  df-mpt2 5639  df-1st 5893  df-2nd 5894  df-recs 6052  df-irdg 6117  df-oadd 6167
This theorem is referenced by:  nnmsucr  6231  nnaordi  6247  nnaordr  6249  nnaword  6250  nnaword2  6253  nnawordi  6254  addcompig  6867  nqpnq0nq  6991  prarloclemlt  7031  prarloclemlo  7032
  Copyright terms: Public domain W3C validator