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

Theorem csbif 4513
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 3831 . . . 4 (𝑦 = 𝐴𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶))
2 dfsbcq2 3714 . . . . 5 (𝑦 = 𝐴 → ([𝑦 / 𝑥]𝜑[𝐴 / 𝑥]𝜑))
3 csbeq1 3831 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐵 = 𝐴 / 𝑥𝐵)
4 csbeq1 3831 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐶 = 𝐴 / 𝑥𝐶)
52, 3, 4ifbieq12d 4484 . . . 4 (𝑦 = 𝐴 → if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
61, 5eqeq12d 2754 . . 3 (𝑦 = 𝐴 → (𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) ↔ 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)))
7 vex 3426 . . . 4 𝑦 ∈ V
8 nfs1v 2155 . . . . 5 𝑥[𝑦 / 𝑥]𝜑
9 nfcsb1v 3853 . . . . 5 𝑥𝑦 / 𝑥𝐵
10 nfcsb1v 3853 . . . . 5 𝑥𝑦 / 𝑥𝐶
118, 9, 10nfif 4486 . . . 4 𝑥if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
12 sbequ12 2247 . . . . 5 (𝑥 = 𝑦 → (𝜑 ↔ [𝑦 / 𝑥]𝜑))
13 csbeq1a 3842 . . . . 5 (𝑥 = 𝑦𝐵 = 𝑦 / 𝑥𝐵)
14 csbeq1a 3842 . . . . 5 (𝑥 = 𝑦𝐶 = 𝑦 / 𝑥𝐶)
1512, 13, 14ifbieq12d 4484 . . . 4 (𝑥 = 𝑦 → if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶))
167, 11, 15csbief 3863 . . 3 𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
176, 16vtoclg 3495 . 2 (𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
18 csbprc 4337 . . 3 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = ∅)
19 csbprc 4337 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐵 = ∅)
20 csbprc 4337 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐶 = ∅)
2119, 20ifeq12d 4477 . . . 4 𝐴 ∈ V → if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, ∅, ∅))
22 ifid 4496 . . . 4 if([𝐴 / 𝑥]𝜑, ∅, ∅) = ∅
2321, 22eqtr2di 2796 . . 3 𝐴 ∈ V → ∅ = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
2418, 23eqtrd 2778 . 2 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
2517, 24pm2.61i 182 1 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3   = wceq 1539  [wsb 2068  wcel 2108  Vcvv 3422  [wsbc 3711  csb 3828  c0 4253  ifcif 4456
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-3an 1087  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-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-nul 4254  df-if 4457
This theorem is referenced by:  csbopg  4819  fvmptnn04if  21906  csbrdgg  35427  csbfinxpg  35486  cdlemk40  38858
  Copyright terms: Public domain W3C validator