prove $((A \times A) \cup (B \times B) = C \times C) \to ((B\subseteq A \land A= C) \lor (A\subseteq B \land B= C))$ I could prove the statement, using another statement I was aware of. that $((A \times A) \cup (B \times B) = C \times C) \to ((A\subseteq B \lor B\subseteq A) \land (A \cup B \subseteq C)$.


*

*But my question is whether it's possible to prove the statment directly, and how.
(this is how I solved it using the above mentioned statment: 
From $\left(A\times A\right)\cup\left(B\times B\right)=\left(C\times C\right)$
it can easily be deduced that $A,B$ are subsets of $C$ or equivalently
that $A\cup B\subseteq C$.
Also from $\left(A\times A\right)\cup\left(B\times B\right)=\left(C\times C\right)$
it can easily be deduced that $C\subseteq A\cup B$, so actually we have
$C=A\cup B$.
If $b\in B\setminus A\wedge a\in A\setminus B$ then $\langle a,b\rangle\in C\times C=\left(A\times A\right)\cup\left(B\times B\right)$
leading to $b\in A\vee a\in B$. 
So a contradiction is found and
we conclude that $B\setminus A=\varnothing\vee A\setminus B=\varnothing$
or equivalently $B\subseteq A\vee A\subseteq B$.
finally, we got $((A \times A) \cup (B \times B) = C \times C) \to ((A\subseteq B \lor B\subseteq A) \land (A \cup B = C)$, but $((A\subseteq B \lor B\subseteq A) \land (A \cup B = C) \equiv (A\subseteq B \land A \cup B= C) \lor (B\subseteq A \land A \cup B = C) \equiv (A\subseteq B \land B= C) \lor (B\subseteq A \land A = C)$
Q.E.D.)

Assume that $(A\times A)\cup(B\times B)=C\times C$. If $x\in C$, then $\langle x,x\rangle\in C\times C$, so $\langle x,x\rangle\in A\times A$ or $\langle x,x\rangle\in B\times B$, and hence $x\in A$ or $x\in B$. Thus, $C\subseteq A\cup B$. 
On the other hand, $A\times A\subseteq C\times C$, so $A\subseteq C$, and similarly, $B\subseteq C$, so $A\cup B\subseteq C$, and it follows that $C=A\cup B$.
Suppose that $A\nsubseteq B$ and $B\nsubseteq A$, and let $a\in A\setminus B$ and $b\in B\setminus A$; then $a,b\in C$, so
$$\langle a,b\rangle\in(C\times C)\setminus\big((A\times A)\cup(B\times B)\big)=\varnothing\;,$$
which is absurd. Thus, $A\subseteq B$, or $B\subseteq A$. Without loss of generality assume that $A\subseteq B$. (If not, just interchange the names of $A$ and $B$.) Then $A\times A\subseteq B\times B$, so
$$C\times C=(A\times A)\cup(B\times B)=B\times B\;,$$
and it follows easily that $C=B$.
