So far I have encountered with two definitions of the GCD of $a$ and $b$.
The first definition is:
$\gcd(a,b)$ is an integer that has the following properties:
$d>0$
$d\mid a$ and $d\mid b$
any common divisor $u$ of $a$ and $b$ also divides $d$
The second definition I saw is:
The greatest common divisor of two integers $a$ and $b$ (not both zero) is the largest integer which divides both of them.
Can someone please show me the equivalence of these two definitions without using any theorems. thanks!
For clarity, let's record these lemmas:
Now, let $a$ and $b$ be integers, and let $d$ be an integer such that $d\mid a$ and $d\mid b$.
Suppose that $d>0$ and that $d$ satisfies $u\mid d$ for any other integer $u$ with $u\mid a$ and $u\mid b$. Then by our first lemma, $d$ satisfies $d\geq u$ for any integer $u$ with $u\mid a$ and $u\mid b$.
Conversely, suppose that $d$ satisfies $d\geq u$ for any integer $u$ with $u\mid a$ and $u\mid b$. Then in particular $d\geq -d$ which means that $d>0$. If $u$ is any integer with $u\mid a$ and $u\mid b$, then each of $a$ and $b$ are a common multiple of $u$ and $d$, so that $\mathrm{lcm}(u,d)\mid a$ and $\mathrm{lcm}(u,d)\mid b$ by our second lemma. Therefore, by our assumption about $d$, we have that $d\geq \mathrm{lcm}(u,d)$ for any $u$ with $u\mid a$ and $u\mid b$, which implies that $u\mid d$ for any $u$ with $u\mid a$ and $u\mid b$.