# Question about clpfd and "insufficiently instantiated variables"

**URL:** <https://swi-prolog.discourse.group/t/question-about-clpfd-and-insufficiently-instantiated-variables/7136>\
**Category:** General\
**Created:** [December 31, 2023, 5:30pm UTC](https://swi-prolog.discourse.group/t/question-about-clpfd-and-insufficiently-instantiated-variables/7136 "2023-12-31T17:30:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesperes](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jesperes/32/6071_2.png) [@jesperes](https://swi-prolog.discourse.group/u/jesperes)\
**Post date:** [December 31, 2023, 5:30pm UTC](https://swi-prolog.discourse.group/t/question-about-clpfd-and-insufficiently-instantiated-variables/7136/1 "2023-12-31T17:30:27Z")

</div>

I’m trying to declare a constraint variable to be in one of two intervals, say [0…3] or [5…6]. I imagined that I should be able to do this:

```prolog
?- X in 0..3 #\/ X in 5..6, label([X]).
ERROR: Arguments are not sufficiently instantiated
ERROR: In:
ERROR: [14] throw(error(instantiation_error,_29172))
ERROR: [11] clpfd:'__aux_maplist/2_must_be_finite_fdvar+0'([_29206]) at /usr/lib/swi-prolog/library/clp/clpfd.pl:1745
ERROR: [10] clpfd:labeling([],[_29244]) at /usr/lib/swi-prolog/library/clp/clpfd.pl:1748
ERROR: [7] <user>
ERROR: 
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.

```

Am I misunderstanding something, or is this a limitation in SWI Prolog?

---

<div class="post-metadata">

**Author:** ![CapelliC](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/capellic/32/17_2.png) [@CapelliC](https://swi-prolog.discourse.group/u/CapelliC)\
**Post date:** [December 31, 2023, 6:18pm UTC](https://swi-prolog.discourse.group/t/question-about-clpfd-and-insufficiently-instantiated-variables/7136/2 "2023-12-31T18:18:27Z")

</div>

as specified [here](https://www.swi-prolog.org/pldoc/man?section=clpfd#sec:A.9.17.2), you need the (\/)/2 operator, and not the reification oriented (#\/)/2.

```prolog
?- X in 1..3 \/ 5..6, label([X]).
X = 1 ;
X = 2 ;
X = 3 ;
X = 5 ;
X = 6.

```

---

<div class="post-metadata">

**Author:** ![jesperes](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jesperes/32/6071_2.png) [@jesperes](https://swi-prolog.discourse.group/u/jesperes)\
**Post date:** [December 31, 2023, 8:05pm UTC](https://swi-prolog.discourse.group/t/question-about-clpfd-and-insufficiently-instantiated-variables/7136/3 "2023-12-31T20:05:10Z")

</div>

Yes, that solved the problem. Thanks!
