previous up next
Go backward to Euclid's Algorithm
Go up to Top
Go forward to Verification (Continued)
RISC-Linz logo

Verification

forall m in N, n in N: (m != 0 \/ n != 0) => Euclid(m, n) = gcd(m, n).
Proof by complete induction on term m+n.

We take arbitrary m in N and n in N and assume

(1) forall x in N, y in N: x+y < m+n =>
      (x != 0 \/ y != 0) => Euclid(x, y) = gcd(x, y).
We have to prove
(2) (m != 0 \/ n != 0) => Euclid(m, n) = gcd(m, n).
We assume (3) (m != 0 \/ n != 0) and prove (4) Euclid(m, n) = gcd(m, n).
Author: Wolfgang Schreiner
Last Modification: November 24, 1999

previous up next