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

Theorem nnacom 6093
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 5546 . . . . 5 (𝑥 = 𝐴 → (𝑥 +𝑜 𝐵) = (𝐴 +𝑜 𝐵))
2 oveq2 5547 . . . . 5 (𝑥 = 𝐴 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 𝐴))
31, 2eqeq12d 2070 . . . 4 (𝑥 = 𝐴 → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴)))
43imbi2d 223 . . 3 (𝑥 = 𝐴 → ((𝐵 ∈ ω → (𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥)) ↔ (𝐵 ∈ ω → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴))))
5 oveq1 5546 . . . . 5 (𝑥 = ∅ → (𝑥 +𝑜 𝐵) = (∅ +𝑜 𝐵))
6 oveq2 5547 . . . . 5 (𝑥 = ∅ → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 ∅))
75, 6eqeq12d 2070 . . . 4 (𝑥 = ∅ → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (∅ +𝑜 𝐵) = (𝐵 +𝑜 ∅)))
8 oveq1 5546 . . . . 5 (𝑥 = 𝑦 → (𝑥 +𝑜 𝐵) = (𝑦 +𝑜 𝐵))
9 oveq2 5547 . . . . 5 (𝑥 = 𝑦 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 𝑦))
108, 9eqeq12d 2070 . . . 4 (𝑥 = 𝑦 → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦)))
11 oveq1 5546 . . . . 5 (𝑥 = suc 𝑦 → (𝑥 +𝑜 𝐵) = (suc 𝑦 +𝑜 𝐵))
12 oveq2 5547 . . . . 5 (𝑥 = suc 𝑦 → (𝐵 +𝑜 𝑥) = (𝐵 +𝑜 suc 𝑦))
1311, 12eqeq12d 2070 . . . 4 (𝑥 = suc 𝑦 → ((𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦)))
14 nna0r 6087 . . . . 5 (𝐵 ∈ ω → (∅ +𝑜 𝐵) = 𝐵)
15 nna0 6083 . . . . 5 (𝐵 ∈ ω → (𝐵 +𝑜 ∅) = 𝐵)
1614, 15eqtr4d 2091 . . . 4 (𝐵 ∈ ω → (∅ +𝑜 𝐵) = (𝐵 +𝑜 ∅))
17 suceq 4166 . . . . . 6 ((𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦) → suc (𝑦 +𝑜 𝐵) = suc (𝐵 +𝑜 𝑦))
18 oveq2 5547 . . . . . . . . . . 11 (𝑥 = 𝐵 → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 𝐵))
19 oveq2 5547 . . . . . . . . . . . 12 (𝑥 = 𝐵 → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝐵))
20 suceq 4166 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝐵) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝐵))
2119, 20syl 14 . . . . . . . . . . 11 (𝑥 = 𝐵 → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝐵))
2218, 21eqeq12d 2070 . . . . . . . . . 10 (𝑥 = 𝐵 → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵)))
2322imbi2d 223 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝑦 ∈ ω → (suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥)) ↔ (𝑦 ∈ ω → (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵))))
24 oveq2 5547 . . . . . . . . . . 11 (𝑥 = ∅ → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 ∅))
25 oveq2 5547 . . . . . . . . . . . 12 (𝑥 = ∅ → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 ∅))
26 suceq 4166 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 ∅) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 ∅))
2725, 26syl 14 . . . . . . . . . . 11 (𝑥 = ∅ → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 ∅))
2824, 27eqeq12d 2070 . . . . . . . . . 10 (𝑥 = ∅ → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 ∅) = suc (𝑦 +𝑜 ∅)))
29 oveq2 5547 . . . . . . . . . . 11 (𝑥 = 𝑧 → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 𝑧))
30 oveq2 5547 . . . . . . . . . . . 12 (𝑥 = 𝑧 → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝑧))
31 suceq 4166 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 𝑧) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑧))
3230, 31syl 14 . . . . . . . . . . 11 (𝑥 = 𝑧 → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑧))
3329, 32eqeq12d 2070 . . . . . . . . . 10 (𝑥 = 𝑧 → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧)))
34 oveq2 5547 . . . . . . . . . . 11 (𝑥 = suc 𝑧 → (suc 𝑦 +𝑜 𝑥) = (suc 𝑦 +𝑜 suc 𝑧))
35 oveq2 5547 . . . . . . . . . . . 12 (𝑥 = suc 𝑧 → (𝑦 +𝑜 𝑥) = (𝑦 +𝑜 suc 𝑧))
36 suceq 4166 . . . . . . . . . . . 12 ((𝑦 +𝑜 𝑥) = (𝑦 +𝑜 suc 𝑧) → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 suc 𝑧))
3735, 36syl 14 . . . . . . . . . . 11 (𝑥 = suc 𝑧 → suc (𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 suc 𝑧))
3834, 37eqeq12d 2070 . . . . . . . . . 10 (𝑥 = suc 𝑧 → ((suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥) ↔ (suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧)))
39 peano2 4345 . . . . . . . . . . . 12 (𝑦 ∈ ω → suc 𝑦 ∈ ω)
40 nna0 6083 . . . . . . . . . . . 12 (suc 𝑦 ∈ ω → (suc 𝑦 +𝑜 ∅) = suc 𝑦)
4139, 40syl 14 . . . . . . . . . . 11 (𝑦 ∈ ω → (suc 𝑦 +𝑜 ∅) = suc 𝑦)
42 nna0 6083 . . . . . . . . . . . 12 (𝑦 ∈ ω → (𝑦 +𝑜 ∅) = 𝑦)
43 suceq 4166 . . . . . . . . . . . 12 ((𝑦 +𝑜 ∅) = 𝑦 → suc (𝑦 +𝑜 ∅) = suc 𝑦)
4442, 43syl 14 . . . . . . . . . . 11 (𝑦 ∈ ω → suc (𝑦 +𝑜 ∅) = suc 𝑦)
4541, 44eqtr4d 2091 . . . . . . . . . 10 (𝑦 ∈ ω → (suc 𝑦 +𝑜 ∅) = suc (𝑦 +𝑜 ∅))
46 suceq 4166 . . . . . . . . . . . 12 ((suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧) → suc (suc 𝑦 +𝑜 𝑧) = suc suc (𝑦 +𝑜 𝑧))
47 nnasuc 6085 . . . . . . . . . . . . . 14 ((suc 𝑦 ∈ ω ∧ 𝑧 ∈ ω) → (suc 𝑦 +𝑜 suc 𝑧) = suc (suc 𝑦 +𝑜 𝑧))
4839, 47sylan 271 . . . . . . . . . . . . 13 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → (suc 𝑦 +𝑜 suc 𝑧) = suc (suc 𝑦 +𝑜 𝑧))
49 nnasuc 6085 . . . . . . . . . . . . . 14 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → (𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 𝑧))
50 suceq 4166 . . . . . . . . . . . . . 14 ((𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 𝑧) → suc (𝑦 +𝑜 suc 𝑧) = suc suc (𝑦 +𝑜 𝑧))
5149, 50syl 14 . . . . . . . . . . . . 13 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → suc (𝑦 +𝑜 suc 𝑧) = suc suc (𝑦 +𝑜 𝑧))
5248, 51eqeq12d 2070 . . . . . . . . . . . 12 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → ((suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧) ↔ suc (suc 𝑦 +𝑜 𝑧) = suc suc (𝑦 +𝑜 𝑧)))
5346, 52syl5ibr 149 . . . . . . . . . . 11 ((𝑦 ∈ ω ∧ 𝑧 ∈ ω) → ((suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧) → (suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧)))
5453expcom 113 . . . . . . . . . 10 (𝑧 ∈ ω → (𝑦 ∈ ω → ((suc 𝑦 +𝑜 𝑧) = suc (𝑦 +𝑜 𝑧) → (suc 𝑦 +𝑜 suc 𝑧) = suc (𝑦 +𝑜 suc 𝑧))))
5528, 33, 38, 45, 54finds2 4351 . . . . . . . . 9 (𝑥 ∈ ω → (𝑦 ∈ ω → (suc 𝑦 +𝑜 𝑥) = suc (𝑦 +𝑜 𝑥)))
5623, 55vtoclga 2636 . . . . . . . 8 (𝐵 ∈ ω → (𝑦 ∈ ω → (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵)))
5756imp 119 . . . . . . 7 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (suc 𝑦 +𝑜 𝐵) = suc (𝑦 +𝑜 𝐵))
58 nnasuc 6085 . . . . . . 7 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → (𝐵 +𝑜 suc 𝑦) = suc (𝐵 +𝑜 𝑦))
5957, 58eqeq12d 2070 . . . . . 6 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → ((suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦) ↔ suc (𝑦 +𝑜 𝐵) = suc (𝐵 +𝑜 𝑦)))
6017, 59syl5ibr 149 . . . . 5 ((𝐵 ∈ ω ∧ 𝑦 ∈ ω) → ((𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦) → (suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦)))
6160expcom 113 . . . 4 (𝑦 ∈ ω → (𝐵 ∈ ω → ((𝑦 +𝑜 𝐵) = (𝐵 +𝑜 𝑦) → (suc 𝑦 +𝑜 𝐵) = (𝐵 +𝑜 suc 𝑦))))
627, 10, 13, 16, 61finds2 4351 . . 3 (𝑥 ∈ ω → (𝐵 ∈ ω → (𝑥 +𝑜 𝐵) = (𝐵 +𝑜 𝑥)))
634, 62vtoclga 2636 . 2 (𝐴 ∈ ω → (𝐵 ∈ ω → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴)))
6463imp 119 1 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω) → (𝐴 +𝑜 𝐵) = (𝐵 +𝑜 𝐴))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 101   = 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:  nnmsucr  6097  nnaordi  6111  nnaordr  6113  nnaword  6114  nnaword2  6117  nnawordi  6118  addcompig  6484  nqpnq0nq  6608  prarloclemlt  6648  prarloclemlo  6649
  Copyright terms: Public domain W3C validator