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

Theorem csbif 4543
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 3854 . . . 4 (𝑦 = 𝐴 → ⦋𝑦 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶))
2 dfsbcq2 3745 . . . . 5 (𝑦 = 𝐴 → ([𝑦 / 𝑥]𝜑 ↔ [𝐴 / 𝑥]𝜑))
3 csbeq1 3854 . . . . 5 (𝑦 = 𝐴 → ⦋𝑦 / 𝑥⦌𝐵 = ⦋𝐴 / 𝑥⦌𝐵)
4 csbeq1 3854 . . . . 5 (𝑦 = 𝐴 → ⦋𝑦 / 𝑥⦌𝐶 = ⦋𝐴 / 𝑥⦌𝐶)
52, 3, 4ifbieq12d 4514 . . . 4 (𝑦 = 𝐴 → if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
61, 5eqeq12d 2779 . . 3 (𝑦 = 𝐴 → (⦋𝑦 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶) ↔ ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶)))
7 vex 3458 . . . 4 𝑦 ∈ V
8 nfs1v 2196 . . . . 5 Ⅎ𝑥[𝑦 / 𝑥]𝜑
9 nfcsb1v 3875 . . . . 5 Ⅎ𝑥⦋𝑦 / 𝑥⦌𝐵
10 nfcsb1v 3875 . . . . 5 Ⅎ𝑥⦋𝑦 / 𝑥⦌𝐶
118, 9, 10nfif 4516 . . . 4 Ⅎ𝑥if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶)
12 sbequ12 2290 . . . . 5 (𝑥 = 𝑦 → (𝜑 ↔ [𝑦 / 𝑥]𝜑))
13 csbeq1a 3865 . . . . 5 (𝑥 = 𝑦 → 𝐵 = ⦋𝑦 / 𝑥⦌𝐵)
14 csbeq1a 3865 . . . . 5 (𝑥 = 𝑦 → 𝐶 = ⦋𝑦 / 𝑥⦌𝐶)
1512, 13, 14ifbieq12d 4514 . . . 4 (𝑥 = 𝑦 → if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶))
167, 11, 15csbief 3885 . . 3 ⦋𝑦 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶)
176, 16vtoclg 3521 . 2 (𝐴 ∈ V → ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
18 csbprc 4370 . . 3 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = ∅)
19 csbprc 4370 . . . . 5 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌𝐵 = ∅)
20 csbprc 4370 . . . . 5 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌𝐶 = ∅)
2119, 20ifeq12d 4507 . . . 4 (¬ 𝐴 ∈ V → if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶) = if([𝐴 / 𝑥]𝜑, ∅, ∅))
22 ifid 4526 . . . 4 if([𝐴 / 𝑥]𝜑, ∅, ∅) = ∅
2321, 22eqtr2di 2815 . . 3 (¬ 𝐴 ∈ V → ∅ = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
2418, 23eqtrd 2798 . 2 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
2517, 24pm2.61i 184 1 ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶)
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   = wceq 1570  [wsb 2101   ∈ wcel 2147  Vcvv 3454  [wsbc 3742  ⦋csb 3851  ∅c0 4281  ifcif 4485
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2102  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-dif 4050  df-un 4154  df-nul 4282  df-if 4486
This theorem is used by:  csbopg  4854  fvmptnn04if  23197  csbrdgg  38444  csbfinxpg  38503  cdlemk40  42166
  Copyright terms: Public domain W3C validator