Proof

We prove the first equality. The proof of the second is left to the reader.

We certainly have:

min{ordp(a), ordp(b)} leq ordp(a)

and

min{ordp(a), ordp(b)} leq ordp(b).

Hence the right-hand side of the equality is a common divisor of a and b. On the other hand, if ordp(ggd(a,b)) = r > 0 for some prime p, then p divides both a and b so that we can conclude that r leq ordp(a) en r leq ordp(b). Hence

 prod p prime pmin{ordp(a), ordp(b)}

equals gcd(a,b).