Now either they are not in continued proportion, and the extremes of them are prime to one another; or they are in continued proportion, and the extremes of them are not prime to one another; or they are not in continued proportion, nor are the extremes of them prime to one another; or they are in continued proportion, and the extremes of them are prime to one another.

If then A, B, C are in continued proportion, and the extremes of them A, C are prime to one another, it has been proved that it is impossible to find a fourth proportional number to them. [[IX. 17](elem.9.17)]

<*>Next, let A, B, C not be in continued proportion, the extremes being again prime to one another; I say that in this case also it is impossible to find a fourth proportional to them.

For, if possible, let D have been found, so that, as A is to B, so is C to D, and let it be contrived that, as B is to C, so is D to E.

Now, since, as A is to B, so is C to D, and, as B is to C, so is D to E, therefore, ex aequali, as A is to C, so is C to E. [[VII. 14](elem.7.14)]

But A, C are prime, primes are also least, [[VII. 21](elem.7.21)] and the least numbers measure those which have the same ratio, the antecedent the antecedent and the consequent the consequent. [[VII. 20](elem.7.20)]

Therefore A measures C as antecedent antecedent.

But it also measures itself; therefore A measures A, C which are prime to one another: which is impossible.

Therefore it is not possible to find a fourth proportional to A, B, C.<*>

Next, let A, B, C be again in continued proportion, but let A, C not be prime to one another.

I say that it is possible to find a fourth proportional to them.

For let B by multiplying C make D; therefore A either measures D or does not measure it.

First, let it measure it according to E; therefore A by multiplying E has made D.

But, further, B has also by multiplying C made D; therefore the product of A, E is equal to the product of B, C; therefore, proportionally, as A is to B, so is C to E; [[VII. 19](elem.7.19)] therefore E has been found a fourth proportional to A, B, C.

Next, let A not measure D; I say that it is impossible to find a fourth proportional number to A, B, C.

For, if possible, let E have been found; therefore the product of A, E is equal to the product of B, C. [[VII. 19](elem.7.19)]

But the product of B, C is D; therefore the product of A, E is also equal to D.

Therefore A by multiplying E has made D; therefore A measures D according to E, so that A measures D.

But it also does not measure it: which is absurd.

Therefore it is not possible to find a fourth proportional number to A, B, C when A does not measure D.

Next, let A, B, C not be in continued proportion, nor the extremes prime to one another.

And let B by multiplying C make D.

Similarly then it can be proved that, if A measures D, it is possible to find a fourth proportional to them, but, if it does not measure it, impossible. Q. E. D.