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

Theorem csbif 4138
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 3536 . . . 4 (𝑦 = 𝐴𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶))
2 dfsbcq2 3438 . . . . 5 (𝑦 = 𝐴 → ([𝑦 / 𝑥]𝜑[𝐴 / 𝑥]𝜑))
3 csbeq1 3536 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐵 = 𝐴 / 𝑥𝐵)
4 csbeq1 3536 . . . . 5 (𝑦 = 𝐴𝑦 / 𝑥𝐶 = 𝐴 / 𝑥𝐶)
52, 3, 4ifbieq12d 4113 . . . 4 (𝑦 = 𝐴 → if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
61, 5eqeq12d 2637 . . 3 (𝑦 = 𝐴 → (𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶) ↔ 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)))
7 vex 3203 . . . 4 𝑦 ∈ V
8 nfs1v 2437 . . . . 5 𝑥[𝑦 / 𝑥]𝜑
9 nfcsb1v 3549 . . . . 5 𝑥𝑦 / 𝑥𝐵
10 nfcsb1v 3549 . . . . 5 𝑥𝑦 / 𝑥𝐶
118, 9, 10nfif 4115 . . . 4 𝑥if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
12 sbequ12 2111 . . . . 5 (𝑥 = 𝑦 → (𝜑 ↔ [𝑦 / 𝑥]𝜑))
13 csbeq1a 3542 . . . . 5 (𝑥 = 𝑦𝐵 = 𝑦 / 𝑥𝐵)
14 csbeq1a 3542 . . . . 5 (𝑥 = 𝑦𝐶 = 𝑦 / 𝑥𝐶)
1512, 13, 14ifbieq12d 4113 . . . 4 (𝑥 = 𝑦 → if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶))
167, 11, 15csbief 3558 . . 3 𝑦 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, 𝑦 / 𝑥𝐵, 𝑦 / 𝑥𝐶)
176, 16vtoclg 3266 . 2 (𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
18 csbprc 3980 . . 3 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = ∅)
19 csbprc 3980 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐵 = ∅)
20 csbprc 3980 . . . . 5 𝐴 ∈ V → 𝐴 / 𝑥𝐶 = ∅)
2119, 20ifeq12d 4106 . . . 4 𝐴 ∈ V → if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶) = if([𝐴 / 𝑥]𝜑, ∅, ∅))
22 ifid 4125 . . . 4 if([𝐴 / 𝑥]𝜑, ∅, ∅) = ∅
2321, 22syl6req 2673 . . 3 𝐴 ∈ V → ∅ = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
2418, 23eqtrd 2656 . 2 𝐴 ∈ V → 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶))
2517, 24pm2.61i 176 1 𝐴 / 𝑥if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, 𝐴 / 𝑥𝐵, 𝐴 / 𝑥𝐶)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3   = wceq 1483  [wsb 1880  wcel 1990  Vcvv 3200  [wsbc 3435  csb 3533  c0 3915  ifcif 4086
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1039  df-tru 1486  df-fal 1489  df-ex 1705  df-nf 1710  df-sb 1881  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-nul 3916  df-if 4087
This theorem is referenced by:  csbopg  4420  fvmptnn04if  20654  csbrdgg  33175  csbfinxpg  33225  cdlemk40  36205
  Copyright terms: Public domain W3C validator