Actually what I desire to get as a result is only the first three solutions:
#{(0 1 1 0) (1 1 0 0) (0 0 1 1)}
I noticed that, in order to get this solution, I can just replace
([[] vars])
with
([[] vars]
(l/everyg #(l/== % 0) vars))
and it seems to work fine for my program, and I agree that this change is necessary for it to work as intended.
Anyway, without this change, what I really think it should return is:
#{(0 1 1 0) (1 1 0 0) (0 0 1 1) (1 1 1 0) (1 1 0 1) (1 1 1 1) (0 1 1 1)}
So, in my opinion, both of the solutions (4 or 5 results) are incorrect, core.logic is adding a few extra results and missing others.