doc-src/Tutorial/Misc/GCD.thy
author kleing
Mon, 15 Oct 2001 21:04:32 +0200
changeset 11787 85b3735a51e1
parent 5377 efb799c5ed3c
permissions -rw-r--r--
canonical 'cases'/'induct' rules for n-tuples (n=3..7) (really belongs to theory Product_Type, but doesn't work there yet)

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