Go backward to Specification Go up to Top Go forward to Verification |
New knowledge:
(0) forall m in N, n <= m: gcd(m, n) = gcd(m-n, n).
Idea for recursive function definition (termination term m+n):
Euclid(m, n) := if m = 0 then n else if n = 0 then m else if n <= m then Euclid(m-n, n) else Euclid(m, n-m).