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

Theorem csbif 4539
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 3849 . . . 4 (𝑦 = 𝐴 → ⦋𝑦 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶))
2 dfsbcq2 3741 . . . . 5 (𝑦 = 𝐴 → ([𝑦 / 𝑥]𝜑 ↔ [𝐴 / 𝑥]𝜑))
3 csbeq1 3849 . . . . 5 (𝑦 = 𝐴 → ⦋𝑦 / 𝑥⦌𝐵 = ⦋𝐴 / 𝑥⦌𝐵)
4 csbeq1 3849 . . . . 5 (𝑦 = 𝐴 → ⦋𝑦 / 𝑥⦌𝐶 = ⦋𝐴 / 𝑥⦌𝐶)
52, 3, 4ifbieq12d 4510 . . . 4 (𝑦 = 𝐴 → if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
61, 5eqeq12d 2776 . . 3 (𝑦 = 𝐴 → (⦋𝑦 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶) ↔ ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶)))
7 vex 3454 . . . 4 𝑦 ∈ V
8 nfs1v 2193 . . . . 5 Ⅎ𝑥[𝑦 / 𝑥]𝜑
9 nfcsb1v 3870 . . . . 5 Ⅎ𝑥⦋𝑦 / 𝑥⦌𝐵
10 nfcsb1v 3870 . . . . 5 Ⅎ𝑥⦋𝑦 / 𝑥⦌𝐶
118, 9, 10nfif 4512 . . . 4 Ⅎ𝑥if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶)
12 sbequ12 2286 . . . . 5 (𝑥 = 𝑦 → (𝜑 ↔ [𝑦 / 𝑥]𝜑))
13 csbeq1a 3860 . . . . 5 (𝑥 = 𝑦 → 𝐵 = ⦋𝑦 / 𝑥⦌𝐵)
14 csbeq1a 3860 . . . . 5 (𝑥 = 𝑦 → 𝐶 = ⦋𝑦 / 𝑥⦌𝐶)
1512, 13, 14ifbieq12d 4510 . . . 4 (𝑥 = 𝑦 → if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶))
167, 11, 15csbief 3880 . . 3 ⦋𝑦 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝑦 / 𝑥]𝜑, ⦋𝑦 / 𝑥⦌𝐵, ⦋𝑦 / 𝑥⦌𝐶)
176, 16vtoclg 3517 . 2 (𝐴 ∈ V → ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
18 csbprc 4366 . . 3 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌if(𝜑, 𝐵, 𝐶) = ∅)
19 csbprc 4366 . . . . 5 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌𝐵 = ∅)
20 csbprc 4366 . . . . 5 (¬ 𝐴 ∈ V → ⦋𝐴 / 𝑥⦌𝐶 = ∅)
2119, 20ifeq12d 4503 . . . 4 (¬ 𝐴 ∈ V → if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶) = if([𝐴 / 𝑥]𝜑, ∅, ∅))
22 ifid 4522 . . . 4 if([𝐴 / 𝑥]𝜑, ∅, ∅) = ∅
2321, 22eqtr2di 2812 . . 3 (¬ 𝐴 ∈ V → ∅ = if([𝐴 / 𝑥]𝜑, ⦋𝐴 / 𝑥⦌𝐵, ⦋𝐴 / 𝑥⦌𝐶))
2418, 23eqtrd 2795 . 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 2099   ∈ wcel 2145  Vcvv 3450  [wsbc 3738  ⦋csb 3846  ∅c0 4278  ifcif 4481
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 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2732
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 2100  df-clab 2739  df-cleq 2752  df-clel 2835  df-nfc 2909  df-rab 3413  df-v 3452  df-sbc 3739  df-csb 3847  df-dif 3901  df-un 3903  df-nul 4279  df-if 4482
This theorem is used by:  csbopg  4850  fvmptnn04if  23129  csbrdgg  38172  csbfinxpg  38231  cdlemk40  41894
  Copyright terms: Public domain W3C validator