Users' Mathboxes Mathbox for Steven Nguyen < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  nnaddcom Structured version   Visualization version   GIF version

Theorem nnaddcom 39874
Description: Addition is commutative for natural numbers. Uses fewer axioms than addcom 10904. (Contributed by Steven Nguyen, 9-Dec-2022.)
Assertion
Ref Expression
nnaddcom ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → (𝐴 + 𝐵) = (𝐵 + 𝐴))

Proof of Theorem nnaddcom
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq1 7177 . . . . 5 (𝑥 = 1 → (𝑥 + 𝐵) = (1 + 𝐵))
2 oveq2 7178 . . . . 5 (𝑥 = 1 → (𝐵 + 𝑥) = (𝐵 + 1))
31, 2eqeq12d 2754 . . . 4 (𝑥 = 1 → ((𝑥 + 𝐵) = (𝐵 + 𝑥) ↔ (1 + 𝐵) = (𝐵 + 1)))
43imbi2d 344 . . 3 (𝑥 = 1 → ((𝐵 ∈ ℕ → (𝑥 + 𝐵) = (𝐵 + 𝑥)) ↔ (𝐵 ∈ ℕ → (1 + 𝐵) = (𝐵 + 1))))
5 oveq1 7177 . . . . 5 (𝑥 = 𝑦 → (𝑥 + 𝐵) = (𝑦 + 𝐵))
6 oveq2 7178 . . . . 5 (𝑥 = 𝑦 → (𝐵 + 𝑥) = (𝐵 + 𝑦))
75, 6eqeq12d 2754 . . . 4 (𝑥 = 𝑦 → ((𝑥 + 𝐵) = (𝐵 + 𝑥) ↔ (𝑦 + 𝐵) = (𝐵 + 𝑦)))
87imbi2d 344 . . 3 (𝑥 = 𝑦 → ((𝐵 ∈ ℕ → (𝑥 + 𝐵) = (𝐵 + 𝑥)) ↔ (𝐵 ∈ ℕ → (𝑦 + 𝐵) = (𝐵 + 𝑦))))
9 oveq1 7177 . . . . 5 (𝑥 = (𝑦 + 1) → (𝑥 + 𝐵) = ((𝑦 + 1) + 𝐵))
10 oveq2 7178 . . . . 5 (𝑥 = (𝑦 + 1) → (𝐵 + 𝑥) = (𝐵 + (𝑦 + 1)))
119, 10eqeq12d 2754 . . . 4 (𝑥 = (𝑦 + 1) → ((𝑥 + 𝐵) = (𝐵 + 𝑥) ↔ ((𝑦 + 1) + 𝐵) = (𝐵 + (𝑦 + 1))))
1211imbi2d 344 . . 3 (𝑥 = (𝑦 + 1) → ((𝐵 ∈ ℕ → (𝑥 + 𝐵) = (𝐵 + 𝑥)) ↔ (𝐵 ∈ ℕ → ((𝑦 + 1) + 𝐵) = (𝐵 + (𝑦 + 1)))))
13 oveq1 7177 . . . . 5 (𝑥 = 𝐴 → (𝑥 + 𝐵) = (𝐴 + 𝐵))
14 oveq2 7178 . . . . 5 (𝑥 = 𝐴 → (𝐵 + 𝑥) = (𝐵 + 𝐴))
1513, 14eqeq12d 2754 . . . 4 (𝑥 = 𝐴 → ((𝑥 + 𝐵) = (𝐵 + 𝑥) ↔ (𝐴 + 𝐵) = (𝐵 + 𝐴)))
1615imbi2d 344 . . 3 (𝑥 = 𝐴 → ((𝐵 ∈ ℕ → (𝑥 + 𝐵) = (𝐵 + 𝑥)) ↔ (𝐵 ∈ ℕ → (𝐴 + 𝐵) = (𝐵 + 𝐴))))
17 nnadd1com 39873 . . . 4 (𝐵 ∈ ℕ → (𝐵 + 1) = (1 + 𝐵))
1817eqcomd 2744 . . 3 (𝐵 ∈ ℕ → (1 + 𝐵) = (𝐵 + 1))
19 oveq1 7177 . . . . . 6 ((𝑦 + 𝐵) = (𝐵 + 𝑦) → ((𝑦 + 𝐵) + 1) = ((𝐵 + 𝑦) + 1))
2017oveq2d 7186 . . . . . . . . 9 (𝐵 ∈ ℕ → (𝑦 + (𝐵 + 1)) = (𝑦 + (1 + 𝐵)))
2120adantl 485 . . . . . . . 8 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → (𝑦 + (𝐵 + 1)) = (𝑦 + (1 + 𝐵)))
22 nncn 11724 . . . . . . . . . 10 (𝑦 ∈ ℕ → 𝑦 ∈ ℂ)
2322adantr 484 . . . . . . . . 9 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 𝑦 ∈ ℂ)
24 nncn 11724 . . . . . . . . . 10 (𝐵 ∈ ℕ → 𝐵 ∈ ℂ)
2524adantl 485 . . . . . . . . 9 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 𝐵 ∈ ℂ)
26 1cnd 10714 . . . . . . . . 9 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → 1 ∈ ℂ)
2723, 25, 26addassd 10741 . . . . . . . 8 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝑦 + 𝐵) + 1) = (𝑦 + (𝐵 + 1)))
2823, 26, 25addassd 10741 . . . . . . . 8 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝑦 + 1) + 𝐵) = (𝑦 + (1 + 𝐵)))
2921, 27, 283eqtr4d 2783 . . . . . . 7 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝑦 + 𝐵) + 1) = ((𝑦 + 1) + 𝐵))
3025, 23, 26addassd 10741 . . . . . . 7 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝐵 + 𝑦) + 1) = (𝐵 + (𝑦 + 1)))
3129, 30eqeq12d 2754 . . . . . 6 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → (((𝑦 + 𝐵) + 1) = ((𝐵 + 𝑦) + 1) ↔ ((𝑦 + 1) + 𝐵) = (𝐵 + (𝑦 + 1))))
3219, 31syl5ib 247 . . . . 5 ((𝑦 ∈ ℕ ∧ 𝐵 ∈ ℕ) → ((𝑦 + 𝐵) = (𝐵 + 𝑦) → ((𝑦 + 1) + 𝐵) = (𝐵 + (𝑦 + 1))))
3332ex 416 . . . 4 (𝑦 ∈ ℕ → (𝐵 ∈ ℕ → ((𝑦 + 𝐵) = (𝐵 + 𝑦) → ((𝑦 + 1) + 𝐵) = (𝐵 + (𝑦 + 1)))))
3433a2d 29 . . 3 (𝑦 ∈ ℕ → ((𝐵 ∈ ℕ → (𝑦 + 𝐵) = (𝐵 + 𝑦)) → (𝐵 ∈ ℕ → ((𝑦 + 1) + 𝐵) = (𝐵 + (𝑦 + 1)))))
354, 8, 12, 16, 18, 34nnind 11734 . 2 (𝐴 ∈ ℕ → (𝐵 ∈ ℕ → (𝐴 + 𝐵) = (𝐵 + 𝐴)))
3635imp 410 1 ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℕ) → (𝐴 + 𝐵) = (𝐵 + 𝐴))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 399   = wceq 1542  wcel 2114  (class class class)co 7170  cc 10613  1c1 10616   + caddc 10618  cn 11716
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2020  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2162  ax-12 2179  ax-ext 2710  ax-sep 5167  ax-nul 5174  ax-pr 5296  ax-un 7479  ax-1cn 10673  ax-addcl 10675  ax-addass 10680
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3or 1089  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2075  df-mo 2540  df-eu 2570  df-clab 2717  df-cleq 2730  df-clel 2811  df-nfc 2881  df-ne 2935  df-ral 3058  df-rex 3059  df-reu 3060  df-rab 3062  df-v 3400  df-sbc 3681  df-csb 3791  df-dif 3846  df-un 3848  df-in 3850  df-ss 3860  df-pss 3862  df-nul 4212  df-if 4415  df-pw 4490  df-sn 4517  df-pr 4519  df-tp 4521  df-op 4523  df-uni 4797  df-iun 4883  df-br 5031  df-opab 5093  df-mpt 5111  df-tr 5137  df-id 5429  df-eprel 5434  df-po 5442  df-so 5443  df-fr 5483  df-we 5485  df-xp 5531  df-rel 5532  df-cnv 5533  df-co 5534  df-dm 5535  df-rn 5536  df-res 5537  df-ima 5538  df-pred 6129  df-ord 6175  df-on 6176  df-lim 6177  df-suc 6178  df-iota 6297  df-fun 6341  df-fn 6342  df-f 6343  df-f1 6344  df-fo 6345  df-f1o 6346  df-fv 6347  df-ov 7173  df-om 7600  df-wrecs 7976  df-recs 8037  df-rdg 8075  df-nn 11717
This theorem is referenced by:  nnaddcomli  39875  nnadddir  39876
  Copyright terms: Public domain W3C validator