This is not the type of goal we like to write, but here's how you can do it in core.logic:
(defn candidate-received-no-votes [candidate]
(conda
[(vote (lvar) candidate)
fail]
[succeed]))
conda/condu should both work here. It basically says, if there is a vote for the candidate, only consider that branch of the cond, which fails. I'm sad to say we've even formalized it in our core.logic support lib:
(defmacro fail-if
"fail if the given goal succeeds, use with extreme caution"
[goal]
`(conda [~goal fail]
[succeed]))
We've never had any success with the nafc goal in core.logic. I'm still not entirely sure what it's supposed to be doing. It seems to be introducing constraints. If it works, it certainly doesn't play nice with pldb.