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

Theorem nndifsnid 6194
Description: If we remove a single element from a natural number then put it back in, we end up with the original natural number. This strengthens difsnss 3557 from subset to equality but the proof relies on equality being decidable. (Contributed by Jim Kingdon, 31-Aug-2021.)
Assertion
Ref Expression
nndifsnid ((𝐴 ∈ ω ∧ 𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)

Proof of Theorem nndifsnid
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elnn 4382 . . . . . 6 ((𝑥𝐴𝐴 ∈ ω) → 𝑥 ∈ ω)
21expcom 114 . . . . 5 (𝐴 ∈ ω → (𝑥𝐴𝑥 ∈ ω))
3 elnn 4382 . . . . . 6 ((𝑦𝐴𝐴 ∈ ω) → 𝑦 ∈ ω)
43expcom 114 . . . . 5 (𝐴 ∈ ω → (𝑦𝐴𝑦 ∈ ω))
52, 4anim12d 328 . . . 4 (𝐴 ∈ ω → ((𝑥𝐴𝑦𝐴) → (𝑥 ∈ ω ∧ 𝑦 ∈ ω)))
6 nndceq 6190 . . . 4 ((𝑥 ∈ ω ∧ 𝑦 ∈ ω) → DECID 𝑥 = 𝑦)
75, 6syl6 33 . . 3 (𝐴 ∈ ω → ((𝑥𝐴𝑦𝐴) → DECID 𝑥 = 𝑦))
87ralrimivv 2448 . 2 (𝐴 ∈ ω → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)
9 dcdifsnid 6193 . 2 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)
108, 9sylan 277 1 ((𝐴 ∈ ω ∧ 𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)
Colors of variables: wff set class
Syntax hints:  wi 4  wa 102  DECID wdc 776   = wceq 1285  wcel 1434  wral 2353  cdif 2981  cun 2982  {csn 3422  ωcom 4367
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-sep 3922  ax-nul 3930  ax-pow 3974  ax-pr 3999  ax-un 4223  ax-setind 4315  ax-iinf 4365
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-nf 1391  df-sb 1688  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-ral 2358  df-rex 2359  df-v 2614  df-dif 2986  df-un 2988  df-in 2990  df-ss 2997  df-nul 3270  df-pw 3408  df-sn 3428  df-pr 3429  df-uni 3628  df-int 3663  df-tr 3902  df-iord 4156  df-on 4158  df-suc 4161  df-iom 4368
This theorem is referenced by:  phplem2  6497
  Copyright terms: Public domain W3C validator