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

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

Proof of Theorem cadan
StepHypRef Expression
1 ordi 834 . . . 4  |-  ( ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ( ps  /\  ch ) )  <->  ( (
( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ps )  /\  ( ( ( ph  /\ 
ps )  \/  ( ph  /\  ch ) )  \/  ch ) ) )
2 ordir 835 . . . . . 6  |-  ( ( ( ph  /\  ch )  \/  ps )  <->  ( ( ph  \/  ps )  /\  ( ch  \/  ps ) ) )
3 simpr 447 . . . . . . . . . . 11  |-  ( (
ph  /\  ps )  ->  ps )
43con3i 127 . . . . . . . . . 10  |-  ( -. 
ps  ->  -.  ( ph  /\ 
ps ) )
5 biorf 394 . . . . . . . . . 10  |-  ( -.  ( ph  /\  ps )  ->  ( ( ph  /\ 
ch )  <->  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
64, 5syl 15 . . . . . . . . 9  |-  ( -. 
ps  ->  ( ( ph  /\ 
ch )  <->  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
76pm5.74i 236 . . . . . . . 8  |-  ( ( -.  ps  ->  ( ph  /\  ch ) )  <-> 
( -.  ps  ->  ( ( ph  /\  ps )  \/  ( ph  /\ 
ch ) ) ) )
8 df-or 359 . . . . . . . 8  |-  ( ( ps  \/  ( ph  /\ 
ch ) )  <->  ( -.  ps  ->  ( ph  /\  ch ) ) )
9 df-or 359 . . . . . . . 8  |-  ( ( ps  \/  ( (
ph  /\  ps )  \/  ( ph  /\  ch ) ) )  <->  ( -.  ps  ->  ( ( ph  /\ 
ps )  \/  ( ph  /\  ch ) ) ) )
107, 8, 93bitr4i 268 . . . . . . 7  |-  ( ( ps  \/  ( ph  /\ 
ch ) )  <->  ( ps  \/  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
11 orcom 376 . . . . . . 7  |-  ( ( ( ph  /\  ch )  \/  ps )  <->  ( ps  \/  ( ph  /\ 
ch ) ) )
12 orcom 376 . . . . . . 7  |-  ( ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ps )  <->  ( ps  \/  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
1310, 11, 123bitr4i 268 . . . . . 6  |-  ( ( ( ph  /\  ch )  \/  ps )  <->  ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ps ) )
14 orcom 376 . . . . . . 7  |-  ( ( ch  \/  ps )  <->  ( ps  \/  ch )
)
1514anbi2i 675 . . . . . 6  |-  ( ( ( ph  \/  ps )  /\  ( ch  \/  ps ) )  <->  ( ( ph  \/  ps )  /\  ( ps  \/  ch ) ) )
162, 13, 153bitr3i 266 . . . . 5  |-  ( ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ps )  <->  ( ( ph  \/  ps )  /\  ( ps  \/  ch ) ) )
17 simpr 447 . . . . . . . . . . 11  |-  ( (
ph  /\  ch )  ->  ch )
1817con3i 127 . . . . . . . . . 10  |-  ( -. 
ch  ->  -.  ( ph  /\ 
ch ) )
19 biorf 394 . . . . . . . . . . 11  |-  ( -.  ( ph  /\  ch )  ->  ( ( ph  /\ 
ps )  <->  ( ( ph  /\  ch )  \/  ( ph  /\  ps ) ) ) )
20 orcom 376 . . . . . . . . . . 11  |-  ( ( ( ph  /\  ch )  \/  ( ph  /\ 
ps ) )  <->  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) )
2119, 20syl6bb 252 . . . . . . . . . 10  |-  ( -.  ( ph  /\  ch )  ->  ( ( ph  /\ 
ps )  <->  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
2218, 21syl 15 . . . . . . . . 9  |-  ( -. 
ch  ->  ( ( ph  /\ 
ps )  <->  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
2322pm5.74i 236 . . . . . . . 8  |-  ( ( -.  ch  ->  ( ph  /\  ps ) )  <-> 
( -.  ch  ->  ( ( ph  /\  ps )  \/  ( ph  /\ 
ch ) ) ) )
24 df-or 359 . . . . . . . 8  |-  ( ( ch  \/  ( ph  /\ 
ps ) )  <->  ( -.  ch  ->  ( ph  /\  ps ) ) )
25 df-or 359 . . . . . . . 8  |-  ( ( ch  \/  ( (
ph  /\  ps )  \/  ( ph  /\  ch ) ) )  <->  ( -.  ch  ->  ( ( ph  /\ 
ps )  \/  ( ph  /\  ch ) ) ) )
2623, 24, 253bitr4i 268 . . . . . . 7  |-  ( ( ch  \/  ( ph  /\ 
ps ) )  <->  ( ch  \/  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
27 orcom 376 . . . . . . 7  |-  ( ( ( ph  /\  ps )  \/  ch )  <->  ( ch  \/  ( ph  /\ 
ps ) ) )
28 orcom 376 . . . . . . 7  |-  ( ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ch )  <->  ( ch  \/  ( ( ph  /\  ps )  \/  ( ph  /\  ch ) ) ) )
2926, 27, 283bitr4i 268 . . . . . 6  |-  ( ( ( ph  /\  ps )  \/  ch )  <->  ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ch ) )
30 ordir 835 . . . . . 6  |-  ( ( ( ph  /\  ps )  \/  ch )  <->  ( ( ph  \/  ch )  /\  ( ps  \/  ch ) ) )
3129, 30bitr3i 242 . . . . 5  |-  ( ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ch )  <->  ( ( ph  \/  ch )  /\  ( ps  \/  ch ) ) )
3216, 31anbi12i 678 . . . 4  |-  ( ( ( ( ( ph  /\ 
ps )  \/  ( ph  /\  ch ) )  \/  ps )  /\  ( ( ( ph  /\ 
ps )  \/  ( ph  /\  ch ) )  \/  ch ) )  <-> 
( ( ( ph  \/  ps )  /\  ( ps  \/  ch ) )  /\  ( ( ph  \/  ch )  /\  ( ps  \/  ch ) ) ) )
331, 32bitri 240 . . 3  |-  ( ( ( ( ph  /\  ps )  \/  ( ph  /\  ch ) )  \/  ( ps  /\  ch ) )  <->  ( (
( ph  \/  ps )  /\  ( ps  \/  ch ) )  /\  (
( ph  \/  ch )  /\  ( ps  \/  ch ) ) ) )
34 df-3or 935 . . 3  |-  ( ( ( ph  /\  ps )  \/  ( ph  /\ 
ch )  \/  ( ps  /\  ch ) )  <-> 
( ( ( ph  /\ 
ps )  \/  ( ph  /\  ch ) )  \/  ( ps  /\  ch ) ) )
35 anandir 802 . . 3  |-  ( ( ( ( ph  \/  ps )  /\  ( ph  \/  ch ) )  /\  ( ps  \/  ch ) )  <->  ( (
( ph  \/  ps )  /\  ( ps  \/  ch ) )  /\  (
( ph  \/  ch )  /\  ( ps  \/  ch ) ) ) )
3633, 34, 353bitr4i 268 . 2  |-  ( ( ( ph  /\  ps )  \/  ( ph  /\ 
ch )  \/  ( ps  /\  ch ) )  <-> 
( ( ( ph  \/  ps )  /\  ( ph  \/  ch ) )  /\  ( ps  \/  ch ) ) )
37 cador 1381 . 2  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  /\ 
ps )  \/  ( ph  /\  ch )  \/  ( ps  /\  ch ) ) )
38 df-3an 936 . 2  |-  ( ( ( ph  \/  ps )  /\  ( ph  \/  ch )  /\  ( ps  \/  ch ) )  <-> 
( ( ( ph  \/  ps )  /\  ( ph  \/  ch ) )  /\  ( ps  \/  ch ) ) )
3936, 37, 383bitr4i 268 1  |-  (cadd (
ph ,  ps ,  ch )  <->  ( ( ph  \/  ps )  /\  ( ph  \/  ch )  /\  ( ps  \/  ch ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    \/ wo 357    /\ wa 358    \/ w3o 933    /\ w3a 934  caddwcad 1369
This theorem is referenced by:  cadnot  1384
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-xor 1296  df-cad 1371
  Copyright terms: Public domain W3C validator