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