Symmetric set difference and odd number of sets containing x

alternative-proofcombinatoricsinduction

Let $A_1,A_2,\ldots,A_n$ be non-empty sets, $n\in\Bbb N$.
$$x\in A_1\triangle A_2\triangle\ldots\triangle A_n\;\iff x\text{ is in an odd number of sets}$$

In the script, this was proven by mathematical induction, but I have another question. Link to a related question

(1) base $$n=1, \;x\in A_1 \iff \; x\text{ is in an odd number of sets}$$

(3) the assumption: the statement $$x\in A_1\triangle A_2\triangle\ldots\triangle A_n\;\iff x\text{ is in an odd number of sets}$$ is true for some number $n\in \mathbb N.$

(3) step of the induction:

$\begin{aligned}x\in A_1\triangle A_2\triangle\ldots\triangle A_n\triangle A_{n+1}&\\\iff\left(x\in A_1\triangle A_2\triangle\ldots\triangle A_n\;\land x\notin A_{n+1}\right)&\\\lor\left(x\notin A_1\triangle A_2\triangle\ldots\triangle A_n\;\land x\in A_{n+1}\right)
\\\left(x\text{ is in an odd number of sets }A_1,A_2,\ldots,A_n\;\land x\notin A_{n+1}\right)&\\\lor\left(x\text{ is in an even number of sets }A_1,A_2,\ldots,A_n\land x\in A_{n+1}\right)\end{aligned}$

Now, when I have this in mind, how can I prove it without induction? Is there any other way?

Best Answer

Here's a proof that I feel is more intuitive. First of all, define the XOR ("exclusive or") operator $\oplus$ as follows: $$ p \oplus q\overset{\text{ def}}{\iff} (\lnot p \land q) \lor (p \land \lnot q). $$ Thus, $\triangle$ is defined by $$ x \in A_1 \triangle A_2 \iff (x\in A_1) \oplus (x\in A_2). $$ With that, the key is to see that $\oplus$ is really addition modulo $2$. In particular, here is a table for addition modulo 2 and a truth table for $\oplus$: $$ \begin{array}{c|cc} + & 0 & 1\\ \hline 0 & 0 & 1\\ 1 & 1 & 0 \end{array} \qquad \begin{array}{c|cc} \oplus & F & T\\ \hline F & F & T\\ T & T & F \end{array} $$ In other words, the identification $F \mapsto 0$, $T \mapsto 1$ is an isomorphism of abeliean groups. Thus, evaluating the statement $$ x \in A_1 \triangle A_2 \triangle \cdots \triangle A_n $$ amounts to evaluating $$ [[(x \in A_1) \oplus (x_1 \in A_2)] \oplus \cdots \oplus (x \in A_n)], $$ which is equivalent to evaluating the sum $$ [[x_1 + x_2] + \cdots + x_n] $$ modulo $2$ where $x_i$ is $0$ if $x \notin A_i$ and $1$ if $x \in A_i$. In other words, the result is true iff $x_1 + \cdots + x_n$ is equal to $1$ modulo $2$, which is to say that $x_1 + \cdots + x_n$ is odd.

Related Question