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

Theorem cador 1401
Description: Write the adder carry in disjunctive normal form. (Contributed by Mario Carneiro, 4-Sep-2016.)
Assertion
Ref Expression
cador  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  /\ 
ps )  \/  ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )

Proof of Theorem cador
StepHypRef Expression
1 df-cad 1391 . 2  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  /\ 
ps )  \/  ( ch  /\  ( ph  \/_  ps ) ) ) )
2 xor2 1320 . . . . . . 7  |-  ( (
ph  \/_  ps )  <->  ( ( ph  \/  ps )  /\  -.  ( ph  /\ 
ps ) ) )
32rbaib 875 . . . . . 6  |-  ( -.  ( ph  /\  ps )  ->  ( ( ph  \/_ 
ps )  <->  ( ph  \/  ps ) ) )
43anbi1d 687 . . . . 5  |-  ( -.  ( ph  /\  ps )  ->  ( ( (
ph  \/_  ps )  /\  ch )  <->  ( ( ph  \/  ps )  /\  ch ) ) )
5 ancom 439 . . . . 5  |-  ( ( ( ph  \/_  ps )  /\  ch )  <->  ( ch  /\  ( ph  \/_  ps ) ) )
6 andir 840 . . . . 5  |-  ( ( ( ph  \/  ps )  /\  ch )  <->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )
74, 5, 63bitr3g 280 . . . 4  |-  ( -.  ( ph  /\  ps )  ->  ( ( ch 
/\  ( ph  \/_  ps ) )  <->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
87pm5.74i 238 . . 3  |-  ( ( -.  ( ph  /\  ps )  ->  ( ch 
/\  ( ph  \/_  ps ) ) )  <->  ( -.  ( ph  /\  ps )  ->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
9 df-or 361 . . 3  |-  ( ( ( ph  /\  ps )  \/  ( ch  /\  ( ph  \/_  ps ) ) )  <->  ( -.  ( ph  /\  ps )  ->  ( ch  /\  ( ph  \/_  ps ) ) ) )
10 3orass 940 . . . 4  |-  ( ( ( ph  /\  ps )  \/  ( ph  /\ 
ch )  \/  ( ps  /\  ch ) )  <-> 
( ( ph  /\  ps )  \/  (
( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
11 df-or 361 . . . 4  |-  ( ( ( ph  /\  ps )  \/  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )  <->  ( -.  ( ph  /\  ps )  ->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
1210, 11bitri 242 . . 3  |-  ( ( ( ph  /\  ps )  \/  ( ph  /\ 
ch )  \/  ( ps  /\  ch ) )  <-> 
( -.  ( ph  /\ 
ps )  ->  (
( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
138, 9, 123bitr4i 270 . 2  |-  ( ( ( ph  /\  ps )  \/  ( ch  /\  ( ph  \/_  ps ) ) )  <->  ( ( ph  /\  ps )  \/  ( ph  /\  ch )  \/  ( ps  /\ 
ch ) ) )
141, 13bitri 242 1  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  /\ 
ps )  \/  ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 178    \/ wo 359    /\ wa 360    \/ w3o 936    \/_ wxo 1314  caddwcad 1389
This theorem is referenced by:  cadan  1402  cadnot  1404  cadcomb  1406
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-xor 1315  df-cad 1391
  Copyright terms: Public domain W3C validator