The problem is: prove if A, B, and C are sets and $A \times C = B \times C$, then A = B.
I decided to prove it and wrote this proof:
Proof. First we will show that if A, B, and C are sets and $A \times C = B \times C$, then $A \subseteq B$. Assume $(x,y) \in A \times C$. Thus, $x \in A$ by definition of cartesian product. Hence, $(x,y) \in B \times C$ by definition of subset (equal sets are subsets of each other). Consequently, $x \in B$ by definition of cartesian product. Therefore $x \in A$ implies $x \in B$, so it follows that $A \subseteq B$.
Conversely, we will show that if A, B, and C are sets and $A \times C = B \times C$, then $B \subseteq A$. Assume $(x,y) \in B \times C$. Thus $x \in B$ by definition of cartesian product. Hence $(x,y) \in A \times B$ by definition of subset (equal sets are subsets of each other). Consequently, $x \in A$ by definition of cartesian product. Therefore, $x \in B$ implies $x \in A$, so it follows that $B \subseteq A$.
Hence, we have shown that $A \subseteq B$ and $B \subseteq A$, so $A = B$.
IS IT CORRECT?