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

Theorem nnacom 4239
Description: Addition of natural numbers is commutative. Theorem 4K(2) of [Enderton] p. 81.
Assertion
Ref Expression
nnacom ((A ω B ω) → (A +o B) = (B +o A))

Proof of Theorem nnacom
StepHypRef Expression
1 opreq1 3974 . . . . 5 (x = → (x +o B) = ( +o B))
2 opreq2 3975 . . . . 5 (x = → (B +o x) = (B +o ))
31, 2eqeq12d 1492 . . . 4 (x = → ((x +o B) = (B +o x) ↔ ( +o B) = (B +o )))
43imbi2d 614 . . 3 (x = → ((B ω → (x +o B) = (B +o x)) ↔ (B ω → ( +o B) = (B +o ))))
5 opreq1 3974 . . . . 5 (x = y → (x +o B) = (y +o B))
6 opreq2 3975 . . . . 5 (x = y → (B +o x) = (B +o y))
75, 6eqeq12d 1492 . . . 4 (x = y → ((x +o B) = (B +o x) ↔ (y +o B) = (B +o y)))
87imbi2d 614 . . 3 (x = y → ((B ω → (x +o B) = (B +o x)) ↔ (B ω → (y +o B) = (B +o y))))
9 opreq1 3974 . . . . 5 (x = suc y → (x +o B) = (suc y +o B))
10 opreq2 3975 . . . . 5 (x = suc y → (B +o x) = (B +o suc y))
119, 10eqeq12d 1492 . . . 4 (x = suc y → ((x +o B) = (B +o x) ↔ (suc y +o B) = (B +o suc y)))
1211imbi2d 614 . . 3 (x = suc y → ((B ω → (x +o B) = (B +o x)) ↔ (B ω → (suc y +o B) = (B +o suc y))))
13 opreq1 3974 . . . . 5 (x = A → (x +o B) = (A +o B))
14 opreq2 3975 . . . . 5 (x = A → (B +o x) = (B +o A))
1513, 14eqeq12d 1492 . . . 4 (x = A → ((x +o B) = (B +o x) ↔ (A +o B) = (B +o A)))
1615imbi2d 614 . . 3 (x = A → ((B ω → (x +o B) = (B +o x)) ↔ (B ω → (A +o B) = (B +o A))))
17 nna0r 4233 . . . 4 (B ω → ( +o B) = B)
18 nna0 4229 . . . 4 (B ω → (B +o ) = B)
1917, 18eqtr4d 1513 . . 3 (B ω → ( +o B) = (B +o ))
20 opreq2 3975 . . . . . . . . . . 11 (x = → (suc y +o x) = (suc y +o ))
21 opreq2 3975 . . . . . . . . . . . 12 (x = → (y +o x) = (y +o ))
22 suceq 3040 . . . . . . . . . . . 12 ((y +o x) = (y +o ) → suc (y +o x) = suc (y +o ))
2321, 22syl 10 . . . . . . . . . . 11 (x = → suc (y +o x) = suc (y +o ))
2420, 23eqeq12d 1492 . . . . . . . . . 10 (x = → ((suc y +o x) = suc (y +o x) ↔ (suc y +o ) = suc (y +o )))
2524imbi2d 614 . . . . . . . . 9 (x = → ((y ω → (suc y +o x) = suc (y +o x)) ↔ (y ω → (suc y +o ) = suc (y +o ))))
26 opreq2 3975 . . . . . . . . . . 11 (x = z → (suc y +o x) = (suc y +o z))
27 opreq2 3975 . . . . . . . . . . . 12 (x = z → (y +o x) = (y +o z))
28 suceq 3040 . . . . . . . . . . . 12 ((y +o x) = (y +o z) → suc (y +o x) = suc (y +o z))
2927, 28syl 10 . . . . . . . . . . 11 (x = z → suc (y +o x) = suc (y +o z))
3026, 29eqeq12d 1492 . . . . . . . . . 10 (x = z → ((suc y +o x) = suc (y +o x) ↔ (suc y +o z) = suc (y +o z)))
3130imbi2d 614 . . . . . . . . 9 (x = z → ((y ω → (suc y +o x) = suc (y +o x)) ↔ (y ω → (suc y +o z) = suc (y +o z))))
32 opreq2 3975 . . . . . . . . . . 11 (x = suc z → (suc y +o x) = (suc y +o suc z))
33 opreq2 3975 . . . . . . . . . . . 12 (x = suc z → (y +o x) = (y +o suc z))
34 suceq 3040 . . . . . . . . . . . 12 ((y +o x) = (y +o suc z) → suc (y +o x) = suc (y +o suc z))
3533, 34syl 10 . . . . . . . . . . 11 (x = suc z → suc (y +o x) = suc (y +o suc z))
3632, 35eqeq12d 1492 . . . . . . . . . 10 (x = suc z → ((suc y +o x) = suc (y +o x) ↔ (suc y +o suc z) = suc (y +o suc z)))
3736imbi2d 614 . . . . . . . . 9 (x = suc z → ((y ω → (suc y +o x) = suc (y +o x)) ↔ (y ω → (suc y +o suc z) = suc (y +o suc z))))
38 opreq2 3975 . . . . . . . . . . 11 (x = B → (suc y +o x) = (suc y +o B))
39 opreq2 3975 . . . . . . . . . . . 12 (x = B → (y +o x) = (y +o B))
40 suceq 3040 . . . . . . . . . . . 12 ((y +o x) = (y +o B) → suc (y +o x) = suc (y +o B))
4139, 40syl 10 . . . . . . . . . . 11 (x = B → suc (y +o x) = suc (y +o B))
4238, 41eqeq12d 1492 . . . . . . . . . 10 (x = B → ((suc y +o x) = suc (y +o x) ↔ (suc y +o B) = suc (y +o B)))
4342imbi2d 614 . . . . . . . . 9 (x = B → ((y ω → (suc y +o x) = suc (y +o x)) ↔ (y ω → (suc y +o B) = suc (y +o B))))
44 peano2b 3153 . . . . . . . . . . 11 (y ω ↔ suc y ω)
45 nna0 4229 . . . . . . . . . . 11 (suc y ω → (suc y +o ) = suc y)
4644, 45sylbi 199 . . . . . . . . . 10 (y ω → (suc y +o ) = suc y)
47 nna0 4229 . . . . . . . . . . 11 (y ω → (y +o ) = y)
48 suceq 3040 . . . . . . . . . . 11 ((y +o ) = y → suc (y +o ) = suc y)
4947, 48syl 10 . . . . . . . . . 10 (y ω → suc (y +o ) = suc y)
5046, 49eqtr4d 1513 . . . . . . . . 9 (y ω → (suc y +o ) = suc (y +o ))
51 oasuc 4169 . . . . . . . . . . . . . 14 ((suc y On z On) → (suc y +o suc z) = suc (suc y +o z))
52 nnont 3144 . . . . . . . . . . . . . . 15 (y ω → y On)
53 suceloni 3068 . . . . . . . . . . . . . . 15 (y On → suc y On)
5452, 53syl 10 . . . . . . . . . . . . . 14 (y ω → suc y On)
55 nnont 3144 . . . . . . . . . . . . . 14 (z ω → z On)
5651, 54, 55syl2an 456 . . . . . . . . . . . . 13 ((y ω z ω) → (suc y +o suc z) = suc (suc y +o z))
5752, 55anim12i 333 . . . . . . . . . . . . . 14 ((y ω z ω) → (y On z On))
58 oasuc 4169 . . . . . . . . . . . . . 14 ((y On z On) → (y +o suc z) = suc (y +o z))
59 suceq 3040 . . . . . . . . . . . . . 14 ((y +o suc z) = suc (y +o z) → suc (y +o suc z) = suc suc (y +o z))
6057, 58, 593syl 20 . . . . . . . . . . . . 13 ((y ω z ω) → suc (y +o suc z) = suc suc (y +o z))
6156, 60eqeq12d 1492 . . . . . . . . . . . 12 ((y ω z ω) → ((suc y +o suc z) = suc (y +o suc z) ↔ suc (suc y +o z) = suc suc (y +o z)))
62 suceq 3040 . . . . . . . . . . . 12 ((suc y +o z) = suc (y +o z) → suc (suc y +o z) = suc suc (y +o z))
6361, 62syl5bir 210 . . . . . . . . . . 11 ((y ω z ω) → ((suc y +o z) = suc (y +o z) → (suc y +o suc z) = suc (y +o suc z)))
6463expcom 374 . . . . . . . . . 10 (z ω → (y ω → ((suc y +o z) = suc (y +o z) → (suc y +o suc z) = suc (y +o suc z))))
6564a2d 13 . . . . . . . . 9 (z ω → ((y ω → (suc y +o z) = suc (y +o z)) → (y ω → (suc y +o suc z) = suc (y +o suc z))))
6625, 31, 37, 43, 50, 65finds 3162 . . . . . . . 8 (B ω → (y ω → (suc y +o B) = suc (y +o B)))
6766imp 350 . . . . . . 7 ((B ω y ω) → (suc y +o B) = suc (y +o B))
68 nnasuc 4231 . . . . . . 7 ((B ω y ω) → (B +o suc y) = suc (B +o y))
6967, 68eqeq12d 1492 . . . . . 6 ((B ω y ω) → ((suc y +o B) = (B +o suc y) ↔ suc (y +o B) = suc (B +o y)))
70 suceq 3040 . . . . . 6 ((y +o B) = (B +o y) → suc (y +o B) = suc (B +o y))
7169, 70syl5bir 210 . . . . 5 ((B ω y ω) → ((y +o B) = (B +o y) → (suc y +o B) = (B +o suc y)))
7271expcom 374 . . . 4 (y ω → (B ω → ((y +o B) = (B +o y) → (suc y +o B) = (B +o suc y))))
7372a2d 13 . . 3 (y ω → ((B ω → (y +o B) = (B +o y)) → (B ω → (suc y +o B) = (B +o suc y))))
744, 8, 12, 16, 19, 73finds 3162 . 2 (A ω → (B ω → (A +o B) = (B +o A)))
7574imp 350 1 ((A ω B ω) → (A +o B) = (B +o A))
Colors of variables: wff set class
Syntax hints:   → wi 3   wa 223   = wceq 958   wcel 960  c0 2283  Oncon0 2954  suc csuc 2956  ωcom 3137  (class class class)co 3969   +o coa 4136
This theorem is referenced by:  nnaordr 4242  nnmsucr 4246  nnaword2 4251  addcompi 5034
This theorem was proved from axioms:  ax-1 4  ax-2 5  ax-3 6  ax-mp 7  ax-7 964  ax-gen 965  ax-8 966  ax-9 967  ax-10 968  ax-11 969  ax-12 970  ax-13 971  ax-14 972  ax-17 973  ax-4 975  ax-5o 977  ax-6o 980  ax-9o 1125  ax-10o 1142  ax-16 1212  ax-11o 1220  ax-ext 1462  ax-rep 2698  ax-sep 2708  ax-nul 2715  ax-pow 2748  ax-pr 2785  ax-un 2872
This theorem depends on definitions:  df-bi 147  df-or 224  df-an 225  df-3or 778  df-3an 779  df-ex 983  df-sb 1174  df-eu 1384  df-mo 1385  df-clab 1467  df-cleq 1472  df-clel 1475  df-ne 1590  df-ral 1652  df-rex 1653  df-rab 1655  df-v 1815  df-sbc 1945  df-csb 2005  df-dif 2052  df-un 2053  df-in 2054  df-ss 2056  df-nul 2284  df-if 2366  df-pw 2406  df-sn 2416  df-pr 2417  df-tp 2419  df-op 2420  df-uni 2508  df-iun 2572  df-br 2625  df-opab 2672  df-tr 2686  df-eprel 2838  df-id 2841  df-po 2846  df-so 2856  df-fr 2923  df-we 2940  df-ord 2957  df-on 2958  df-lim 2959  df-suc 2960  df-om 3138  df-xp 3190  df-rel 3191  df-cnv 3192  df-co 3193  df-dm 3194  df-rn 3195  df-res 3196  df-ima 3197  df-fun 3198  df-fn 3199  df-fv 3204  df-rdg 3938  df-opr 3971  df-oprab 3972  df-oadd 4141
Copyright terms: Public domain