:- use_module(library(chr)).
:- chr_constraint gcd/1.

gcd1 @ gcd(0) <=> true.
gcd2 @ gcd(I) \ gcd(J) <=> I =< J | K is J - I, gcd(K).
