Euclidean Algorithm proof