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

Theorem ifor 4135
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 4092 . . . 4  |-  ( (
ph  \/  ps )  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
21orcs 409 . . 3  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
3 iftrue 4092 . . 3  |-  ( ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  A )
42, 3eqtr4d 2659 . 2  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
) )
5 iffalse 4095 . . 3  |-  ( -. 
ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  if ( ps ,  A ,  B )
)
6 biorf 420 . . . 4  |-  ( -. 
ph  ->  ( ps  <->  ( ph  \/  ps ) ) )
76ifbid 4108 . . 3  |-  ( -. 
ph  ->  if ( ps ,  A ,  B
)  =  if ( ( ph  \/  ps ) ,  A ,  B ) )
85, 7eqtr2d 2657 . 2  |-  ( -. 
ph  ->  if ( (
ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B ) ) )
94, 8pm2.61i 176 1  |-  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
)
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    \/ wo 383    = wceq 1483   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-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-clab 2609  df-cleq 2615  df-clel 2618  df-if 4087
This theorem is referenced by:  cantnflem1d  8585  cantnflem1  8586
  Copyright terms: Public domain W3C validator