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

Theorem rabsnifsb 4393
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 4333 . . . . . . . 8 (𝑥 ∈ {𝐴} → 𝑥 = 𝐴)
2 sbceq1a 3598 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
32biimpd 219 . . . . . . . 8 (𝑥 = 𝐴 → (𝜑[𝐴 / 𝑥]𝜑))
41, 3syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → (𝜑[𝐴 / 𝑥]𝜑))
54imdistani 558 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ 𝜑) → (𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑))
65orcd 860 . . . . 5 ((𝑥 ∈ {𝐴} ∧ 𝜑) → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
72biimprd 238 . . . . . . . 8 (𝑥 = 𝐴 → ([𝐴 / 𝑥]𝜑𝜑))
81, 7syl 17 . . . . . . 7 (𝑥 ∈ {𝐴} → ([𝐴 / 𝑥]𝜑𝜑))
98imdistani 558 . . . . . 6 ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
10 noel 4067 . . . . . . . 8 ¬ 𝑥 ∈ ∅
1110pm2.21i 117 . . . . . . 7 (𝑥 ∈ ∅ → (𝑥 ∈ {𝐴} ∧ 𝜑))
1211adantr 466 . . . . . 6 ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) → (𝑥 ∈ {𝐴} ∧ 𝜑))
139, 12jaoi 844 . . . . 5 (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) → (𝑥 ∈ {𝐴} ∧ 𝜑))
146, 13impbii 199 . . . 4 ((𝑥 ∈ {𝐴} ∧ 𝜑) ↔ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
1514abbii 2888 . . 3 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
16 nfv 1995 . . . 4 𝑦((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
17 nfv 1995 . . . . . 6 𝑥 𝑦 ∈ {𝐴}
18 nfsbc1v 3607 . . . . . 6 𝑥[𝐴 / 𝑥]𝜑
1917, 18nfan 1980 . . . . 5 𝑥(𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)
20 nfv 1995 . . . . . 6 𝑥 𝑦 ∈ ∅
2118nfn 1935 . . . . . 6 𝑥 ¬ [𝐴 / 𝑥]𝜑
2220, 21nfan 1980 . . . . 5 𝑥(𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)
2319, 22nfor 1986 . . . 4 𝑥((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))
24 eleq1w 2833 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ {𝐴} ↔ 𝑦 ∈ {𝐴}))
2524anbi1d 615 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑)))
26 eleq1w 2833 . . . . . 6 (𝑥 = 𝑦 → (𝑥 ∈ ∅ ↔ 𝑦 ∈ ∅))
2726anbi1d 615 . . . . 5 (𝑥 = 𝑦 → ((𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑) ↔ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)))
2825, 27orbi12d 902 . . . 4 (𝑥 = 𝑦 → (((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑)) ↔ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))))
2916, 23, 28cbvab 2895 . . 3 {𝑥 ∣ ((𝑥 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑥 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3015, 29eqtri 2793 . 2 {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)} = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
31 df-rab 3070 . 2 {𝑥 ∈ {𝐴} ∣ 𝜑} = {𝑥 ∣ (𝑥 ∈ {𝐴} ∧ 𝜑)}
32 df-if 4226 . 2 if([𝐴 / 𝑥]𝜑, {𝐴}, ∅) = {𝑦 ∣ ((𝑦 ∈ {𝐴} ∧ [𝐴 / 𝑥]𝜑) ∨ (𝑦 ∈ ∅ ∧ ¬ [𝐴 / 𝑥]𝜑))}
3330, 31, 323eqtr4i 2803 1 {𝑥 ∈ {𝐴} ∣ 𝜑} = if([𝐴 / 𝑥]𝜑, {𝐴}, ∅)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 382  wo 834   = wceq 1631  wcel 2145  {cab 2757  {crab 3065  [wsbc 3587  c0 4063  ifcif 4225  {csn 4316
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 835  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-rab 3070  df-v 3353  df-sbc 3588  df-dif 3726  df-nul 4064  df-if 4226  df-sn 4317
This theorem is referenced by:  rabsnif  4394  rabrsn  4395
  Copyright terms: Public domain W3C validator