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

Theorem ifor 3979
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 3938 . . . 4  |-  ( (
ph  \/  ps )  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
21orcs 394 . . 3  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
3 iftrue 3938 . . 3  |-  ( ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  A )
42, 3eqtr4d 2504 . 2  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
) )
5 iffalse 3941 . . 3  |-  ( -. 
ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  if ( ps ,  A ,  B )
)
6 biorf 405 . . . 4  |-  ( -. 
ph  ->  ( ps  <->  ( ph  \/  ps ) ) )
76ifbid 3954 . . 3  |-  ( -. 
ph  ->  if ( ps ,  A ,  B
)  =  if ( ( ph  \/  ps ) ,  A ,  B ) )
85, 7eqtr2d 2502 . 2  |-  ( -. 
ph  ->  if ( (
ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B ) ) )
94, 8pm2.61i 164 1  |-  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
)
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    \/ wo 368    = wceq 1374   ifcif 3932
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1714  ax-7 1734  ax-10 1781  ax-11 1786  ax-12 1798  ax-13 1961  ax-ext 2438
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-tru 1377  df-ex 1592  df-nf 1595  df-sb 1707  df-clab 2446  df-cleq 2452  df-clel 2455  df-if 3933
This theorem is referenced by:  cantnflem1d  8096  cantnflem1  8097  cantnflem1dOLD  8119  cantnflem1OLD  8120
  Copyright terms: Public domain W3C validator