A proof by contradiction.
Assume that x/y is a non-integer rational in lowest terms.
Define z := (x/y)², and q := floor (x/y). Then:
x/y - 1 < q < x/y
x - y < yq < x
-y < yq - x < 0
y > x - yq > 0
x/y = x(x - yq) / y(x-yq)
x/y = (xx -yqx) / y(x-yq)
x/y = (yyz-yqx) / y(x-yq)
x/y = (yz - qx) / (x-yq)
An equivalent fraction with a denominator lower than y has been found.
Contradiction: x/y is not in lowest terms.