Definition:Greatest Common Divisor/Integral Domain

Definition
Let $\struct {D, +, \times}$ be an integral domain whose zero is $0$.

Let $a, b \in D: a \ne 0 \lor b \ne 0$.

Let $d \divides a$ denote that $d$ is a divisor of $a$.

Let $d \in D$ have the following properties:


 * $(1): \quad d \divides a \land d \divides b$
 * $(2): \quad c \divides a \land c \divides b \implies c \divides d$

Then $d$ is called a greatest common divisor of $a$ and $b$ (abbreviated GCD or gcd) and denoted $\gcd \set {a, b}$.

That is, in the integral domain $D$, $d$ is the GCD of $a$ and $b$ :
 * $d$ is a common divisor of $a$ and $b$
 * Any other common divisor of $a$ and $b$ also divides $d$.

We see that, trivially:
 * $\gcd \set {a, b} = \gcd \set {b, a}$

so the set notation is justified.

Also see
Note that, in the general integral domain, there is no guarantee that any GCD so defined either exists or is actually unique.

However, see Elements of Euclidean Domain have Greatest Common Divisor where it is shown that the same does not apply to a Euclidean domain.