Go backward to Example: Greatest Common DivisorGo up to TopGo forward to Euclid's Algorithm |

We can show that

i.e., gcd(0, 0) is undefined, but that, ifforallzinN:existsw:w| 0 /\w>z

i.e., gcd(existszinN:z|x/\z|y/\ (forallw: (w|x/\w|y) =>w<=z).

Thus our problem is to find some `f` that implements the specification

in a more efficient way than gcd does.forallminN,ninN: (m!= 0 \/n!= 0) => f(m,n) = gcd(m,n).

Author: Wolfgang Schreiner

Last Modification: November 24, 1999