Euclid's Elements: Book I: Proposition 30
Proposition 30: Straight lines parallel to the same straight line are also parallel to one another.
Let each of the straight lines AB, CD be parallel to EF; I say that AB is also parallel to CD.
For let the straight line GK fall upon them;
Then, since the straight line GK has fallen on the parallel straight lines AB, EF, the angle AGK is equal to the angle GHF. I. 29
Again, since the straight line GK has fallen on the parallel straight lines EF, CD, the angle GHF is equal to the angle GKD. I. 29
But the angle AGK was also proved equal to the angle GHF; therefore the angle AGK is also equal to the angle GKD; C.N. 1 and they are alternate.
Therefore AB is parallel to CD.