doc-src/Tutorial/Misc/GCD.thy
author paulson
Mon, 12 Nov 2001 10:56:38 +0100
changeset 12156 d2758965362e
parent 5377 efb799c5ed3c
permissions -rw-r--r--
new-style numerals without leading #, along with generic 0 and 1

GCD = WF_Rel +
consts gcd :: "nat*nat => nat"
recdef gcd "measure ((%(m,n).n))"
  simpset "simpset() addsimps [mod_less_divisor]"
    "gcd (m, n) = (if n=0 then m else gcd(n, m mod n))"
end