Polynomials are in Q[X].
An ad hoc proof that (up to a nonzero scalar factor) this is the greatest common divisor runs as follows. Divide X3 - 1 by X2 - 1. This yields
From this identity we read off that every common divisor of X2 - 1 and X3 - 1 must also be a divisor of X - 1.