GCD from Prime Decomposition/General Result

Theorem
Let $n \in \N$ be a natural number such that $n \ge 2$.

Let $\N_n$ be defined as:
 * $\N_n := \set {1, 2, \dotsc, n}$.

Let $A = \set {a_1, a_2, \dotsc, a_n} \subseteq \in \Z$ be a set of $n$ integers.

From Expression for Integers as Powers of Same Primes, let:


 * $\displaystyle \forall i \in \N_n: a_i = \prod_{p_j \mathop \in T} p_j^{k_{i j} }$

where:
 * $T = \set {p_j: j \in \N_r}$

such that:
 * $\forall j \in \N_{r - 1}: p_j < p_{j - 1}$


 * $\forall j \in \N_r: \exists i \in \N_n: p_j \divides a_i$

where $\divides$ denotes divisibility.

Then:
 * $\displaystyle \map \gcd A = \prod_{j \mathop \in \N_r} p_j^{\min \set {k_{i j}: i \in \N_n} }$

where $\map \gcd A$ denotes the greatest common divisor of $a_1, a_2, \dotsc, a_n$.