Basic set theory proof about cardinality of cartesian product of two finite sets I'm really lost on how to do this proof:
If $S$ and $T$ are finite sets, show that $|S\times T| = |S|\times |T|$.
(where $|S|$ denotes the number of elements in the set)
I understand why it is true, I just can't seem to figure out how to prove it.
Any hints/help will be greatly appreciated!

Let $\underline{n} = \{ 1,\dots,n\}$.
Define $\phi: \underline{|S||T|} \to \underline{|S|} \times \underline{|T|}$ by
$\phi(n) = \left(1+\frac{n-(n \mod |T|)}{|T|},1+(n \mod |T|) \right)  $.
This corresponds to dividing $n$ by $|T|$, taking the quotient and remainder, and adding one to both.
A little work shows that $\phi$ is a bijection – specifically, $\phi^{-1} (s,t) = (s-1)|T|+(t-1)$.
By definition of cardinality, there exists bijections $\sigma:\underline{|S|} \to S$,
$\tau:\underline{|T|} \to T$, so we define
$\xi: \underline{|S||T|} \to S \times T$ by
$\xi(n) = (\sigma([\phi(n)])_1, \tau([\phi(n)])_2 ) $.
It is straightforward to establish that $\xi \text{ is a bijection}$.
