Metamath Proof Explorer


Theorem cad0

Description: If one input is false, then the adder carry is true exactly when both of the other two inputs are true. (Contributed by Mario Carneiro, 8-Sep-2016)

Ref Expression
Assertion cad0
|- ( -. ch -> ( cadd ( ph , ps , ch ) <-> ( ph /\ ps ) ) )

Proof

Step Hyp Ref Expression
1 df-cad
 |-  ( cadd ( ph , ps , ch ) <-> ( ( ph /\ ps ) \/ ( ch /\ ( ph \/_ ps ) ) ) )
2 idd
 |-  ( -. ch -> ( ( ph /\ ps ) -> ( ph /\ ps ) ) )
3 pm2.21
 |-  ( -. ch -> ( ch -> ( ph /\ ps ) ) )
4 3 adantrd
 |-  ( -. ch -> ( ( ch /\ ( ph \/_ ps ) ) -> ( ph /\ ps ) ) )
5 2 4 jaod
 |-  ( -. ch -> ( ( ( ph /\ ps ) \/ ( ch /\ ( ph \/_ ps ) ) ) -> ( ph /\ ps ) ) )
6 orc
 |-  ( ( ph /\ ps ) -> ( ( ph /\ ps ) \/ ( ch /\ ( ph \/_ ps ) ) ) )
7 5 6 impbid1
 |-  ( -. ch -> ( ( ( ph /\ ps ) \/ ( ch /\ ( ph \/_ ps ) ) ) <-> ( ph /\ ps ) ) )
8 1 7 syl5bb
 |-  ( -. ch -> ( cadd ( ph , ps , ch ) <-> ( ph /\ ps ) ) )