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

Theorem cador 1640
Description: 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(𝜑, 𝜓, 𝜒) ↔ ((𝜑 ∧ 𝜓) ∨ (𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒)))

Proof of Theorem cador
StepHypRef Expression
1 xor2 1546 . . . . . . 7 ((𝜑 ⊻ 𝜓) ↔ ((𝜑 ∨ 𝜓) ∧ ¬ (𝜑 ∧ 𝜓)))
21rbaib 548 . . . . . 6 (¬ (𝜑 ∧ 𝜓) → ((𝜑 ⊻ 𝜓) ↔ (𝜑 ∨ 𝜓)))
32anbi1d 643 . . . . 5 (¬ (𝜑 ∧ 𝜓) → (((𝜑 ⊻ 𝜓) ∧ 𝜒) ↔ ((𝜑 ∨ 𝜓) ∧ 𝜒)))
4 ancom 466 . . . . 5 (((𝜑 ⊻ 𝜓) ∧ 𝜒) ↔ (𝜒 ∧ (𝜑 ⊻ 𝜓)))
5 andir 1026 . . . . 5 (((𝜑 ∨ 𝜓) ∧ 𝜒) ↔ ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒)))
63, 4, 53bitr3g 316 . . . 4 (¬ (𝜑 ∧ 𝜓) → ((𝜒 ∧ (𝜑 ⊻ 𝜓)) ↔ ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒))))
76pm5.74i 274 . . 3 ((¬ (𝜑 ∧ 𝜓) → (𝜒 ∧ (𝜑 ⊻ 𝜓))) ↔ (¬ (𝜑 ∧ 𝜓) → ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒))))
8 df-or 862 . . 3 (((𝜑 ∧ 𝜓) ∨ (𝜒 ∧ (𝜑 ⊻ 𝜓))) ↔ (¬ (𝜑 ∧ 𝜓) → (𝜒 ∧ (𝜑 ⊻ 𝜓))))
9 df-or 862 . . 3 (((𝜑 ∧ 𝜓) ∨ ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒))) ↔ (¬ (𝜑 ∧ 𝜓) → ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒))))
107, 8, 93bitr4i 306 . 2 (((𝜑 ∧ 𝜓) ∨ (𝜒 ∧ (𝜑 ⊻ 𝜓))) ↔ ((𝜑 ∧ 𝜓) ∨ ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒))))
11 df-cad 1639 . 2 (cadd(𝜑, 𝜓, 𝜒) ↔ ((𝜑 ∧ 𝜓) ∨ (𝜒 ∧ (𝜑 ⊻ 𝜓))))
12 3orass 1106 . 2 (((𝜑 ∧ 𝜓) ∨ (𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒)) ↔ ((𝜑 ∧ 𝜓) ∨ ((𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒))))
1310, 11, 123bitr4i 306 1 (cadd(𝜑, 𝜓, 𝜒) ↔ ((𝜑 ∧ 𝜓) ∨ (𝜑 ∧ 𝜒) ∨ (𝜓 ∧ 𝜒)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   → wi 4   ↔ wb 209   ∧ wa 401   ∨ wo 861   ∨ w3o 1102   ⊻ wxo 1540  caddwcad 1638
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-xor 1541  df-cad 1639
This theorem is used by:  cadan  1641  cadnot  1647
  Copyright terms: Public domain W3C validator