triska / clpz

Constraint Logic Programming over Integers

Home Page:https://www.metalevel.at/prolog/clpz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tuples_in/2 non-relational

UWN opened this issue · comments

commented
?- A = 0, tuples_in([[A,A]],[[0,1],[2,0]]).
   false.
?-        tuples_in([[A,A]],[[0,1],[2,0]]).
   A = 0, unexpected.

As followup to SWI-Prolog/swipl-devel#1160

commented
?- tuples_in([[A,A]],[[0,1],[1,0]]).
   A in 0..1, tuples_in([[A,A]],[[0,1],[1,0]]) % weak, but not incorrect
|  false.  % would be much better
commented

Maybe more convincing:

?-        tuples_in([[A,B]],[[0,1],[2,0]]), A = B.
   false.
?- A = B, tuples_in([[A,B]],[[0,1],[2,0]]), A = B.
   A = 0, B = 0, unexpected.