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

Theorem ifor 3781
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 3747 . . . 4  |-  ( (
ph  \/  ps )  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
21orcs 385 . . 3  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  A )
3 iftrue 3747 . . 3  |-  ( ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  A )
42, 3eqtr4d 2473 . 2  |-  ( ph  ->  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
) )
5 iffalse 3748 . . 3  |-  ( -. 
ph  ->  if ( ph ,  A ,  if ( ps ,  A ,  B ) )  =  if ( ps ,  A ,  B )
)
6 biorf 396 . . . 4  |-  ( -. 
ph  ->  ( ps  <->  ( ph  \/  ps ) ) )
76ifbid 3759 . . 3  |-  ( -. 
ph  ->  if ( ps ,  A ,  B
)  =  if ( ( ph  \/  ps ) ,  A ,  B ) )
85, 7eqtr2d 2471 . 2  |-  ( -. 
ph  ->  if ( (
ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B ) ) )
94, 8pm2.61i 159 1  |-  if ( ( ph  \/  ps ) ,  A ,  B )  =  if ( ph ,  A ,  if ( ps ,  A ,  B )
)
Colors of variables: wff set class
Syntax hints:   -. wn 3    \/ wo 359    = wceq 1653   ifcif 3741
This theorem is referenced by:  cantnflem1d  7647  cantnflem1  7648
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-clab 2425  df-cleq 2431  df-clel 2434  df-if 3742
  Copyright terms: Public domain W3C validator