Relationship between the symmetric difference of two sets and their intersection How do we prove that the union of symmetric difference of two sets and their intersection is the same as the union of the two sets?
i.e. $(A\backslash B) \cup (A\cap B) \cup (B\backslash A) = A\cup B$
where $A, B$ are two sets?
I know how it is obvious. But I want a rigorous proof from definitions of difference and union and intersection.
 A: Let $a:=x\in A, b:=x\in B$. The truth table for $(A\setminus B)\cup (B\setminus A)$ as a function of $ab=FF,TF,FT,TT$ is $F,T,T,F$, and that for $A\cap B$ is $F,F,F,T$. Now taking the union, $F,T,T,T$ is indeed the table for $A\cup B$.

A: It is indeed important to gain proficiency in setting up the logical structure of proofs like this (as Brian M. Scott comments). The statement to be proved is
$$
(A\setminus B) \cup (A\cap B) \cup (B\setminus A) = A\cup B,
$$
which is equivalent (by definition of set equality) to the pair of inclusions
$$
(A\setminus B) \cup (A\cap B) \cup (B\setminus A) \subset A\cup B \quad\text{and}\quad
A\cup B \subset (A\setminus B) \cup (A\cap B) \cup (B\setminus A).
$$
The proof of the first inclusion has this structure, by definition of subset:

Assume that $x\in (A\setminus B) \cup (A\cap B) \cup (B\setminus A)$.
...
Therefore $x\in A\cup B$ as desired.

And by definition of union, we can further expand this to:

Assume that $x\in (A\setminus B) \cup (A\cap B) \cup (B\setminus A)$. In other words, assume that $x\in A\setminus B$ or $x\in A\cap B$ or $x\in B\setminus A$.
Case 1: $x\in A\setminus B$. ... ... Therefore $x\in A\cup B$.
Case 2: $x\in A\cap B$. ... ... Therefore $x\in A\cup B$.
Case 3: $x\in B\setminus A$. ... ... Therefore $x\in A\cup B$.
Therefore, in all cases, $x\in A\cup B$ as desired.

And the proof of the second inclusion has this structure:

Assume that $x\in A\cup B$.
...
Therefore $x\in (A\setminus B) \cup (A\cap B) \cup (B\setminus A)$ as desired.

In the course of filling in the "..." details of these proofs, you will indeed (explicitly or implicitly) be using the logical relationships described in Yves Daoust's answer. But this setting-up-the-structure skill is important for understanding why those logical relationships actually prove the statement you want to prove.
A: Maybe you were looking for a "computational" proof:
$$\underbrace{(A\backslash B)\cup(A\cap B)}_{A}\cup(B\backslash A)=A\cup (B\backslash A)=A\cup B.$$
In the first equality, I am using the fact that for any sets $A$ and $B$, we have
$$A=(A\backslash B)\cup (A\cap B).$$
Intuitively, this means that everything in $A$ either belongs to $B$ or it doesn't. For the second equality, it's just
$$A\cup (B\backslash A)=A\cup (B\cap A^c)=(A\cup B)\cap (A\cup A^c)=(A\cup B).$$
