MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  ifor Unicode version

Theorem ifor 3618
Description: Rewrite a disjunction in an if statement as two nested conditionals. (Contributed by Mario Carneiro, 28-Jul-2014.)
Assertion
Ref Expression
ifor  |-  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
)

Proof of Theorem ifor
StepHypRef Expression
1 iftrue 3584 . . . 4  |-  ( (
ph  \/  ps )  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
21orcs 383 . . 3  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
3 iftrue 3584 . . 3  |-  ( ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  A )
42, 3eqtr4d 2331 . 2  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
) )
5 iffalse 3585 . . 3  |-  ( -. 
ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  if ( ps ,  A ,  B )
)
6 biorf 394 . . . 4  |-  ( -. 
ph  ->  ( ps  <->  ( ph  \/  ps ) ) )
76ifbid 3596 . . 3  |-  ( -. 
ph  ->  if ( ps ,  A ,  B
)  =  if ( ( ph  \/  ps ) ,  A ,  B ) )
85, 7eqtr2d 2329 . 2  |-  ( -. 
ph  ->  if ( (
ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B ) ) )
94, 8pm2.61i 156 1  |-  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
)
Colors of variables: wff set class
Syntax hints:   -. wn 3    \/ wo 357    = wceq 1632   ifcif 3578
This theorem is referenced by:  cantnflem1d  7406  cantnflem1  7407
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-clab 2283  df-cleq 2289  df-clel 2292  df-if 3579
  Copyright terms: Public domain W3C validator