In my lecture notes, and also on many websites, the definition of the highest common factor of two elements in an integral domain $R$, say $a$ and $b$, is an element $c$ such that:
- $c|a$ and $c|b$
- $d|a$ and $d|b$ $\implies$ $d|c$
But when I think of an example, say the ring $\mathbb{Z}$, and take $a=14,b=28$, it is clear (from the simple integer definition) that $\mathrm{hcf}(14,28)$ is $7$. However, here $2$ is also a common factor, but $2$ does not divide $7$. So by the above definition, $7$ is not the highest common factor.
What am I missing here? I am assuming I must be making some very very simple mistake, but can't spot it!
Note $\,\gcd(14,28) = 14,\,$ not $\,7.\,$ If $\,a\mid b\,$ then $\,c\mid a,b \iff \,c\mid a,\,$ so $\,\gcd(a,b) = a.\ \ $
Remark $\ $ The definition is written more naturally as
$$ c\mid a,b\iff c\mid\gcd(a,b)$$
since $(1)$ follows by specializing $\,c = \gcd(a,b)\,$ above.