### Distributive Laws

For sentences p,q,r:

p ( q r ) ≡ ( p ∧ q ) ∨ ( p ∧ r )
p ∨ ( q ∧ r ) ≡ ( p ∨ q ) ∧ ( p ∨ r )

Or, using Tem42's Everything Logic Symbols if the above hasn't rendered correctly on your browser:

p * ( q ^ r ) == ( p * q ) ^ ( p * r )
p ^ ( q * r ) == ( p ^ q ) * ( p ^ r )

The first law can be shown to be true by comparing columns 5 and 8 of the following truth table:

```p  q  r  |  q∨r  p∧(q∨r)  p∧q  p∧r  (p∧q)∨(p ∧ r)
T  T  T  |   T     T        T    T         T
T  T  F  |   T     T        T    F         T
T  F  T  |   T     T        F    T         T
T  F  F  |   F     F        F    F         F
F  T  T  |   T     F        F    F         F
F  T  F  |   T     F        F    F         F
F  F  T  |   T     F        F    F         F
F  F  F  |   F     F        F    F         F
```

To prove the second law holds, consider the negation of each side, using DeMorgan's Laws:

negation of LHS= ¬(p∨(q∧r)) ≡ (¬p)∧(¬(q∧r)) ≡ (¬p)∧((¬q)∨(¬r))
negation of RHS= ¬((p∨q)∧(p∨r)) ≡ (¬(p∨q))∨(¬(p∨r)) ≡ ((¬p)∧(¬q))∨((¬p)∧(¬r))

From the first distributive law, the right-hand sides of the above two expressions are equivalent. Thus the negations of the L- and RHS of the second distributive law are equal: thus they are equal (negate again and the negations cancel, leaving the L- and RHS) and the second law must hold.

The distributive laws also hold for sets, with union in place of logical or, and intersection in place of logical and:

p ( q r ) ≡ ( p ∩ q ) ∪ ( p ∩ r )
p ∪ ( q ∩ r ) ≡ ( p ∪ q ) ∩ ( p ∪ r )