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

Theorem csbif 4516
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 3835 . . . 4 (𝑦 = 𝐴𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶))
2 dfsbcq2 3719 . . . . 5 (𝑦 = 𝐴 → ([𝑦 / 𝑥]𝜑[𝐴 / 𝑥]𝜑))
3 csbeq1 3835 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐵 = 𝐴 / 𝑥𝐵)
4 csbeq1 3835 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐶 = 𝐴 / 𝑥𝐶)
52, 3, 4ifbieq12d 4487 . . . 4 (𝑦 = 𝐴 → if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
61, 5eqeq12d 2754 . . 3 (𝑦 = 𝐴 → (𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) ↔ 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)))
7 vex 3436 . . . 4 𝑦 ∈ V
8 nfs1v 2153 . . . . 5 𝑥[𝑦 / 𝑥]𝜑
9 nfcsb1v 3857 . . . . 5 𝑥𝑦 / 𝑥𝐵
10 nfcsb1v 3857 . . . . 5 𝑥𝑦 / 𝑥𝐶
118, 9, 10nfif 4489 . . . 4 𝑥if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
12 sbequ12 2244 . . . . 5 (𝑥 = 𝑦 → (𝜑 ↔ [𝑦 / 𝑥]𝜑))
13 csbeq1a 3846 . . . . 5 (𝑥 = 𝑦𝐵 = 𝑦 / 𝑥𝐵)
14 csbeq1a 3846 . . . . 5 (𝑥 = 𝑦𝐶 = 𝑦 / 𝑥𝐶)
1512, 13, 14ifbieq12d 4487 . . . 4 (𝑥 = 𝑦 → if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶))
167, 11, 15csbief 3867 . . 3 𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
176, 16vtoclg 3505 . 2 (𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
18 csbprc 4340 . . 3 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = ∅)
19 csbprc 4340 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐵 = ∅)
20 csbprc 4340 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐶 = ∅)
2119, 20ifeq12d 4480 . . . 4 𝐴 ∈ V → if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, ∅, ∅))
22 ifid 4499 . . . 4 if([𝐴 / 𝑥]𝜑, ∅, ∅) = ∅
2321, 22eqtr2di 2795 . . 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 2067  wcel 2106  Vcvv 3432  [wsbc 3716  csb 3832  c0 4256  ifcif 4459
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-nul 4257  df-if 4460
This theorem is referenced by:  csbopg  4822  fvmptnn04if  21998  csbrdgg  35500  csbfinxpg  35559  cdlemk40  38931
  Copyright terms: Public domain W3C validator