$\begin{align} & \text{Let }P,Q\text{ and }R\text{ be set, prove that } \\ & \text{(i) }(P\cup Q)\cup R=P\cup (Q\cup R) \\ & (ii)\text{ }(P\cap Q)\cap R=P\cap (Q\cap R) \\\end{align}$
$\begin{align} & \text{Let }P,Q\text{ and }R\text{ be set, prove that } \\ & \text{(i) }(P\cup Q)\cup R=P\cup (Q\cup R) \\ & \text{From the L}\text{.H}\text{.S} \\ & \text{Let }x\in (P\cup Q)\cup R \\ & x\in (P\cup Q)\text{ or }x\in R \\ & x\in P\text{ or }x\in Q\text{ or }x\in R \\ & x\in P\text{ or }x\in (Q\cup R) \\ & x\in P\cup (Q\cup R) \\ & \therefore P\cup (Q\cup R)\subseteq (P\cup Q)\cup R----(i) \\ & \text{From the R}\text{.H}\text{.S} \\ & \text{Let }y\in P\cup (Q\cup R) \\ & y\in P\text{ or }y\in (Q\cup R) \\ & y\in P\text{ or }y\in Q\text{ or }y\in R \\ & y\in (P\cup Q)\text{ or }y\in R \\ & y\in (P\cup Q)\cup R \\ & (P\cup Q)\cup R\subseteq P\cup (Q\cup R)----(ii) \\ & \therefore (P\cup Q)\cup R=P\cup (Q\cup R)---proved \\ & \\ & \text{(ii)Let }P,Q\text{ and }R\text{ be set, prove that } \\ & (P\cap Q)\cap R=P\cap (Q\cap R) \\ & \text{From the L}\text{.H}\text{.S} \\ & \text{Let }x\in (P\cap Q)\cap R \\ & x\in (P\cap Q)\text{ and }x\in R \\ & x\in P\text{ and }x\in Q\text{ and }x\in R \\ & x\in P\text{ and }x\in (Q\cap R) \\ & x\in P\cap (Q\cap R) \\ & \therefore P\cap (Q\cap R)\subseteq (P\cap Q)\cap R----(i) \\ & \text{From the R}\text{.H}\text{.S} \\ & \text{Let }y\in P\cap (Q\cap R) \\ & y\in P\text{ and }y\in (Q\cap R) \\ & y\in P\text{ and }y\in Q\text{ and }y\in R \\ & y\in (P\cap Q)\text{ and }y\in R \\ & y\in (P\cap Q)\cap R \\ & (P\cap Q)\cap R\subseteq P\cap (Q\cap R)----(ii) \\ & \therefore (P\cap Q)\cap R=P\cap (Q\cap R)---proved \\\end{align}$
