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

Theorem rabsnifsb 4655
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 4575 . . . . . . . 8 (𝑥 ∈ {𝐴} → 𝑥 = 𝐴)
2 sbceq1a 3722 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
32biimpd 228 . . . . . . . 8 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
41, 3syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → (𝜑[𝐴 / 𝑥]𝜑))
54imdistani 568 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ 𝜑) → (𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑))
65orcd 869 . . . . 5 ((𝑥 ∈ {𝐴} ∧ 𝜑) → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
72biimprd 247 . . . . . . . 8 (𝑥 = 𝐴 → ([𝐴 / 𝑥]𝜑𝜑))
81, 7syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → ([𝐴 / 𝑥]𝜑𝜑))
98imdistani 568 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
10 noel 4261 . . . . . . . 8 ¬ 𝑥 ∈ ∅
1110pm2.21i 119 . . . . . . 7 (𝑥 ∈ ∅ → (𝑥 ∈ {𝐴} ∧ 𝜑))
1211adantr 480 . . . . . 6 ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
139, 12jaoi 853 . . . . 5 (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) → (𝑥 ∈ {𝐴} ∧ 𝜑))
146, 13impbii 208 . . . 4 ((𝑥 ∈ {𝐴} ∧ 𝜑) ↔ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
1514abbii 2809 . . 3 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
16 nfv 1918 . . . 4 𝑦((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
17 nfv 1918 . . . . . 6 𝑥 𝑦 ∈ {𝐴}
18 nfsbc1v 3731 . . . . . 6 𝑥[𝐴 / 𝑥]𝜑
1917, 18nfan 1903 . . . . 5 𝑥(𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)
20 nfv 1918 . . . . . 6 𝑥 𝑦 ∈ ∅
2118nfn 1861 . . . . . 6 𝑥 ¬ [𝐴 / 𝑥]𝜑
2220, 21nfan 1903 . . . . 5 𝑥(𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)
2319, 22nfor 1908 . . . 4 𝑥((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
24 eleq1w 2821 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ {𝐴} ↔ 𝑦 ∈ {𝐴}))
2524anbi1d 629 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)))
26 eleq1w 2821 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ ∅ ↔ 𝑦 ∈ ∅))
2726anbi1d 629 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
2825, 27orbi12d 915 . . . 4 (𝑥 = 𝑦 → (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) ↔ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))))
2916, 23, 28cbvabw 2813 . . 3 {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3015, 29eqtri 2766 . 2 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
31 df-rab 3072 . 2 {𝑥 ∈ {𝐴} ∣ 𝜑} = {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)}
32 df-if 4457 . 2 if([𝐴 / 𝑥]𝜑, {𝐴}, ∅) = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3330, 31, 323eqtr4i 2776 1 {𝑥 ∈ {𝐴} ∣ 𝜑} = if([𝐴 / 𝑥]𝜑, {𝐴}, ∅)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 395  wo 843   = wceq 1539  wcel 2108  {cab 2715  {crab 3067  [wsbc 3711  c0 4253  ifcif 4456  {csn 4558
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-rab 3072  df-sbc 3712  df-dif 3886  df-nul 4254  df-if 4457  df-sn 4559
This theorem is referenced by:  rabsnif  4656  rabrsn  4657
  Copyright terms: Public domain W3C validator