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

Theorem rabsnifsb 4201
 Description: A restricted class abstraction restricted to a singleton is either the empty set or the singleton itself. (Contributed by AV, 21-Jul-2019.)
Assertion
Ref Expression
rabsnifsb {𝑥 ∈ {𝐴} ∣ 𝜑} = if([𝐴 / 𝑥]𝜑, {𝐴}, ∅)
Distinct variable group:   𝑥,𝐴
Allowed substitution hint:   𝜑(𝑥)

Proof of Theorem rabsnifsb
Dummy variable 𝑦 is distinct from all other variables.
StepHypRef Expression
1 elsni 4142 . . . . . . . 8 (𝑥 ∈ {𝐴} → 𝑥 = 𝐴)
2 sbceq1a 3413 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
32biimpd 218 . . . . . . . 8 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
41, 3syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → (𝜑[𝐴 / 𝑥]𝜑))
54imdistani 722 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ 𝜑) → (𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑))
65orcd 406 . . . . 5 ((𝑥 ∈ {𝐴} ∧ 𝜑) → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
72biimprd 237 . . . . . . . 8 (𝑥 = 𝐴 → ([𝐴 / 𝑥]𝜑𝜑))
81, 7syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → ([𝐴 / 𝑥]𝜑𝜑))
98imdistani 722 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
10 noel 3878 . . . . . . . 8 ¬ 𝑥 ∈ ∅
1110pm2.21i 115 . . . . . . 7 (𝑥 ∈ ∅ → (𝑥 ∈ {𝐴} ∧ 𝜑))
1211adantr 480 . . . . . 6 ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
139, 12jaoi 393 . . . . 5 (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) → (𝑥 ∈ {𝐴} ∧ 𝜑))
146, 13impbii 198 . . . 4 ((𝑥 ∈ {𝐴} ∧ 𝜑) ↔ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
1514abbii 2726 . . 3 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
16 nfv 1830 . . . 4 𝑦((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
17 nfv 1830 . . . . . 6 𝑥 𝑦 ∈ {𝐴}
18 nfsbc1v 3422 . . . . . 6 𝑥[𝐴 / 𝑥]𝜑
1917, 18nfan 1816 . . . . 5 𝑥(𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)
20 nfv 1830 . . . . . 6 𝑥 𝑦 ∈ ∅
2118nfn 1768 . . . . . 6 𝑥 ¬ [𝐴 / 𝑥]𝜑
2220, 21nfan 1816 . . . . 5 𝑥(𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)
2319, 22nfor 1822 . . . 4 𝑥((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
24 eleq1 2676 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ {𝐴} ↔ 𝑦 ∈ {𝐴}))
2524anbi1d 737 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)))
26 eleq1 2676 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ ∅ ↔ 𝑦 ∈ ∅))
2726anbi1d 737 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
2825, 27orbi12d 742 . . . 4 (𝑥 = 𝑦 → (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) ↔ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))))
2916, 23, 28cbvab 2733 . . 3 {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3015, 29eqtri 2632 . 2 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
31 df-rab 2905 . 2 {𝑥 ∈ {𝐴} ∣ 𝜑} = {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)}
32 df-if 4037 . 2 if([𝐴 / 𝑥]𝜑, {𝐴}, ∅) = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3330, 31, 323eqtr4i 2642 1 {𝑥 ∈ {𝐴} ∣ 𝜑} = if([𝐴 / 𝑥]𝜑, {𝐴}, ∅)
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   → wi 4   ∨ wo 382   ∧ wa 383   = wceq 1475   ∈ wcel 1977  {cab 2596  {crab 2900  [wsbc 3402  ∅c0 3874  ifcif 4036  {csn 4125 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-rab 2905  df-v 3175  df-sbc 3403  df-dif 3543  df-nul 3875  df-if 4037  df-sn 4126 This theorem is referenced by:  rabsnif  4202  rabrsn  4203
 Copyright terms: Public domain W3C validator