[Math] GCD of an empty set

elementary-number-theorygcd-and-lcm

The empty sum and empty product have clear, widely accepted definitions. But I can't seem to find any such definition of an "empty GCD".

The GCD, I'm told, is associative. Hence, given a binary GCD function $\gcd(a, b)$, we can define the n-ary GCD function as $\gcd(a, b, c) \equiv \gcd(\gcd(a, b), c)$.

Extending this "below" the binary case, I'm pretty sure no-one would disagree that the unary case, $\gcd(a) = a$, makes sense. Then, can we say that $\gcd(a) = \gcd(a, \gcd())$?

If so, then we need a value $x = \gcd()$ such that $\forall a$, $\gcd(a, x) = a$. It seems to be an accepted convention that $\gcd(a, 0) \equiv a$, and I don't think there's any other candidate.

So, does it make sense to define $\gcd() \equiv 0$?

Motivation: I was implementing an n-ary gcd() function and got curious about whether I should require at least one argument.

Best Answer

Yes, the convention $\gcd \emptyset =0 $ makes sense.

Every integer divides all elements of $\emptyset$ thus the "greatest" among them is $0$, when "greatest" is understood with respect to the partial order given by divisibility, which is the appropriate notion of 'size' in this context.

Related Question