doc-src/Tutorial/Misc/GCD.thy
author wenzelm
Mon, 14 Aug 2000 18:47:32 +0200
changeset 9605 60d8c954390f
parent 5377 efb799c5ed3c
permissions -rw-r--r--
added 'declare' command; moved tactic emulations; tuned; renamed "res_inst_tac' etc. to 'rule_tac' etc.; tuned;

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