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

Theorem rabsnifsb 4401
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 4338 . . . . . . . 8 (𝑥 ∈ {𝐴} → 𝑥 = 𝐴)
2 sbceq1a 3587 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
32biimpd 219 . . . . . . . 8 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
41, 3syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → (𝜑[𝐴 / 𝑥]𝜑))
54imdistani 728 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ 𝜑) → (𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑))
65orcd 406 . . . . 5 ((𝑥 ∈ {𝐴} ∧ 𝜑) → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
72biimprd 238 . . . . . . . 8 (𝑥 = 𝐴 → ([𝐴 / 𝑥]𝜑𝜑))
81, 7syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → ([𝐴 / 𝑥]𝜑𝜑))
98imdistani 728 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
10 noel 4062 . . . . . . . 8 ¬ 𝑥 ∈ ∅
1110pm2.21i 116 . . . . . . 7 (𝑥 ∈ ∅ → (𝑥 ∈ {𝐴} ∧ 𝜑))
1211adantr 472 . . . . . 6 ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
139, 12jaoi 393 . . . . 5 (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) → (𝑥 ∈ {𝐴} ∧ 𝜑))
146, 13impbii 199 . . . 4 ((𝑥 ∈ {𝐴} ∧ 𝜑) ↔ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
1514abbii 2877 . . 3 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
16 nfv 1992 . . . 4 𝑦((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
17 nfv 1992 . . . . . 6 𝑥 𝑦 ∈ {𝐴}
18 nfsbc1v 3596 . . . . . 6 𝑥[𝐴 / 𝑥]𝜑
1917, 18nfan 1977 . . . . 5 𝑥(𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)
20 nfv 1992 . . . . . 6 𝑥 𝑦 ∈ ∅
2118nfn 1933 . . . . . 6 𝑥 ¬ [𝐴 / 𝑥]𝜑
2220, 21nfan 1977 . . . . 5 𝑥(𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)
2319, 22nfor 1983 . . . 4 𝑥((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
24 eleq1w 2822 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ {𝐴} ↔ 𝑦 ∈ {𝐴}))
2524anbi1d 743 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)))
26 eleq1w 2822 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ ∅ ↔ 𝑦 ∈ ∅))
2726anbi1d 743 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
2825, 27orbi12d 748 . . . 4 (𝑥 = 𝑦 → (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) ↔ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))))
2916, 23, 28cbvab 2884 . . 3 {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3015, 29eqtri 2782 . 2 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
31 df-rab 3059 . 2 {𝑥 ∈ {𝐴} ∣ 𝜑} = {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)}
32 df-if 4231 . 2 if([𝐴 / 𝑥]𝜑, {𝐴}, ∅) = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3330, 31, 323eqtr4i 2792 1 {𝑥 ∈ {𝐴} ∣ 𝜑} = if([𝐴 / 𝑥]𝜑, {𝐴}, ∅)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wo 382  wa 383   = wceq 1632  wcel 2139  {cab 2746  {crab 3054  [wsbc 3576  c0 4058  ifcif 4230  {csn 4321
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1871  ax-4 1886  ax-5 1988  ax-6 2054  ax-7 2090  ax-9 2148  ax-10 2168  ax-11 2183  ax-12 2196  ax-13 2391  ax-ext 2740
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-tru 1635  df-ex 1854  df-nf 1859  df-sb 2047  df-clab 2747  df-cleq 2753  df-clel 2756  df-nfc 2891  df-rab 3059  df-v 3342  df-sbc 3577  df-dif 3718  df-nul 4059  df-if 4231  df-sn 4322
This theorem is referenced by:  rabsnif  4402  rabrsn  4403
  Copyright terms: Public domain W3C validator