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

Theorem nnacom 6002
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 ((A 𝜔 B 𝜔) → (A +𝑜 B) = (B +𝑜 A))

Proof of Theorem nnacom
Dummy variables x y z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq1 5462 . . . . 5 (x = A → (x +𝑜 B) = (A +𝑜 B))
2 oveq2 5463 . . . . 5 (x = A → (B +𝑜 x) = (B +𝑜 A))
31, 2eqeq12d 2051 . . . 4 (x = A → ((x +𝑜 B) = (B +𝑜 x) ↔ (A +𝑜 B) = (B +𝑜 A)))
43imbi2d 219 . . 3 (x = A → ((B 𝜔 → (x +𝑜 B) = (B +𝑜 x)) ↔ (B 𝜔 → (A +𝑜 B) = (B +𝑜 A))))
5 oveq1 5462 . . . . 5 (x = ∅ → (x +𝑜 B) = (∅ +𝑜 B))
6 oveq2 5463 . . . . 5 (x = ∅ → (B +𝑜 x) = (B +𝑜 ∅))
75, 6eqeq12d 2051 . . . 4 (x = ∅ → ((x +𝑜 B) = (B +𝑜 x) ↔ (∅ +𝑜 B) = (B +𝑜 ∅)))
8 oveq1 5462 . . . . 5 (x = y → (x +𝑜 B) = (y +𝑜 B))
9 oveq2 5463 . . . . 5 (x = y → (B +𝑜 x) = (B +𝑜 y))
108, 9eqeq12d 2051 . . . 4 (x = y → ((x +𝑜 B) = (B +𝑜 x) ↔ (y +𝑜 B) = (B +𝑜 y)))
11 oveq1 5462 . . . . 5 (x = suc y → (x +𝑜 B) = (suc y +𝑜 B))
12 oveq2 5463 . . . . 5 (x = suc y → (B +𝑜 x) = (B +𝑜 suc y))
1311, 12eqeq12d 2051 . . . 4 (x = suc y → ((x +𝑜 B) = (B +𝑜 x) ↔ (suc y +𝑜 B) = (B +𝑜 suc y)))
14 nna0r 5996 . . . . 5 (B 𝜔 → (∅ +𝑜 B) = B)
15 nna0 5992 . . . . 5 (B 𝜔 → (B +𝑜 ∅) = B)
1614, 15eqtr4d 2072 . . . 4 (B 𝜔 → (∅ +𝑜 B) = (B +𝑜 ∅))
17 suceq 4105 . . . . . 6 ((y +𝑜 B) = (B +𝑜 y) → suc (y +𝑜 B) = suc (B +𝑜 y))
18 oveq2 5463 . . . . . . . . . . 11 (x = B → (suc y +𝑜 x) = (suc y +𝑜 B))
19 oveq2 5463 . . . . . . . . . . . 12 (x = B → (y +𝑜 x) = (y +𝑜 B))
20 suceq 4105 . . . . . . . . . . . 12 ((y +𝑜 x) = (y +𝑜 B) → suc (y +𝑜 x) = suc (y +𝑜 B))
2119, 20syl 14 . . . . . . . . . . 11 (x = B → suc (y +𝑜 x) = suc (y +𝑜 B))
2218, 21eqeq12d 2051 . . . . . . . . . 10 (x = B → ((suc y +𝑜 x) = suc (y +𝑜 x) ↔ (suc y +𝑜 B) = suc (y +𝑜 B)))
2322imbi2d 219 . . . . . . . . 9 (x = B → ((y 𝜔 → (suc y +𝑜 x) = suc (y +𝑜 x)) ↔ (y 𝜔 → (suc y +𝑜 B) = suc (y +𝑜 B))))
24 oveq2 5463 . . . . . . . . . . 11 (x = ∅ → (suc y +𝑜 x) = (suc y +𝑜 ∅))
25 oveq2 5463 . . . . . . . . . . . 12 (x = ∅ → (y +𝑜 x) = (y +𝑜 ∅))
26 suceq 4105 . . . . . . . . . . . 12 ((y +𝑜 x) = (y +𝑜 ∅) → suc (y +𝑜 x) = suc (y +𝑜 ∅))
2725, 26syl 14 . . . . . . . . . . 11 (x = ∅ → suc (y +𝑜 x) = suc (y +𝑜 ∅))
2824, 27eqeq12d 2051 . . . . . . . . . 10 (x = ∅ → ((suc y +𝑜 x) = suc (y +𝑜 x) ↔ (suc y +𝑜 ∅) = suc (y +𝑜 ∅)))
29 oveq2 5463 . . . . . . . . . . 11 (x = z → (suc y +𝑜 x) = (suc y +𝑜 z))
30 oveq2 5463 . . . . . . . . . . . 12 (x = z → (y +𝑜 x) = (y +𝑜 z))
31 suceq 4105 . . . . . . . . . . . 12 ((y +𝑜 x) = (y +𝑜 z) → suc (y +𝑜 x) = suc (y +𝑜 z))
3230, 31syl 14 . . . . . . . . . . 11 (x = z → suc (y +𝑜 x) = suc (y +𝑜 z))
3329, 32eqeq12d 2051 . . . . . . . . . 10 (x = z → ((suc y +𝑜 x) = suc (y +𝑜 x) ↔ (suc y +𝑜 z) = suc (y +𝑜 z)))
34 oveq2 5463 . . . . . . . . . . 11 (x = suc z → (suc y +𝑜 x) = (suc y +𝑜 suc z))
35 oveq2 5463 . . . . . . . . . . . 12 (x = suc z → (y +𝑜 x) = (y +𝑜 suc z))
36 suceq 4105 . . . . . . . . . . . 12 ((y +𝑜 x) = (y +𝑜 suc z) → suc (y +𝑜 x) = suc (y +𝑜 suc z))
3735, 36syl 14 . . . . . . . . . . 11 (x = suc z → suc (y +𝑜 x) = suc (y +𝑜 suc z))
3834, 37eqeq12d 2051 . . . . . . . . . 10 (x = suc z → ((suc y +𝑜 x) = suc (y +𝑜 x) ↔ (suc y +𝑜 suc z) = suc (y +𝑜 suc z)))
39 peano2 4261 . . . . . . . . . . . 12 (y 𝜔 → suc y 𝜔)
40 nna0 5992 . . . . . . . . . . . 12 (suc y 𝜔 → (suc y +𝑜 ∅) = suc y)
4139, 40syl 14 . . . . . . . . . . 11 (y 𝜔 → (suc y +𝑜 ∅) = suc y)
42 nna0 5992 . . . . . . . . . . . 12 (y 𝜔 → (y +𝑜 ∅) = y)
43 suceq 4105 . . . . . . . . . . . 12 ((y +𝑜 ∅) = y → suc (y +𝑜 ∅) = suc y)
4442, 43syl 14 . . . . . . . . . . 11 (y 𝜔 → suc (y +𝑜 ∅) = suc y)
4541, 44eqtr4d 2072 . . . . . . . . . 10 (y 𝜔 → (suc y +𝑜 ∅) = suc (y +𝑜 ∅))
46 suceq 4105 . . . . . . . . . . . 12 ((suc y +𝑜 z) = suc (y +𝑜 z) → suc (suc y +𝑜 z) = suc suc (y +𝑜 z))
47 nnasuc 5994 . . . . . . . . . . . . . 14 ((suc y 𝜔 z 𝜔) → (suc y +𝑜 suc z) = suc (suc y +𝑜 z))
4839, 47sylan 267 . . . . . . . . . . . . 13 ((y 𝜔 z 𝜔) → (suc y +𝑜 suc z) = suc (suc y +𝑜 z))
49 nnasuc 5994 . . . . . . . . . . . . . 14 ((y 𝜔 z 𝜔) → (y +𝑜 suc z) = suc (y +𝑜 z))
50 suceq 4105 . . . . . . . . . . . . . 14 ((y +𝑜 suc z) = suc (y +𝑜 z) → suc (y +𝑜 suc z) = suc suc (y +𝑜 z))
5149, 50syl 14 . . . . . . . . . . . . 13 ((y 𝜔 z 𝜔) → suc (y +𝑜 suc z) = suc suc (y +𝑜 z))
5248, 51eqeq12d 2051 . . . . . . . . . . . 12 ((y 𝜔 z 𝜔) → ((suc y +𝑜 suc z) = suc (y +𝑜 suc z) ↔ suc (suc y +𝑜 z) = suc suc (y +𝑜 z)))
5346, 52syl5ibr 145 . . . . . . . . . . 11 ((y 𝜔 z 𝜔) → ((suc y +𝑜 z) = suc (y +𝑜 z) → (suc y +𝑜 suc z) = suc (y +𝑜 suc z)))
5453expcom 109 . . . . . . . . . 10 (z 𝜔 → (y 𝜔 → ((suc y +𝑜 z) = suc (y +𝑜 z) → (suc y +𝑜 suc z) = suc (y +𝑜 suc z))))
5528, 33, 38, 45, 54finds2 4267 . . . . . . . . 9 (x 𝜔 → (y 𝜔 → (suc y +𝑜 x) = suc (y +𝑜 x)))
5623, 55vtoclga 2613 . . . . . . . 8 (B 𝜔 → (y 𝜔 → (suc y +𝑜 B) = suc (y +𝑜 B)))
5756imp 115 . . . . . . 7 ((B 𝜔 y 𝜔) → (suc y +𝑜 B) = suc (y +𝑜 B))
58 nnasuc 5994 . . . . . . 7 ((B 𝜔 y 𝜔) → (B +𝑜 suc y) = suc (B +𝑜 y))
5957, 58eqeq12d 2051 . . . . . 6 ((B 𝜔 y 𝜔) → ((suc y +𝑜 B) = (B +𝑜 suc y) ↔ suc (y +𝑜 B) = suc (B +𝑜 y)))
6017, 59syl5ibr 145 . . . . 5 ((B 𝜔 y 𝜔) → ((y +𝑜 B) = (B +𝑜 y) → (suc y +𝑜 B) = (B +𝑜 suc y)))
6160expcom 109 . . . 4 (y 𝜔 → (B 𝜔 → ((y +𝑜 B) = (B +𝑜 y) → (suc y +𝑜 B) = (B +𝑜 suc y))))
627, 10, 13, 16, 61finds2 4267 . . 3 (x 𝜔 → (B 𝜔 → (x +𝑜 B) = (B +𝑜 x)))
634, 62vtoclga 2613 . 2 (A 𝜔 → (B 𝜔 → (A +𝑜 B) = (B +𝑜 A)))
6463imp 115 1 ((A 𝜔 B 𝜔) → (A +𝑜 B) = (B +𝑜 A))
Colors of variables: wff set class
Syntax hints:  wi 4   wa 97   = wceq 1242   wcel 1390  c0 3218  suc csuc 4068  𝜔com 4256  (class class class)co 5455   +𝑜 coa 5937
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 99  ax-ia2 100  ax-ia3 101  ax-in1 544  ax-in2 545  ax-io 629  ax-5 1333  ax-7 1334  ax-gen 1335  ax-ie1 1379  ax-ie2 1380  ax-8 1392  ax-10 1393  ax-11 1394  ax-i12 1395  ax-bnd 1396  ax-4 1397  ax-13 1401  ax-14 1402  ax-17 1416  ax-i9 1420  ax-ial 1424  ax-i5r 1425  ax-ext 2019  ax-coll 3863  ax-sep 3866  ax-nul 3874  ax-pow 3918  ax-pr 3935  ax-un 4136  ax-setind 4220  ax-iinf 4254
This theorem depends on definitions:  df-bi 110  df-3an 886  df-tru 1245  df-fal 1248  df-nf 1347  df-sb 1643  df-eu 1900  df-mo 1901  df-clab 2024  df-cleq 2030  df-clel 2033  df-nfc 2164  df-ne 2203  df-ral 2305  df-rex 2306  df-reu 2307  df-rab 2309  df-v 2553  df-sbc 2759  df-csb 2847  df-dif 2914  df-un 2916  df-in 2918  df-ss 2925  df-nul 3219  df-pw 3353  df-sn 3373  df-pr 3374  df-op 3376  df-uni 3572  df-int 3607  df-iun 3650  df-br 3756  df-opab 3810  df-mpt 3811  df-tr 3846  df-id 4021  df-iord 4069  df-on 4071  df-suc 4074  df-iom 4257  df-xp 4294  df-rel 4295  df-cnv 4296  df-co 4297  df-dm 4298  df-rn 4299  df-res 4300  df-ima 4301  df-iota 4810  df-fun 4847  df-fn 4848  df-f 4849  df-f1 4850  df-fo 4851  df-f1o 4852  df-fv 4853  df-ov 5458  df-oprab 5459  df-mpt2 5460  df-1st 5709  df-2nd 5710  df-recs 5861  df-irdg 5897  df-oadd 5944
This theorem is referenced by:  nnmsucr  6006  nnaordi  6017  nnaordr  6019  nnaword  6020  nnaword2  6023  nnawordi  6024  addcompig  6313  nqpnq0nq  6435  prarloclemlt  6475  prarloclemlo  6476
  Copyright terms: Public domain W3C validator