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

Theorem nndifsnid 6533
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 3753 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 4623 . . . . . 6 ((𝑥𝐴𝐴 ∈ ω) → 𝑥 ∈ ω)
21expcom 116 . . . . 5 (𝐴 ∈ ω → (𝑥𝐴𝑥 ∈ ω))
3 elnn 4623 . . . . . 6 ((𝑦𝐴𝐴 ∈ ω) → 𝑦 ∈ ω)
43expcom 116 . . . . 5 (𝐴 ∈ ω → (𝑦𝐴𝑦 ∈ ω))
52, 4anim12d 335 . . . 4 (𝐴 ∈ ω → ((𝑥𝐴𝑦𝐴) → (𝑥 ∈ ω ∧ 𝑦 ∈ ω)))
6 nndceq 6525 . . . 4 ((𝑥 ∈ ω ∧ 𝑦 ∈ ω) → DECID 𝑥 = 𝑦)
75, 6syl6 33 . . 3 (𝐴 ∈ ω → ((𝑥𝐴𝑦𝐴) → DECID 𝑥 = 𝑦))
87ralrimivv 2571 . 2 (𝐴 ∈ ω → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)
9 dcdifsnid 6530 . 2 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)
108, 9sylan 283 1 ((𝐴 ∈ ω ∧ 𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  DECID wdc 835   = wceq 1364  wcel 2160  wral 2468  cdif 3141  cun 3142  {csn 3607  ωcom 4607
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2162  ax-14 2163  ax-ext 2171  ax-sep 4136  ax-nul 4144  ax-pow 4192  ax-pr 4227  ax-un 4451  ax-setind 4554  ax-iinf 4605
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-nf 1472  df-sb 1774  df-clab 2176  df-cleq 2182  df-clel 2185  df-nfc 2321  df-ne 2361  df-ral 2473  df-rex 2474  df-v 2754  df-dif 3146  df-un 3148  df-in 3150  df-ss 3157  df-nul 3438  df-pw 3592  df-sn 3613  df-pr 3614  df-uni 3825  df-int 3860  df-tr 4117  df-iord 4384  df-on 4386  df-suc 4389  df-iom 4608
This theorem is referenced by:  phplem2  6882
  Copyright terms: Public domain W3C validator