MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  addcanpi Structured version   Visualization version   GIF version

Theorem addcanpi 9706
Description: Addition cancellation law for positive integers. (Contributed by Mario Carneiro, 8-May-2013.) (New usage is discouraged.)
Assertion
Ref Expression
addcanpi ((𝐴N𝐵N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) ↔ 𝐵 = 𝐶))

Proof of Theorem addcanpi
StepHypRef Expression
1 addclpi 9699 . . . . . . . . . 10 ((𝐴N𝐵N) → (𝐴 +N 𝐵) ∈ N)
2 eleq1 2687 . . . . . . . . . 10 ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → ((𝐴 +N 𝐵) ∈ N ↔ (𝐴 +N 𝐶) ∈ N))
31, 2syl5ib 234 . . . . . . . . 9 ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → ((𝐴N𝐵N) → (𝐴 +N 𝐶) ∈ N))
43imp 445 . . . . . . . 8 (((𝐴 +N 𝐵) = (𝐴 +N 𝐶) ∧ (𝐴N𝐵N)) → (𝐴 +N 𝐶) ∈ N)
5 dmaddpi 9697 . . . . . . . . 9 dom +N = (N × N)
6 0npi 9689 . . . . . . . . 9 ¬ ∅ ∈ N
75, 6ndmovrcl 6805 . . . . . . . 8 ((𝐴 +N 𝐶) ∈ N → (𝐴N𝐶N))
8 simpr 477 . . . . . . . 8 ((𝐴N𝐶N) → 𝐶N)
94, 7, 83syl 18 . . . . . . 7 (((𝐴 +N 𝐵) = (𝐴 +N 𝐶) ∧ (𝐴N𝐵N)) → 𝐶N)
10 addpiord 9691 . . . . . . . . . 10 ((𝐴N𝐵N) → (𝐴 +N 𝐵) = (𝐴 +𝑜 𝐵))
1110adantr 481 . . . . . . . . 9 (((𝐴N𝐵N) ∧ 𝐶N) → (𝐴 +N 𝐵) = (𝐴 +𝑜 𝐵))
12 addpiord 9691 . . . . . . . . . 10 ((𝐴N𝐶N) → (𝐴 +N 𝐶) = (𝐴 +𝑜 𝐶))
1312adantlr 750 . . . . . . . . 9 (((𝐴N𝐵N) ∧ 𝐶N) → (𝐴 +N 𝐶) = (𝐴 +𝑜 𝐶))
1411, 13eqeq12d 2635 . . . . . . . 8 (((𝐴N𝐵N) ∧ 𝐶N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) ↔ (𝐴 +𝑜 𝐵) = (𝐴 +𝑜 𝐶)))
15 pinn 9685 . . . . . . . . . 10 (𝐴N𝐴 ∈ ω)
16 pinn 9685 . . . . . . . . . 10 (𝐵N𝐵 ∈ ω)
17 pinn 9685 . . . . . . . . . 10 (𝐶N𝐶 ∈ ω)
18 nnacan 7693 . . . . . . . . . . 11 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω) → ((𝐴 +𝑜 𝐵) = (𝐴 +𝑜 𝐶) ↔ 𝐵 = 𝐶))
1918biimpd 219 . . . . . . . . . 10 ((𝐴 ∈ ω ∧ 𝐵 ∈ ω ∧ 𝐶 ∈ ω) → ((𝐴 +𝑜 𝐵) = (𝐴 +𝑜 𝐶) → 𝐵 = 𝐶))
2015, 16, 17, 19syl3an 1366 . . . . . . . . 9 ((𝐴N𝐵N𝐶N) → ((𝐴 +𝑜 𝐵) = (𝐴 +𝑜 𝐶) → 𝐵 = 𝐶))
21203expa 1263 . . . . . . . 8 (((𝐴N𝐵N) ∧ 𝐶N) → ((𝐴 +𝑜 𝐵) = (𝐴 +𝑜 𝐶) → 𝐵 = 𝐶))
2214, 21sylbid 230 . . . . . . 7 (((𝐴N𝐵N) ∧ 𝐶N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → 𝐵 = 𝐶))
239, 22sylan2 491 . . . . . 6 (((𝐴N𝐵N) ∧ ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) ∧ (𝐴N𝐵N))) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → 𝐵 = 𝐶))
2423exp32 630 . . . . 5 ((𝐴N𝐵N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → ((𝐴N𝐵N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → 𝐵 = 𝐶))))
2524imp4b 612 . . . 4 (((𝐴N𝐵N) ∧ (𝐴 +N 𝐵) = (𝐴 +N 𝐶)) → (((𝐴N𝐵N) ∧ (𝐴 +N 𝐵) = (𝐴 +N 𝐶)) → 𝐵 = 𝐶))
2625pm2.43i 52 . . 3 (((𝐴N𝐵N) ∧ (𝐴 +N 𝐵) = (𝐴 +N 𝐶)) → 𝐵 = 𝐶)
2726ex 450 . 2 ((𝐴N𝐵N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) → 𝐵 = 𝐶))
28 oveq2 6643 . 2 (𝐵 = 𝐶 → (𝐴 +N 𝐵) = (𝐴 +N 𝐶))
2927, 28impbid1 215 1 ((𝐴N𝐵N) → ((𝐴 +N 𝐵) = (𝐴 +N 𝐶) ↔ 𝐵 = 𝐶))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1481  wcel 1988  (class class class)co 6635  ωcom 7050   +𝑜 coa 7542  Ncnpi 9651   +N cpli 9652
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1720  ax-4 1735  ax-5 1837  ax-6 1886  ax-7 1933  ax-8 1990  ax-9 1997  ax-10 2017  ax-11 2032  ax-12 2045  ax-13 2244  ax-ext 2600  ax-sep 4772  ax-nul 4780  ax-pow 4834  ax-pr 4897  ax-un 6934
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1484  df-ex 1703  df-nf 1708  df-sb 1879  df-eu 2472  df-mo 2473  df-clab 2607  df-cleq 2613  df-clel 2616  df-nfc 2751  df-ne 2792  df-ral 2914  df-rex 2915  df-reu 2916  df-rab 2918  df-v 3197  df-sbc 3430  df-csb 3527  df-dif 3570  df-un 3572  df-in 3574  df-ss 3581  df-pss 3583  df-nul 3908  df-if 4078  df-pw 4151  df-sn 4169  df-pr 4171  df-tp 4173  df-op 4175  df-uni 4428  df-iun 4513  df-br 4645  df-opab 4704  df-mpt 4721  df-tr 4744  df-id 5014  df-eprel 5019  df-po 5025  df-so 5026  df-fr 5063  df-we 5065  df-xp 5110  df-rel 5111  df-cnv 5112  df-co 5113  df-dm 5114  df-rn 5115  df-res 5116  df-ima 5117  df-pred 5668  df-ord 5714  df-on 5715  df-lim 5716  df-suc 5717  df-iota 5839  df-fun 5878  df-fn 5879  df-f 5880  df-f1 5881  df-fo 5882  df-f1o 5883  df-fv 5884  df-ov 6638  df-oprab 6639  df-mpt2 6640  df-om 7051  df-1st 7153  df-2nd 7154  df-wrecs 7392  df-recs 7453  df-rdg 7491  df-oadd 7549  df-ni 9679  df-pli 9680
This theorem is referenced by:  adderpqlem  9761
  Copyright terms: Public domain W3C validator