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

Theorem rabsnifsb 4658
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 4578 . . . . . . . 8 (𝑥 ∈ {𝐴} → 𝑥 = 𝐴)
2 sbceq1a 3727 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
32biimpd 228 . . . . . . . 8 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
41, 3syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → (𝜑[𝐴 / 𝑥]𝜑))
54imdistani 569 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ 𝜑) → (𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑))
65orcd 870 . . . . 5 ((𝑥 ∈ {𝐴} ∧ 𝜑) → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
72biimprd 247 . . . . . . . 8 (𝑥 = 𝐴 → ([𝐴 / 𝑥]𝜑𝜑))
81, 7syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → ([𝐴 / 𝑥]𝜑𝜑))
98imdistani 569 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
10 noel 4264 . . . . . . . 8 ¬ 𝑥 ∈ ∅
1110pm2.21i 119 . . . . . . 7 (𝑥 ∈ ∅ → (𝑥 ∈ {𝐴} ∧ 𝜑))
1211adantr 481 . . . . . 6 ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
139, 12jaoi 854 . . . . 5 (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) → (𝑥 ∈ {𝐴} ∧ 𝜑))
146, 13impbii 208 . . . 4 ((𝑥 ∈ {𝐴} ∧ 𝜑) ↔ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
1514abbii 2808 . . 3 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
16 nfv 1917 . . . 4 𝑦((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
17 nfv 1917 . . . . . 6 𝑥 𝑦 ∈ {𝐴}
18 nfsbc1v 3736 . . . . . 6 𝑥[𝐴 / 𝑥]𝜑
1917, 18nfan 1902 . . . . 5 𝑥(𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)
20 nfv 1917 . . . . . 6 𝑥 𝑦 ∈ ∅
2118nfn 1860 . . . . . 6 𝑥 ¬ [𝐴 / 𝑥]𝜑
2220, 21nfan 1902 . . . . 5 𝑥(𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)
2319, 22nfor 1907 . . . 4 𝑥((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
24 eleq1w 2821 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ {𝐴} ↔ 𝑦 ∈ {𝐴}))
2524anbi1d 630 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)))
26 eleq1w 2821 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ ∅ ↔ 𝑦 ∈ ∅))
2726anbi1d 630 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
2825, 27orbi12d 916 . . . 4 (𝑥 = 𝑦 → (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) ↔ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))))
2916, 23, 28cbvabw 2812 . . 3 {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3015, 29eqtri 2766 . 2 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
31 df-rab 3073 . 2 {𝑥 ∈ {𝐴} ∣ 𝜑} = {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)}
32 df-if 4460 . 2 if([𝐴 / 𝑥]𝜑, {𝐴}, ∅) = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3330, 31, 323eqtr4i 2776 1 {𝑥 ∈ {𝐴} ∣ 𝜑} = if([𝐴 / 𝑥]𝜑, {𝐴}, ∅)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 396  wo 844   = wceq 1539  wcel 2106  {cab 2715  {crab 3068  [wsbc 3716  c0 4256  ifcif 4459  {csn 4561
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-rab 3073  df-sbc 3717  df-dif 3890  df-nul 4257  df-if 4460  df-sn 4562
This theorem is referenced by:  rabsnif  4659  rabrsn  4660
  Copyright terms: Public domain W3C validator