Greatest common divisor

For a finite sequence
Let $$R$$ be a commutative unital ring and $$a_1, a_2, \dots, a_n \in R$$. An element $$d \in R$$ is termed a greatest common divisor or gcd of $$a_1,a_2,\dots,a_n$$ if it satisfies the following equivalent conditions:


 * $$d|a_i$$ for all $$1 \le i \le n$$ and if $$c|a_i$$ for all $$1 \le i \le n$$, then $$c | d$$.
 * $$c|a_i$$ for all $$1 \le i \le n$$ if and only if $$c | d$$.
 * The ideal $$(d)$$ is the intersection of all the principal ideals of $$R$$ containing $$(a_1, a_2, \dots, a_n)$$.

The greatest common divisor of a finite set of elements is not unique; if two elements are both greatest common divisors of $$a_1,a_2, \dots, a_n$$, then they are associate elements.

For any set
Let $$R$$ be a commutative unital ring and $$S$$ be a subset of $$R$$. An element $$d \in R$$ is termed a greatest common divisor of $$S$$ if it satisfies the following equivalent conditions:


 * $$d|a$$ for all $$a \in S$$, and if $$c|a$$ for all $$a \in S$$, then $$c|d$$.
 * $$c|a$$ for all $$a \in S$$ if and only if $$c|d$$.
 * The ideal $$(d)$$ is the intersection of all the principal ideals of $$R$$ containing $$S$$.

Facts

 * Greatest common divisors of the same subset form an associate class