Theory:

Distributive property of intersection over union
For any three sets \(A\), \(B\) and \(C\): \(A \cap (B \cup C)\) \(=\) \((A \cap B)\) \(\cup\) \((A \cap C)\)
Let \(A\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\), \(B\) \(=\) \(\{\)\(n\), \(o\), \(p\), \(q\), \(r\)\(\}\) and \(C\) \(=\) \(\{\)\(l\), \(n\), \(p\), \(r\)\(\}\)
 
L.H.S: \(A \cap (B \cup C)\)
 
\(B \cup C\) \(=\) \(\{\)\(n\), \(o\), \(p\), \(q\), \(r\)\(\}\) \(\cup\) \(\{\)\(l\), \(n\), \(p\), \(r\)\(\}\)
 
\(B \cup C\) \(=\) \(\{\)\(l\), \(n\), \(o\), \(p\), \(q\), \(r\)\(\}\)
 
\(A \cap (B \cup C)\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\) \(\cap\) \(\{\)\(l\), \(n\), \(o\), \(p\), \(q\), \(r\)\(\}\)
 
\(A \cap (B \cup C)\) \(=\) \(\{\)\(l\), \(n\), \(o\), \(p\)\(\}\) - - - - - - - - - (I)
 
R.H.S: \((A \cap B)\) \(\cup\) \((A \cap C)\)
 
\(A \cap B\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\) \(\cap\) \(\{\)\(n\), \(o\), \(p\), \(q\), \(r\)\(\}\)
 
\(A \cap B\) \(=\) \(\{\)\(n\), \(o\), \(p\)\(\}\)
 
\(A \cap C\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\) \(\cap\) \(\{\)\(l\), \(n\), \(p\), \(r\)\(\}\)
 
\(A \cap C\) \(=\) \(\{\)\(l\), \(n\), \(p\)\(\}\)
 
\((A \cap B)\) \(\cup\) \((A \cap C)\) \(=\) \(\{\)\(n\), \(o\), \(p\)\(\}\) \(\cup\) \(\{\)\(l\), \(n\), \(p\)\(\}\)
 
\((A \cap B)\) \(\cup\) \((A \cap C)\) \(=\) \(\{\)\(l\), \(n\), \(o\), \(p\)\(\}\) - - - - - - - - - (II)
 
From (I) and (II), we see that:
 
\(A \cap (B \cup C)\) \(=\) \((A \cap B)\) \(\cup\) \((A \cap C)\)
 
This is called distributive property of intersection over union.
Distributive property of union over intersection
For any three sets \(A\), \(B\) and \(C\): \(A \cup (B \cap C)\) \(=\) \((A \cup B)\) \(\cap\) \((A \cup C)\)
Let \(A\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\), \(B\) \(=\) \(\{\)\(n\), \(o\), \(p\), \(q\), \(r\)\(\}\) and \(C\) \(=\) \(\{\)\(l\), \(n\), \(p\), \(r\)\(\}\)
 
L.H.S: \(A \cup (B \cap C)\)
 
\(B \cap C\) \(=\) \(\{\)\(n\), \(o\), \(p\), \(q\), \(r\)\(\}\) \(\cap \) \(\{\)\(l\), \(n\), \(p\), \(r\)\(\}\)
 
\(B \cap C\) \(=\) \(\{\)\(n\), \(p\), \(r\)\(\}\)
 
\(A \cup (B \cap C)\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\) \(\cup \) \(\{\)\(n\), \(p\), \(r\)\(\}\)
 
\(A \cup (B \cap C)\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\), \(r\)\(\}\) - - - - - - - - - (I)
 
R.H.S: \((A \cup B)\) \(\cap\) \((A \cup C)\)
 
\(A \cup B\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\) \(\cup \) \(\{\)\(n\), \(o\), \(p\), \(q\), \(r\)\(\}\)
 
\(A \cup B\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\), \(q\), \(r\)\(\}\)
 
\(A \cup C\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\)\(\}\) \(\cup \) \(\{\)\(l\), \(n\), \(p\), \(r\)\(\}\)
 
\(A \cup C\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\), \(r\)\(\}\)
 
\((A \cup B)\) \(\cap \) \((A \cup C)\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\), \(q\), \(r\)\(\}\) \(\cap \) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\), \(r\)\(\}\)
 
\((A \cup B)\) \(\cap \) \((A \cup C)\) \(=\) \(\{\)\(l\), \(m\), \(n\), \(o\), \(p\), \(r\)\(\}\) - - - - - - - - - (II)
 
From (I) and (II), we see that:
 
\(A \cup (B \cap C)\) \(=\) \((A \cup B)\) \(\cap \) \((A \cup C)\)
 
This is called distributive property of intersection over union.
 
Important!
L.H.S – Left Hand Side
 
R.H.S – Right Hand Side