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

Theorem csbif 4518
Description: Distribute proper substitution through the conditional operator. (Contributed by NM, 24-Feb-2013.) (Revised by NM, 19-Aug-2018.)
Assertion
Ref Expression
csbif 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)

Proof of Theorem csbif
Dummy variable 𝑦 is distinct from all other variables.
StepHypRef Expression
1 csbeq1 3883 . . . 4 (𝑦 = 𝐴𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶))
2 dfsbcq2 3772 . . . . 5 (𝑦 = 𝐴 → ([𝑦 / 𝑥]𝜑[𝐴 / 𝑥]𝜑))
3 csbeq1 3883 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐵 = 𝐴 / 𝑥𝐵)
4 csbeq1 3883 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐶 = 𝐴 / 𝑥𝐶)
52, 3, 4ifbieq12d 4490 . . . 4 (𝑦 = 𝐴 → if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
61, 5eqeq12d 2834 . . 3 (𝑦 = 𝐴 → (𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) ↔ 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)))
7 vex 3495 . . . 4 𝑦 ∈ V
8 nfs1v 2264 . . . . 5 𝑥[𝑦 / 𝑥]𝜑
9 nfcsb1v 3904 . . . . 5 𝑥𝑦 / 𝑥𝐵
10 nfcsb1v 3904 . . . . 5 𝑥𝑦 / 𝑥𝐶
118, 9, 10nfif 4492 . . . 4 𝑥if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
12 sbequ12 2243 . . . . 5 (𝑥 = 𝑦 → (𝜑 ↔ [𝑦 / 𝑥]𝜑))
13 csbeq1a 3894 . . . . 5 (𝑥 = 𝑦𝐵 = 𝑦 / 𝑥𝐵)
14 csbeq1a 3894 . . . . 5 (𝑥 = 𝑦𝐶 = 𝑦 / 𝑥𝐶)
1512, 13, 14ifbieq12d 4490 . . . 4 (𝑥 = 𝑦 → if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶))
167, 11, 15csbief 3914 . . 3 𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
176, 16vtoclg 3565 . 2 (𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
18 csbprc 4355 . . 3 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = ∅)
19 csbprc 4355 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐵 = ∅)
20 csbprc 4355 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐶 = ∅)
2119, 20ifeq12d 4483 . . . 4 𝐴 ∈ V → if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, ∅, ∅))
22 ifid 4502 . . . 4 if([𝐴 / 𝑥]𝜑, ∅, ∅) = ∅
2321, 22syl6req 2870 . . 3 𝐴 ∈ V → ∅ = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
2418, 23eqtrd 2853 . 2 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
2517, 24pm2.61i 183 1 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3   = wceq 1528  [wsb 2060  wcel 2105  Vcvv 3492  [wsbc 3769  csb 3880  c0 4288  ifcif 4463
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1787  ax-4 1801  ax-5 1902  ax-6 1961  ax-7 2006  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2151  ax-12 2167  ax-ext 2790
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 842  df-3an 1081  df-tru 1531  df-fal 1541  df-ex 1772  df-nf 1776  df-sb 2061  df-clab 2797  df-cleq 2811  df-clel 2890  df-nfc 2960  df-rab 3144  df-v 3494  df-sbc 3770  df-csb 3881  df-dif 3936  df-un 3938  df-nul 4289  df-if 4464
This theorem is referenced by:  csbopg  4813  fvmptnn04if  21385  csbrdgg  34492  csbfinxpg  34551  cdlemk40  37933
  Copyright terms: Public domain W3C validator