@flawr Hi Flawr, sorry for the late answer:
here’s how you should do it. Note that I imported library clpfd in the header: this allows us to use #=, #>, etc., which are "declarative" versions of "is" (i.e., you can use them in any direction; it works with constraint logic programming under the hood)