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

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

Proof of Theorem cador
StepHypRef Expression
1 xor2 1373 . . . . . . 7  |-  ( (
ph  \/_  ps )  <->  ( ( ph  \/  ps )  /\  -.  ( ph  /\ 
ps ) ) )
21rbaib 907 . . . . . 6  |-  ( -.  ( ph  /\  ps )  ->  ( ( ph  \/_ 
ps )  <->  ( ph  \/  ps ) ) )
32anbi1d 703 . . . . 5  |-  ( -.  ( ph  /\  ps )  ->  ( ( (
ph  \/_  ps )  /\  ch )  <->  ( ( ph  \/  ps )  /\  ch ) ) )
4 ancom 448 . . . . 5  |-  ( ( ( ph  \/_  ps )  /\  ch )  <->  ( ch  /\  ( ph  \/_  ps ) ) )
5 andir 869 . . . . 5  |-  ( ( ( ph  \/  ps )  /\  ch )  <->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )
63, 4, 53bitr3g 287 . . . 4  |-  ( -.  ( ph  /\  ps )  ->  ( ( ch 
/\  ( ph  \/_  ps ) )  <->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
76pm5.74i 245 . . 3  |-  ( ( -.  ( ph  /\  ps )  ->  ( ch 
/\  ( ph  \/_  ps ) ) )  <->  ( -.  ( ph  /\  ps )  ->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
8 df-or 368 . . 3  |-  ( ( ( ph  /\  ps )  \/  ( ch  /\  ( ph  \/_  ps ) ) )  <->  ( -.  ( ph  /\  ps )  ->  ( ch  /\  ( ph  \/_  ps ) ) ) )
9 df-or 368 . . 3  |-  ( ( ( ph  /\  ps )  \/  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )  <->  ( -.  ( ph  /\  ps )  ->  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
107, 8, 93bitr4i 277 . 2  |-  ( ( ( ph  /\  ps )  \/  ( ch  /\  ( ph  \/_  ps ) ) )  <->  ( ( ph  /\  ps )  \/  ( ( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
11 df-cad 1462 . 2  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  /\ 
ps )  \/  ( ch  /\  ( ph  \/_  ps ) ) ) )
12 3orass 977 . 2  |-  ( ( ( ph  /\  ps )  \/  ( ph  /\ 
ch )  \/  ( ps  /\  ch ) )  <-> 
( ( ph  /\  ps )  \/  (
( ph  /\  ch )  \/  ( ps  /\  ch ) ) ) )
1310, 11, 123bitr4i 277 1  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  /\ 
ps )  \/  ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    \/ wo 366    /\ wa 367    \/ w3o 973    \/_ wxo 1366  caddwcad 1460
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 185  df-or 368  df-an 369  df-3or 975  df-xor 1367  df-cad 1462
This theorem is referenced by:  cadan  1474  cadnot  1477  cadnotOLD  1478  cadcombOLD  1481
  Copyright terms: Public domain W3C validator