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

Theorem nndifsnid 6653
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 3814 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 4698 . . . . . 6 ((𝑥𝐴𝐴 ∈ ω) → 𝑥 ∈ ω)
21expcom 116 . . . . 5 (𝐴 ∈ ω → (𝑥𝐴𝑥 ∈ ω))
3 elnn 4698 . . . . . 6 ((𝑦𝐴𝐴 ∈ ω) → 𝑦 ∈ ω)
43expcom 116 . . . . 5 (𝐴 ∈ ω → (𝑦𝐴𝑦 ∈ ω))
52, 4anim12d 335 . . . 4 (𝐴 ∈ ω → ((𝑥𝐴𝑦𝐴) → (𝑥 ∈ ω ∧ 𝑦 ∈ ω)))
6 nndceq 6645 . . . 4 ((𝑥 ∈ ω ∧ 𝑦 ∈ ω) → DECID 𝑥 = 𝑦)
75, 6syl6 33 . . 3 (𝐴 ∈ ω → ((𝑥𝐴𝑦𝐴) → DECID 𝑥 = 𝑦))
87ralrimivv 2611 . 2 (𝐴 ∈ ω → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)
9 dcdifsnid 6650 . 2 ((∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)
108, 9sylan 283 1 ((𝐴 ∈ ω ∧ 𝐵𝐴) → ((𝐴 ∖ {𝐵}) ∪ {𝐵}) = 𝐴)
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  DECID wdc 839   = wceq 1395  wcel 2200  wral 2508  cdif 3194  cun 3195  {csn 3666  ωcom 4682
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 617  ax-in2 618  ax-io 714  ax-5 1493  ax-7 1494  ax-gen 1495  ax-ie1 1539  ax-ie2 1540  ax-8 1550  ax-10 1551  ax-11 1552  ax-i12 1553  ax-bndl 1555  ax-4 1556  ax-17 1572  ax-i9 1576  ax-ial 1580  ax-i5r 1581  ax-13 2202  ax-14 2203  ax-ext 2211  ax-sep 4202  ax-nul 4210  ax-pow 4258  ax-pr 4293  ax-un 4524  ax-setind 4629  ax-iinf 4680
This theorem depends on definitions:  df-bi 117  df-dc 840  df-3or 1003  df-3an 1004  df-tru 1398  df-nf 1507  df-sb 1809  df-clab 2216  df-cleq 2222  df-clel 2225  df-nfc 2361  df-ne 2401  df-ral 2513  df-rex 2514  df-v 2801  df-dif 3199  df-un 3201  df-in 3203  df-ss 3210  df-nul 3492  df-pw 3651  df-sn 3672  df-pr 3673  df-uni 3889  df-int 3924  df-tr 4183  df-iord 4457  df-on 4459  df-suc 4462  df-iom 4683
This theorem is referenced by:  phplem2  7014
  Copyright terms: Public domain W3C validator