HomeHome Metamath Proof Explorer < Previous   Next >
Related theorems
Unicode version

Theorem nnacom 5288
Description: Addition of natural numbers is commutative. Theorem 4K(2) of [Enderton] p. 81.
Assertion
Ref Expression
nnacom |- ((A e. om /\ B e. om) -> (A +o B) = (B +o A))

Proof of Theorem nnacom
StepHypRef Expression
1 opreq1 4889 . . . . 5 |- (x = (/) -> (x +o B) = ((/) +o B))
2 opreq2 4890 . . . . 5 |- (x = (/) -> (B +o x) = (B +o (/)))
31, 2eqeq12d 1899 . . . 4 |- (x = (/) -> ((x +o B) = (B +o x) <-> ((/) +o B) = (B +o (/))))
43imbi2d 674 . . 3 |- (x = (/) -> ((B e. om -> (x +o B) = (B +o x)) <-> (B e. om -> ((/) +o B) = (B +o (/)))))
5 opreq1 4889 . . . . 5 |- (x = y -> (x +o B) = (y +o B))
6 opreq2 4890 . . . . 5 |- (x = y -> (B +o x) = (B +o y))
75, 6eqeq12d 1899 . . . 4 |- (x = y -> ((x +o B) = (B +o x) <-> (y +o B) = (B +o y)))
87imbi2d 674 . . 3 |- (x = y -> ((B e. om -> (x +o B) = (B +o x)) <-> (B e. om -> (y +o B) = (B +o y))))
9 opreq1 4889 . . . . 5 |- (x = suc y -> (x +o B) = (suc y +o B))
10 opreq2 4890 . . . . 5 |- (x = suc y -> (B +o x) = (B +o suc y))
119, 10eqeq12d 1899 . . . 4 |- (x = suc y -> ((x +o B) = (B +o x) <-> (suc y +o B) = (B +o suc y)))
1211imbi2d 674 . . 3 |- (x = suc y -> ((B e. om -> (x +o B) = (B +o x)) <-> (B e. om -> (suc y +o B) = (B +o suc y))))
13 opreq1 4889 . . . . 5 |- (x = A -> (x +o B) = (A +o B))
14 opreq2 4890 . . . . 5 |- (x = A -> (B +o x) = (B +o A))
1513, 14eqeq12d 1899 . . . 4 |- (x = A -> ((x +o B) = (B +o x) <-> (A +o B) = (B +o A)))
1615imbi2d 674 . . 3 |- (x = A -> ((B e. om -> (x +o B) = (B +o x)) <-> (B e. om -> (A +o B) = (B +o A))))
17 nna0r 5279 . . . 4 |- (B e. om -> ((/) +o B) = B)
18 nna0 5275 . . . 4 |- (B e. om -> (B +o (/)) = B)
1917, 18eqtr4d 1928 . . 3 |- (B e. om -> ((/) +o B) = (B +o (/)))
20 opreq2 4890 . . . . . . . . . . 11 |- (x = (/) -> (suc y +o x) = (suc y +o (/)))
21 opreq2 4890 . . . . . . . . . . . 12 |- (x = (/) -> (y +o x) = (y +o (/)))
22 suceq 3729 . . . . . . . . . . . 12 |- ((y +o x) = (y +o (/)) -> suc (y +o x) = suc (y +o (/)))
2321, 22syl 12 . . . . . . . . . . 11 |- (x = (/) -> suc (y +o x) = suc (y +o (/)))
2420, 23eqeq12d 1899 . . . . . . . . . 10 |- (x = (/) -> ((suc y +o x) = suc (y +o x) <-> (suc y +o (/)) = suc (y +o (/))))
2524imbi2d 674 . . . . . . . . 9 |- (x = (/) -> ((y e. om -> (suc y +o x) = suc (y +o x)) <-> (y e. om -> (suc y +o (/)) = suc (y +o (/)))))
26 opreq2 4890 . . . . . . . . . . 11 |- (x = z -> (suc y +o x) = (suc y +o z))
27 opreq2 4890 . . . . . . . . . . . 12 |- (x = z -> (y +o x) = (y +o z))
28 suceq 3729 . . . . . . . . . . . 12 |- ((y +o x) = (y +o z) -> suc (y +o x) = suc (y +o z))
2927, 28syl 12 . . . . . . . . . . 11 |- (x = z -> suc (y +o x) = suc (y +o z))
3026, 29eqeq12d 1899 . . . . . . . . . 10 |- (x = z -> ((suc y +o x) = suc (y +o x) <-> (suc y +o z) = suc (y +o z)))
3130imbi2d 674 . . . . . . . . 9 |- (x = z -> ((y e. om -> (suc y +o x) = suc (y +o x)) <-> (y e. om -> (suc y +o z) = suc (y +o z))))
32 opreq2 4890 . . . . . . . . . . 11 |- (x = suc z -> (suc y +o x) = (suc y +o suc z))
33 opreq2 4890 . . . . . . . . . . . 12 |- (x = suc z -> (y +o x) = (y +o suc z))
34 suceq 3729 . . . . . . . . . . . 12 |- ((y +o x) = (y +o suc z) -> suc (y +o x) = suc (y +o suc z))
3533, 34syl 12 . . . . . . . . . . 11 |- (x = suc z -> suc (y +o x) = suc (y +o suc z))
3632, 35eqeq12d 1899 . . . . . . . . . 10 |- (x = suc z -> ((suc y +o x) = suc (y +o x) <-> (suc y +o suc z) = suc (y +o suc z)))
3736imbi2d 674 . . . . . . . . 9 |- (x = suc z -> ((y e. om -> (suc y +o x) = suc (y +o x)) <-> (y e. om -> (suc y +o suc z) = suc (y +o suc z))))
38 opreq2 4890 . . . . . . . . . . 11 |- (x = B -> (suc y +o x) = (suc y +o B))
39 opreq2 4890 . . . . . . . . . . . 12 |- (x = B -> (y +o x) = (y +o B))
40 suceq 3729 . . . . . . . . . . . 12 |- ((y +o x) = (y +o B) -> suc (y +o x) = suc (y +o B))
4139, 40syl 12 . . . . . . . . . . 11 |- (x = B -> suc (y +o x) = suc (y +o B))
4238, 41eqeq12d 1899 . . . . . . . . . 10 |- (x = B -> ((suc y +o x) = suc (y +o x) <-> (suc y +o B) = suc (y +o B)))
4342imbi2d 674 . . . . . . . . 9 |- (x = B -> ((y e. om -> (suc y +o x) = suc (y +o x)) <-> (y e. om -> (suc y +o B) = suc (y +o B))))
44 peano2b 3968 . . . . . . . . . . 11 |- (y e. om <-> suc y e. om)
45 nna0 5275 . . . . . . . . . . 11 |- (suc y e. om -> (suc y +o (/)) = suc y)
4644, 45sylbi 216 . . . . . . . . . 10 |- (y e. om -> (suc y +o (/)) = suc y)
47 nna0 5275 . . . . . . . . . . 11 |- (y e. om -> (y +o (/)) = y)
48 suceq 3729 . . . . . . . . . . 11 |- ((y +o (/)) = y -> suc (y +o (/)) = suc y)
4947, 48syl 12 . . . . . . . . . 10 |- (y e. om -> suc (y +o (/)) = suc y)
5046, 49eqtr4d 1928 . . . . . . . . 9 |- (y e. om -> (suc y +o (/)) = suc (y +o (/)))
51 oasuc 5208 . . . . . . . . . . . . . 14 |- ((suc y e. On /\ z e. On) -> (suc y +o suc z) = suc (suc y +o z))
52 nnon 3957 . . . . . . . . . . . . . . 15 |- (y e. om -> y e. On)
53 suceloni 3894 . . . . . . . . . . . . . . 15 |- (y e. On -> suc y e. On)
5452, 53syl 12 . . . . . . . . . . . . . 14 |- (y e. om -> suc y e. On)
55 nnon 3957 . . . . . . . . . . . . . 14 |- (z e. om -> z e. On)
5651, 54, 55syl2an 503 . . . . . . . . . . . . 13 |- ((y e. om /\ z e. om) -> (suc y +o suc z) = suc (suc y +o z))
5752, 55anim12i 360 . . . . . . . . . . . . . 14 |- ((y e. om /\ z e. om) -> (y e. On /\ z e. On))
58 oasuc 5208 . . . . . . . . . . . . . 14 |- ((y e. On /\ z e. On) -> (y +o suc z) = suc (y +o z))
59 suceq 3729 . . . . . . . . . . . . . 14 |- ((y +o suc z) = suc (y +o z) -> suc (y +o suc z) = suc suc (y +o z))
6057, 58, 593syl 24 . . . . . . . . . . . . 13 |- ((y e. om /\ z e. om) -> suc (y +o suc z) = suc suc (y +o z))
6156, 60eqeq12d 1899 . . . . . . . . . . . 12 |- ((y e. om /\ z e. om) -> ((suc y +o suc z) = suc (y +o suc z) <-> suc (suc y +o z) = suc suc (y +o z)))
62 suceq 3729 . . . . . . . . . . . 12 |- ((suc y +o z) = suc (y +o z) -> suc (suc y +o z) = suc suc (y +o z))
6361, 62syl5bir 227 . . . . . . . . . . 11 |- ((y e. om /\ z e. om) -> ((suc y +o z) = suc (y +o z) -> (suc y +o suc z) = suc (y +o suc z)))
6463expcom 403 . . . . . . . . . 10 |- (z e. om -> (y e. om -> ((suc y +o z) = suc (y +o z) -> (suc y +o suc z) = suc (y +o suc z))))
6564a2d 16 . . . . . . . . 9 |- (z e. om -> ((y e. om -> (suc y +o z) = suc (y +o z)) -> (y e. om -> (suc y +o suc z) = suc (y +o suc z))))
6625, 31, 37, 43, 50, 65finds 3979 . . . . . . . 8 |- (B e. om -> (y e. om -> (suc y +o B) = suc (y +o B)))
6766imp 377 . . . . . . 7 |- ((B e. om /\ y e. om) -> (suc y +o B) = suc (y +o B))
68 nnasuc 5277 . . . . . . 7 |- ((B e. om /\ y e. om) -> (B +o suc y) = suc (B +o y))
6967, 68eqeq12d 1899 . . . . . 6 |- ((B e. om /\ y e. om) -> ((suc y +o B) = (B +o suc y) <-> suc (y +o B) = suc (B +o y)))
70 suceq 3729 . . . . . 6 |- ((y +o B) = (B +o y) -> suc (y +o B) = suc (B +o y))
7169, 70syl5bir 227 . . . . 5 |- ((B e. om /\ y e. om) -> ((y +o B) = (B +o y) -> (suc y +o B) = (B +o suc y)))
7271expcom 403 . . . 4 |- (y e. om -> (B e. om -> ((y +o B) = (B +o y) -> (suc y +o B) = (B +o suc y))))
7372a2d 16 . . 3 |- (y e. om -> ((B e. om -> (y +o B) = (B +o y)) -> (B e. om -> (suc y +o B) = (B +o suc y))))
744, 8, 12, 16, 19, 73finds 3979 . 2 |- (A e. om -> (B e. om -> (A +o B) = (B +o A)))
7574imp 377 1 |- ((A e. om /\ B e. om) -> (A +o B) = (B +o A))
Colors of variables: wff set class
Syntax hints:   -> wi 3   /\ wa 240   = wceq 1298   e. wcel 1300  (/)c0 2875  Oncon0 3657  suc csuc 3659  omcom 3949  (class class class)co 4884   +o coa 5174
This theorem is referenced by:  nnaordr 5291  nnmsucr 5295  nnmsucrOLD 5296  nnaword2 5302  addcompi 6174
This theorem was proved from axioms:  ax-1 4  ax-2 5  ax-3 6  ax-mp 7  ax-7 1304  ax-gen 1305  ax-8 1306  ax-9 1307  ax-10 1308  ax-11 1309  ax-12 1310  ax-13 1311  ax-14 1312  ax-17 1317  ax-4 1319  ax-5o 1321  ax-6o 1324  ax-9o 1481  ax-10o 1500  ax-16 1580  ax-11o 1588  ax-ext 1865  ax-rep 3428  ax-sep 3438  ax-nul 3445  ax-pow 3481  ax-pr 3524  ax-un 3790
This theorem depends on definitions:  df-bi 164  df-or 241  df-an 242  df-3or 859  df-3an 860  df-ex 1327  df-sb 1536  df-eu 1775  df-mo 1776  df-clab 1872  df-cleq 1877  df-clel 1880  df-ne 2019  df-ral 2109  df-rex 2110  df-rab 2112  df-v 2294  df-sbc 2454  df-csb 2541  df-dif 2597  df-un 2600  df-in 2603  df-ss 2605  df-pss 2607  df-nul 2876  df-if 2983  df-pw 3035  df-sn 3049  df-pr 3050  df-tp 3052  df-op 3053  df-uni 3178  df-iun 3257  df-br 3339  df-opab 3396  df-tr 3412  df-eprel 3583  df-id 3586  df-po 3591  df-so 3604  df-fr 3625  df-we 3644  df-ord 3660  df-on 3661  df-lim 3662  df-suc 3663  df-om 3950  df-xp 4000  df-rel 4001  df-cnv 4002  df-co 4003  df-dm 4004  df-rn 4005  df-res 4006  df-ima 4007  df-fun 4008  df-fn 4009  df-fv 4014  df-opr 4886  df-oprab 4887  df-rdg 5140  df-oadd 5179
Copyright terms: Public domain