$f(x,y) := \begin{cases} f(x-y,y) \hspace{0.5cm} if \hspace{0.5cm} x > y\\ f(x, y-x) \hspace{0.5cm} if \hspace{0.5cm} y > x\\ x \hspace{2.2cm} if \hspace{0.5cm} x= y \end{cases}$
Define a well founded order on $\mathbb{N} x \mathbb{N}$ and prove by induction that $\forall x, y \in N: f(x,y) = \operatorname{gcd}(x,y)$.
Regarding the well founded order, I once read in a book that $({\mathbb{N}}^{k}, \leq)$ with $(k \geq 1)$ is always a well founded order. Here we have $k=2$. So would this answer suffice or it is intuitively clear but how could I prove it being well-founded?
Regarding the induction the third case is obvious, I think I have to the induction for the first case and the second would be analogous to the first?
Base case: $x=2, y= 1$
$f(2,1) = f(2-1,1) = f(1,1) = 1$
I have seen this question was asked already here. The solution suggestion is with diagonal sets. is there another way to show this?